|
|
@@ -9,167 +9,239 @@
|
|
|
<vm:ViewAViewModel/>
|
|
|
</UserControl.DataContext>
|
|
|
|
|
|
- <!-- 使用固定尺寸设计,由外层容器负责缩放 -->
|
|
|
- <Border Background="#1a1a2e" Width="1024" Height="613">
|
|
|
- <Canvas Width="1024" Height="613">
|
|
|
-
|
|
|
- <!-- 模式切换开关 -->
|
|
|
- <controls:ValveControl Canvas.Left="893" Canvas.Top="9" Width="129" Height="108"
|
|
|
- Status="{Binding ModeStatus}" Text="远程/本地"/>
|
|
|
-
|
|
|
- <!-- 入口水箱 -->
|
|
|
- <controls:WaterTankControl Canvas.Left="44" Canvas.Top="113" Width="134" Height="100"
|
|
|
- WaterLevel="{Binding Tank1Level}" Text="入口池"
|
|
|
- WaterColor="#178187" BorderColor="#cfcfcf"/>
|
|
|
-
|
|
|
- <!-- 池1 -->
|
|
|
- <Border BorderBrush="#cfcfcf" BorderThickness="8" Height="135" Canvas.Left="248" Canvas.Top="113" Width="138"/>
|
|
|
- <controls:WaterTankControl Canvas.Left="250" Canvas.Top="121" Width="134" Height="127"
|
|
|
- WaterLevel="{Binding Tank1Level}" Text=""
|
|
|
- WaterColor="#178187" BorderColor="#cfcfcf"/>
|
|
|
-
|
|
|
- <!-- 池2 -->
|
|
|
- <controls:WaterTankControl Canvas.Left="250" Canvas.Top="248" Width="134" Height="87"
|
|
|
- WaterLevel="{Binding Tank2Level}" Text=""
|
|
|
- WaterColor="#178187" BorderColor="#cfcfcf"/>
|
|
|
-
|
|
|
- <!-- 大水池 -->
|
|
|
- <controls:WaterTankControl Canvas.Left="250" Canvas.Top="335" Width="748" Height="183"
|
|
|
- WaterLevel="{Binding Tank3Level}" Text=""
|
|
|
- WaterColor="#178187" BorderColor="#cfcfcf"/>
|
|
|
- <Border BorderBrush="#cfcfcf" BorderThickness="8" Height="191" Canvas.Left="248" Canvas.Top="327" Width="138"/>
|
|
|
-
|
|
|
- <!-- 出口池 -->
|
|
|
- <controls:WaterTankControl Canvas.Left="44" Canvas.Top="267" Width="134" Height="100"
|
|
|
- WaterLevel="{Binding Tank4Level}" Text="出口池"
|
|
|
- WaterColor="#178187" BorderColor="#cfcfcf"/>
|
|
|
-
|
|
|
- <!-- 管道连接线 -->
|
|
|
- <Rectangle Fill="#178187" Height="12" Canvas.Left="358" Stroke="Transparent" Canvas.Top="480" Width="48"
|
|
|
- RenderTransformOrigin="0.5,0.5">
|
|
|
- <Rectangle.RenderTransform>
|
|
|
- <RotateTransform Angle="-90"/>
|
|
|
- </Rectangle.RenderTransform>
|
|
|
- </Rectangle>
|
|
|
-
|
|
|
- <!-- 液位显示 -->
|
|
|
- <TextBlock Canvas.Left="676" Canvas.Top="414" Width="70" Foreground="White" FontSize="12">
|
|
|
- <Run Text="液位3:"/><Run Text="{Binding Tank3Level, StringFormat='{}{0:F1}'}"/><Run Text="米"/>
|
|
|
- </TextBlock>
|
|
|
- <TextBlock Canvas.Left="288" Canvas.Top="147" Width="70" Foreground="White" FontSize="12">
|
|
|
- <Run Text="池1"/><LineBreak/><Run Text="液位1:"/><Run Text="{Binding Tank1Level, StringFormat='{}{0:F1}'}"/><Run Text="米"/>
|
|
|
- </TextBlock>
|
|
|
- <TextBlock Canvas.Left="286" Canvas.Top="415" Width="78" Foreground="White" FontSize="12">
|
|
|
- <Run Text="池2"/><LineBreak/><Run Text="液位2:"/><Run Text="{Binding Tank2Level, StringFormat='{}{0:F1}'}"/><Run Text="米"/>
|
|
|
- </TextBlock>
|
|
|
-
|
|
|
- <!-- 阀门控件 -->
|
|
|
- <controls:ValveControl Canvas.Left="147" Canvas.Top="168" Width="22" Height="22"
|
|
|
- Status="{Binding Valve1Status}" Text=""/>
|
|
|
- <controls:ValveControl Canvas.Left="279" Canvas.Top="205" Width="22" Height="22"
|
|
|
- Status="{Binding Valve2Status}" Text=""/>
|
|
|
- <controls:ValveControl Canvas.Left="336" Canvas.Top="206" Width="22" Height="22"
|
|
|
- Status="{Binding Valve3Status}" Text=""/>
|
|
|
- <controls:ValveControl Canvas.Left="278" Canvas.Top="298" Width="22" Height="22"
|
|
|
- Status="{Binding Valve4Status}" Text=""/>
|
|
|
- <controls:ValveControl Canvas.Left="337" Canvas.Top="298" Width="22" Height="22"
|
|
|
- Status="{Binding Valve5Status}" Text=""/>
|
|
|
-
|
|
|
- <!-- 管道 -->
|
|
|
- <controls:PipeLineControl Canvas.Left="0" Canvas.Top="306" Width="52" Height="29"
|
|
|
- IsFlow="{Binding IsInflowRunning}" IsHorizontal="True"/>
|
|
|
- <controls:PipeLineControl Canvas.Left="0" Canvas.Top="164" Width="52" Height="29"
|
|
|
- IsFlow="{Binding IsOutflowRunning}" IsHorizontal="True"
|
|
|
- RenderTransformOrigin="0.5,0.5">
|
|
|
- <controls:PipeLineControl.RenderTransform>
|
|
|
- <RotateTransform Angle="180"/>
|
|
|
- </controls:PipeLineControl.RenderTransform>
|
|
|
- </controls:PipeLineControl>
|
|
|
-
|
|
|
- <!-- 泵1-5 -->
|
|
|
- <controls:PumpControl Canvas.Left="394" Canvas.Top="427" Width="60" Height="63"
|
|
|
- IsRunning="{Binding Pump1Running}" Speed="2" Text="泵1"/>
|
|
|
- <controls:PumpControl Canvas.Left="504" Canvas.Top="426" Width="60" Height="63"
|
|
|
- IsRunning="{Binding Pump2Running}" Speed="2" Text="泵2"/>
|
|
|
- <controls:PumpControl Canvas.Left="617" Canvas.Top="426" Width="60" Height="63"
|
|
|
- IsRunning="{Binding Pump3Running}" Speed="2" Text="泵3"/>
|
|
|
- <controls:PumpControl Canvas.Left="730" Canvas.Top="427" Width="60" Height="63"
|
|
|
- IsRunning="{Binding Pump4Running}" Speed="2" Text="泵4"/>
|
|
|
- <controls:PumpControl Canvas.Left="843" Canvas.Top="426" Width="60" Height="63"
|
|
|
- IsRunning="{Binding Pump5Running}" Speed="2" Text="泵5"/>
|
|
|
-
|
|
|
- <!-- 风扇 -->
|
|
|
- <controls:FanControl Canvas.Left="412" Canvas.Top="441" Width="34" Height="32"
|
|
|
- IsRunning="{Binding Fan1Running}" Speed="1" Text="风扇1"/>
|
|
|
- <controls:FanControl Canvas.Left="522" Canvas.Top="441" Width="34" Height="32"
|
|
|
- IsRunning="{Binding Fan2Running}" Speed="1" Text="风扇2"/>
|
|
|
-
|
|
|
- <!-- 流量显示 -->
|
|
|
- <Border Background="#2d2d44" CornerRadius="5" Canvas.Left="10" Canvas.Top="550" Padding="10">
|
|
|
- <StackPanel Spacing="10">
|
|
|
- <TextBlock Foreground="#4CAF50" FontWeight="Bold" FontSize="14">
|
|
|
- <Run Text="进水流量: "/>
|
|
|
- <Run Text="{Binding InflowRate, StringFormat='{}{0:F1}'}"/>
|
|
|
- <Run Text=" m³/h"/>
|
|
|
- </TextBlock>
|
|
|
- <TextBlock Foreground="#2196F3" FontWeight="Bold" FontSize="14">
|
|
|
- <Run Text="出水流量: "/>
|
|
|
- <Run Text="{Binding OutflowRate, StringFormat='{}{0:F1}'}"/>
|
|
|
- <Run Text=" m³/h"/>
|
|
|
- </TextBlock>
|
|
|
- </StackPanel>
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 报警信息 -->
|
|
|
- <Border Background="#F44336" CornerRadius="5" Canvas.Left="259" Canvas.Top="544" Width="685" Height="43"
|
|
|
- IsVisible="{Binding HasAlarm}">
|
|
|
- <TextBlock Text="{Binding AlarmMessage}" FontSize="20" Foreground="White"
|
|
|
- HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
- </Border>
|
|
|
-
|
|
|
- <!-- 操作按钮区域 -->
|
|
|
- <StackPanel Canvas.Left="10" Canvas.Top="10" Spacing="5">
|
|
|
- <Button Content="连接PLC" Command="{Binding ConnectPlcCommand}" Width="80" Height="30"/>
|
|
|
- <Button Content="断开PLC" Command="{Binding DisconnectPlcCommand}" Width="80" Height="30"/>
|
|
|
- <Button Content="刷新数据" Command="{Binding RefreshDataCommand}" Width="80" Height="30"/>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <!-- 设备状态面板 -->
|
|
|
- <Border Background="#2d2d44" CornerRadius="5" Canvas.Left="850" Canvas.Top="130" Width="160" Height="300" Padding="10">
|
|
|
- <StackPanel Spacing="5">
|
|
|
- <TextBlock Text="设备状态" FontWeight="Bold" Foreground="White" FontSize="14"/>
|
|
|
- <Separator Background="#444"/>
|
|
|
- <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <Ellipse Width="10" Height="10" Fill="{Binding Pump1StatusColor}"/>
|
|
|
- <TextBlock Text="泵1" Foreground="White"/>
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <Ellipse Width="10" Height="10" Fill="{Binding Pump2StatusColor}"/>
|
|
|
- <TextBlock Text="泵2" Foreground="White"/>
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <Ellipse Width="10" Height="10" Fill="{Binding Pump3StatusColor}"/>
|
|
|
- <TextBlock Text="泵3" Foreground="White"/>
|
|
|
+ <Border Background="#0D1117" Width="1280" Height="800">
|
|
|
+ <Grid RowDefinitions="Auto,*,Auto" Margin="15">
|
|
|
+
|
|
|
+ <!-- 顶部工具栏 -->
|
|
|
+ <Border Grid.Row="0" Background="#161B22" CornerRadius="8" Padding="12" Margin="0,0,0,10">
|
|
|
+ <Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
|
|
+ <!-- 左侧标题 -->
|
|
|
+ <StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="10">
|
|
|
+ <TextBlock Text="🏭" FontSize="20" VerticalAlignment="Center"/>
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="污水处理监控系统" FontWeight="Bold" FontSize="16" Foreground="White"/>
|
|
|
+ <TextBlock Text="实时工艺流程" FontSize="11" Foreground="#8B949E"/>
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <Ellipse Width="10" Height="10" Fill="{Binding Pump4StatusColor}"/>
|
|
|
- <TextBlock Text="泵4" Foreground="White"/>
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <Ellipse Width="10" Height="10" Fill="{Binding Pump5StatusColor}"/>
|
|
|
- <TextBlock Text="泵5" Foreground="White"/>
|
|
|
+
|
|
|
+ <!-- 中间连接状态 -->
|
|
|
+ <StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="15" Margin="20,0">
|
|
|
+ <Border Background="#238636" CornerRadius="12" Padding="10,5">
|
|
|
+ <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
+ <Ellipse Width="8" Height="8" Fill="White"/>
|
|
|
+ <TextBlock Text="PLC 已连接" Foreground="White" FontSize="11"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <Button Content="连接" Command="{Binding ConnectPlcCommand}" Padding="12,4"/>
|
|
|
+ <Button Content="断开" Command="{Binding DisconnectPlcCommand}" Padding="12,4"/>
|
|
|
+ <Button Content="刷新" Command="{Binding RefreshDataCommand}" Padding="12,4"/>
|
|
|
</StackPanel>
|
|
|
- <Separator Background="#444"/>
|
|
|
- <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <Ellipse Width="10" Height="10" Fill="{Binding Fan1StatusColor}"/>
|
|
|
- <TextBlock Text="风扇1" Foreground="White"/>
|
|
|
+
|
|
|
+ <!-- 右侧时间 -->
|
|
|
+ <StackPanel Grid.Column="3" VerticalAlignment="Center">
|
|
|
+ <TextBlock Text="{Binding CurrentTime, StringFormat='{}{0:HH:mm:ss}'}"
|
|
|
+ FontSize="18" FontWeight="Bold" Foreground="#58A6FF"/>
|
|
|
+ <TextBlock Text="{Binding CurrentTime, StringFormat='{}{0:yyyy-MM-dd}'}"
|
|
|
+ FontSize="11" Foreground="#8B949E" HorizontalAlignment="Right"/>
|
|
|
</StackPanel>
|
|
|
- <StackPanel Orientation="Horizontal" Spacing="5">
|
|
|
- <Ellipse Width="10" Height="10" Fill="{Binding Fan2StatusColor}"/>
|
|
|
- <TextBlock Text="风扇2" Foreground="White"/>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 中间主内容区 -->
|
|
|
+ <Grid Grid.Row="1" ColumnDefinitions="*,280">
|
|
|
+
|
|
|
+ <!-- 左侧工艺流程图 -->
|
|
|
+ <Border Grid.Column="0" Background="#161B22" CornerRadius="8" Padding="10" Margin="0,0,10,0">
|
|
|
+ <Canvas Width="900" Height="550">
|
|
|
+
|
|
|
+ <!-- 水箱组 -->
|
|
|
+ <StackPanel Orientation="Horizontal" Canvas.Left="20" Canvas.Top="20" Spacing="30">
|
|
|
+ <!-- 入口池 -->
|
|
|
+ <StackPanel>
|
|
|
+ <controls:WaterTankControl Width="120" Height="160"
|
|
|
+ WaterLevel="{Binding Tank1Level}" Text="入口池"
|
|
|
+ WaterColor="#00BCD4"/>
|
|
|
+ <TextBlock Text="{Binding Tank1Level, StringFormat='液位: {0:F1}%'}"
|
|
|
+ Foreground="#8B949E" FontSize="11" HorizontalAlignment="Center" Margin="0,5,0,0"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 池1 -->
|
|
|
+ <StackPanel>
|
|
|
+ <controls:WaterTankControl Width="120" Height="160"
|
|
|
+ WaterLevel="{Binding Tank2Level}" Text="生化池"
|
|
|
+ WaterColor="#26A69A"/>
|
|
|
+ <TextBlock Text="{Binding Tank2Level, StringFormat='液位: {0:F1}%'}"
|
|
|
+ Foreground="#8B949E" FontSize="11" HorizontalAlignment="Center" Margin="0,5,0,0"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 池2 -->
|
|
|
+ <StackPanel>
|
|
|
+ <controls:WaterTankControl Width="120" Height="160"
|
|
|
+ WaterLevel="{Binding Tank3Level}" Text="沉淀池"
|
|
|
+ WaterColor="#42A5F5"/>
|
|
|
+ <TextBlock Text="{Binding Tank3Level, StringFormat='液位: {0:F1}%'}"
|
|
|
+ Foreground="#8B949E" FontSize="11" HorizontalAlignment="Center" Margin="0,5,0,0"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 出口池 -->
|
|
|
+ <StackPanel>
|
|
|
+ <controls:WaterTankControl Width="120" Height="160"
|
|
|
+ WaterLevel="{Binding Tank4Level}" Text="出口池"
|
|
|
+ WaterColor="#66BB6A"/>
|
|
|
+ <TextBlock Text="{Binding Tank4Level, StringFormat='液位: {0:F1}%'}"
|
|
|
+ Foreground="#8B949E" FontSize="11" HorizontalAlignment="Center" Margin="0,5,0,0"/>
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 管道连接 -->
|
|
|
+ <controls:PipeLineControl Canvas.Left="20" Canvas.Top="200" Width="540" Height="25"
|
|
|
+ IsFlow="{Binding IsInflowRunning}" IsHorizontal="True"/>
|
|
|
+
|
|
|
+ <!-- 阀门组 -->
|
|
|
+ <StackPanel Orientation="Horizontal" Canvas.Left="50" Canvas.Top="240" Spacing="80">
|
|
|
+ <controls:ValveControl Width="40" Height="50" Status="{Binding Valve1Status}" Text="进水"/>
|
|
|
+ <controls:ValveControl Width="40" Height="50" Status="{Binding Valve2Status}" Text="曝气"/>
|
|
|
+ <controls:ValveControl Width="40" Height="50" Status="{Binding Valve3Status}" Text="回流"/>
|
|
|
+ <controls:ValveControl Width="40" Height="50" Status="{Binding Valve4Status}" Text="出水"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 泵组 -->
|
|
|
+ <StackPanel Orientation="Horizontal" Canvas.Left="30" Canvas.Top="310" Spacing="25">
|
|
|
+ <controls:PumpControl Width="70" Height="80"
|
|
|
+ IsRunning="{Binding Pump1Running}" Frequency="50" Text="进水泵1"/>
|
|
|
+ <controls:PumpControl Width="70" Height="80"
|
|
|
+ IsRunning="{Binding Pump2Running}" Frequency="45" Text="进水泵2"/>
|
|
|
+ <controls:PumpControl Width="70" Height="80"
|
|
|
+ IsRunning="{Binding Pump3Running}" Frequency="40" Text="回流泵"/>
|
|
|
+ <controls:PumpControl Width="70" Height="80"
|
|
|
+ IsRunning="{Binding Pump4Running}" Frequency="35" Text="排泥泵"/>
|
|
|
+ <controls:PumpControl Width="70" Height="80"
|
|
|
+ IsRunning="{Binding Pump5Running}" Frequency="55" Text="加药泵"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 风机组 -->
|
|
|
+ <StackPanel Orientation="Horizontal" Canvas.Left="120" Canvas.Top="410" Spacing="50">
|
|
|
+ <controls:FanControl Width="50" Height="50" IsRunning="{Binding Fan1Running}" Speed="1" Text="风机1"/>
|
|
|
+ <controls:FanControl Width="50" Height="50" IsRunning="{Binding Fan2Running}" Speed="1.5" Text="风机2"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ <!-- 模式切换 -->
|
|
|
+ <Border Canvas.Left="750" Canvas.Top="20" Width="120" Height="50"
|
|
|
+ Background="#21262D" CornerRadius="8">
|
|
|
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
+ <TextBlock Text="运行模式" FontSize="10" Foreground="#8B949E" HorizontalAlignment="Center"/>
|
|
|
+ <controls:ValveControl Width="30" Height="30"
|
|
|
+ Status="{Binding ModeStatus}" Text=""/>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 流程箭头 -->
|
|
|
+ <Path Data="M 140 100 L 200 100" Stroke="#58A6FF" StrokeThickness="2">
|
|
|
+ <Path.Data>
|
|
|
+ <StreamGeometry>M 140 100 L 200 100</StreamGeometry>
|
|
|
+ </Path.Data>
|
|
|
+ </Path>
|
|
|
+ <Path Data="M 320 100 L 380 100" Stroke="#58A6FF" StrokeThickness="2"/>
|
|
|
+ <Path Data="M 500 100 L 560 100" Stroke="#58A6FF" StrokeThickness="2"/>
|
|
|
+ </Canvas>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 右侧面板 -->
|
|
|
+ <Grid Grid.Column="1" RowDefinitions="Auto,Auto,Auto,*,Auto">
|
|
|
+
|
|
|
+ <!-- 流量仪表 -->
|
|
|
+ <Border Grid.Row="0" Background="#161B22" CornerRadius="8" Padding="10" Margin="0,0,0,10">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="流量监测" FontWeight="Bold" Foreground="White" Margin="0,0,0,10"/>
|
|
|
+ <Grid ColumnDefinitions="*,*">
|
|
|
+ <controls:GaugeControl Grid.Column="0" Width="120" Height="140"
|
|
|
+ Value="{Binding InflowRate}" Title="进水" Unit="m³/h"
|
|
|
+ MaxValue="100"/>
|
|
|
+ <controls:GaugeControl Grid.Column="1" Width="120" Height="140"
|
|
|
+ Value="{Binding OutflowRate}" Title="出水" Unit="m³/h"
|
|
|
+ MaxValue="100"
|
|
|
+ ValueColor="#66BB6A"/>
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 设备状态 -->
|
|
|
+ <Border Grid.Row="1" Background="#161B22" CornerRadius="8" Padding="10" Margin="0,0,0,10">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="设备状态" FontWeight="Bold" Foreground="White" Margin="0,0,0,10"/>
|
|
|
+ <StackPanel Spacing="5">
|
|
|
+ <controls:StatusCard Title="进水泵1" Status="{Binding Pump1Status}" Icon="🔄"
|
|
|
+ IsActive="{Binding Pump1Running}"/>
|
|
|
+ <controls:StatusCard Title="进水泵2" Status="{Binding Pump2Status}" Icon="🔄"
|
|
|
+ IsActive="{Binding Pump2Running}"/>
|
|
|
+ <controls:StatusCard Title="回流泵" Status="{Binding Pump3Status}" Icon="🔄"
|
|
|
+ IsActive="{Binding Pump3Running}"/>
|
|
|
+ <controls:StatusCard Title="风机1" Status="{Binding Fan1Status}" Icon="🌀"
|
|
|
+ IsActive="{Binding Fan1Running}"/>
|
|
|
+ <controls:StatusCard Title="风机2" Status="{Binding Fan2Status}" Icon="🌀"
|
|
|
+ IsActive="{Binding Fan2Running}"/>
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 报警信息 -->
|
|
|
+ <Border Grid.Row="2" Background="#161B22" CornerRadius="8" Padding="10" Margin="0,0,0,10"
|
|
|
+ IsVisible="{Binding HasAlarm}">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="⚠️ 报警信息" FontWeight="Bold" Foreground="#F85149" Margin="0,0,0,10"/>
|
|
|
+ <Border Background="#F85149" CornerRadius="5" Padding="10">
|
|
|
+ <TextBlock Text="{Binding AlarmMessage}" Foreground="White" TextWrapping="Wrap"/>
|
|
|
+ </Border>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 快捷操作 -->
|
|
|
+ <Border Grid.Row="4" Background="#161B22" CornerRadius="8" Padding="10">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="快捷操作" FontWeight="Bold" Foreground="White" Margin="0,0,0,10"/>
|
|
|
+ <WrapPanel HorizontalAlignment="Center">
|
|
|
+ <Button Content="全部启动" Margin="5" Padding="12,6"/>
|
|
|
+ <Button Content="全部停止" Margin="5" Padding="12,6"/>
|
|
|
+ <Button Content="报警确认" Margin="5" Padding="12,6"/>
|
|
|
+ <Button Content="数据导出" Margin="5" Padding="12,6"/>
|
|
|
+ </WrapPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <!-- 底部状态栏 -->
|
|
|
+ <Border Grid.Row="2" Background="#161B22" CornerRadius="8" Padding="12" Margin="0,10,0,0">
|
|
|
+ <Grid ColumnDefinitions="Auto,*,Auto,Auto,Auto">
|
|
|
+ <StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="20">
|
|
|
+ <TextBlock Foreground="#8B949E" FontSize="11">
|
|
|
+ <Run Text="进水: "/>
|
|
|
+ <Run Text="{Binding InflowRate, StringFormat='{}{0:F1} m³/h'}" Foreground="#58A6FF"/>
|
|
|
+ </TextBlock>
|
|
|
+ <TextBlock Foreground="#8B949E" FontSize="11">
|
|
|
+ <Run Text="出水: "/>
|
|
|
+ <Run Text="{Binding OutflowRate, StringFormat='{}{0:F1} m³/h'}" Foreground="#66BB6A"/>
|
|
|
+ </TextBlock>
|
|
|
</StackPanel>
|
|
|
- </StackPanel>
|
|
|
+
|
|
|
+ <TextBlock Grid.Column="2" Foreground="#8B949E" FontSize="11">
|
|
|
+ <Run Text="运行设备: "/>
|
|
|
+ <Run Text="{Binding RunningDeviceCount}" Foreground="#58A6FF"/>
|
|
|
+ <Run Text=" 台"/>
|
|
|
+ </TextBlock>
|
|
|
+
|
|
|
+ <TextBlock Grid.Column="3" Foreground="#8B949E" FontSize="11" Margin="20,0">
|
|
|
+ <Run Text="报警: "/>
|
|
|
+ <Run Text="{Binding AlarmCount}" Foreground="#F85149"/>
|
|
|
+ <Run Text=" 条"/>
|
|
|
+ </TextBlock>
|
|
|
+
|
|
|
+ <TextBlock Grid.Column="4" Foreground="#8B949E" FontSize="11">
|
|
|
+ <Run Text="系统运行: "/>
|
|
|
+ <Run Text="{Binding RunningTime}" Foreground="#58A6FF"/>
|
|
|
+ </TextBlock>
|
|
|
+ </Grid>
|
|
|
</Border>
|
|
|
- </Canvas>
|
|
|
+ </Grid>
|
|
|
</Border>
|
|
|
</UserControl>
|