Kaynağa Gözat

增加图片带当前螺丝编号命名格式

KWD 6 ay önce
ebeveyn
işleme
3d3972e62e

+ 1 - 1
TeamAAS-VM/Interfaces/IRemoteCommandService.cs

@@ -240,7 +240,7 @@ namespace TeamAAS_VP.Interfaces
         /// <param name="InputTerminal"></param>
         /// <param name="InputTerminal"></param>
         /// <param name="outputCollection"></param>
         /// <param name="outputCollection"></param>
         /// <returns></returns>
         /// <returns></returns>
-        bool ExecutePhoto(int index, ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection, ImageParameters imgPara);
+        bool ExecutePhoto(int index, ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection, ImageParameters imgPara,int ScrewNum=1);
         /// <summary>
         /// <summary>
         /// 执行拍照二维码流程运行
         /// 执行拍照二维码流程运行
         /// </summary>
         /// </summary>

+ 2 - 1
TeamAAS-VM/Services/RemoteCommandService.cs

@@ -1456,7 +1456,7 @@ namespace TeamAAS_VP.Services
         /// 执行相机拍照并运行 ToolBlock,返回是否成功并通过 out 参数返回 Outputs。
         /// 执行相机拍照并运行 ToolBlock,返回是否成功并通过 out 参数返回 Outputs。
         /// 该方法会发布 RenderUpdateNotification 以更新 UI。
         /// 该方法会发布 RenderUpdateNotification 以更新 UI。
         /// </summary>
         /// </summary>
-        public bool ExecutePhoto(int index, ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection, ImageParameters imgPara)
+        public bool ExecutePhoto(int index, ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection, ImageParameters imgPara,int ScrewNum=1)
         {
         {
             try
             try
             {
             {
@@ -1532,6 +1532,7 @@ namespace TeamAAS_VP.Services
                         template.RegisterVariable("CameraName", () => procedure.CameraName);
                         template.RegisterVariable("CameraName", () => procedure.CameraName);
                         template.RegisterVariable("ShotCount", () => index);
                         template.RegisterVariable("ShotCount", () => index);
                         template.RegisterVariable("Result", () => Found ? "OK" : "NG");
                         template.RegisterVariable("Result", () => Found ? "OK" : "NG");
+                        template.RegisterVariable("Number", () => ScrewNum);
                         template.RegisterVariable("DateTime", () => DateTime.Now);
                         template.RegisterVariable("DateTime", () => DateTime.Now);
 
 
                         // 生成文件名
                         // 生成文件名

+ 1 - 0
TeamAAS-VM/ValueConverter/ImageFileNameFormatConverter.cs

@@ -23,6 +23,7 @@ namespace TeamAAS_VP.ValueConverter
                 template.RegisterVariable("CameraName", () => "MainCamera");
                 template.RegisterVariable("CameraName", () => "MainCamera");
                 template.RegisterVariable("ShotCount", () => 3);
                 template.RegisterVariable("ShotCount", () => 3);
                 template.RegisterVariable("Result", () => "OK");
                 template.RegisterVariable("Result", () => "OK");
+                template.RegisterVariable("Number", () => 1);
                 template.RegisterVariable("DateTime", () => DateTime.Now);
                 template.RegisterVariable("DateTime", () => DateTime.Now);
 
 
                 // 生成文件名
                 // 生成文件名

+ 1 - 1
TeamAAS-VM/Views/Product/ProcedureParams.xaml

@@ -459,7 +459,7 @@
                                 Grid.ColumnSpan="2"
                                 Grid.ColumnSpan="2"
                                 Orientation="Vertical"
                                 Orientation="Vertical"
                                 Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
                                 Visibility="{Binding ElementName=chbSaveImage,Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
-                        <TextBlock Text="示例:{ProductSN}_Daisy_KB Screw _01 _{CameraName}-Locate_{ShotCount}_WhiteRingLight_{Result}_{DateTime:yyyy-MM-dd_HH-mm-ss}"
+                        <TextBlock Text="示例:{ProductSN}_Daisy_KB Screw _01 _{CameraName}-Locate_{ShotCount}_WhiteRingLight_{Result}_Screw{Number}_{DateTime:yyyy-MM-dd_HH-mm-ss}"
                                    Foreground="LightGray"
                                    Foreground="LightGray"
                                    FontSize="10"
                                    FontSize="10"
                                    TextTrimming="CharacterEllipsis"
                                    TextTrimming="CharacterEllipsis"