|
|
@@ -14,6 +14,8 @@
|
|
|
xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
|
|
|
xmlns:c="clr-namespace:TeamAAS_VP.ValueConverter"
|
|
|
xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
|
|
+ xmlns:coreLights="clr-namespace:TeamAAS_VP.Core.Lights"
|
|
|
+ xmlns:io="clr-namespace:System.IO.Ports;assembly=System"
|
|
|
lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
|
|
|
lex:ResxLocalizationProvider.DefaultDictionary="Lang"
|
|
|
lex:LocalizeDictionary.DesignCulture="zh-CN"
|
|
|
@@ -25,6 +27,7 @@
|
|
|
x:Class="TeamAAS_VP.Views.SettingView"
|
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
FontFamily="{DynamicResource DefaultFont}">
|
|
|
+
|
|
|
<b:Interaction.Triggers>
|
|
|
<b:EventTrigger EventName="Loaded">
|
|
|
<b:InvokeCommandAction Command="{Binding LoadedCommand}" />
|
|
|
@@ -36,6 +39,19 @@
|
|
|
<c:RobotBrandToVisibiltyConverter x:Key="RobotBrandToVisibiltyConverterInverse"
|
|
|
Inverse="True" />
|
|
|
<c:PlcIdToNameConverter x:Key="PlcIdToNameConverter" />
|
|
|
+
|
|
|
+ <!-- Header text style: no wrap and trim with ellipsis, allows header to size to content -->
|
|
|
+ <Style x:Key="TabHeaderTextBlockStyle"
|
|
|
+ TargetType="TextBlock">
|
|
|
+ <Setter Property="TextWrapping"
|
|
|
+ Value="NoWrap" />
|
|
|
+ <Setter Property="TextTrimming"
|
|
|
+ Value="CharacterEllipsis" />
|
|
|
+ <Setter Property="HorizontalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="VerticalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ </Style>
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
<Grid>
|
|
|
@@ -52,16 +68,15 @@
|
|
|
<!--相机配置-->
|
|
|
<TabItem Margin="5,0">
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel Width="auto"
|
|
|
- Height="auto">
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="CameraPlusOutline" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="{lex:Loc SettingView_Camera_Text}" />
|
|
|
+ Text="{lex:Loc SettingView_Camera_Text}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
|
|
|
@@ -185,15 +200,15 @@
|
|
|
<!--机器人-->
|
|
|
<TabItem>
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel>
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="RobotIndustrialOutline" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="{lex:Loc 机器人}" />
|
|
|
+ Text="{lex:Loc 机器人}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
|
|
|
@@ -489,9 +504,9 @@
|
|
|
VerticalAlignment="Center"
|
|
|
Visibility="{Binding SelectRobot.RobotBrand,Converter={StaticResource RobotBrandToVisibiltyConverter}}" />
|
|
|
<!--编码格式-->
|
|
|
- <TextBlock Text="{lex:Loc 编码解码,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
- Grid.Row="7"
|
|
|
+ <TextBlock Grid.Row="7"
|
|
|
Grid.Column="0"
|
|
|
+ Text="{lex:Loc 编码解码,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
HorizontalAlignment="Right"
|
|
|
@@ -535,7 +550,7 @@
|
|
|
</DataTemplate>
|
|
|
</ComboBox.ItemTemplate>
|
|
|
</ComboBox>
|
|
|
- <ScrollViewer Grid.RowSpan="8"
|
|
|
+ <!--<ScrollViewer Grid.RowSpan="8"
|
|
|
Grid.Column="2"
|
|
|
HorizontalScrollBarVisibility="Auto"
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
@@ -733,7 +748,7 @@
|
|
|
Grid.Column="1"
|
|
|
Text="{Binding SelectRobot.PlcRobotParameter.CommandParameter.JogCmd}" />
|
|
|
</Grid>
|
|
|
- </ScrollViewer>
|
|
|
+ </ScrollViewer>-->
|
|
|
</Grid>
|
|
|
</ScrollViewer>
|
|
|
</Grid>
|
|
|
@@ -743,16 +758,15 @@
|
|
|
<!--Feeder-->
|
|
|
<TabItem>
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel Width="auto"
|
|
|
- Height="auto">
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="Vibrate" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="Feeder" />
|
|
|
+ Text="Feeder"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
|
|
|
@@ -1003,16 +1017,15 @@
|
|
|
<!--PLC-->
|
|
|
<TabItem>
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel Width="auto"
|
|
|
- Height="auto">
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="CellphoneLink" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="PLC" />
|
|
|
+ Text="PLC"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
|
|
|
@@ -1193,15 +1206,347 @@
|
|
|
HorizontalAlignment="Right"
|
|
|
VerticalAlignment="Center" />
|
|
|
<TextBox Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
+ Margin="10,0"
|
|
|
+ MinWidth="80"
|
|
|
+ TextAlignment="Center"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Width="{Binding ElementName=txt_plc_Id,Path=ActualWidth}"
|
|
|
+ Text="{Binding SelectPlc.NodeHeader,Mode=TwoWay}" />
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+ </ScrollViewer>
|
|
|
+ </Grid>
|
|
|
+ </TabItem>
|
|
|
+
|
|
|
+ <!--光源控制器-->
|
|
|
+ <TabItem>
|
|
|
+ <TabItem.Header>
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
+ <materialDesign:PackIcon Width="24"
|
|
|
+ Height="24"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Kind="TelevisionAmbientLight" />
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
+ Text="{lex:Loc 光源控制器}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
+ </StackPanel>
|
|
|
+ </TabItem.Header>
|
|
|
+
|
|
|
+ <Grid Margin="16">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="50" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <!--增删改查-->
|
|
|
+ <StackPanel Grid.ColumnSpan="2"
|
|
|
+ IsEnabled="{Binding IsAllowEdit}"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <Button Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
|
|
+ ToolTip="{lex:Loc 增加光源控制器}"
|
|
|
+ Command="{Binding AddLightControllerCommand}">
|
|
|
+ <materialDesign:PackIcon Kind="Plus" />
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ <Button Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
|
|
|
+ ToolTip="{lex:Loc 移除光源控制器}"
|
|
|
+ Margin="20,0"
|
|
|
+ Command="{Binding RemoveLightControllerCommand}">
|
|
|
+ <materialDesign:PackIcon Kind="DeleteForeverOutline" />
|
|
|
+ </Button>
|
|
|
+ <Button Style="{StaticResource MaterialDesignFloatingActionMiniSecondaryDarkButton}"
|
|
|
+ ToolTip="{lex:Loc 保存}"
|
|
|
+ Command="{Binding SaveLightControllersCommand}">
|
|
|
+ <materialDesign:PackIcon Kind="ContentSaveCheck" />
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
+ <!--控制器列表-->
|
|
|
+ <TreeView Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ SelectedItemChanged="TreeView_SelectedItemChanged">
|
|
|
+ <TreeViewItem Header="{lex:Loc 光源控制器列表}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Title4}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ IsExpanded="True"
|
|
|
+ ItemsSource="{Binding LightControllerList}">
|
|
|
+ <TreeViewItem.ItemTemplate>
|
|
|
+ <HierarchicalDataTemplate>
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <TextBlock FontSize="{DynamicResource Font.Size.Title4}">
|
|
|
+ <TextBlock.Text>
|
|
|
+ <MultiBinding StringFormat="{}{0}. {1}">
|
|
|
+ <Binding Path="Id" />
|
|
|
+ <Binding Path="Name" />
|
|
|
+ </MultiBinding>
|
|
|
+ </TextBlock.Text>
|
|
|
+ </TextBlock>
|
|
|
+
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="{lex:Loc 型号, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}"
|
|
|
+ Margin="10,0,0,0" />
|
|
|
+ <TextBlock Text="{Binding LightModel,Mode=TwoWay}"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Text="{lex:Loc 通道数, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}"
|
|
|
+ Margin="10,0,0,0" />
|
|
|
+ <TextBlock Text="{Binding ChannelCount,Mode=TwoWay}"
|
|
|
+ Style="{StaticResource MaterialDesignCaptionTextBlock}"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}" />
|
|
|
+ </StackPanel>
|
|
|
+ <Border Height="2"
|
|
|
+ Margin="0"
|
|
|
+ BorderThickness="2"
|
|
|
+ BorderBrush="Green" />
|
|
|
+ </StackPanel>
|
|
|
+ </HierarchicalDataTemplate>
|
|
|
+ </TreeViewItem.ItemTemplate>
|
|
|
+ </TreeViewItem>
|
|
|
+ </TreeView>
|
|
|
+ <!--参数详情-->
|
|
|
+ <ScrollViewer Grid.Row="1"
|
|
|
+ IsEnabled="{Binding IsAllowEdit}"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="20"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Top"
|
|
|
+ Visibility="{Binding SelectLightController,Converter={StaticResource ObjectToVisibilityConverter}}">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <!-- Id -->
|
|
|
+ <TextBlock Text="Id: "
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBlock Text="{Binding SelectLightController.Id}"
|
|
|
+ Grid.Row="0"
|
|
|
Grid.Column="1"
|
|
|
- FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
Margin="10,0"
|
|
|
- MinWidth="80"
|
|
|
- TextAlignment="Center"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Width="{Binding ElementName=txt_plc_Id,Path=ActualWidth}"
|
|
|
- Text="{Binding SelectPlc.NodeHeader,Mode=TwoWay}" />
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+
|
|
|
+ <!-- Name -->
|
|
|
+ <TextBlock Text="{lex:Loc 名称, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBox Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ Text="{Binding SelectLightController.Name,Mode=TwoWay}" />
|
|
|
+
|
|
|
+ <!-- Model -->
|
|
|
+ <TextBlock Text="{lex:Loc 型号, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <ComboBox Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ SelectedItem="{Binding SelectLightController.LightModel,Mode=TwoWay}"
|
|
|
+ ItemsSource="{ext:EnumBindingSource EnumType=coreLights:LightModel}" />
|
|
|
+
|
|
|
+ <!-- Channel count -->
|
|
|
+ <TextBlock Text="{lex:Loc 通道数, Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBox Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ Text="{Binding SelectLightController.ChannelCount,Mode=TwoWay}"
|
|
|
+ IsReadOnly="True" />
|
|
|
+
|
|
|
+ <!-- Channel configs list -->
|
|
|
+ <TextBlock Text="{lex:Loc 通道配置}"
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="0"
|
|
|
+ Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Top" />
|
|
|
+ <ItemsControl Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="10,0"
|
|
|
+ ItemsSource="{Binding SelectLightController.ChannelConfigs}">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal"
|
|
|
+ Margin="0,4">
|
|
|
+ <TextBlock Text="{Binding LocalIndex}"
|
|
|
+ Width="30"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBox Text="{Binding Name,Mode=TwoWay}"
|
|
|
+ Width="180"
|
|
|
+ Margin="6,0" />
|
|
|
+ <TextBlock Text="亮度:"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="6,0" />
|
|
|
+ <TextBox Text="{Binding DefaultBrightness,Mode=TwoWay}"
|
|
|
+ Width="80" />
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+
|
|
|
+ <!-- Serial port config (visible for serial model) -->
|
|
|
+ <GroupBox Grid.Row="5"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ Header="串口配置"
|
|
|
+ Margin="0,12,0,0">
|
|
|
+ <GroupBox.Style>
|
|
|
+ <Style TargetType="GroupBox">
|
|
|
+ <Setter Property="Visibility"
|
|
|
+ Value="Collapsed" />
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding SelectLightController.LightModel}"
|
|
|
+ Value="{x:Static coreLights:LightModel.KCS_KDC_12V60W_4T}">
|
|
|
+ <Setter Property="Visibility"
|
|
|
+ Value="Visible" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </GroupBox.Style>
|
|
|
+ <Grid Margin="10">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <TextBlock Text="PortName:"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <TextBox Text="{Binding SelectLightController.SerialPortConfig.PortName,Mode=TwoWay}"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="6,0" />
|
|
|
+ <TextBlock Text="BaudRate:"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <TextBox Text="{Binding SelectLightController.SerialPortConfig.BaudRate,Mode=TwoWay}"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="6,0" />
|
|
|
+ <TextBlock Text="Parity:"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <ComboBox Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ SelectedItem="{Binding SelectLightController.SerialPortConfig.Parity,Mode=TwoWay}">
|
|
|
+ <ComboBoxItem Content="{x:Static io:Parity.None}" />
|
|
|
+ <ComboBoxItem Content="{x:Static io:Parity.Odd}" />
|
|
|
+ <ComboBoxItem Content="{x:Static io:Parity.Even}" />
|
|
|
+ <ComboBoxItem Content="{x:Static io:Parity.Mark}" />
|
|
|
+ <ComboBoxItem Content="{x:Static io:Parity.Space}" />
|
|
|
+ </ComboBox>
|
|
|
+ <TextBlock Text="StopBits:"
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <ComboBox Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ SelectedItem="{Binding SelectLightController.SerialPortConfig.StopBits,Mode=TwoWay}">
|
|
|
+ <ComboBoxItem Content="{x:Static io:StopBits.None}" />
|
|
|
+ <ComboBoxItem Content="{x:Static io:StopBits.One}" />
|
|
|
+ <ComboBoxItem Content="{x:Static io:StopBits.OnePointFive}" />
|
|
|
+ <ComboBoxItem Content="{x:Static io:StopBits.Two}" />
|
|
|
+ </ComboBox>
|
|
|
+ <TextBlock Text="DataBits:"
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <TextBox Text="{Binding SelectLightController.SerialPortConfig.DataBits,Mode=TwoWay}"
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="6,0" />
|
|
|
+ </Grid>
|
|
|
+ </GroupBox>
|
|
|
+
|
|
|
+ <!-- TCP config (visible for non-serial models) -->
|
|
|
+ <GroupBox Grid.Row="5"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ Header="TCP 配置"
|
|
|
+ Margin="0,12,0,0">
|
|
|
+ <GroupBox.Style>
|
|
|
+ <Style TargetType="GroupBox">
|
|
|
+ <Setter Property="Visibility"
|
|
|
+ Value="Visible" />
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding SelectLightController.LightModel}"
|
|
|
+ Value="{x:Static coreLights:LightModel.KCS_KDC_12V60W_4T}">
|
|
|
+ <Setter Property="Visibility"
|
|
|
+ Value="Collapsed" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </GroupBox.Style>
|
|
|
+ <Grid Margin="10">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <TextBlock Text="IP:"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <TextBox Text="{Binding SelectLightController.TcpConfig.IP,Mode=TwoWay}"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="6,0" />
|
|
|
+ <TextBlock Text="Port:"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right" />
|
|
|
+ <TextBox Text="{Binding SelectLightController.TcpConfig.Port,Mode=TwoWay}"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="6,0" />
|
|
|
+ </Grid>
|
|
|
+ </GroupBox>
|
|
|
|
|
|
</Grid>
|
|
|
</ScrollViewer>
|
|
|
@@ -1211,16 +1556,15 @@
|
|
|
<!--通讯-->
|
|
|
<TabItem>
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel Width="auto"
|
|
|
- Height="auto">
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="Lan" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="{lex:Loc 通讯}" />
|
|
|
+ Text="{lex:Loc 通讯}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
<Grid Margin="20"
|
|
|
@@ -1450,16 +1794,15 @@
|
|
|
<!--生产排班-->
|
|
|
<TabItem>
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel Width="auto"
|
|
|
- Height="auto">
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="LanConnect" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="{lex:Loc 生产排班}" />
|
|
|
+ Text="{lex:Loc 生产排班}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
|
|
|
@@ -1474,15 +1817,15 @@
|
|
|
<!--字体-->
|
|
|
<TabItem>
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel>
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="FontSize" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="{lex:Loc 字体}" />
|
|
|
+ Text="{lex:Loc 字体}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
|
|
|
@@ -1639,16 +1982,15 @@
|
|
|
<!--语言-->
|
|
|
<TabItem>
|
|
|
<TabItem.Header>
|
|
|
- <StackPanel Width="auto"
|
|
|
- Height="auto">
|
|
|
+ <StackPanel HorizontalAlignment="Stretch">
|
|
|
<materialDesign:PackIcon Width="24"
|
|
|
Height="24"
|
|
|
HorizontalAlignment="Center"
|
|
|
Kind="TranslateVariant" />
|
|
|
- <TextBlock HorizontalAlignment="Center"
|
|
|
- TextWrapping="Wrap"
|
|
|
+ <TextBlock Style="{StaticResource TabHeaderTextBlockStyle}"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Text="{lex:Loc SettingView_Language_Text}" />
|
|
|
+ Text="{lex:Loc SettingView_Language_Text}"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
</StackPanel>
|
|
|
</TabItem.Header>
|
|
|
|
|
|
@@ -1709,13 +2051,6 @@
|
|
|
<Setter Property="BorderBrush"
|
|
|
Value="Green" />
|
|
|
</DataTrigger>
|
|
|
- <!--<DataTrigger Binding="{Binding management.CurrentLanguage}"
|
|
|
- Value="{x:Static enums:Language.Chinese}">
|
|
|
- <Setter Property="Background"
|
|
|
- Value="#e4ff54" />
|
|
|
- <Setter Property="BorderBrush"
|
|
|
- Value="#e4ff54" />
|
|
|
- </DataTrigger>-->
|
|
|
</Style.Triggers>
|
|
|
</Style>
|
|
|
</Button.Style>
|
|
|
@@ -1774,6 +2109,7 @@
|
|
|
</Button>
|
|
|
</StackPanel>
|
|
|
</TabItem>
|
|
|
+
|
|
|
</TabControl>
|
|
|
|
|
|
</Grid>
|