Dexif/Installer/Dexif_Installer/App.xaml

301 lines
19 KiB
XML

<Application x:Class="Dexif_Installer.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Dexif_Installer"
StartupUri="MainWindow.xaml"
xmlns:fa="http://schemas.fontawesome.io/icons/">
<Application.Resources>
<!-- Nord Theme https://nordtheme.com/ -->
<Color x:Key="Yellow">#EBCB8B</Color>
<Color x:Key="Red">#BF616A</Color>
<Color x:Key="Orange">#D08770</Color>
<Color x:Key="Green">#A3BE8C</Color>
<Color x:Key="Violet">#B48EAD</Color>
<Color x:Key="PolarNight_0">#2E3440</Color>
<Color x:Key="PolarNight_1">#3B4252</Color>
<Color x:Key="PolarNight_2">#434C5E</Color>
<Color x:Key="PolarNight_3">#4C566A</Color>
<Color x:Key="SnowStorm_0">#D8DEE9</Color>
<Color x:Key="SnowStorm_1">#E5E9F0</Color>
<Color x:Key="SnowStorm_2">#ECEFF4</Color>
<Color x:Key="Frost_0">#8FBCBB</Color>
<Color x:Key="Frost_1">#88C0D0</Color>
<Color x:Key="Frost_2">#81A1C1</Color>
<Color x:Key="Frost_3">#5E81AC</Color>
<SolidColorBrush x:Key="Yellow_Brush" Color="{DynamicResource Yellow}"/>
<SolidColorBrush x:Key="Red_Brush" Color="{DynamicResource Red}"/>
<SolidColorBrush x:Key="Orange_Brush" Color="{DynamicResource Orange}"/>
<SolidColorBrush x:Key="Green_Brush" Color="{DynamicResource Green}"/>
<SolidColorBrush x:Key="Violet_Brush" Color="{DynamicResource Violet}"/>
<SolidColorBrush x:Key="PolarNight_0_Brush" Color="{DynamicResource PolarNight_0}"/>
<SolidColorBrush x:Key="PolarNight_1_Brush" Color="{DynamicResource PolarNight_1}"/>
<SolidColorBrush x:Key="PolarNight_2_Brush" Color="{DynamicResource PolarNight_2}"/>
<SolidColorBrush x:Key="PolarNight_3_Brush" Color="{DynamicResource PolarNight_3}"/>
<SolidColorBrush x:Key="SnowStorm_0_Brush" Color="{DynamicResource SnowStorm_0}"/>
<SolidColorBrush x:Key="SnowStorm_1_Brush" Color="{DynamicResource SnowStorm_1}"/>
<SolidColorBrush x:Key="SnowStorm_2_Brush" Color="{DynamicResource SnowStorm_2}"/>
<SolidColorBrush x:Key="Frost_0_Brush" Color="{DynamicResource Frost_0}"/>
<SolidColorBrush x:Key="Frost_1_Brush" Color="{DynamicResource Frost_1}"/>
<SolidColorBrush x:Key="Frost_2_Brush" Color="{DynamicResource Frost_2}"/>
<SolidColorBrush x:Key="Frost_3_Brush" Color="{DynamicResource Frost_3}"/>
<!-- CHECKBOXES -->
<Style x:Key="OptionMarkFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="14,0,0,0" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="OptionMark.Static.Background" Color="{DynamicResource PolarNight_0}"/>
<SolidColorBrush x:Key="OptionMark.Static.Border" Color="{DynamicResource PolarNight_3}"/>
<SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="{DynamicResource Frost_1}"/>
<SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="{DynamicResource PolarNight_1}"/>
<SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="{DynamicResource PolarNight_3}"/>
<SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="{DynamicResource Frost_0}"/>
<SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="{DynamicResource PolarNight_3}"/>
<SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="{DynamicResource PolarNight_3}"/>
<SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="{DynamicResource Frost_0}"/>
<SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="{DynamicResource PolarNight_1}"/>
<SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="{DynamicResource PolarNight_2}"/>
<SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="{DynamicResource PolarNight_3}"/>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource OptionMark.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource OptionMark.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="checkBoxBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid x:Name="markGrid">
<Path x:Name="optionMark" Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z " Fill="{StaticResource OptionMark.Static.Glyph}" Margin="1" Opacity="0" Stretch="None"/>
<Rectangle x:Name="indeterminateMark" Fill="{StaticResource OptionMark.Static.Glyph}" Margin="2" Opacity="0"/>
</Grid>
</Border>
<ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasContent" Value="true">
<Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
<Setter Property="Padding" Value="4,-1,0,0"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.MouseOver.Border}"/>
<Setter Property="Fill" TargetName="optionMark" Value="{StaticResource OptionMark.MouseOver.Glyph}"/>
<Setter Property="Fill" TargetName="indeterminateMark" Value="{StaticResource OptionMark.MouseOver.Glyph}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Disabled.Border}"/>
<Setter Property="Fill" TargetName="optionMark" Value="{StaticResource OptionMark.Disabled.Glyph}"/>
<Setter Property="Fill" TargetName="indeterminateMark" Value="{StaticResource OptionMark.Disabled.Glyph}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Pressed.Border}"/>
<Setter Property="Fill" TargetName="optionMark" Value="{StaticResource OptionMark.Pressed.Glyph}"/>
<Setter Property="Fill" TargetName="indeterminateMark" Value="{StaticResource OptionMark.Pressed.Glyph}"/>
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Opacity" TargetName="optionMark" Value="1"/>
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}">
<Setter Property="Opacity" TargetName="optionMark" Value="0"/>
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- STATUSES -->
<Style TargetType="{x:Type fa:FontAwesome}">
<Setter Property="TextWrapping" Value="NoWrap"/>
<Setter Property="TextTrimming" Value="None"/>
<Style.Triggers>
<Trigger Property="Icon" Value="QuestionCircleOutline">
<Setter Property="Foreground" Value="{DynamicResource Yellow_Brush}"/>
</Trigger>
<Trigger Property="Icon" Value="CheckCircleOutline">
<Setter Property="Foreground" Value="{DynamicResource Green_Brush}"/>
</Trigger>
<Trigger Property="Icon" Value="TimesCircleOutline">
<Setter Property="Foreground" Value="{DynamicResource Red_Brush}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- PROGRESBARS -->
<SolidColorBrush x:Key="ProgressBar.Progress" Color="{DynamicResource Frost_1}"/>
<SolidColorBrush x:Key="ProgressBar.Background" Color="{DynamicResource PolarNight_1}"/>
<SolidColorBrush x:Key="ProgressBar.Border" Color="{DynamicResource PolarNight_3}"/>
<Style TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground" Value="{StaticResource ProgressBar.Progress}"/>
<Setter Property="Background" Value="{StaticResource ProgressBar.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource ProgressBar.Border}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ProgressBar}">
<Grid x:Name="TemplateRoot">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Determinate"/>
<VisualState x:Name="Indeterminate">
<Storyboard RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="0" Value="0.25"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25"/>
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25"/>
</DoubleAnimationUsingKeyFrames>
<PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
<EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5"/>
<EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5"/>
<EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5"/>
</PointAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
<Rectangle x:Name="PART_Track"/>
<Grid x:Name="PART_Indicator" ClipToBounds="true" HorizontalAlignment="Left">
<Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}"/>
<Rectangle x:Name="Animation" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
<Setter.Value>
<RotateTransform Angle="-90"/>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsIndeterminate" Value="true">
<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- LABELS -->
<Style TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource Button.Static.Foreground}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Label}">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- BUTTONS -->
<SolidColorBrush x:Key="Button.Static.Background" Color="{DynamicResource PolarNight_0}"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="{DynamicResource PolarNight_3}"/>
<SolidColorBrush x:Key="Button.Static.Foreground" Color="{DynamicResource SnowStorm_2}"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="{DynamicResource PolarNight_1}"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="{DynamicResource Frost_1}"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="{DynamicResource PolarNight_2}"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="{DynamicResource Frost_1}"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="{DynamicResource PolarNight_1}"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="{DynamicResource PolarNight_2}"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="{DynamicResource PolarNight_3}"/>
<Style TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Foreground" Value="{StaticResource Button.Static.Foreground}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Button.IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- WINDOWS -->
<Style TargetType="{x:Type Window}">
<Setter Property="Background" Value="{DynamicResource PolarNight_0_Brush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<ContentPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>