P膩rl奴kot izejas kodu

鎭㈠鍚勯〉闈㈢嫭绔嬫爣棰樻爮锛孧ainWindow浠呬繚鐣欏簳閮ㄥ鑸

纾 鏇 1 ned膿募u atpaka募
vec膩ks
rev墨zija
2a341027a6

+ 0 - 48
src/YZWater.Avalonia/Views/MainWindow.axaml

@@ -16,54 +16,6 @@
     </Window.DataContext>
 
     <DockPanel>
-        <!-- 鈺愨晲鈺 缁熶竴椤堕儴鏍囬鏍 鈺愨晲鈺 -->
-        <Border DockPanel.Dock="Top" Background="{DynamicResource SurfaceBgBrush}"
-                BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1" Height="48">
-            <Grid ColumnDefinitions="Auto,*,Auto,Auto,Auto" Margin="16,0">
-                <!-- 宸︿晶: Logo + 鏍囬 -->
-                <StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
-                    <Border Background="{DynamicResource SuccessBrush}" Width="4" Height="24" CornerRadius="2"/>
-                    <TextBlock Text="YZ WATER" FontSize="16" FontWeight="Bold"
-                               Foreground="{DynamicResource TextPrimaryBrush}" FontFamily="Consolas, monospace"
-                               VerticalAlignment="Center"/>
-                    <TextBlock Text="姹℃按澶勭悊鐩戞帶绯荤粺" FontSize="12"
-                               Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
-                </StackPanel>
-
-                <!-- Tab 鏍囬鎸囩ず -->
-                <TextBlock Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center"
-                           FontFamily="Consolas, monospace" FontSize="12" FontWeight="Bold"
-                           Foreground="{DynamicResource TextSecondaryBrush}"
-                           Text="{Binding TabTitle}"/>
-
-                <!-- PLC 鐘舵 + 鎿嶄綔鎸夐挳 -->
-                <StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="8" VerticalAlignment="Center" Margin="16,0">
-                    <Border Width="10" Height="10" CornerRadius="5"
-                            Background="{Binding IsPlcConnected, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
-                    <TextBlock Text="PLC" FontFamily="Consolas, monospace" FontSize="10"
-                               Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
-                    <Button Content="CONNECT" Command="{Binding ConnectPlcCommand}" Classes="btn-success" Padding="8,3" FontSize="10"/>
-                    <Button Content="DISCONNECT" Command="{Binding DisconnectPlcCommand}" Classes="btn-danger" Padding="8,3" FontSize="10"/>
-                    <Button Content="REFRESH" Command="{Binding RefreshDataCommand}" Classes="btn-info" Padding="8,3" FontSize="10"/>
-                </StackPanel>
-
-                <!-- 鏃堕挓 -->
-                <StackPanel Grid.Column="3" Orientation="Horizontal" Spacing="8" VerticalAlignment="Center" Margin="16,0">
-                    <Border Background="{DynamicResource BorderBrush}" Width="1" Height="24"/>
-                    <TextBlock Text="{Binding CurrentTime, StringFormat='{}{0:HH:mm:ss}'}"
-                               FontFamily="Consolas, monospace" FontSize="16" FontWeight="Bold"
-                               Foreground="{DynamicResource SuccessBrush}"/>
-                    <TextBlock Text="{Binding CurrentTime, StringFormat='{}{0:yyyy-MM-dd}'}"
-                               FontFamily="Consolas, monospace" FontSize="10"
-                               Foreground="{DynamicResource TextDisabledBrush}" VerticalAlignment="Bottom" Margin="0,0,0,2"/>
-                </StackPanel>
-
-                <!-- 鐗堟湰 -->
-                <TextBlock Grid.Column="4" Text="v3.0" FontFamily="Consolas, monospace" FontSize="9"
-                           Foreground="{DynamicResource TextDisabledBrush}" VerticalAlignment="Center" Margin="12,0,0,0"/>
-            </Grid>
-        </Border>
-
         <!-- 鈺愨晲鈺 搴曢儴瀵艰埅鏍 鈺愨晲鈺 -->
         <Border DockPanel.Dock="Bottom" Background="{DynamicResource SurfaceBgBrush}"
                 BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0" Padding="4,0">

