207 lines
9.2 KiB
XML
207 lines
9.2 KiB
XML
<Window x:Class="QoSManager.Views.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="QoS Policy Manager"
|
|
Height="600" Width="900"
|
|
MinHeight="400" MinWidth="600"
|
|
WindowStartupLocation="CenterScreen"
|
|
Background="#1E1E1E">
|
|
|
|
<Grid Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Заголовок -->
|
|
<StackPanel Grid.Row="0" Margin="0,0,0,20">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="Управление QoS-политиками Windows"
|
|
FontSize="18"
|
|
FontWeight="SemiBold"
|
|
Foreground="White"/>
|
|
<TextBlock Text="Создавайте и управляйте QoS-политиками для приоритизации сетевого трафика"
|
|
FontSize="12"
|
|
Foreground="#CCCCCC"
|
|
Margin="0,5,0,0"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1"
|
|
Orientation="Horizontal"
|
|
VerticalAlignment="Top">
|
|
<TextBlock Text="Статус: "
|
|
FontSize="12"
|
|
Foreground="#CCCCCC"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="Активно"
|
|
FontSize="12"
|
|
FontWeight="SemiBold"
|
|
Foreground="#4CAF50"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<!-- DataGrid -->
|
|
<DataGrid x:Name="PoliciesDataGrid"
|
|
Grid.Row="1"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
CanUserReorderColumns="False"
|
|
CanUserResizeColumns="True"
|
|
CanUserResizeRows="False"
|
|
CanUserSortColumns="True"
|
|
GridLinesVisibility="Horizontal"
|
|
HorizontalGridLinesBrush="#3C3C3C"
|
|
VerticalGridLinesBrush="Transparent"
|
|
Background="#1E1E1E"
|
|
Foreground="White"
|
|
BorderBrush="#3C3C3C"
|
|
BorderThickness="1"
|
|
HeadersVisibility="Column"
|
|
SelectionMode="Single"
|
|
AlternatingRowBackground="#252525"
|
|
RowHeight="30"
|
|
MinRowHeight="25"
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
VirtualizingPanel.VirtualizationMode="Recycling"
|
|
ScrollViewer.CanContentScroll="True"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
|
|
|
<DataGrid.ColumnHeaderStyle>
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="Background" Value="#3C3C3C"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
<Setter Property="Height" Value="35"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
</Style>
|
|
</DataGrid.ColumnHeaderStyle>
|
|
|
|
<DataGrid.RowStyle>
|
|
<Style TargetType="DataGridRow">
|
|
<Setter Property="Background" Value="#2D2D2D"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="#0078D4"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#333333"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
|
|
<DataGrid.CellStyle>
|
|
<Style TargetType="DataGridCell">
|
|
<Setter Property="Background" Value="#2D2D2D"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="8,4"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="#0078D4"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.CellStyle>
|
|
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="#"
|
|
Binding="{Binding Number}"
|
|
Width="40"
|
|
IsReadOnly="True"/>
|
|
<DataGridTextColumn Header="Политика"
|
|
Binding="{Binding Name}"
|
|
Width="180"
|
|
IsReadOnly="True"/>
|
|
<DataGridTextColumn Header="Процесс"
|
|
Binding="{Binding Process}"
|
|
Width="*"
|
|
IsReadOnly="True"/>
|
|
<DataGridTextColumn Header="DSCP"
|
|
Binding="{Binding DSCP}"
|
|
Width="70"
|
|
IsReadOnly="True"/>
|
|
<DataGridTextColumn Header="Источник"
|
|
Binding="{Binding Source}"
|
|
Width="120"
|
|
IsReadOnly="True"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
|
|
<!-- Настройки -->
|
|
<StackPanel x:Name="SettingsPanel"
|
|
Grid.Row="2"
|
|
Orientation="Horizontal"
|
|
HorizontalAlignment="Left"
|
|
Margin="0,20,0,10">
|
|
|
|
<CheckBox x:Name="LoggingCheckBox"
|
|
Content="Вести логи"
|
|
Width="120"
|
|
Height="30"
|
|
Foreground="White"
|
|
VerticalContentAlignment="Center"/>
|
|
</StackPanel>
|
|
|
|
<!-- Кнопки -->
|
|
<StackPanel Grid.Row="3"
|
|
Orientation="Horizontal"
|
|
HorizontalAlignment="Right"
|
|
Margin="0,20,0,0">
|
|
|
|
<Button x:Name="AddPolicyButton"
|
|
Content="Добавить политику"
|
|
Width="140"
|
|
Height="35"
|
|
Margin="0,0,10,0"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
|
|
<Button x:Name="DeletePolicyButton"
|
|
Content="Удалить политику"
|
|
Width="140"
|
|
Height="35"
|
|
Margin="0,0,10,0"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
|
|
<Button x:Name="RefreshButton"
|
|
Content="Обновить"
|
|
Width="100"
|
|
Height="35"
|
|
Margin="0,0,10,0"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
|
|
|
|
<Button x:Name="LogButton"
|
|
Content="Открыть лог"
|
|
Width="100"
|
|
Height="35"
|
|
Margin="0,0,10,0"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
|
|
<Button x:Name="ExitButton"
|
|
Content="Выход"
|
|
Width="80"
|
|
Height="35"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|