重构了代码
This commit is contained in:
@@ -61,19 +61,10 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!-- 通讯协议-->
|
||||
<TextBlock Text="设备通信协议"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource TextBlockSubTitle}" />
|
||||
<ComboBox SelectedItem="{Binding Device.ProtocolType}"
|
||||
ItemsSource="{Binding Source={StaticResource protocolType} }">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Converter={StaticResource EnumDescriptionConverter}}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<CheckBox FontSize="16"
|
||||
Content="是否添加默认变量表"
|
||||
Margin="0 30 0 0"
|
||||
IsChecked="{Binding Device.IsAddDefVarTable}" />
|
||||
|
||||
</ikw:SimpleStackPanel>
|
||||
<!-- 右边列 -->
|
||||
|
||||
@@ -13,33 +13,4 @@ public partial class DeviceDialog
|
||||
DataContext = viewModel;
|
||||
}
|
||||
|
||||
private void OnPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
private void OnCloseButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
{
|
||||
var deferral = args.GetDeferral();
|
||||
deferral.Complete();
|
||||
}
|
||||
|
||||
private async void TryOpenAnother(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// try
|
||||
// {
|
||||
// await new TestContentDialog { Owner = Owner }.ShowAsync();
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// ErrorText.Text = ex.Message;
|
||||
// ErrorText.Visibility = Visibility.Visible;
|
||||
// }
|
||||
}
|
||||
|
||||
private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
|
||||
{
|
||||
// ErrorText.Text = string.Empty;
|
||||
// ErrorText.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user