重构MQTT事件处理和激活状态管理功能

This commit is contained in:
2025-10-05 14:45:41 +08:00
parent b96101dea6
commit 80ea47e627
13 changed files with 70 additions and 198 deletions

View File

@@ -45,11 +45,13 @@
<!-- Row 0: Header with Name and ToggleSwitch -->
<DockPanel Grid.Row="0" Margin="0,0,0,10">
<ui:ToggleSwitch
<ToggleButton
DockPanel.Dock="Right"
IsOn="{Binding IsActive}"
OffContent="停止"
OnContent="启动" />
Command="{Binding DataContext.ToggleIsActiveCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding }"
IsChecked="{Binding IsActive}"
Style="{StaticResource ToggleButtonSwitch}" />
<TextBlock
VerticalAlignment="Center"
FontSize="20"