| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <Window xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:vm="using:YZWater.Core.ViewModels"
- xmlns:views="using:YZWater.Avalonia.Views"
- xmlns:conv="using:YZWater.Avalonia.Converters"
- xmlns:th="using:YZWater.Avalonia.Controls"
- x:Class="YZWater.Avalonia.Views.MainWindow"
- x:DataType="vm:MainViewModel"
- Title="{Binding Title}"
- Width="1280" Height="800"
- MinWidth="1024" MinHeight="700"
- WindowStartupLocation="CenterScreen"
- Background="{DynamicResource AppBgBrush}">
- <Window.DataContext>
- <vm:MainViewModel/>
- </Window.DataContext>
- <DockPanel>
- <!-- ═══ 底部导航栏 ═══ -->
- <Border x:Name="NavBar" DockPanel.Dock="Bottom" Background="{DynamicResource NavBgBrush}"
- BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0" Padding="4,0">
- <Grid ColumnDefinitions="*,Auto,Auto">
- <!-- 导航按钮 -->
- <StackPanel Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="0">
- <Button Command="{Binding ShowViewACommand}" Padding="20,8" BorderThickness="0" Background="Transparent">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <Border Width="3" Height="14" CornerRadius="1"
- Background="{Binding IsTabAActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- <TextBlock Text="{Binding NavProcess}" FontFamily="Consolas, monospace" FontSize="11"
- FontWeight="{Binding IsTabAActive, Converter={x:Static conv:BoolConverters.ToFontWeight}}"
- Foreground="{Binding IsTabAActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- </StackPanel>
- </Button>
- <Border Background="{DynamicResource BorderBrush}" Width="1" Height="20" VerticalAlignment="Center"/>
- <Button Command="{Binding ShowViewBCommand}" Padding="20,8" BorderThickness="0" Background="Transparent">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <Border Width="3" Height="14" CornerRadius="1"
- Background="{Binding IsTabBActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- <TextBlock Text="{Binding NavParams}" FontFamily="Consolas, monospace" FontSize="11"
- FontWeight="{Binding IsTabBActive, Converter={x:Static conv:BoolConverters.ToFontWeight}}"
- Foreground="{Binding IsTabBActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- </StackPanel>
- </Button>
- <Border Background="{DynamicResource BorderBrush}" Width="1" Height="20" VerticalAlignment="Center"/>
- <Button Command="{Binding ShowViewCCommand}" Padding="20,8" BorderThickness="0" Background="Transparent">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <Border Width="3" Height="14" CornerRadius="1"
- Background="{Binding IsTabCActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- <TextBlock Text="{Binding NavFlow}" FontFamily="Consolas, monospace" FontSize="11"
- FontWeight="{Binding IsTabCActive, Converter={x:Static conv:BoolConverters.ToFontWeight}}"
- Foreground="{Binding IsTabCActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- </StackPanel>
- </Button>
- <Border Background="{DynamicResource BorderBrush}" Width="1" Height="20" VerticalAlignment="Center"/>
- <Button Command="{Binding ShowViewDCommand}" Padding="20,8" BorderThickness="0" Background="Transparent">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <Border Width="3" Height="14" CornerRadius="1"
- Background="{Binding IsTabDActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- <TextBlock Text="{Binding NavAlarm}" FontFamily="Consolas, monospace" FontSize="11"
- FontWeight="{Binding IsTabDActive, Converter={x:Static conv:BoolConverters.ToFontWeight}}"
- Foreground="{Binding IsTabDActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- </StackPanel>
- </Button>
- <Border Background="{DynamicResource BorderBrush}" Width="1" Height="20" VerticalAlignment="Center"/>
- <Button Command="{Binding ShowViewECommand}" Padding="20,8" BorderThickness="0" Background="Transparent">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <Border Width="3" Height="14" CornerRadius="1"
- Background="{Binding IsTabEActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- <TextBlock Text="{Binding NavAbout}" FontFamily="Consolas, monospace" FontSize="11"
- FontWeight="{Binding IsTabEActive, Converter={x:Static conv:BoolConverters.ToFontWeight}}"
- Foreground="{Binding IsTabEActive, Converter={x:Static conv:BoolConverters.ToBrush}}"/>
- </StackPanel>
- </Button>
- </StackPanel>
- <!-- 主题切换 -->
- <Button Grid.Column="1" Command="{Binding ToggleThemeCommand}" Classes="btn-toggle" Margin="8,0">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <TextBlock Text="{Binding ThemeIcon}" FontSize="14" VerticalAlignment="Center"/>
- <TextBlock Text="THEME" FontSize="10" VerticalAlignment="Center"
- Foreground="{DynamicResource TextSecondaryBrush}"/>
- </StackPanel>
- </Button>
- <!-- 语言切换 -->
- <Button Grid.Column="2" Command="{Binding ToggleLanguageCommand}" Classes="btn-toggle" Margin="0,0,8,0">
- <StackPanel Orientation="Horizontal" Spacing="6">
- <TextBlock Text="{Binding LangIcon}" FontSize="12" FontWeight="Bold" VerticalAlignment="Center"/>
- <TextBlock Text="LANG" FontSize="10" VerticalAlignment="Center"
- Foreground="{DynamicResource TextSecondaryBrush}"/>
- </StackPanel>
- </Button>
- </Grid>
- </Border>
- <!-- ═══ 主内容区域 ═══ -->
- <TabControl SelectedIndex="{Binding SelectedTabIndex}" Background="{DynamicResource AppBgBrush}">
- <TabItem Header="PROCESS" IsVisible="False">
- <views:ViewAView/>
- </TabItem>
- <TabItem Header="PARAMS" IsVisible="False">
- <views:ViewBView/>
- </TabItem>
- <TabItem Header="FLOW" IsVisible="False">
- <views:ViewCView/>
- </TabItem>
- <TabItem Header="ALARM" IsVisible="False">
- <views:ViewDView/>
- </TabItem>
- <TabItem Header="ABOUT" IsVisible="False">
- <views:ViewEView/>
- </TabItem>
- </TabControl>
- </DockPanel>
- </Window>
|