+ 38 - 3
src/YZWater.Avalonia/Views/ViewAView.axaml

@@ -10,10 +10,45 @@
     </UserControl.DataContext>
 
     <Border Background="{DynamicResource AppBgBrush}">
-        <Grid RowDefinitions="*,32">
+        <Grid RowDefinitions="48,*,32">
+
+            <!-- 鈺愨晲鈺 椤堕儴鏍囬鏍 鈺愨晲鈺 -->
+            <Border Grid.Row="0" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
+                <Grid ColumnDefinitions="Auto,*,Auto,Auto,Auto" Margin="16,0">
+                    <StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
+                        <Border Background="{DynamicResource SuccessBrush}" Width="4" Height="24" CornerRadius="2"/>
+                        <TextBlock Text="YZ WATER" FontSize="16" FontWeight="Bold"
+                                   Foreground="{DynamicResource TextPrimaryBrush}" FontFamily="Consolas, monospace"
+                                   VerticalAlignment="Center"/>
+                        <TextBlock Text="姹℃按澶勭悊鐩戞帶绯荤粺" FontSize="12"
+                                   Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
+                    </StackPanel>
+
+                    <StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="8" VerticalAlignment="Center" Margin="24,0">
+                        <Border Width="10" Height="10" CornerRadius="5" Background="{DynamicResource SuccessBrush}"/>
+                        <TextBlock Text="PLC CONNECTED" FontFamily="Consolas, monospace" FontSize="11"
+                                   Foreground="{DynamicResource SuccessBrush}" VerticalAlignment="Center"/>
+                    </StackPanel>
+
+                    <StackPanel Grid.Column="3" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center" Margin="16,0">
+                        <Button Content="CONNECT" Command="{Binding ConnectPlcCommand}" Classes="btn-success" Padding="8,3" FontSize="10"/>
+                        <Button Content="DISCONNECT" Command="{Binding DisconnectPlcCommand}" Classes="btn-danger" Padding="8,3" FontSize="10"/>
+                        <Button Content="REFRESH" Command="{Binding RefreshDataCommand}" Classes="btn-info" Padding="8,3" FontSize="10"/>
+                    </StackPanel>
+
+                    <StackPanel Grid.Column="4" VerticalAlignment="Center" HorizontalAlignment="Right">
+                        <TextBlock Text="{Binding CurrentTime, StringFormat='{}{0:HH:mm:ss}'}"
+                                   FontFamily="Consolas, monospace" FontSize="16" FontWeight="Bold"
+                                   Foreground="{DynamicResource SuccessBrush}"/>
+                        <TextBlock Text="{Binding CurrentTime, StringFormat='{}{0:yyyy-MM-dd}'}"
+                                   FontFamily="Consolas, monospace" FontSize="10"
+                                   Foreground="{DynamicResource TextDisabledBrush}" HorizontalAlignment="Right"/>
+                    </StackPanel>
+                </Grid>
+            </Border>
 
             <!-- 鈺愨晲鈺 涓诲唴瀹瑰尯 鈺愨晲鈺 -->
-            <Grid Grid.Row="0" ColumnDefinitions="*,260" Margin="8,4">
+            <Grid Grid.Row="1" ColumnDefinitions="*,260" Margin="8,4">
 
                 <!-- 宸︿晶锛氬伐鑹烘祦绋嬪浘 -->
                 <Border Grid.Column="0" Background="{DynamicResource SurfaceBgBrush}" CornerRadius="2" Margin="0,0,4,0"
