2025-06-12 13:15:55 +08:00
|
|
|
<ui:ContentDialog
|
|
|
|
|
x:Class="PMSWPF.Views.Dialogs.DeviceDialog"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
|
|
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
|
|
|
xmlns:vmd="clr-namespace:PMSWPF.ViewModels.Dialogs"
|
|
|
|
|
x:Name="dialog"
|
|
|
|
|
Title="{Binding Title}"
|
|
|
|
|
d:DesignHeight="756"
|
|
|
|
|
d:DesignWidth="700"
|
|
|
|
|
CloseButtonText="取消"
|
|
|
|
|
Closed="OnClosed"
|
|
|
|
|
DefaultButton="Primary"
|
2025-06-12 18:41:46 +08:00
|
|
|
PrimaryButtonCommand="{Binding AddDeviceCommand}"
|
2025-06-12 13:15:55 +08:00
|
|
|
PrimaryButtonText="添加"
|
|
|
|
|
FullSizeDesired="False"
|
|
|
|
|
IsShadowEnabled="True"
|
|
|
|
|
d:DataContext="{d:DesignInstance vmd:DeviceDialogViewModel}"
|
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
<ikw:SimpleStackPanel Spacing="12">
|
2025-06-12 18:41:46 +08:00
|
|
|
<TextBox ui:ControlHelper.Header="设备名称"
|
|
|
|
|
Text="{Binding Device.Name, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
<TextBox ui:ControlHelper.Header="设备描述"
|
|
|
|
|
Text="{Binding Device.Description, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
|
2025-06-12 13:15:55 +08:00
|
|
|
<TextBox
|
|
|
|
|
ui:ControlHelper.Header="设备IP地址:"
|
|
|
|
|
AcceptsReturn="True"
|
2025-06-12 18:41:46 +08:00
|
|
|
Text="{Binding Device.Ip, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
|
|
|
|
|
<CheckBox Content="是否启用" IsChecked="{Binding Device.IsActive}" />
|
|
|
|
|
<!-- <TextBox ui:ControlHelper.Header="PrimaryButtonText" -->
|
|
|
|
|
<!-- Text="{Binding ElementName=dialog, Path=PrimaryButtonText, UpdateSourceTrigger=PropertyChanged}" /> -->
|
|
|
|
|
<!-- <TextBox ui:ControlHelper.Header="SecondaryButtonText" -->
|
|
|
|
|
<!-- Text="{Binding ElementName=dialog, Path=SecondaryButtonText, UpdateSourceTrigger=PropertyChanged}" /> -->
|
|
|
|
|
<!-- <TextBox ui:ControlHelper.Header="CloseButtonText" -->
|
|
|
|
|
<!-- Text="{Binding ElementName=dialog, Path=CloseButtonText, UpdateSourceTrigger=PropertyChanged}" /> -->
|
|
|
|
|
<!-- <ComboBox -->
|
|
|
|
|
<!-- ui:ControlHelper.Header="DefaultButton" -->
|
|
|
|
|
<!-- ItemsSource="{Binding Source={x:Type ui:ContentDialogButton}}" -->
|
|
|
|
|
<!-- SelectedItem="{Binding ElementName=dialog, Path=DefaultButton}" /> -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- <CheckBox Content="IsShadowEnabled" IsChecked="{Binding ElementName=dialog, Path=IsShadowEnabled}" /> -->
|
|
|
|
|
<!-- <StackPanel> -->
|
|
|
|
|
<!-- <Button Click="TryOpenAnother" Content="Try to open another ContentDialog" /> -->
|
|
|
|
|
<!-- <TextBlock -->
|
|
|
|
|
<!-- x:Name="ErrorText" -->
|
|
|
|
|
<!-- Margin="0,8,0,0" -->
|
|
|
|
|
<!-- Foreground="{DynamicResource SystemControlErrorTextForegroundBrush}" -->
|
|
|
|
|
<!-- Visibility="Collapsed" /> -->
|
|
|
|
|
<!-- </StackPanel> -->
|
2025-06-12 13:15:55 +08:00
|
|
|
</ikw:SimpleStackPanel>
|
|
|
|
|
</ui:ContentDialog>
|