初步完成变量选择Mqtt服务器
This commit is contained in:
@@ -1,21 +1,37 @@
|
||||
<controls:ContentDialog x:Class="DMS.WPF.Views.Dialogs.MqttSelectionDialog"
|
||||
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:vm="clr-namespace:DMS.WPF.ViewModels.Dialogs"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
xmlns:controls="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance vm:MqttSelectionDialogViewModel}"
|
||||
Title="选择MQTT服务器"
|
||||
PrimaryButtonText="确定"
|
||||
SecondaryButtonText="取消"
|
||||
PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
|
||||
SecondaryButtonClick="ContentDialog_SecondaryButtonClick">
|
||||
<ui:ContentDialog x:Class="DMS.WPF.Views.Dialogs.MqttSelectionDialog"
|
||||
|
||||
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:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
xmlns:vmd="clr-namespace:DMS.WPF.ViewModels.Dialogs"
|
||||
d:DataContext="{d:DesignInstance vmd:MqttSelectionDialogViewModel}"
|
||||
Title="选择MQTT服务器"
|
||||
PrimaryButtonText="确定"
|
||||
CloseButtonText="取消"
|
||||
PrimaryButtonCommand="{Binding ConfirmCommand}"
|
||||
CloseButtonCommand="{Binding CloseCommand}"
|
||||
DefaultButton="Primary"
|
||||
mc:Ignorable="d"
|
||||
>
|
||||
|
||||
<Grid>
|
||||
<ListBox ItemsSource="{Binding Mqtts}"
|
||||
SelectedItem="{Binding SelectedMqtt}"
|
||||
DisplayMemberPath="Name" />
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="请选择要关联的MQTT服务器:"
|
||||
Margin="0,0,0,10"
|
||||
Style="{StaticResource BodyTextBlockStyle}" />
|
||||
|
||||
<ListBox Grid.Row="1"
|
||||
ItemsSource="{Binding MqttServers}"
|
||||
SelectedItem="{Binding SelectedMqttServer}"
|
||||
DisplayMemberPath="ServerName"
|
||||
MinHeight="200"
|
||||
MaxHeight="400" />
|
||||
</Grid>
|
||||
</controls:ContentDialog>
|
||||
</ui:ContentDialog>
|
||||
Reference in New Issue
Block a user