@@ -365,7 +400,7 @@
             </Grid>
 
             <!-- 鈺愨晲鈺 搴曢儴鐘舵佹爮 鈺愨晲鈺 -->
-            <Border Grid.Row="1" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
+            <Border Grid.Row="2" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
                 <Grid ColumnDefinitions="Auto,*,Auto,Auto,Auto,Auto" Margin="16,0">
                     <TextBlock Grid.Column="0" VerticalAlignment="Center"
                                FontFamily="Consolas, monospace" FontSize="11" Foreground="{DynamicResource TextDisabledBrush}">

+ 15 - 3
src/YZWater.Avalonia/Views/ViewBView.axaml

@@ -9,9 +9,21 @@
     </UserControl.DataContext>
 
     <Border Background="{DynamicResource AppBgBrush}">
-        <Grid RowDefinitions="*,32">
+        <Grid RowDefinitions="48,*,32">
+            <!-- 椤堕儴 -->
+            <Border Grid.Row="0" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
+                <Grid Margin="16,0">
+                    <StackPanel Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
+                        <Border Background="{DynamicResource InfoBrush}" Width="3" Height="20" CornerRadius="1"/>
+                        <TextBlock Text="PARAMETERS" FontFamily="{DynamicResource MonoFont}" FontSize="16" FontWeight="Bold"
+                                   Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
+                        <TextBlock Text="绯荤粺鍙傛暟閰嶇疆" FontSize="12" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
+                    </StackPanel>
+                </Grid>
+            </Border>
+
             <!-- 鍐呭 -->
-            <ScrollViewer Grid.Row="0" Margin="8,4">
+            <ScrollViewer Grid.Row="1" Margin="8,4">
                 <Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto">
 
                     <!-- PLC 杩炴帴璁剧疆 -->
@@ -101,7 +113,7 @@
             </ScrollViewer>
 
             <!-- 搴曢儴鐘舵佹爮 -->
-            <Border Grid.Row="1" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
+            <Border Grid.Row="2" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
                 <TextBlock Text="CONFIG v1.0" FontFamily="{DynamicResource MonoFont}" FontSize="10"
                            Foreground="{DynamicResource TextDisabledBrush}" VerticalAlignment="Center" Margin="16,0"/>
             </Border>

+ 14 - 3
src/YZWater.Avalonia/Views/ViewCView.axaml

@@ -10,10 +10,21 @@
     </UserControl.DataContext>
 
     <Border Background="{DynamicResource AppBgBrush}">
-        <Grid RowDefinitions="*,32">
+        <Grid RowDefinitions="48,*,32">
+            <!-- 椤堕儴 -->
+            <Border Grid.Row="0" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
+                <Grid Margin="16,0">
+                    <StackPanel Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
+                        <Border Background="{DynamicResource SuccessBrush}" Width="3" Height="20" CornerRadius="1"/>
+                        <TextBlock Text="FLOW RECORDS" FontFamily="{DynamicResource MonoFont}" FontSize="16" FontWeight="Bold"
+                                   Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
+                        <TextBlock Text="娴侀噺鍘嗗彶鏁版嵁" FontSize="12" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
+                    </StackPanel>
+                </Grid>
+            </Border>
 
             <!-- 鍐呭 -->
-            <Grid Grid.Row="0" RowDefinitions="Auto,*,Auto" Margin="8,4">
+            <Grid Grid.Row="1" RowDefinitions="Auto,*,Auto" Margin="8,4">
 
                 <!-- 鏌ヨ鏉′欢 -->
                 <Border Grid.Row="0" Background="{DynamicResource SurfaceBgBrush}" CornerRadius="2"
@@ -69,7 +80,7 @@
             </Grid>
 
             <!-- 搴曢儴 -->
-            <Border Grid.Row="1" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
+            <Border Grid.Row="2" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
                 <TextBlock Text="FLOW DATA v1.0" FontFamily="{DynamicResource MonoFont}" FontSize="10"
                            Foreground="{DynamicResource TextDisabledBrush}" VerticalAlignment="Center" Margin="16,0"/>
             </Border>

