161 lines
6.2 KiB
XML
161 lines
6.2 KiB
XML
<Window x:Class="QoSManager.Views.PolicyEditWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="Создание QoS-политики"
|
|
Height="320" Width="500"
|
|
WindowStartupLocation="CenterScreen"
|
|
WindowStyle="None"
|
|
Background="#1E1E1E"
|
|
ResizeMode="NoResize">
|
|
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome CaptionHeight="0" GlassFrameThickness="0" ResizeBorderThickness="0" UseAeroCaptionButtons="False"/>
|
|
</WindowChrome.WindowChrome>
|
|
|
|
<Border BorderBrush="#555555" BorderThickness="1" CornerRadius="8" Background="#1E1E1E">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="30"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Title Bar -->
|
|
<Border Grid.Row="0" Style="{StaticResource TitleBar}"
|
|
MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
|
|
<Grid>
|
|
<TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=Title}"
|
|
Style="{StaticResource TitleBarText}"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button x:Name="CloseButton" Style="{StaticResource TitleBarCloseButton}"
|
|
Click="CloseButton_Click" Content=""/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Content -->
|
|
<Grid Grid.Row="1" Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="120"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Имя политики -->
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
Text="Имя политики:"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,10,10"
|
|
Foreground="White"/>
|
|
<TextBox x:Name="NameTextBox"
|
|
Grid.Row="0" Grid.Column="1"
|
|
Height="30"
|
|
Margin="0,0,0,10"
|
|
Background="#2D2D2D"
|
|
Foreground="White"
|
|
BorderBrush="#444444"
|
|
Padding="5"/>
|
|
|
|
<!-- Процесс -->
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
Text="Процесс:"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,10,10"
|
|
Foreground="White"/>
|
|
<Grid Grid.Row="1" Grid.Column="1" Margin="0,0,0,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox x:Name="ProcessTextBox"
|
|
Height="30"
|
|
Background="#2D2D2D"
|
|
Foreground="White"
|
|
BorderBrush="#444444"
|
|
Padding="5"/>
|
|
|
|
<Button x:Name="BrowseButton"
|
|
Grid.Column="1"
|
|
Content="Обзор..."
|
|
Width="80"
|
|
Height="30"
|
|
Margin="5,0,0,0"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
</Grid>
|
|
|
|
<!-- DSCP -->
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
Text="DSCP:"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,10,10"
|
|
Foreground="White"/>
|
|
<StackPanel Grid.Row="2" Grid.Column="1"
|
|
Orientation="Horizontal"
|
|
Margin="0,0,0,10">
|
|
<TextBox x:Name="DSCPTextBox"
|
|
Width="80"
|
|
Height="30"
|
|
Text="1"
|
|
Background="#2D2D2D"
|
|
Foreground="White"
|
|
BorderBrush="#444444"
|
|
Padding="5"
|
|
TextAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
PreviewTextInput="DSCPTextBox_PreviewTextInput"
|
|
TextChanged="DSCPTextBox_TextChanged"/>
|
|
|
|
<!-- 1-63 Hint -->
|
|
<TextBlock Text="1-63"
|
|
Foreground="#CCCCCC"
|
|
FontSize="12"
|
|
VerticalAlignment="Center"
|
|
Margin="10,0,0,0"/>
|
|
|
|
<!-- TOS Value moved to the right -->
|
|
<StackPanel Orientation="Vertical"
|
|
Margin="40,0,0,0"
|
|
MinWidth="120">
|
|
<TextBlock Text="TOS Value:"
|
|
Foreground="#AAAAAA"
|
|
FontSize="11"/>
|
|
<TextBlock x:Name="TosValueTextBlock"
|
|
Text="0x04 (Custom)"
|
|
Foreground="#00FF00"
|
|
FontSize="13"
|
|
FontWeight="Bold"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<!-- Кнопки -->
|
|
<StackPanel Grid.Row="5" Grid.Column="1"
|
|
Orientation="Horizontal"
|
|
HorizontalAlignment="Right"
|
|
Margin="0,20,0,0">
|
|
|
|
<Button x:Name="CreateButton"
|
|
Content="Создать"
|
|
Width="100"
|
|
Height="35"
|
|
Margin="0,0,10,0"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
|
|
<Button x:Name="CancelButton"
|
|
Content="Отмена"
|
|
Width="100"
|
|
Height="35"
|
|
Style="{StaticResource DarkButtonStyle}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|