A:调整设置页面样式
This commit is contained in:
1 parent
1023832c7b
commit
2a3e2eba65
1 file changed
+293
-216
@@ -6,14 +6,129 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="NetVizor - 设置"
|
Title="NetVizor - 设置"
|
||||||
Height="620"
|
Height="720"
|
||||||
Width="470"
|
Width="560"
|
||||||
MinHeight="620"
|
MinHeight="720"
|
||||||
MinWidth="470"
|
MinWidth="560"
|
||||||
MaxHeight="620"
|
|
||||||
MaxWidth="470"
|
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
ResizeMode="NoResize">
|
ResizeMode="NoResize"
|
||||||
|
Background="#F8F9FA">
|
||||||
|
|
||||||
|
<!-- 窗口资源 -->
|
||||||
|
<Window.Resources>
|
||||||
|
<!-- 卡片样式 -->
|
||||||
|
<Style x:Key="CardStyle" TargetType="Border">
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#E5E7EB"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="CornerRadius" Value="8"/>
|
||||||
|
<Setter Property="Padding" Value="16"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,0,12"/>
|
||||||
|
<Setter Property="Effect">
|
||||||
|
<Setter.Value>
|
||||||
|
<DropShadowEffect Color="#000000" BlurRadius="4" ShadowDepth="1" Opacity="0.1"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- 分组标题样式 -->
|
||||||
|
<Style x:Key="GroupTitleStyle" TargetType="TextBlock">
|
||||||
|
<Setter Property="FontSize" Value="16"/>
|
||||||
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||||
|
<Setter Property="Foreground" Value="#1F2937"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,0,12"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- 标签样式 -->
|
||||||
|
<Style x:Key="LabelStyle" TargetType="TextBlock">
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
<Setter Property="Foreground" Value="#4B5563"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,8,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- 颜色按钮样式 -->
|
||||||
|
<Style x:Key="ColorButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Width" Value="32"/>
|
||||||
|
<Setter Property="Height" Value="32"/>
|
||||||
|
<Setter Property="BorderThickness" Value="2"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#D1D5DB"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="4">
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- 输入框样式 -->
|
||||||
|
<Style x:Key="InputStyle" TargetType="TextBox">
|
||||||
|
<Setter Property="Padding" Value="8,6"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#D1D5DB"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- 按钮样式 -->
|
||||||
|
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Background" Value="#3B82F6"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Padding" Value="16,8"/>
|
||||||
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="{TemplateBinding Background}"
|
||||||
|
CornerRadius="6"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#2563EB"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="Foreground" Value="#6B7280"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#D1D5DB"/>
|
||||||
|
<Setter Property="Padding" Value="16,8"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="6"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#F9FAFB"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
<!-- 主容器 -->
|
<!-- 主容器 -->
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -22,230 +137,192 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- 内容区域 -->
|
<!-- 内容滚动区域 -->
|
||||||
<Grid Grid.Row="0" Margin="20,20,20,0">
|
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto" Margin="20">
|
||||||
<Grid.ColumnDefinitions>
|
<StackPanel>
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="16" />
|
<!-- 外观设置 -->
|
||||||
<ColumnDefinition Width="180" />
|
<Border Style="{StaticResource CardStyle}">
|
||||||
</Grid.ColumnDefinitions>
|
<StackPanel>
|
||||||
|
<TextBlock Text="🎨 外观设置" Style="{StaticResource GroupTitleStyle}"/>
|
||||||
|
|
||||||
|
<!-- 颜色设置 -->
|
||||||
|
<Grid Margin="0,0,0,16">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="12"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="12"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- 文字颜色 -->
|
||||||
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||||
|
<TextBlock Text="文字颜色" Style="{StaticResource LabelStyle}" Width="80"/>
|
||||||
|
<TextBox x:Name="TextColorBox" Text="#333333" Style="{StaticResource InputStyle}" Width="120" Margin="0,0,8,0"/>
|
||||||
|
<Button x:Name="TextColorButton" Background="#333333" Style="{StaticResource ColorButtonStyle}" Click="SelectTextColor_Click"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<!-- 左侧设置区 -->
|
<!-- 背景颜色 -->
|
||||||
<StackPanel Grid.Column="0">
|
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||||
|
<TextBlock Text="背景颜色" Style="{StaticResource LabelStyle}" Width="80"/>
|
||||||
|
<TextBox x:Name="BackgroundColorBox" Text="#F0FFFFFF" Style="{StaticResource InputStyle}" Width="120" Margin="0,0,8,0"/>
|
||||||
|
<Button x:Name="BackgroundColorButton" Background="#F0FFFFFF" Style="{StaticResource ColorButtonStyle}" Click="SelectBackgroundColor_Click"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<!-- 外观 -->
|
<!-- 透明度 -->
|
||||||
<TextBlock Text="外观" FontSize="14" FontWeight="Bold" Margin="0,0,0,12" />
|
<StackPanel Grid.Row="4" Orientation="Horizontal">
|
||||||
<Grid Margin="0,0,0,16">
|
<TextBlock Text="透明度" Style="{StaticResource LabelStyle}" Width="80"/>
|
||||||
<Grid.RowDefinitions>
|
<Slider x:Name="OpacitySlider" Minimum="10" Maximum="100" Value="94"
|
||||||
<RowDefinition Height="Auto" />
|
TickFrequency="10" IsSnapToTickEnabled="True" ValueChanged="OpacitySlider_ValueChanged"
|
||||||
<RowDefinition Height="8" />
|
Width="120" Margin="0,0,8,0" VerticalAlignment="Center"/>
|
||||||
<RowDefinition Height="Auto" />
|
<TextBlock x:Name="OpacityText" Text="94%" TextAlignment="Center" VerticalAlignment="Center"
|
||||||
<RowDefinition Height="8" />
|
Width="40" FontWeight="SemiBold" Foreground="#3B82F6"/>
|
||||||
<RowDefinition Height="Auto" />
|
</StackPanel>
|
||||||
</Grid.RowDefinitions>
|
</Grid>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="80" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="32" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- 文字颜色 -->
|
<!-- 预览区域 -->
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="文字颜色" VerticalAlignment="Center" />
|
<StackPanel>
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" x:Name="TextColorBox" Text="#333333"
|
<TextBlock Text="预览效果" Style="{StaticResource LabelStyle}" Margin="0,0,0,8"/>
|
||||||
Margin="0,0,8,0" />
|
<Border x:Name="PreviewBorder" Background="LightGray" BorderBrush="#D1D5DB" BorderThickness="1"
|
||||||
<Button Grid.Row="0" Grid.Column="2" x:Name="TextColorButton" Background="#333333"
|
CornerRadius="6" Padding="16,12" HorizontalAlignment="Center">
|
||||||
Width="24" Height="24" Click="SelectTextColor_Click" />
|
<StackPanel x:Name="PreviewPanel" Orientation="Horizontal">
|
||||||
|
<Grid>
|
||||||
<!-- 背景颜色 -->
|
<Grid.ColumnDefinitions>
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="背景颜色" VerticalAlignment="Center" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="BackgroundColorBox" Text="#F0FFFFFF"
|
<ColumnDefinition Width="*" />
|
||||||
Margin="0,0,8,0" />
|
</Grid.ColumnDefinitions>
|
||||||
<Button Grid.Row="2" Grid.Column="2" x:Name="BackgroundColorButton" Background="#F0FFFFFF"
|
<TextBlock Grid.Column="0" Text="↑" Foreground="Red" FontSize="12" FontWeight="Bold"
|
||||||
Width="24" Height="24" Click="SelectBackgroundColor_Click" />
|
VerticalAlignment="Center" Margin="0,0,6,0" />
|
||||||
|
<TextBlock Grid.Column="1" x:Name="PreviewUploadText" Text="1.25 MB/s" FontSize="12"
|
||||||
<!-- 透明度 -->
|
FontWeight="Bold" VerticalAlignment="Center" />
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="透明度" VerticalAlignment="Center" />
|
</Grid>
|
||||||
<Slider Grid.Row="4" Grid.Column="1" x:Name="OpacitySlider" Minimum="10" Maximum="100"
|
<Grid Margin="15,0,0,0">
|
||||||
Value="94" TickFrequency="10" IsSnapToTickEnabled="True"
|
<Grid.ColumnDefinitions>
|
||||||
ValueChanged="OpacitySlider_ValueChanged" Margin="0,0,8,0" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<TextBlock Grid.Row="4" Grid.Column="2" x:Name="OpacityText" Text="94%"
|
<ColumnDefinition Width="*" />
|
||||||
TextAlignment="Center" VerticalAlignment="Center" />
|
</Grid.ColumnDefinitions>
|
||||||
</Grid>
|
<TextBlock Grid.Column="0" Text="↓" Foreground="Green" FontSize="12" FontWeight="Bold"
|
||||||
|
VerticalAlignment="Center" Margin="0,0,2,0" />
|
||||||
<!-- 显示 -->
|
<TextBlock Grid.Column="1" x:Name="PreviewDownloadText" Text="15.67 MB/s" FontSize="12"
|
||||||
<TextBlock Text="显示" FontSize="14" FontWeight="Bold" Margin="0,0,0,12" />
|
FontWeight="Bold" VerticalAlignment="Center" />
|
||||||
<Grid Margin="0,0,0,16">
|
</Grid>
|
||||||
<Grid.RowDefinitions>
|
</StackPanel>
|
||||||
<RowDefinition Height="Auto" />
|
</Border>
|
||||||
<RowDefinition Height="8" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="8" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="80" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- 速度单位 -->
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="速度单位" VerticalAlignment="Center" />
|
|
||||||
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="SpeedUnitComboBox"
|
|
||||||
SelectionChanged="SpeedUnitComboBox_SelectionChanged">
|
|
||||||
<ComboBoxItem Content="自动选择" Tag="Auto" IsSelected="True" />
|
|
||||||
<ComboBoxItem Content="B/s" Tag="Bytes" />
|
|
||||||
<ComboBoxItem Content="KB/s" Tag="KB" />
|
|
||||||
<ComboBoxItem Content="MB/s" Tag="MB" />
|
|
||||||
</ComboBox>
|
|
||||||
|
|
||||||
<!-- 布局方向 -->
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="布局方向" VerticalAlignment="Center" />
|
|
||||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
|
||||||
<RadioButton x:Name="VerticalLayoutRadio" Content="纵向" IsChecked="True"
|
|
||||||
Margin="0,0,20,0" Checked="LayoutDirection_Changed" />
|
|
||||||
<RadioButton x:Name="HorizontalLayoutRadio" Content="横向"
|
|
||||||
Checked="LayoutDirection_Changed" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- 显示单位 -->
|
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="显示选项" VerticalAlignment="Center" />
|
|
||||||
<StackPanel Grid.Row="4" Grid.Column="1">
|
|
||||||
<CheckBox x:Name="ShowUnitCheckBox" Content="显示单位"
|
|
||||||
IsChecked="True" Checked="ShowUnitCheckBox_Changed"
|
|
||||||
Unchecked="ShowUnitCheckBox_Changed" />
|
|
||||||
<CheckBox x:Name="ShowTopListCheckBox" Content="显示网速排行榜" Margin="0,4,0,0"
|
|
||||||
IsChecked="False" Checked="ShowTopListCheckBox_Changed"
|
|
||||||
Unchecked="ShowTopListCheckBox_Changed" />
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
|
|
||||||
<TextBlock Text="排行榜数量:" VerticalAlignment="Center" Margin="0,0,8,0" />
|
|
||||||
<ComboBox x:Name="TopListCountComboBox" Width="80"
|
|
||||||
SelectionChanged="TopListCountComboBox_SelectionChanged">
|
|
||||||
<ComboBoxItem Content="1" Tag="1" />
|
|
||||||
<ComboBoxItem Content="2" Tag="2" />
|
|
||||||
<ComboBoxItem Content="3" Tag="3" IsSelected="True" />
|
|
||||||
<ComboBoxItem Content="4" Tag="4" />
|
|
||||||
<ComboBoxItem Content="5" Tag="5" />
|
|
||||||
</ComboBox>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Border>
|
||||||
|
|
||||||
<!-- 交互 -->
|
<!-- 显示设置 -->
|
||||||
<TextBlock Text="交互" FontSize="14" FontWeight="Bold" Margin="0,0,0,12" />
|
<Border Style="{StaticResource CardStyle}">
|
||||||
<Grid Margin="0,0,0,16">
|
<StackPanel>
|
||||||
<Grid.ColumnDefinitions>
|
<TextBlock Text="📊 显示设置" Style="{StaticResource GroupTitleStyle}"/>
|
||||||
<ColumnDefinition Width="80" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Grid.Column="0" Text="双击动作" VerticalAlignment="Center" />
|
|
||||||
<ComboBox Grid.Column="1" x:Name="DoubleClickActionComboBox"
|
|
||||||
SelectionChanged="DoubleClickActionComboBox_SelectionChanged">
|
|
||||||
<ComboBoxItem Content="无动作" Tag="None" IsSelected="True" />
|
|
||||||
<ComboBoxItem Content="流量分析" Tag="TrafficAnalysis" />
|
|
||||||
<ComboBoxItem Content="打开设置" Tag="Settings" />
|
|
||||||
</ComboBox>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- 窗口行为 -->
|
|
||||||
<TextBlock Text="窗口行为" FontSize="14" FontWeight="Bold" Margin="0,0,0,12" />
|
|
||||||
<Grid Margin="0,0,0,16">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="8" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="8" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="8" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="8" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="12" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- 始终置顶 -->
|
|
||||||
<CheckBox Grid.Row="0" x:Name="TopmostCheckBox" Content="始终置顶"
|
|
||||||
IsChecked="True" Checked="TopmostCheckBox_Changed"
|
|
||||||
Unchecked="TopmostCheckBox_Changed" />
|
|
||||||
|
|
||||||
<!-- 锁定窗口位置 -->
|
|
||||||
<CheckBox Grid.Row="2" x:Name="LockPositionCheckBox" Content="锁定窗口位置"
|
|
||||||
IsChecked="False" Checked="LockPositionCheckBox_Changed"
|
|
||||||
Unchecked="LockPositionCheckBox_Changed" />
|
|
||||||
|
|
||||||
<!-- 启用点击穿透 -->
|
|
||||||
<CheckBox Grid.Row="4" x:Name="ClickThroughCheckBox" Content="启用点击穿透"
|
|
||||||
IsChecked="False" Checked="ClickThroughCheckBox_Changed"
|
|
||||||
Unchecked="ClickThroughCheckBox_Changed" />
|
|
||||||
|
|
||||||
<!-- 不能超出屏幕 -->
|
|
||||||
<CheckBox Grid.Row="6" x:Name="SnapToScreenCheckBox" Content="不能超出屏幕"
|
|
||||||
IsChecked="False" Checked="SnapToScreenCheckBox_Changed"
|
|
||||||
Unchecked="SnapToScreenCheckBox_Changed" />
|
|
||||||
|
|
||||||
<!-- 显示详细信息 -->
|
|
||||||
<CheckBox Grid.Row="8" x:Name="ShowDetailedInfoCheckBox" Content="显示详细信息"
|
|
||||||
IsChecked="False" Checked="ShowDetailedInfoCheckBox_Changed"
|
|
||||||
Unchecked="ShowDetailedInfoCheckBox_Changed" />
|
|
||||||
|
|
||||||
<!-- 重置窗口位置按钮 -->
|
|
||||||
<Button Grid.Row="10" HorizontalAlignment="Left" Content="重置窗口位置"
|
|
||||||
Click="ResetWindowPosition_Click" Padding="12,6" MinWidth="100" />
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- 右侧预览区 -->
|
|
||||||
<StackPanel Grid.Column="2">
|
|
||||||
<TextBlock Text="预览" FontSize="14" FontWeight="Bold" Margin="0,0,0,12" />
|
|
||||||
|
|
||||||
<Border HorizontalAlignment="Center" x:Name="PreviewBorder"
|
|
||||||
Background="LightGray" BorderBrush="Gray" BorderThickness="1"
|
|
||||||
Padding="16,12">
|
|
||||||
|
|
||||||
<StackPanel x:Name="PreviewPanel" Orientation="Horizontal">
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<RowDefinition Height="Auto"/>
|
||||||
<ColumnDefinition Width="*" />
|
<RowDefinition Height="16"/>
|
||||||
</Grid.ColumnDefinitions>
|
<RowDefinition Height="Auto"/>
|
||||||
<TextBlock Grid.Column="0" Text="↑" Foreground="Red" FontSize="11"
|
<RowDefinition Height="16"/>
|
||||||
FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,6,0" />
|
<RowDefinition Height="Auto"/>
|
||||||
<TextBlock Grid.Column="1" x:Name="PreviewUploadText" Text="1.25 MB/s"
|
</Grid.RowDefinitions>
|
||||||
FontSize="11" FontWeight="Bold"
|
|
||||||
VerticalAlignment="Center" />
|
<!-- 速度单位 -->
|
||||||
</Grid>
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||||
<Grid Margin="0,0,0,0">
|
<TextBlock Text="速度单位" Style="{StaticResource LabelStyle}" Width="80"/>
|
||||||
<Grid.ColumnDefinitions>
|
<ComboBox x:Name="SpeedUnitComboBox" Width="150" SelectionChanged="SpeedUnitComboBox_SelectionChanged">
|
||||||
<ColumnDefinition Width="Auto" />
|
<ComboBoxItem Content="自动选择" Tag="Auto" IsSelected="True" />
|
||||||
<ColumnDefinition Width="*" />
|
<ComboBoxItem Content="B/s" Tag="Bytes" />
|
||||||
</Grid.ColumnDefinitions>
|
<ComboBoxItem Content="KB/s" Tag="KB" />
|
||||||
<TextBlock Grid.Column="0" Text="↓" Foreground="Green" FontSize="11"
|
<ComboBoxItem Content="MB/s" Tag="MB" />
|
||||||
FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,2,0" />
|
</ComboBox>
|
||||||
<TextBlock Grid.Column="1" x:Name="PreviewDownloadText" Text="15.67 MB/s"
|
</StackPanel>
|
||||||
FontSize="11" FontWeight="Bold"
|
|
||||||
VerticalAlignment="Center" />
|
<!-- 布局方向 -->
|
||||||
|
<StackPanel Grid.Row="2">
|
||||||
|
<TextBlock Text="布局方向" Style="{StaticResource LabelStyle}" Margin="0,0,0,8"/>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton x:Name="VerticalLayoutRadio" Content="纵向" IsChecked="True" Margin="0,0,20,0"
|
||||||
|
Checked="LayoutDirection_Changed" FontSize="13"/>
|
||||||
|
<RadioButton x:Name="HorizontalLayoutRadio" Content="横向" Checked="LayoutDirection_Changed" FontSize="13"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- 显示选项 -->
|
||||||
|
<StackPanel Grid.Row="4">
|
||||||
|
<TextBlock Text="显示选项" Style="{StaticResource LabelStyle}" Margin="0,0,0,8"/>
|
||||||
|
<StackPanel>
|
||||||
|
<CheckBox x:Name="ShowUnitCheckBox" Content="显示单位" IsChecked="True"
|
||||||
|
Checked="ShowUnitCheckBox_Changed" Unchecked="ShowUnitCheckBox_Changed" FontSize="13"/>
|
||||||
|
<CheckBox x:Name="ShowTopListCheckBox" Content="显示网速排行榜" Margin="0,8,0,0" IsChecked="False"
|
||||||
|
Checked="ShowTopListCheckBox_Changed" Unchecked="ShowTopListCheckBox_Changed" FontSize="13"/>
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="20,8,0,0">
|
||||||
|
<TextBlock Text="排行榜数量:" VerticalAlignment="Center" Margin="0,0,8,0" Style="{StaticResource LabelStyle}"/>
|
||||||
|
<ComboBox x:Name="TopListCountComboBox" Width="80" SelectionChanged="TopListCountComboBox_SelectionChanged">
|
||||||
|
<ComboBoxItem Content="1" Tag="1" />
|
||||||
|
<ComboBoxItem Content="2" Tag="2" />
|
||||||
|
<ComboBoxItem Content="3" Tag="3" IsSelected="True" />
|
||||||
|
<ComboBoxItem Content="4" Tag="4" />
|
||||||
|
<ComboBoxItem Content="5" Tag="5" />
|
||||||
|
</ComboBox>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- 底部按钮 -->
|
<!-- 交互设置 -->
|
||||||
<Border Grid.Row="1" Background="LightGray" Padding="20,12">
|
<Border Style="{StaticResource CardStyle}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="🖱️ 交互设置" Style="{StaticResource GroupTitleStyle}"/>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="双击动作" Style="{StaticResource LabelStyle}" Width="80"/>
|
||||||
|
<ComboBox x:Name="DoubleClickActionComboBox" Width="150" SelectionChanged="DoubleClickActionComboBox_SelectionChanged">
|
||||||
|
<ComboBoxItem Content="无动作" Tag="None" IsSelected="True" />
|
||||||
|
<ComboBoxItem Content="流量分析" Tag="TrafficAnalysis" />
|
||||||
|
<ComboBoxItem Content="打开设置" Tag="Settings" />
|
||||||
|
</ComboBox>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- 窗口行为 -->
|
||||||
|
<Border Style="{StaticResource CardStyle}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="🪟 窗口行为" Style="{StaticResource GroupTitleStyle}"/>
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<CheckBox x:Name="TopmostCheckBox" Content="始终置顶" IsChecked="True"
|
||||||
|
Checked="TopmostCheckBox_Changed" Unchecked="TopmostCheckBox_Changed" FontSize="13"/>
|
||||||
|
<CheckBox x:Name="LockPositionCheckBox" Content="锁定窗口位置" IsChecked="False" Margin="0,8,0,0"
|
||||||
|
Checked="LockPositionCheckBox_Changed" Unchecked="LockPositionCheckBox_Changed" FontSize="13"/>
|
||||||
|
<CheckBox x:Name="ClickThroughCheckBox" Content="启用点击穿透" IsChecked="False" Margin="0,8,0,0"
|
||||||
|
Checked="ClickThroughCheckBox_Changed" Unchecked="ClickThroughCheckBox_Changed" FontSize="13"/>
|
||||||
|
<CheckBox x:Name="SnapToScreenCheckBox" Content="不能超出屏幕" IsChecked="False" Margin="0,8,0,0"
|
||||||
|
Checked="SnapToScreenCheckBox_Changed" Unchecked="SnapToScreenCheckBox_Changed" FontSize="13"/>
|
||||||
|
<CheckBox x:Name="ShowDetailedInfoCheckBox" Content="显示详细信息" IsChecked="False" Margin="0,8,0,0"
|
||||||
|
Checked="ShowDetailedInfoCheckBox_Changed" Unchecked="ShowDetailedInfoCheckBox_Changed" FontSize="13"/>
|
||||||
|
|
||||||
|
<Button Content="重置窗口位置" Click="ResetWindowPosition_Click" Margin="0,16,0,0"
|
||||||
|
Style="{StaticResource SecondaryButtonStyle}" HorizontalAlignment="Left"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<!-- 底部按钮栏 -->
|
||||||
|
<Border Grid.Row="1" Background="White" BorderBrush="#E5E7EB" BorderThickness="0,1,0,0" Padding="20,16">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Button HorizontalAlignment="Left" Content="恢复默认" Click="RestoreDefaults_Click"
|
<Button Content="恢复默认" Click="RestoreDefaults_Click" HorizontalAlignment="Left"
|
||||||
Padding="12,6" MinWidth="80" />
|
Style="{StaticResource SecondaryButtonStyle}"/>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Button Content="应用" Click="Apply_Click" Margin="0,0,8,0"
|
<Button Content="应用" Click="Apply_Click" Margin="0,0,12,0" Style="{StaticResource PrimaryButtonStyle}"/>
|
||||||
Padding="16,6" MinWidth="60" FontWeight="SemiBold" />
|
<Button Content="关闭" Click="Close_Click" Style="{StaticResource SecondaryButtonStyle}"/>
|
||||||
<Button Content="关闭" Click="Close_Click"
|
|
||||||
Padding="12,6" MinWidth="60" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
Reference in new issue
Block a user