|
|
|
|
<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="{DynamicResource PageBgBrush}"
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}">
|
|
|
|
|
|
|
|
|
|
<Grid RowDefinitions="Auto,Auto,*,Auto">
|
|
|
|
|
|
|
|
|
|
<!-- Title Bar -->
|
|
|
|
|
<Border Grid.Row="0" Padding="16,8" Background="{DynamicResource PageBgBrush}" BorderBrush="{DynamicResource BorderBrush}" 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="{DynamicResource PrimaryBgBrush}" Stroke="{DynamicResource AccentTextBrush}" StrokeThickness="1.2" />
|
|
|
|
|
<Rectangle Canvas.Left="3" Canvas.Top="3" Width="14" Height="5" RadiusX="1" RadiusY="1" Fill="{DynamicResource AccentBgBrush}" />
|
|
|
|
|
<Line StartPoint="4,10" EndPoint="17,10" Stroke="{DynamicResource AccentBgBrush}" StrokeThickness="1" />
|
|
|
|
|
<Ellipse Canvas.Left="4" Canvas.Top="4" Width="2" Height="2" Fill="{DynamicResource SuccessBrush}" />
|
|
|
|
|
<Ellipse Canvas.Left="8" Canvas.Top="4" Width="2" Height="2" Fill="{DynamicResource AccentTextBrush}" />
|
|
|
|
|
</Canvas>
|
|
|
|
|
<TextBlock Text="基于多场景应用的 WCS 通用平台" FontSize="15" FontWeight="Bold" Foreground="{DynamicResource TitleTextBrush}" />
|
|
|
|
|
<Border Background="{DynamicResource AccentBgBrush}" CornerRadius="3" Padding="5,2" VerticalAlignment="Center">
|
|
|
|
|
<TextBlock Text="V1.0.0" FontSize="10" Foreground="{DynamicResource AccentTextBrush}" />
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- Right: Status + Time + User + Theme -->
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="16" VerticalAlignment="Center">
|
|
|
|
|
<!-- 运行状态 -->
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
|
|
|
<Ellipse Width="8" Height="8" Fill="{DynamicResource SuccessBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock x:Name="StatusText" Text="运行正常" FontSize="12" Foreground="{DynamicResource SecondaryTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<!-- 当前时间 -->
|
|
|
|
|
<TextBlock x:Name="ClockText" Text="2026-06-11 12:00:00" FontSize="12" Foreground="{DynamicResource MutedTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<!-- 主题切换 -->
|
|
|
|
|
<Border x:Name="ThemeToggleBorder" Background="{DynamicResource PrimaryBgBrush}" CornerRadius="3"
|
|
|
|
|
BorderBrush="{DynamicResource AccentBgBrush}" BorderThickness="1"
|
|
|
|
|
Cursor="Hand" Padding="8,3">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="4">
|
|
|
|
|
<TextBlock x:Name="ThemeIcon" Text="🌙" FontSize="11" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock x:Name="ThemeLabel" Text="深色" FontSize="11" Foreground="{DynamicResource AccentTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
<!-- 登录用户 -->
|
|
|
|
|
<Border Background="{DynamicResource PrimaryBgBrush}" CornerRadius="3" Padding="10,4" BorderBrush="{DynamicResource AccentBgBrush}" BorderThickness="1">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
|
|
|
<TextBlock x:Name="UserText" Text="管理员" FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
<!-- 退出 -->
|
|
|
|
|
<Button x:Name="LogoutBtn" Content="退出" FontSize="11"
|
|
|
|
|
Background="Transparent" Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
|
|
|
|
|
CornerRadius="3" Padding="10,4" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<!-- Menu Bar -->
|
|
|
|
|
<Border Grid.Row="1" Padding="16,0" Background="{DynamicResource CardBgBrush}" BorderBrush="{DynamicResource BorderBrush}" 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="{DynamicResource AccentTextBrush}" 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="{DynamicResource CardBgBrush}" BorderBrush="{DynamicResource BorderBrush}" 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="{DynamicResource SuccessBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock Text="CPU" FontSize="11" Foreground="{DynamicResource MutedTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock x:Name="CpuUsageText" Text="0.0%" FontSize="11" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Column="1" Width="1" Height="12" Background="{DynamicResource BorderBrush}" 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="{DynamicResource SuccessBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock Text="内存" FontSize="11" Foreground="{DynamicResource MutedTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock x:Name="MemUsageText" Text="0 MB" FontSize="11" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Column="3" Width="1" Height="12" Background="{DynamicResource BorderBrush}" 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="{DynamicResource SuccessBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock Text="网络" FontSize="11" Foreground="{DynamicResource MutedTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock x:Name="NetStatusText" Text="已连接" FontSize="11" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock Text="↓" FontSize="10" Foreground="{DynamicResource SubtleTextBrush}" VerticalAlignment="Center" Margin="4,0,0,0" />
|
|
|
|
|
<TextBlock x:Name="NetDownText" Text="0 KB/s" FontSize="11" Foreground="{DynamicResource AccentTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock Text="↑" FontSize="10" Foreground="{DynamicResource SubtleTextBrush}" VerticalAlignment="Center" Margin="2,0,0,0" />
|
|
|
|
|
<TextBlock x:Name="NetUpText" Text="0 KB/s" FontSize="11" Foreground="{DynamicResource AccentTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- Uptime -->
|
|
|
|
|
<Border Grid.Column="5" Width="1" Height="12" Background="{DynamicResource BorderBrush}" Margin="10,0" VerticalAlignment="Center" />
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="6" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
|
|
|
|
|
<TextBlock Text="运行时间" FontSize="11" Foreground="{DynamicResource MutedTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock x:Name="UptimeText" Text="00:00:00" FontSize="11" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- Version -->
|
|
|
|
|
<StackPanel Grid.Column="7" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center" Margin="24,0,0,0">
|
|
|
|
|
<TextBlock Text="Sln.Wcs.UI" FontSize="10" Foreground="{DynamicResource SubtleTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
<TextBlock Text="V1.0.0" FontSize="10" Foreground="{DynamicResource AccentTextBrush}" VerticalAlignment="Center" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|