+ 18 - 3
src/YZWater.Avalonia/Views/ViewDView.axaml

@@ -9,10 +9,25 @@
     </UserControl.DataContext>
 
     <Border Background="{DynamicResource AppBgBrush}">
-        <Grid RowDefinitions="*,32">
+        <Grid RowDefinitions="48,*,32">
+            <!-- 椤堕儴 -->
+            <Border Grid.Row="0" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
+                <Grid Margin="16,0">
+                    <StackPanel Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
+                        <Border Background="{DynamicResource DangerBrush}" Width="3" Height="20" CornerRadius="1"/>
+                        <TextBlock Text="ALARM LOG" FontFamily="{DynamicResource MonoFont}" FontSize="16" FontWeight="Bold"
+                                   Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
+                        <TextBlock Text="鎶ヨ鍘嗗彶璁板綍" FontSize="12" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
+                        <Border Background="{DynamicResource DangerBrush}" CornerRadius="10" Padding="8,2" Margin="8,0,0,0">
+                            <TextBlock Text="{Binding UnconfirmedCount, StringFormat='{}{0}'}" FontFamily="{DynamicResource MonoFont}" FontSize="11"
+                                       Foreground="White"/>
+                        </Border>
+                    </StackPanel>
+                </Grid>
+            </Border>
 
             <!-- 鍐呭 -->
-            <Grid Grid.Row="0" RowDefinitions="Auto,*,Auto" Margin="8,4">
+            <Grid Grid.Row="1" RowDefinitions="Auto,*,Auto" Margin="8,4">
 
                 <!-- 鏌ヨ鏉′欢 -->
                 <Border Grid.Row="0" Background="{DynamicResource SurfaceBgBrush}" CornerRadius="2"
@@ -76,7 +91,7 @@
             </Grid>
 
             <!-- 搴曢儴 -->
-            <Border Grid.Row="1" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
+            <Border Grid.Row="2" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
                 <TextBlock Text="ALARM SYSTEM v1.0" FontFamily="{DynamicResource MonoFont}" FontSize="10"
                            Foreground="{DynamicResource TextDisabledBrush}" VerticalAlignment="Center" Margin="16,0"/>
             </Border>

+ 13 - 2
src/YZWater.Avalonia/Views/ViewEView.axaml

@@ -9,7 +9,18 @@
     </UserControl.DataContext>
 
     <Border Background="{DynamicResource AppBgBrush}">
-        <Grid RowDefinitions="*,32">
+        <Grid RowDefinitions="48,*,32">
+            <!-- 椤堕儴 -->
+            <Border Grid.Row="0" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
+                <Grid Margin="16,0">
+                    <StackPanel Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
+                        <Border Background="{DynamicResource TextSecondaryBrush}" Width="3" Height="20" CornerRadius="1"/>
+                        <TextBlock Text="ABOUT" FontFamily="{DynamicResource MonoFont}" FontSize="16" FontWeight="Bold"
+                                   Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
+                        <TextBlock Text="绯荤粺淇℃伅" FontSize="12" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center"/>
+                    </StackPanel>
+                </Grid>
+            </Border>
 
             <!-- 鍐呭 -->
             <ScrollViewer Grid.Row="1" Margin="8,4">
@@ -85,7 +96,7 @@
             </ScrollViewer>
 
             <!-- 搴曢儴 -->
-            <Border Grid.Row="1" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
+            <Border Grid.Row="2" Background="{DynamicResource SurfaceBgBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
                 <TextBlock Text="ABOUT v1.0" FontFamily="{DynamicResource MonoFont}" FontSize="10"
                            Foreground="{DynamicResource TextDisabledBrush}" VerticalAlignment="Center" Margin="16,0"/>
             </Border>