Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c2212cde9 | ||
|
|
793076b948 |
BIN
Binary file not shown.
@@ -83,6 +83,63 @@
|
|||||||
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="Foreground" Value="White"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- Стиль для кастомного заголовка окна -->
|
||||||
|
<Style x:Key="TitleBar" TargetType="Border">
|
||||||
|
<Setter Property="Background" Value="#2D2D2D"/>
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#444444"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
||||||
|
<Setter Property="CornerRadius" Value="8,8,0,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TitleBarText" TargetType="TextBlock">
|
||||||
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||||
|
<Setter Property="FontSize" Value="12"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="12,0,0,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TitleBarButton" TargetType="Button">
|
||||||
|
<Setter Property="Width" Value="46"/>
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="{TemplateBinding Background}">
|
||||||
|
<TextBlock Text="{TemplateBinding Content}"
|
||||||
|
FontFamily="Segoe MDL2 Assets"
|
||||||
|
FontSize="10"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#3C3C3C"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="#2A2A2A"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TitleBarCloseButton" TargetType="Button" BasedOn="{StaticResource TitleBarButton}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#E81123"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="#F1707A"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- Стиль для MessageBox buttons -->
|
<!-- Стиль для MessageBox buttons -->
|
||||||
<Style TargetType="Button" x:Key="{x:Type Button}">
|
<Style TargetType="Button" x:Key="{x:Type Button}">
|
||||||
<Setter Property="Background" Value="#3C3C3C"/>
|
<Setter Property="Background" Value="#3C3C3C"/>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="QoS Manager"
|
Title="QoS Manager"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
WindowStyle="None"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
SizeToContent="WidthAndHeight"
|
SizeToContent="WidthAndHeight"
|
||||||
Background="#2D2D2D"
|
Background="#2D2D2D"
|
||||||
@@ -12,13 +13,38 @@
|
|||||||
MinWidth="300"
|
MinWidth="300"
|
||||||
MaxWidth="500">
|
MaxWidth="500">
|
||||||
|
|
||||||
<Grid Margin="20">
|
<WindowChrome.WindowChrome>
|
||||||
|
<WindowChrome CaptionHeight="0" GlassFrameThickness="0" ResizeBorderThickness="0" UseAeroCaptionButtons="False"/>
|
||||||
|
</WindowChrome.WindowChrome>
|
||||||
|
|
||||||
|
<Border BorderBrush="#555555" BorderThickness="1" CornerRadius="8" Background="#2D2D2D">
|
||||||
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="30"/>
|
||||||
<RowDefinition Height="20"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
</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="20"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Сообщение -->
|
<!-- Сообщение -->
|
||||||
<TextBlock x:Name="MessageTextBlock"
|
<TextBlock x:Name="MessageTextBlock"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
@@ -69,5 +95,7 @@
|
|||||||
Click="NoButton_Click"
|
Click="NoButton_Click"
|
||||||
Visibility="Collapsed"/>
|
Visibility="Collapsed"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
+34
-2
@@ -5,9 +5,39 @@
|
|||||||
Height="600" Width="900"
|
Height="600" Width="900"
|
||||||
MinHeight="400" MinWidth="600"
|
MinHeight="400" MinWidth="600"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
WindowStyle="None"
|
||||||
Background="#1E1E1E">
|
Background="#1E1E1E">
|
||||||
|
|
||||||
<Grid Margin="20">
|
<WindowChrome.WindowChrome>
|
||||||
|
<WindowChrome CaptionHeight="0" GlassFrameThickness="0" ResizeBorderThickness="5" 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="MinimizeButton" Style="{StaticResource TitleBarButton}"
|
||||||
|
Click="MinimizeButton_Click" Content=""/>
|
||||||
|
<Button x:Name="MaximizeButton" Style="{StaticResource TitleBarButton}"
|
||||||
|
Click="MaximizeButton_Click" Content=""/>
|
||||||
|
<Button x:Name="CloseButton" Style="{StaticResource TitleBarCloseButton}"
|
||||||
|
Click="CloseButton_Click" Content=""/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Content -->
|
||||||
|
<Grid Grid.Row="1" Margin="20">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
@@ -202,5 +232,7 @@
|
|||||||
Height="35"
|
Height="35"
|
||||||
Style="{StaticResource DarkButtonStyle}"/>
|
Style="{StaticResource DarkButtonStyle}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -336,6 +336,13 @@ namespace QoSManager.Views
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnStateChanged(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnStateChanged(e);
|
||||||
|
if (MaximizeButton != null)
|
||||||
|
MaximizeButton.Content = WindowState == WindowState.Maximized ? "\uE923" : "\uE922";
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnClosed(EventArgs e)
|
protected override void OnClosed(EventArgs e)
|
||||||
{
|
{
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
|
|||||||
@@ -4,10 +4,36 @@
|
|||||||
Title="Создание QoS-политики"
|
Title="Создание QoS-политики"
|
||||||
Height="320" Width="500"
|
Height="320" Width="500"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
WindowStyle="None"
|
||||||
Background="#1E1E1E"
|
Background="#1E1E1E"
|
||||||
ResizeMode="NoResize">
|
ResizeMode="NoResize">
|
||||||
|
|
||||||
<Grid Margin="20">
|
<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>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -128,5 +154,7 @@
|
|||||||
Height="35"
|
Height="35"
|
||||||
Style="{StaticResource DarkButtonStyle}"/>
|
Style="{StaticResource DarkButtonStyle}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -4,20 +4,48 @@
|
|||||||
Title="Выбор процесса"
|
Title="Выбор процесса"
|
||||||
Height="600" Width="800"
|
Height="600" Width="800"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
WindowStyle="None"
|
||||||
ResizeMode="CanResize"
|
ResizeMode="CanResize"
|
||||||
Background="#2b2b2b"
|
Background="#2b2b2b"
|
||||||
TextElement.Foreground="White">
|
TextElement.Foreground="White">
|
||||||
|
|
||||||
<Grid Margin="10">
|
<WindowChrome.WindowChrome>
|
||||||
|
<WindowChrome CaptionHeight="0" GlassFrameThickness="0" ResizeBorderThickness="5" UseAeroCaptionButtons="False"/>
|
||||||
|
</WindowChrome.WindowChrome>
|
||||||
|
|
||||||
|
<Border BorderBrush="#555555" BorderThickness="1" CornerRadius="8" Background="#2b2b2b">
|
||||||
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="30"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Grid.Row="0" Text="Выберите запущенный процесс:"
|
<!-- Title Bar -->
|
||||||
FontSize="14" FontWeight="Bold"
|
<Border Grid.Row="0" Style="{StaticResource TitleBar}"
|
||||||
Foreground="White" Margin="0,0,0,10"/>
|
MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=Title}"
|
||||||
|
Style="{StaticResource TitleBarText}"/>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
<Button x:Name="MinimizeButton" Style="{StaticResource TitleBarButton}"
|
||||||
|
Click="MinimizeButton_Click" Content=""/>
|
||||||
|
<Button x:Name="CloseButton" Style="{StaticResource TitleBarCloseButton}"
|
||||||
|
Click="CloseButton_Click" Content=""/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Content -->
|
||||||
|
<Grid Grid.Row="1" Margin="10">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="0" Text="Выберите запущенный процесс:"
|
||||||
|
FontSize="14" FontWeight="Bold"
|
||||||
|
Foreground="White" Margin="0,0,0,10"/>
|
||||||
|
|
||||||
<DataGrid x:Name="ProcessesDataGrid" Grid.Row="1"
|
<DataGrid x:Name="ProcessesDataGrid" Grid.Row="1"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
@@ -57,5 +85,7 @@
|
|||||||
Background="#4a4a4a" Foreground="White"
|
Background="#4a4a4a" Foreground="White"
|
||||||
BorderBrush="#6a6a6a" Margin="0,0,10,0" Click="CancelButton_Click"/>
|
BorderBrush="#6a6a6a" Margin="0,0,10,0" Click="CancelButton_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -78,6 +78,11 @@ namespace QoSManager.Views
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MinimizeButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
WindowState = WindowState.Minimized;
|
||||||
|
}
|
||||||
|
|
||||||
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
DialogResult = false;
|
DialogResult = false;
|
||||||
|
|||||||
@@ -3,16 +3,42 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="Неподдерживаемая версия Windows" Height="520" Width="580"
|
Title="Неподдерживаемая версия Windows" Height="520" Width="580"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
WindowStyle="None"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
Background="#2D2D30">
|
Background="#2D2D30">
|
||||||
|
|
||||||
<Grid Margin="25">
|
<WindowChrome.WindowChrome>
|
||||||
|
<WindowChrome CaptionHeight="0" GlassFrameThickness="0" ResizeBorderThickness="0" UseAeroCaptionButtons="False"/>
|
||||||
|
</WindowChrome.WindowChrome>
|
||||||
|
|
||||||
|
<Border BorderBrush="#555555" BorderThickness="1" CornerRadius="8" Background="#2D2D30">
|
||||||
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="30"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
</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="25">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Заголовок с иконкой -->
|
<!-- Заголовок с иконкой -->
|
||||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,25">
|
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,25">
|
||||||
<TextBlock Text="⚠️" FontSize="36" Margin="0,0,15,0" VerticalAlignment="Center"/>
|
<TextBlock Text="⚠️" FontSize="36" Margin="0,0,15,0" VerticalAlignment="Center"/>
|
||||||
@@ -74,5 +100,7 @@
|
|||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Click="ExitButton_Click"/>
|
Click="ExitButton_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user