2025-10-07 19:04:30 +08:00
|
|
|
<UserControl
|
|
|
|
|
x:Class="DMS.WPF.Views.MqttServerDetailView"
|
|
|
|
|
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:helper="clr-namespace:DMS.WPF.Helper"
|
|
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
|
|
|
xmlns:valueConverts="clr-namespace:DMS.WPF.ValueConverts"
|
|
|
|
|
d:DesignHeight="450"
|
|
|
|
|
d:DesignWidth="800"
|
|
|
|
|
mc:Ignorable="d">
|
2025-07-05 22:57:54 +08:00
|
|
|
<UserControl.Resources>
|
2025-10-07 19:04:30 +08:00
|
|
|
<valueConverts:EnumDescriptionConverter x:Key="EnumDescriptionConverter" />
|
2025-07-05 22:57:54 +08:00
|
|
|
</UserControl.Resources>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
2025-10-05 17:50:41 +08:00
|
|
|
<DockPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<!-- 顶部导航栏 -->
|
|
|
|
|
<Border
|
|
|
|
|
Margin="20,10"
|
|
|
|
|
Padding="15"
|
|
|
|
|
DockPanel.Dock="Top">
|
2025-10-05 17:50:41 +08:00
|
|
|
<Grid>
|
2025-07-05 22:57:54 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
2025-10-07 19:04:30 +08:00
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
2025-07-05 22:57:54 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
|
|
|
|
<!-- 返回MQTT列表按钮 -->
|
|
|
|
|
<Button
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,10,0"
|
|
|
|
|
Command="{Binding NavigateToMqttsCommand}"
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
ToolTip="返回MQTT服务器列表">
|
2025-10-05 17:50:41 +08:00
|
|
|
<Button.Content>
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ArrowLeft8}" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Button.Content>
|
|
|
|
|
</Button>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
|
|
|
|
<!-- 操作菜单栏 -->
|
|
|
|
|
<ui:CommandBar
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
DefaultLabelPosition="Right"
|
|
|
|
|
IsOpen="False">
|
|
|
|
|
|
|
|
|
|
<ui:AppBarButton
|
|
|
|
|
x:Name="EditButton"
|
|
|
|
|
Command="{Binding EditMqttCommand}"
|
|
|
|
|
Label="编辑">
|
2025-10-05 17:50:41 +08:00
|
|
|
<ui:AppBarButton.Icon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}" />
|
|
|
|
|
</ui:AppBarButton.Icon>
|
|
|
|
|
</ui:AppBarButton>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
2025-10-05 17:50:41 +08:00
|
|
|
<ui:AppBarButton x:Name="ShareButton" Label="分享">
|
|
|
|
|
<ui:AppBarButton.Icon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Share}" />
|
|
|
|
|
</ui:AppBarButton.Icon>
|
|
|
|
|
</ui:AppBarButton>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
2025-10-05 17:50:41 +08:00
|
|
|
<ui:CommandBar.SecondaryCommands>
|
|
|
|
|
<ui:AppBarButton
|
|
|
|
|
x:Name="SettingsButton"
|
|
|
|
|
Icon="Setting"
|
|
|
|
|
Label="设置" />
|
|
|
|
|
</ui:CommandBar.SecondaryCommands>
|
|
|
|
|
</ui:CommandBar>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<!-- 主内容区域 -->
|
2025-10-05 17:50:41 +08:00
|
|
|
<ScrollViewer DockPanel.Dock="Top" VerticalScrollBarVisibility="Auto">
|
|
|
|
|
<StackPanel Margin="20">
|
2025-10-07 19:04:30 +08:00
|
|
|
<!-- MQTT Server Details -->
|
|
|
|
|
<Border
|
|
|
|
|
Margin="0,0,0,10"
|
|
|
|
|
Padding="15"
|
|
|
|
|
Background="White"
|
|
|
|
|
BorderBrush="#E0E0E0"
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
CornerRadius="8">
|
2025-10-05 17:50:41 +08:00
|
|
|
<Border.Effect>
|
2025-10-07 19:04:30 +08:00
|
|
|
<DropShadowEffect
|
|
|
|
|
BlurRadius="5"
|
|
|
|
|
Opacity="0.1"
|
|
|
|
|
ShadowDepth="2"
|
|
|
|
|
Color="#888888" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</Border.Effect>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
2025-10-05 17:50:41 +08:00
|
|
|
<StackPanel>
|
|
|
|
|
<Grid Margin="0,0,0,10">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
2025-10-07 19:04:30 +08:00
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
2025-10-07 19:04:30 +08:00
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,10,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontFamily="{StaticResource MdFontIcons}"
|
|
|
|
|
FontSize="24"
|
|
|
|
|
Foreground="#2196F3"
|
|
|
|
|
Glyph="󰒋" />
|
|
|
|
|
<TextBlock
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
|
|
|
Text="MQTT 服务器详情" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
2025-10-05 17:50:41 +08:00
|
|
|
<Grid Margin="0,8,0,8">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
2025-10-07 19:04:30 +08:00
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
2025-10-07 19:04:30 +08:00
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</Grid.RowDefinitions>
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.Tag}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="名称:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Margin="0,0,10,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.ServerName}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.World}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="主机:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Grid.Column="3"
|
|
|
|
|
Margin="0,0,0,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.ServerUrl}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.ConnectApp}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="端口:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Margin="0,0,10,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.Port}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.ContactInfo}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="客户端ID:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="3"
|
|
|
|
|
Margin="0,0,0,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.ClientId}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.People}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="用户名:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Margin="0,0,10,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.Username}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.Lock}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="密码:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
Grid.Column="3"
|
|
|
|
|
Margin="0,0,0,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.Password}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="3"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontFamily="{StaticResource MdFontIcons}"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Glyph="󰚧" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="发布主题:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="3"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Margin="0,0,10,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.PublishTopic}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="3"
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontFamily="{StaticResource MdFontIcons}"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Glyph="󰂞" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="订阅主题:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="3"
|
|
|
|
|
Grid.Column="3"
|
|
|
|
|
Margin="0,0,0,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.SubscribeTopic}" />
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="4"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.PC1}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="平台:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
<!-- <TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding CurrentMqtt.MqttPlatform, Converter={StaticResource EnumDescriptionConverter}}" Margin="0,0,10,12" VerticalAlignment="Center" FontWeight="SemiBold" Foreground="#333333"/> -->
|
2025-10-07 19:04:30 +08:00
|
|
|
|
|
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="5"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.Mail}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="消息头:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="5"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Margin="0,0,10,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.MessageHeader}" />
|
|
|
|
|
|
|
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="5"
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
Margin="0,0,5,12"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.Mail}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="消息内容:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="5"
|
|
|
|
|
Grid.Column="3"
|
|
|
|
|
Margin="0,0,0,12"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.MessageContent}" />
|
|
|
|
|
|
|
|
|
|
<StackPanel
|
|
|
|
|
Grid.Row="6"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
<ui:FontIcon
|
|
|
|
|
Margin="0,0,5,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="16"
|
|
|
|
|
Foreground="#666666"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.Mail}" />
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="消息尾:" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</StackPanel>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="6"
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Margin="0,0,10,0"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
Foreground="#333333"
|
|
|
|
|
Text="{Binding CurrentMqtt.MessageFooter}" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</Grid>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
2025-07-05 22:57:54 +08:00
|
|
|
|
2025-10-07 19:04:30 +08:00
|
|
|
<!-- Associated Variables -->
|
|
|
|
|
<Border
|
|
|
|
|
Margin="0,0,0,10"
|
|
|
|
|
Padding="15"
|
|
|
|
|
Background="White"
|
|
|
|
|
BorderBrush="#E0E0E0"
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
CornerRadius="8">
|
2025-10-05 17:50:41 +08:00
|
|
|
<Border.Effect>
|
2025-10-07 19:04:30 +08:00
|
|
|
<DropShadowEffect
|
|
|
|
|
BlurRadius="5"
|
|
|
|
|
Opacity="0.1"
|
|
|
|
|
ShadowDepth="2"
|
|
|
|
|
Color="#888888" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</Border.Effect>
|
2025-10-07 19:04:30 +08:00
|
|
|
|
2025-10-05 17:50:41 +08:00
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
2025-10-07 19:04:30 +08:00
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="*" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</Grid.RowDefinitions>
|
2025-10-07 19:04:30 +08:00
|
|
|
<TextBlock
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Margin="0,0,0,10"
|
|
|
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
|
|
|
Text="关联变量" />
|
|
|
|
|
<DataGrid
|
|
|
|
|
x:Name="AssociatedVariablesDataGrid"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
|
CanUserAddRows="False"
|
|
|
|
|
CanUserDeleteRows="False"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
ItemsSource="{Binding CurrentMqtt.VariableAliases}"
|
|
|
|
|
SelectionMode="Extended">
|
|
|
|
|
|
|
|
|
|
<i:Interaction.Behaviors>
|
|
|
|
|
<helper:SelectedItemsBehavior SelectedItems="{Binding SelectedMqttAliaes}" />
|
|
|
|
|
</i:Interaction.Behaviors>
|
|
|
|
|
|
|
|
|
|
|
2025-10-05 19:57:58 +08:00
|
|
|
<DataGrid.ContextMenu>
|
|
|
|
|
<ContextMenu>
|
2025-10-07 19:04:30 +08:00
|
|
|
<MenuItem
|
|
|
|
|
Command="{Binding ModifyAliasCommand}"
|
|
|
|
|
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=DataGrid}, Path=SelectedItems[0]}"
|
|
|
|
|
Header="修改发送名称" />
|
2025-10-05 19:57:58 +08:00
|
|
|
</ContextMenu>
|
|
|
|
|
</DataGrid.ContextMenu>
|
2025-10-05 17:50:41 +08:00
|
|
|
<DataGrid.Columns>
|
2025-10-07 19:04:30 +08:00
|
|
|
<DataGridTextColumn Binding="{Binding Variable.VariableTable.Device.Name}" Header="设备名称" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Variable.VariableTable.Name}" Header="变量表名称" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Variable.Name}" Header="变量名称" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Alias}" Header="MQTT发送名称" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Variable.S7Address}" Header="地址" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Variable.DataType}" Header="数据类型" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Variable.DisplayValue}" Header="显示值" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Variable.UpdatedAt, StringFormat='yyyy-MM-dd HH:mm:ss'}" Header="更新时间" />
|
2025-10-05 17:50:41 +08:00
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</DockPanel>
|
2025-07-05 22:57:54 +08:00
|
|
|
</UserControl>
|