mirror of
https://github.com/MathiasLui/CSGO-Projects.git
synced 2025-05-06 13:51:18 +00:00
Add Config Manager
This commit is contained in:
parent
77e1bdf273
commit
1433cdee81
23 changed files with 3884 additions and 0 deletions
25
ConfigManager/ConfigManager.sln
Normal file
25
ConfigManager/ConfigManager.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2018
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigManager", "ConfigManager\ConfigManager.csproj", "{0CAA02A3-CEE3-4A21-AE35-BC8A4177DAE2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0CAA02A3-CEE3-4A21-AE35-BC8A4177DAE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0CAA02A3-CEE3-4A21-AE35-BC8A4177DAE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0CAA02A3-CEE3-4A21-AE35-BC8A4177DAE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0CAA02A3-CEE3-4A21-AE35-BC8A4177DAE2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {046FAB0A-0119-4B6A-9905-924FD5975AB8}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
6
ConfigManager/ConfigManager/App.config
Normal file
6
ConfigManager/ConfigManager/App.config
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
102
ConfigManager/ConfigManager/App.xaml
Normal file
102
ConfigManager/ConfigManager/App.xaml
Normal file
|
@ -0,0 +1,102 @@
|
|||
<Application x:Class="ConfigManager.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ConfigManager"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
|
||||
<Style x:Key="ConfigButtonStyle" 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="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<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 Button}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" 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="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="#FF593939"/>
|
||||
<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>
|
||||
<Style x:Key="ButtonStyleGreen" 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="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<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 Button}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" 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="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="#FF45AA52"/>
|
||||
<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>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
17
ConfigManager/ConfigManager/App.xaml.cs
Normal file
17
ConfigManager/ConfigManager/App.xaml.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace ConfigManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
134
ConfigManager/ConfigManager/ConfigManager.csproj
Normal file
134
ConfigManager/ConfigManager/ConfigManager.csproj
Normal file
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{0CAA02A3-CEE3-4A21-AE35-BC8A4177DAE2}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>ConfigManager</RootNamespace>
|
||||
<AssemblyName>ConfigManager</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Gameloop.Vdf, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Gameloop.Vdf.0.5.0\lib\net45\Gameloop.Vdf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="WPFTextBoxAutoComplete, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WPFTextBoxAutoComplete.1.0.5\lib\net40\WPFTextBoxAutoComplete.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="SaveDialogWindow.xaml.cs">
|
||||
<DependentUpon>SaveDialogWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Settings.cs" />
|
||||
<Page Include="ctrlConfig.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ctrlConfig.xaml.cs">
|
||||
<DependentUpon>ctrlConfig.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="SaveDialogWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Save_16x.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Trashbin.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\MenuButton.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Star.png" />
|
||||
<Resource Include="Images\StarEmpty.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
BIN
ConfigManager/ConfigManager/Images/MenuButton.png
Normal file
BIN
ConfigManager/ConfigManager/Images/MenuButton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 674 B |
BIN
ConfigManager/ConfigManager/Images/Save_16x.png
Normal file
BIN
ConfigManager/ConfigManager/Images/Save_16x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 260 B |
BIN
ConfigManager/ConfigManager/Images/Star.png
Normal file
BIN
ConfigManager/ConfigManager/Images/Star.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 604 B |
BIN
ConfigManager/ConfigManager/Images/StarEmpty.png
Normal file
BIN
ConfigManager/ConfigManager/Images/StarEmpty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 512 B |
BIN
ConfigManager/ConfigManager/Images/Trashbin.png
Normal file
BIN
ConfigManager/ConfigManager/Images/Trashbin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
78
ConfigManager/ConfigManager/MainWindow.xaml
Normal file
78
ConfigManager/ConfigManager/MainWindow.xaml
Normal file
|
@ -0,0 +1,78 @@
|
|||
<Window x:Name="window" x:Class="ConfigManager.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:behaviors="clr-namespace:WPFTextBoxAutoComplete;assembly=WPFTextBoxAutoComplete"
|
||||
xmlns:local="clr-namespace:ConfigManager"
|
||||
mc:Ignorable="d"
|
||||
Title="CS:GO Config Manager" Height="400" Width="900" WindowStartupLocation="CenterScreen" WindowState="Maximized" Background="#FF282828" MinWidth="900" Closing="Window_Closing" MinHeight="300" PreviewKeyDown="window_PreviewKeyDown">
|
||||
<Grid>
|
||||
<Grid x:Name="gridNonMenu">
|
||||
<Grid.Effect>
|
||||
<BlurEffect Radius="0" RenderingBias="Quality"/>
|
||||
</Grid.Effect>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="SteamLibrary-Path:" VerticalAlignment="Top" Foreground="White"/>
|
||||
<ScrollViewer x:Name="scrollConfigs" Margin="10,80,15,10" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel x:Name="stackConfigs" VerticalAlignment="Top"/>
|
||||
</ScrollViewer>
|
||||
<Rectangle Fill="White" HorizontalAlignment="Center" Margin="0" Width="2" Grid.ColumnSpan="2"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20,15,0" VerticalAlignment="Top" Height="20">
|
||||
<Button x:Name="btnDeleteEmptyConfigs" Content="Delete Empty" ToolTip="Delete all empty configs" Click="btnDeleteEmptyConfigs_Click" Background="#FF646464" Foreground="White" Style="{DynamicResource ButtonStyleGreen}" Padding="5,1"/>
|
||||
<Button x:Name="btnRefreshConfigs" Content="Refresh List" Margin="10,0,0,0" Height="20" ToolTip="Load or refresh the list of configs" Click="btnRefreshConfigs_Click" Background="#FF646464" Foreground="White" Style="{DynamicResource ButtonStyleGreen}" Padding="5,1"/>
|
||||
</StackPanel>
|
||||
<TextBox x:Name="txtConfigContent" Grid.Column="1" Margin="10,40,10,10" TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="True" Foreground="White" Background="#FF212121" FontSize="14" TextChanged="txtConfigContent_TextChanged"/>
|
||||
<TextBlock x:Name="lblConfigsFound" HorizontalAlignment="Left" Margin="10,64,0,0" TextWrapping="Wrap" Text="Configs found:" VerticalAlignment="Top" Foreground="White"/>
|
||||
<TextBox x:Name="txtConfigTitle" Grid.Column="1" Margin="10,5,180,40" TextWrapping="Wrap" AcceptsTab="True" Foreground="White" Height="30" VerticalAlignment="Top" VerticalContentAlignment="Center" FontSize="14" CaretBrush="#CCFF3E3E" TextChanged="txtConfigTitle_TextChanged">
|
||||
<TextBox.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#FF323232" Offset="0"/>
|
||||
<GradientStop Color="#FF212121" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</TextBox.Background>
|
||||
</TextBox>
|
||||
<Image Source="Images/Trashbin.png" HorizontalAlignment="Right" Width="30" Height="30" VerticalAlignment="Top" Margin="0,5,50,0" Grid.Column="1" />
|
||||
<Rectangle x:Name="rectTrashbinMouseOver" Width="34" HorizontalAlignment="Right" Margin="0,3,48,0" MouseEnter="rectTrashbinMouseOver_MouseEnter" MouseLeave="rectTrashbinMouseOver_MouseLeave" MouseLeftButtonDown="rectTrashbinMouseOver_MouseLeftButtonDown" MouseLeftButtonUp="rectTrashbinMouseOver_MouseLeftButtonUp" Opacity="0" Loaded="rectTrashbinMouseOver_Loaded" Grid.Column="1" VerticalAlignment="Top" Height="34" Stroke="#FFB90808" StrokeThickness="2">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Color="#4CC3C3C3"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Image x:Name="btnSave" Source="Images/Save_16x.png" RenderOptions.BitmapScalingMode="NearestNeighbor" Width="30" Height="30" Grid.Column="1" Margin="0,5,10,0" HorizontalAlignment="Right" VerticalAlignment="Top" />
|
||||
<Rectangle x:Name="rectSaveMouseOver" Width="35" Height="34" VerticalAlignment="Top" HorizontalAlignment="Right" Grid.ColumnSpan="2" Margin="0,3,7,0" Stroke="#FFB90808" Visibility="Visible" StrokeThickness="2" Fill="#4CC3C3C3" MouseLeftButtonUp="rectSaveMouseOver_MouseLeftButtonUp" Opacity="0" MouseEnter="rectSaveMouseOver_MouseEnter" MouseLeave="rectSaveMouseOver_MouseLeave" MouseLeftButtonDown="rectSaveMouseOver_MouseLeftButtonDown" Loaded="rectSaveMouseOver_Loaded" />
|
||||
<TextBlock x:Name="lblConfigsFoundValue" HorizontalAlignment="Left" Margin="95,64,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Foreground="#FFDE3333" FontWeight="Bold"/>
|
||||
<Grid x:Name="gridInfoText" Height="20" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,45,15,0" Visibility="Collapsed">
|
||||
<Rectangle Grid.Column="1" Fill="#99F4F4F5" Margin="0" Stroke="#999C0000"/>
|
||||
<TextBlock x:Name="lblInfoText" Text="Your info text here" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF212121" Padding="5,0" />
|
||||
</Grid>
|
||||
<TextBox x:Name="txtFilterConfigs" HorizontalAlignment="Center" Height="25" Margin="0,55,0,0" TextWrapping="Wrap" Text="filter configs" VerticalAlignment="Top" Width="120" FontSize="11" Background="White" Foreground="#FF272727" SelectionBrush="#FFD13333" BorderBrush="{x:Null}" VerticalContentAlignment="Center" GotFocus="txtFilterConfigs_GotFocus" LostFocus="txtFilterConfigs_LostFocus" PreviewKeyDown="txtFilterConfigs_PreviewKeyDown"/>
|
||||
<Button x:Name="btnCreateConfig" Content="+ Create new" Margin="0,60,15,0" HorizontalAlignment="Right" VerticalAlignment="Top" Height="20" ToolTip="Create a new config" Background="#FF39613D" Foreground="White" Style="{DynamicResource ButtonStyleGreen}" Padding="5,1" Click="btnCreateConfig_Click"/>
|
||||
<TextBlock x:Name="lblConfigsFound_Copy" HorizontalAlignment="Right" Margin="0,10,150,0" TextWrapping="Wrap" Text=".cfg" VerticalAlignment="Top" Foreground="White" Grid.Column="1" FontSize="14"/>
|
||||
<Grid x:Name="gridPath" Margin="130,10,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="160" MouseEnter="Grid_MouseEnter" MouseLeave="gridPath_MouseLeave" MouseLeftButtonUp="gridPath_MouseLeftButtonUp" Grid.ColumnSpan="2" >
|
||||
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal" Background="#FFBF5151">
|
||||
<Button x:Name="btnChangePath" Content="..." Width="27" HorizontalAlignment="Left" VerticalAlignment="Top" Height="16" FontWeight="Bold" ToolTip="Here choose the location of your Steam Library, in which CS:GO is installed, default: C:\Program Files\Steam\" Click="btnChangePath_Click" Background="#FF646464" Foreground="White"/>
|
||||
<TextBlock x:Name="lblPath" HorizontalAlignment="Left" TextWrapping="Wrap" Text="C:\Path here" VerticalAlignment="Top" Foreground="White" Margin="0" Padding="5,0,20,0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Rectangle x:Name="rectBlockInput" Margin="0" Grid.ColumnSpan="2" Grid.RowSpan="2" Visibility="Collapsed">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Opacity="0"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Image x:Name="imgSettingsMenu" HorizontalAlignment="Left" Height="20" Margin="10,33,0,0" VerticalAlignment="Top" Width="20" Source="Images/MenuButton.png" MouseLeftButtonUp="imgSettingsMenu_MouseLeftButtonUp"/>
|
||||
<Button x:Name="btnAutoDetectLibrary" Content="Auto-Detect Library" HorizontalAlignment="Left" VerticalAlignment="Top" Height="16" ToolTip="Here choose the location of your Steam Library, in which CS:GO is installed, default: C:\Program Files\Steam\" Background="#FF646464" Foreground="White" Margin="130,26,0,0" FontSize="10" Click="btnAutoDetectLibrary_Click"/>
|
||||
</Grid>
|
||||
<Grid x:Name="gridSettingsMenu" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="40,30,0,0" MinWidth="250" MinHeight="150" Visibility="Collapsed">
|
||||
<Rectangle x:Name="rectSettingsMenu" Fill="#66444444" Margin="0"/>
|
||||
<CheckBox x:Name="chkCheckSubfolders" Content="Also check subfolders" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Foreground="White" Checked="chkSettings_Changed" Unchecked="chkSettings_Changed" ToolTip="Check this if you want to show all configs in subfolders of \cfg\"/>
|
||||
<CheckBox x:Name="chkOnlyShowFavourites" Content="Only show favourites" HorizontalAlignment="Left" Margin="10,50,0,0" VerticalAlignment="Top" Foreground="White" Checked="chkSettings_Changed" Unchecked="chkSettings_Changed" ToolTip="Check this if you only want to show the configs marked as favourite"/>
|
||||
<Button x:Name="btnBackFromSettingsMenu" Content="Back" Margin="0,0,0,10" HorizontalAlignment="Center" VerticalAlignment="Bottom" Height="20" Background="#FF646464" Foreground="White" Style="{DynamicResource ButtonStyleGreen}" Padding="5,1" Click="btnBackFromSettingsMenu_Click"/>
|
||||
<CheckBox x:Name="chkSearchCaseSensitive" Content="Search case sensitive" HorizontalAlignment="Left" Margin="10,80,0,0" VerticalAlignment="Top" Foreground="White" Checked="chkSettings_Changed" Unchecked="chkSettings_Changed" ToolTip="Check this if you want the config filter to be case sensitive"/>
|
||||
<TextBlock x:Name="lblProgramVersion" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="Version: 0.0.0" FontSize="10" Foreground="White"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
2983
ConfigManager/ConfigManager/MainWindow.xaml.cs
Normal file
2983
ConfigManager/ConfigManager/MainWindow.xaml.cs
Normal file
File diff suppressed because it is too large
Load diff
55
ConfigManager/ConfigManager/Properties/AssemblyInfo.cs
Normal file
55
ConfigManager/ConfigManager/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,55 @@
|
|||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ConfigManager")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ConfigManager")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
63
ConfigManager/ConfigManager/Properties/Resources.Designer.cs
generated
Normal file
63
ConfigManager/ConfigManager/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,63 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ConfigManager.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ConfigManager.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
ConfigManager/ConfigManager/Properties/Resources.resx
Normal file
117
ConfigManager/ConfigManager/Properties/Resources.resx
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
26
ConfigManager/ConfigManager/Properties/Settings.Designer.cs
generated
Normal file
26
ConfigManager/ConfigManager/Properties/Settings.Designer.cs
generated
Normal file
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ConfigManager.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
ConfigManager/ConfigManager/Properties/Settings.settings
Normal file
7
ConfigManager/ConfigManager/Properties/Settings.settings
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
30
ConfigManager/ConfigManager/SaveDialogWindow.xaml
Normal file
30
ConfigManager/ConfigManager/SaveDialogWindow.xaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
<Window x:Class="ConfigManager.SaveDialogWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ConfigManager"
|
||||
mc:Ignorable="d"
|
||||
Title="SaveDialogWindow" Height="200" Width="300" AllowsTransparency="True" WindowStyle="None" Background="{x:Null}" ResizeMode="NoResize" Foreground="{x:Null}" SizeToContent="Height" WindowStartupLocation="CenterOwner">
|
||||
<Grid>
|
||||
<Border BorderBrush="Black" BorderThickness="1" Margin="0" CornerRadius="10" MinWidth="300" MinHeight="150">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#FF343434" Offset="0"/>
|
||||
<GradientStop Color="#FF111111" Offset="1"/>
|
||||
<GradientStop Color="#CC212121" Offset="0.295"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<TextBlock x:Name="lblCloseWindow" HorizontalAlignment="Right" Margin="0,0,20,0" TextWrapping="Wrap" Text="x" VerticalAlignment="Top" FontSize="24" Foreground="Red" FontWeight="Bold" MouseLeftButtonUp="lblCloseWindow_MouseLeftButtonUp" Padding="0"/>
|
||||
</Border>
|
||||
<StackPanel VerticalAlignment="Top">
|
||||
<TextBlock x:Name="lblDialogTitle" HorizontalAlignment="Center" Margin="0,20,0,0" TextWrapping="Wrap" Text="Title" VerticalAlignment="Top" FontSize="16" Foreground="White" FontWeight="Bold"/>
|
||||
<TextBlock x:Name="lblDialogText" HorizontalAlignment="Center" Margin="10,20,10,0" TextWrapping="Wrap" Text="Message" VerticalAlignment="Top" FontSize="14" Foreground="#FFCFCFCF" TextAlignment="Center"/>
|
||||
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,30,0,10" Orientation="Horizontal">
|
||||
<Button x:Name="btnYes" Height="25" Content="Yes" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0" Style="{DynamicResource ButtonStyleGreen}" Padding="10,1" BorderBrush="{x:Null}" Background="#E5FFFFFF" FontWeight="Bold" Click="btnYes_Click" />
|
||||
<Button x:Name="btnNo" Height="25" Content="No" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,0,0,0" Style="{DynamicResource ConfigButtonStyle}" Padding="10,1" BorderBrush="{x:Null}" Background="#E5FFFFFF" FontWeight="Bold" Click="btnNo_Click" />
|
||||
<Button x:Name="btnCancel" Height="25" Content="Cancel" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,0,0,0" Style="{DynamicResource ConfigButtonStyle}" Padding="10,1" BorderBrush="{x:Null}" Background="#E5FFFFFF" Foreground="Black" FontWeight="Bold" Click="btnCancel_Click" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
59
ConfigManager/ConfigManager/SaveDialogWindow.xaml.cs
Normal file
59
ConfigManager/ConfigManager/SaveDialogWindow.xaml.cs
Normal file
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace ConfigManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SaveDialogWindow.xaml
|
||||
/// </summary>
|
||||
public partial class SaveDialogWindow : Window
|
||||
{
|
||||
public SaveDialogWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
bool? m_bReturnValue;
|
||||
public bool? ReturnValue
|
||||
{
|
||||
get { return m_bReturnValue; }
|
||||
}
|
||||
|
||||
private void btnYes_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
m_bReturnValue = true;
|
||||
DialogResult = true;
|
||||
}
|
||||
|
||||
private void btnNo_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
m_bReturnValue = false;
|
||||
DialogResult = false;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
m_bReturnValue = false;
|
||||
m_bReturnValue = null;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void lblCloseWindow_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
m_bReturnValue = false;
|
||||
m_bReturnValue = null;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
33
ConfigManager/ConfigManager/Settings.cs
Normal file
33
ConfigManager/ConfigManager/Settings.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConfigManager
|
||||
{
|
||||
public class Settings
|
||||
{
|
||||
private bool m_bCheckSubfolders = false;
|
||||
private bool m_bOnlyShowFavourites = false;
|
||||
private bool m_bSearchCaseSensitive = false;
|
||||
|
||||
public bool CheckSubfolders
|
||||
{
|
||||
get { return m_bCheckSubfolders; }
|
||||
set { m_bCheckSubfolders = value; }
|
||||
}
|
||||
|
||||
public bool OnlyShowFavourites
|
||||
{
|
||||
get { return m_bOnlyShowFavourites; }
|
||||
set { m_bOnlyShowFavourites = value; }
|
||||
}
|
||||
|
||||
public bool SearchCaseSensitive
|
||||
{
|
||||
get { return m_bSearchCaseSensitive; }
|
||||
set { m_bSearchCaseSensitive = value; }
|
||||
}
|
||||
}
|
||||
}
|
26
ConfigManager/ConfigManager/ctrlConfig.xaml
Normal file
26
ConfigManager/ConfigManager/ctrlConfig.xaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<UserControl x:Name="userControl" x:Class="ConfigManager.ctrlConfig"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ConfigManager"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="30" d:DesignWidth="235" Width="Auto" Height="Auto">
|
||||
<UserControl.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Button x:Name="btnEditConfig" Margin="0" VerticalAlignment="Top" Height="30" Background="#FF4B4B4B" Click="btnEditConfig_Click" Foreground="White" Style="{DynamicResource ConfigButtonStyle}" >
|
||||
<TextBlock x:Name="txtConfigName"/>
|
||||
</Button>
|
||||
<Image Source="Images/Trashbin.png" HorizontalAlignment="Right" Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0" />
|
||||
<Rectangle x:Name="rectTrashbinMouseOver" Width="30" HorizontalAlignment="Right" Margin="0" MouseEnter="rectMouseOver_MouseEnter" MouseLeave="rectMouseOver_MouseLeave" MouseLeftButtonDown="rectMouseOver_MouseLeftButtonDown" MouseLeftButtonUp="rectMouseOver_MouseLeftButtonUp" Opacity="0" Loaded="rectMouseOver_Loaded">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Color="#4CC3C3C3"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Image Source="Images/StarEmpty.png" HorizontalAlignment="Right" Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,35,0" />
|
||||
<Image Source="Images/Star.png" HorizontalAlignment="Right" Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,35,0" Visibility="{Binding IsFavourite, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=userControl}" />
|
||||
<Rectangle x:Name="rectFavouritesMouseOver" Width="30" HorizontalAlignment="Right" Margin="0,0,30,0" MouseEnter="rectMouseOver_MouseEnter" MouseLeave="rectMouseOver_MouseLeave" MouseLeftButtonDown="rectMouseOver_MouseLeftButtonDown" MouseLeftButtonUp="rectMouseOver_MouseLeftButtonUp" Opacity="0" Loaded="rectFavouritesMouseOver_Loaded" Fill="#4CC3C3C3"/>
|
||||
</Grid>
|
||||
</UserControl>
|
119
ConfigManager/ConfigManager/ctrlConfig.xaml.cs
Normal file
119
ConfigManager/ConfigManager/ctrlConfig.xaml.cs
Normal file
|
@ -0,0 +1,119 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.IO;
|
||||
|
||||
namespace ConfigManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ctrlConfig.xaml
|
||||
/// </summary>
|
||||
public partial class ctrlConfig : UserControl
|
||||
{
|
||||
public ctrlConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public delegate void EditConfig(object sender, string sPath);
|
||||
public event EditConfig OnEditConfig;
|
||||
public delegate void DeleteConfig(object sender, string sPath);
|
||||
public event DeleteConfig OnDeleteConfig;
|
||||
public delegate void ToggleFavouriteConfig(object sender, bool bFavourite);
|
||||
public event ToggleFavouriteConfig OnToggleFavouriteConfig;
|
||||
private string sPath;
|
||||
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
return sPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
sPath = value;
|
||||
}
|
||||
}
|
||||
public bool IsFavourite
|
||||
{
|
||||
get { return (bool)GetValue(IsFavouriteProperty); }
|
||||
set { SetValue(IsFavouriteProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for IsFavourite. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty IsFavouriteProperty =
|
||||
DependencyProperty.Register("IsFavourite", typeof(bool), typeof(ctrlConfig), new PropertyMetadata(false));
|
||||
|
||||
|
||||
|
||||
private void btnEditConfig_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (OnEditConfig != null)
|
||||
{
|
||||
OnEditConfig(this, this.Path);
|
||||
}
|
||||
}
|
||||
|
||||
private void rectMouseOver_MouseEnter(object sender, MouseEventArgs e)
|
||||
{
|
||||
(sender as Rectangle).Opacity = 1;
|
||||
}
|
||||
|
||||
private void rectMouseOver_MouseLeave(object sender, MouseEventArgs e)
|
||||
{
|
||||
(sender as Rectangle).Fill = new SolidColorBrush(Color.FromArgb(77, 195, 195, 195));
|
||||
(sender as Rectangle).Opacity = 0;
|
||||
}
|
||||
|
||||
private void rectMouseOver_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
(sender as Rectangle).Fill = new SolidColorBrush(Color.FromArgb(77, 30, 30, 30));
|
||||
}
|
||||
|
||||
private void rectMouseOver_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
(sender as Rectangle).Fill = new SolidColorBrush(Color.FromArgb(77, 195, 195, 195));
|
||||
switch((sender as Rectangle).Name)
|
||||
{
|
||||
case "rectTrashbinMouseOver":
|
||||
if (OnDeleteConfig != null)
|
||||
{
|
||||
OnDeleteConfig(this, this.Path);
|
||||
}
|
||||
break;
|
||||
case "rectFavouritesMouseOver":
|
||||
this.IsFavourite = !this.IsFavourite;
|
||||
if (OnToggleFavouriteConfig != null)
|
||||
{
|
||||
OnToggleFavouriteConfig(this, this.IsFavourite);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MessageBox.Show("The clicked Button is not configured in the Switch statement", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void rectMouseOver_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//Set ToolTip to "Delete "ConfigName""
|
||||
(sender as Rectangle).ToolTip = $"Delete \"{(Application.Current.MainWindow as MainWindow).getConfigNameFromPath(Path)}\"";
|
||||
}
|
||||
|
||||
private void rectFavouritesMouseOver_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//Set ToolTip
|
||||
(sender as Rectangle).ToolTip = $"Add/Remove \"{(Application.Current.MainWindow as MainWindow).getConfigNameFromPath(Path)}\" from your favourites";
|
||||
}
|
||||
}
|
||||
}
|
4
ConfigManager/ConfigManager/packages.config
Normal file
4
ConfigManager/ConfigManager/packages.config
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="WPFTextBoxAutoComplete" version="1.0.5" targetFramework="net461" />
|
||||
</packages>
|
Loading…
Add table
Reference in a new issue