|
|
@@ -6,6 +6,7 @@
|
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
|
+ xmlns:sysio="clr-namespace:System.IO.Ports;assembly=System"
|
|
|
xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels"
|
|
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
|
xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
|
|
|
@@ -52,6 +53,21 @@
|
|
|
<Setter Property="VerticalAlignment"
|
|
|
Value="Center" />
|
|
|
</Style>
|
|
|
+
|
|
|
+ <ObjectDataProvider x:Key="Parity"
|
|
|
+ MethodName="GetValues"
|
|
|
+ ObjectType="{x:Type sys:Enum}">
|
|
|
+ <ObjectDataProvider.MethodParameters>
|
|
|
+ <x:Type TypeName="sysio:Parity" />
|
|
|
+ </ObjectDataProvider.MethodParameters>
|
|
|
+ </ObjectDataProvider>
|
|
|
+ <ObjectDataProvider x:Key="StopBits"
|
|
|
+ MethodName="GetValues"
|
|
|
+ ObjectType="{x:Type sys:Enum}">
|
|
|
+ <ObjectDataProvider.MethodParameters>
|
|
|
+ <x:Type TypeName="sysio:StopBits" />
|
|
|
+ </ObjectDataProvider.MethodParameters>
|
|
|
+ </ObjectDataProvider>
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
<Grid>
|
|
|
@@ -1472,25 +1488,16 @@
|
|
|
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>
|
|
|
+ SelectedItem="{Binding SelectLightController.SerialPortConfig.Parity,Mode=TwoWay}"
|
|
|
+ ItemsSource="{Binding Source={StaticResource Parity}}"/>
|
|
|
<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>
|
|
|
+ SelectedItem="{Binding SelectLightController.SerialPortConfig.StopBits,Mode=TwoWay}"
|
|
|
+ ItemsSource="{Binding Source={StaticResource StopBits}}" />
|
|
|
<TextBlock Text="DataBits:"
|
|
|
Grid.Row="4"
|
|
|
Grid.Column="0"
|