You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
7.2 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Sln.Wcs.UI.ViewModels"
x:Class="Sln.Wcs.UI.Views.MainWindow"
x:DataType="vm:NavigationViewModel"
Title="基于多场景应用的 WCS 通用平台"
Width="1280" Height="780"
MinWidth="1000" MinHeight="600"
WindowStartupLocation="CenterScreen"
Background="#0A0E14"
Foreground="#BCC8D6">
<Grid RowDefinitions="Auto,Auto,*,Auto">
<!-- Title Bar -->
<Border Grid.Row="0" Padding="16,8" Background="#0A0E14" BorderBrush="#1A2F4A" BorderThickness="0,0,0,1">
<Grid ColumnDefinitions="Auto,*,Auto">
<!-- Left: Logo + Title -->
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="10" VerticalAlignment="Center">
<Canvas Width="22" Height="22">
<Rectangle Canvas.Left="1" Canvas.Top="1" Width="20" Height="16" RadiusX="2" RadiusY="2" Fill="#0F1F38" Stroke="#4FC3F7" StrokeThickness="1.2" />
<Rectangle Canvas.Left="3" Canvas.Top="3" Width="14" Height="5" RadiusX="1" RadiusY="1" Fill="#1B3A5C" />
<Line StartPoint="4,10" EndPoint="17,10" Stroke="#1B3A5C" StrokeThickness="1" />
<Ellipse Canvas.Left="4" Canvas.Top="4" Width="2" Height="2" Fill="#00E676" />
<Ellipse Canvas.Left="8" Canvas.Top="4" Width="2" Height="2" Fill="#4FC3F7" />
</Canvas>
<TextBlock Text="基于多场景应用的 WCS 通用平台" FontSize="15" FontWeight="Bold" Foreground="#E1E8F0" />
<Border Background="#1B3A5C" CornerRadius="3" Padding="5,2" VerticalAlignment="Center">
<TextBlock Text="V1.0.0" FontSize="10" Foreground="#4FC3F7" />
</Border>
</StackPanel>
<!-- Right: Status + Time + User -->
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="16" VerticalAlignment="Center">
<!-- 运行状态 -->
<StackPanel Orientation="Horizontal" Spacing="6">
<Ellipse Width="8" Height="8" Fill="#00E676" VerticalAlignment="Center" />
<TextBlock x:Name="StatusText" Text="运行正常" FontSize="12" Foreground="#8B9BB5" VerticalAlignment="Center" />
</StackPanel>
<!-- 当前时间 -->
<TextBlock x:Name="ClockText" Text="2026-06-11 12:00:00" FontSize="12" Foreground="#6B8CB5" VerticalAlignment="Center" />
<!-- 登录用户 -->
<Border Background="#0F1F38" CornerRadius="3" Padding="10,4" BorderBrush="#1B3A5C" BorderThickness="1">
<StackPanel Orientation="Horizontal" Spacing="6">
<TextBlock x:Name="UserText" Text="管理员" FontSize="12" Foreground="#DDE4F0" VerticalAlignment="Center" />
</StackPanel>
</Border>
<!-- 退出 -->
<Button x:Name="LogoutBtn" Content="退出" FontSize="11"
Background="Transparent" Foreground="#8B9BB5"
BorderBrush="#1A2F4A" BorderThickness="1"
CornerRadius="3" Padding="10,4" />
</StackPanel>
</Grid>
</Border>
<!-- Menu Bar -->
<Border Grid.Row="1" Padding="16,0" Background="#0C1622" BorderBrush="#1A2F4A" BorderThickness="0,1,0,1">
<Grid ColumnDefinitions="Auto,*">
<StackPanel Grid.Column="0" x:Name="MenuContainer" Orientation="Horizontal" Spacing="0" />
<!-- 当前页面路径 -->
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="16,0,0,0">
<TextBlock Text="{Binding CurrentPageTitle}" FontSize="12" Foreground="#4FC3F7" VerticalAlignment="Center" />
</StackPanel>
</Grid>
</Border>
<!-- Content Area -->
<Border Grid.Row="2" x:Name="ContentArea" />
<!-- System Status Bar -->
<Border Grid.Row="3" Padding="16,4" Background="#0C1622" BorderBrush="#1A2F4A" BorderThickness="0,1,0,0">
<Grid ColumnDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,*,Auto">
<!-- CPU -->
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
<Ellipse x:Name="CpuStatusDot" Width="6" Height="6" Fill="#00E676" VerticalAlignment="Center" />
<TextBlock Text="CPU" FontSize="11" Foreground="#6B8CB5" VerticalAlignment="Center" />
<TextBlock x:Name="CpuUsageText" Text="0.0%" FontSize="11" Foreground="#BCC8D6" VerticalAlignment="Center" />
</StackPanel>
<Border Grid.Column="1" Width="1" Height="12" Background="#1A2F4A" Margin="10,0" VerticalAlignment="Center" />
<!-- Memory -->
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
<Ellipse x:Name="MemStatusDot" Width="6" Height="6" Fill="#00E676" VerticalAlignment="Center" />
<TextBlock Text="内存" FontSize="11" Foreground="#6B8CB5" VerticalAlignment="Center" />
<TextBlock x:Name="MemUsageText" Text="0 MB" FontSize="11" Foreground="#BCC8D6" VerticalAlignment="Center" />
</StackPanel>
<Border Grid.Column="3" Width="1" Height="12" Background="#1A2F4A" Margin="10,0" VerticalAlignment="Center" />
<!-- Network -->
<StackPanel Grid.Column="4" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
<Ellipse x:Name="NetStatusDot" Width="6" Height="6" Fill="#00E676" VerticalAlignment="Center" />
<TextBlock Text="网络" FontSize="11" Foreground="#6B8CB5" VerticalAlignment="Center" />
<TextBlock x:Name="NetStatusText" Text="已连接" FontSize="11" Foreground="#BCC8D6" VerticalAlignment="Center" />
</StackPanel>
<!-- Uptime -->
<Border Grid.Column="5" Width="1" Height="12" Background="#1A2F4A" Margin="10,0" VerticalAlignment="Center" />
<StackPanel Grid.Column="6" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
<TextBlock Text="运行时间" FontSize="11" Foreground="#6B8CB5" VerticalAlignment="Center" />
<TextBlock x:Name="UptimeText" Text="00:00:00" FontSize="11" Foreground="#BCC8D6" VerticalAlignment="Center" />
</StackPanel>
<!-- WCS Version -->
<StackPanel Grid.Column="7" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center" Margin="24,0,0,0">
<TextBlock Text="WCS Core" FontSize="10" Foreground="#4B6A8A" VerticalAlignment="Center" />
<TextBlock Text="V1.0.0" FontSize="10" Foreground="#4FC3F7" VerticalAlignment="Center" />
</StackPanel>
</Grid>
</Border>
</Grid>
</Window>