Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c2212cde9 | ||
|
|
793076b948 |
BIN
Binary file not shown.
@@ -83,6 +83,63 @@
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</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 -->
|
||||
<Style TargetType="Button" x:Key="{x:Type Button}">
|
||||
<Setter Property="Background" Value="#3C3C3C"/>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="QoS Manager"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
Background="#2D2D2D"
|
||||
@@ -12,13 +13,38 @@
|
||||
MinWidth="300"
|
||||
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>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="20"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<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="20"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Сообщение -->
|
||||
<TextBlock x:Name="MessageTextBlock"
|
||||
Grid.Row="0"
|
||||
@@ -69,5 +95,7 @@
|
||||
Click="NoButton_Click"
|
||||
Visibility="Collapsed"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
|
||||
+34
-2
@@ -5,9 +5,39 @@
|
||||
Height="600" Width="900"
|
||||
MinHeight="400" MinWidth="600"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
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>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
@@ -202,5 +232,7 @@
|
||||
Height="35"
|
||||
Style="{StaticResource DarkButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
|
||||
@@ -336,6 +336,13 @@ namespace QoSManager.Views
|
||||
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)
|
||||
{
|
||||
SaveSettings();
|
||||
|
||||
@@ -4,10 +4,36 @@
|
||||
Title="Создание QoS-политики"
|
||||
Height="320" Width="500"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
Background="#1E1E1E"
|
||||
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>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -128,5 +154,7 @@
|
||||
Height="35"
|
||||
Style="{StaticResource DarkButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
|
||||
@@ -4,20 +4,48 @@
|
||||
Title="Выбор процесса"
|
||||
Height="600" Width="800"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
ResizeMode="CanResize"
|
||||
Background="#2b2b2b"
|
||||
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>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Text="Выберите запущенный процесс:"
|
||||
FontSize="14" FontWeight="Bold"
|
||||
Foreground="White" Margin="0,0,0,10"/>
|
||||
<!-- 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="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"
|
||||
AutoGenerateColumns="False"
|
||||
@@ -57,5 +85,7 @@
|
||||
Background="#4a4a4a" Foreground="White"
|
||||
BorderBrush="#6a6a6a" Margin="0,0,10,0" Click="CancelButton_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</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)
|
||||
{
|
||||
DialogResult = false;
|
||||
|
||||
@@ -3,16 +3,42 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Неподдерживаемая версия Windows" Height="520" Width="580"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
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>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</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">
|
||||
<TextBlock Text="⚠️" FontSize="36" Margin="0,0,15,0" VerticalAlignment="Center"/>
|
||||
@@ -74,5 +100,7 @@
|
||||
Cursor="Hand"
|
||||
Click="ExitButton_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user