Files
DMS/DMS.WPF/Views/Dialogs/MqttAliasBatchEditDialog.xaml

38 lines
2.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<ui:ContentDialog
x:Class="DMS.WPF.Views.Dialogs.MqttAliasBatchEditDialog"
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:hc="https://handyorg.github.io/handycontrol"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:vm="clr-namespace:DMS.WPF.ViewModels.Dialogs"
xmlns:models="clr-namespace:DMS.Core.Models"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance vm:MqttAliasBatchEditDialogViewModel}"
Title="{Binding Title}"
PrimaryButtonText="确定"
CloseButtonText="取消"
>
<StackPanel Margin="10">
<TextBlock TextWrapping="WrapWithOverflow" Margin="5 10" FontSize="13" Foreground="#666">设置的别名当变量向MQTT服务器发送数据时就会按照设置设置好的别名发送请在MQTT服务端按照设置的名称接受。</TextBlock>
<DataGrid ItemsSource="{Binding VariablesToEdit}"
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
IsReadOnly="False">
<DataGrid.Columns>
<DataGridTextColumn Header="变量名称" Binding="{Binding Variable.Name}" IsReadOnly="True" Width="*"/>
<DataGridTextColumn Header="标识符" Binding="{Binding Identifier}" IsReadOnly="True" Width="*"/>
<DataGridTemplateColumn Header="MQTT别名" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<hc:TextBox Text="{Binding MqttAlias, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Placeholder="请输入别名"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</ui:ContentDialog>