Pārlūkot izejas kodu

增强光源通道亮灭控制及界面优化

新增流程光源通道亮灭控制属性,完善数据绑定。更新多语言资源,支持“是否控制光源通道亮灭”文本。重构流程和相机参数界面,优化光源通道相关控件布局与样式,提升用户操作体验。
孝锋 徐 8 mēneši atpakaļ
vecāks
revīzija
5c821ce767

+ 10 - 0
TeamAAS-VM/Models/Product/ProcedureModel.cs

@@ -314,6 +314,16 @@ namespace TeamAAS_VP.Models
             set { SetProperty(ref _UserDefineParameters, value); }
         }
 
+        private bool _IsControlLightChannels;
+        /// <summary>
+        /// 是否控制光源通道亮灭
+        /// </summary>
+        public bool IsControlLightChannels
+        {
+            get { return _IsControlLightChannels; }
+            set { SetProperty(ref _IsControlLightChannels, value); }
+        }
+
         private ObservableCollection<ChannelConfig> _LightChannels;
         /// <summary>
         /// 光源通道配置集合。每个流程可配置多个光源通道及其默认亮度。

+ 9 - 0
TeamAAS-VM/Resources/Languages/Lang.Designer.cs

@@ -3300,6 +3300,15 @@ namespace TeamAAS_VP.Resources.Languages {
             }
         }
         
+        /// <summary>
+        ///   查找类似 是否控制光源通道亮灭 的本地化字符串。
+        /// </summary>
+        public static string 是否控制光源通道亮灭 {
+            get {
+                return ResourceManager.GetString("是否控制光源通道亮灭", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 是否清料? 的本地化字符串。
         /// </summary>

+ 3 - 0
TeamAAS-VM/Resources/Languages/Lang.resx

@@ -2111,4 +2111,7 @@
   <data name="请选择要启用的光源通道" xml:space="preserve">
     <value>请选择要启用的光源通道</value>
   </data>
+  <data name="是否控制光源通道亮灭" xml:space="preserve">
+    <value>是否控制光源通道亮灭</value>
+  </data>
 </root>

+ 3 - 6
TeamAAS-VM/Views/Product/CameraParams.xaml

@@ -174,8 +174,7 @@
                         <StackPanel Orientation="Vertical"
                                     Grid.Row="4"
                                     Grid.ColumnSpan="2"
-                                    Margin="5"
-                                    Visibility="{Binding IsHaveFeeder,Converter={StaticResource BooleanToVisibilityConverter}}">
+                                    Margin="5" >
                             <TextBlock Text="{lex:Loc 光源通道列表}"
                                        FontWeight="Bold" />
                             <ItemsControl ItemsSource="{Binding SelectProcedure.LightChannels}">
@@ -189,6 +188,7 @@
                                             </Grid.RowDefinitions>
                                             <TextBlock Width="120"
                                                        Grid.Row="0"
+                                                       HorizontalAlignment="Left"
                                                        VerticalAlignment="Center">
                                                 <TextBlock.Text>
                                                     <MultiBinding StringFormat="{}{0} . {1}">
@@ -214,13 +214,10 @@
                                                            Width="40"
                                                            VerticalAlignment="Center"
                                                            Margin="6,0" />
-                                                <Button Content="{lex:Loc 应用}"
-                                                        Margin="6,0"
-                                                        Command="{Binding DataContext.SetChannelBrightnessCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
-                                                        CommandParameter="{Binding}" />
                                             </StackPanel>
                                             <StackPanel Grid.Row="2"
                                                         Orientation="Horizontal"
+                                                        HorizontalAlignment="Right"
                                                         Margin="0,4">
                                                 <Button Content="打开"
                                                         Command="{Binding TurnOnCommand}"

+ 16 - 5
TeamAAS-VM/Views/Product/ProcessBasics.xaml

@@ -220,22 +220,33 @@
                         </DataTemplate>
                     </ComboBox.ItemTemplate>
                 </ComboBox>
-
-                <!-- 光源通道配置(已改为弹窗选择) -->
-                <TextBlock Text="{lex:Loc 光源通道,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
+                
+                <TextBlock Text="{lex:Loc 是否控制光源通道亮灭,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
                            Grid.Row="7"
-                           Grid.RowSpan="2" />
+                           Grid.Column="0" />
+                <ToggleButton Grid.Row="7"
+                              Grid.Column="1"
+                              Width="60"
+                              Height="30"
+                              HorizontalAlignment="Left"
+                              IsChecked="{Binding SelectProcedure.IsControlLightChannels,Mode=TwoWay}"/>
+
                 <Button Grid.Row="7"
                         Grid.Column="1"
                         HorizontalAlignment="Right"
                         materialDesign:HintAssist.Hint="{lex:Loc 选择光源通道}"
-                        Style="{StaticResource MaterialDesignFloatingActionButton}"
+                        Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
                         Command="{Binding SelectLightChannelCommand}">
                     <materialDesign:PackIcon Width="20"
                                              Height="20"
                                              Kind="ListBoxOutline" />
                 </Button>
 
+                <!-- 光源通道配置(已改为弹窗选择) -->
+                <TextBlock Text="{lex:Loc 光源通道,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
+                           Grid.Row="8"
+                           Grid.RowSpan="1" />
+
                 <ListBox Grid.Row="8"
                          Grid.Column="1"
                          ItemsSource="{Binding SelectProcedure.LightChannels}"