mirror of
https://github.com/MathiasLui/CSGO-Projects.git
synced 2025-05-06 13:51:18 +00:00
Add DamageCalculator
This commit is contained in:
commit
5ecf5d6d6d
159 changed files with 121629 additions and 0 deletions
BIN
DamageCalculator/.vs/Config Manager/v16/.suo
Normal file
BIN
DamageCalculator/.vs/Config Manager/v16/.suo
Normal file
Binary file not shown.
BIN
DamageCalculator/.vs/DamageCalculator/v16/.suo
Normal file
BIN
DamageCalculator/.vs/DamageCalculator/v16/.suo
Normal file
Binary file not shown.
25
DamageCalculator/DamageCalculator.sln
Normal file
25
DamageCalculator/DamageCalculator.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31515.178
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Damage Calculator", "DamageCalculator\DamageCalculator.csproj", "{7A7AE40F-8677-44E3-873A-4AB7C9FCFEB4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7A7AE40F-8677-44E3-873A-4AB7C9FCFEB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7A7AE40F-8677-44E3-873A-4AB7C9FCFEB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7A7AE40F-8677-44E3-873A-4AB7C9FCFEB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7A7AE40F-8677-44E3-873A-4AB7C9FCFEB4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {DB4B39C3-0168-457A-BB47-A934F038897A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
DamageCalculator/DamageCalculator/27.ico
Normal file
BIN
DamageCalculator/DamageCalculator/27.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
22
DamageCalculator/DamageCalculator/About.xaml
Normal file
22
DamageCalculator/DamageCalculator/About.xaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<Window x:Class="Damage_Calculator.About"
|
||||
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:Damage_Calculator"
|
||||
mc:Ignorable="d"
|
||||
Style="{DynamicResource CustomWindowStyle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Title="About" Height="323" Width="410" ResizeMode="NoResize">
|
||||
<Grid>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="Made by: Matty_L" FontSize="14" />
|
||||
<TextBlock Text="Special thanks to SlothSquadron" FontSize="14" Margin="0,20,0,0" />
|
||||
<TextBlock Text="(for being quick and helpful with some questions that I had)" />
|
||||
<TextBlock Text="and Zat" FontSize="14" Margin="0,20,0,0" />
|
||||
<TextBlock Text="(for the VDF parser pasta, had to modify it, tho)" />
|
||||
<TextBlock Foreground="LightSeaGreen" Margin="0,20,0,0" FontSize="14" Text="Any feedback or bug findings are more than welcome and can be reported to mathias-lui@freenet.de or on GameBanana." TextWrapping="Wrap" />
|
||||
<TextBlock x:Name="txtVersion" Margin="0,20,0,0" Text="Version XXX" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
28
DamageCalculator/DamageCalculator/About.xaml.cs
Normal file
28
DamageCalculator/DamageCalculator/About.xaml.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
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 Damage_Calculator
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for About.xaml
|
||||
/// </summary>
|
||||
public partial class About : Window
|
||||
{
|
||||
public About()
|
||||
{
|
||||
InitializeComponent();
|
||||
txtVersion.Text = "Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
}
|
6
DamageCalculator/DamageCalculator/App.config
Normal file
6
DamageCalculator/DamageCalculator/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>
|
13
DamageCalculator/DamageCalculator/App.xaml
Normal file
13
DamageCalculator/DamageCalculator/App.xaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<Application x:Class="Damage_Calculator.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Damage_Calculator"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/Themes/DarkTheme.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
17
DamageCalculator/DamageCalculator/App.xaml.cs
Normal file
17
DamageCalculator/DamageCalculator/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 Damage_Calculator
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
342
DamageCalculator/DamageCalculator/CsgoHelper.cs
Normal file
342
DamageCalculator/DamageCalculator/CsgoHelper.cs
Normal file
|
@ -0,0 +1,342 @@
|
|||
using Damage_Calculator.Models;
|
||||
using Damage_Calculator.ZatVdfParser;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Damage_Calculator
|
||||
{
|
||||
public class CsgoHelper
|
||||
{
|
||||
public string CsgoPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the prefixes allowed for maps when using <see cref="GetMaps"/>.
|
||||
/// </summary>
|
||||
private readonly string[] validMapPrefixes = new[]
|
||||
{
|
||||
"de",
|
||||
"cs",
|
||||
"dz",
|
||||
"ar"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Gets the files relative to the CS:GO install path that are checked when <see cref="Validate(string)">validating</see>.
|
||||
/// </summary>
|
||||
private readonly string[] filesToValidate = new[]
|
||||
{
|
||||
"csgo\\scripts\\items\\items_game.txt" // Item info (weapon stats etc.)
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Gets the directories relative to the CS:GO install path that are checked when <see cref="Validate(string)">validating</see>.
|
||||
/// </summary>
|
||||
private readonly string[] directoriesToValidate = new[]
|
||||
{
|
||||
"csgo\\resource\\overviews" // Map overviews
|
||||
};
|
||||
|
||||
public CsgoHelper()
|
||||
{
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
public CsgoHelper(string csgoPath)
|
||||
{
|
||||
this.CsgoPath = csgoPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates files and directories for CS:GO installed in the <see cref="CsgoPath">path</see>.
|
||||
/// </summary>
|
||||
/// <returns>whether the files and directories exist.</returns>
|
||||
public bool Validate()
|
||||
{
|
||||
return this.Validate(this.CsgoPath);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Validates files and directories for CS:GO installed in the given path.
|
||||
/// </summary>
|
||||
/// <param name="csgoPath">The path to the CS:GO install directory, in which the executable resides.</param>
|
||||
/// <returns>whether the files and directories exist.</returns>
|
||||
public bool Validate(string csgoPath)
|
||||
{
|
||||
foreach (string file in this.filesToValidate)
|
||||
{
|
||||
if (!File.Exists(Path.Combine(csgoPath, file)))
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (string dir in this.directoriesToValidate)
|
||||
{
|
||||
if (!Directory.Exists(Path.Combine(csgoPath, dir)))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public List<CsgoMapOverview> GetMaps()
|
||||
{
|
||||
List<string> mapTextFiles = Directory.GetFiles(System.IO.Path.Combine(this.CsgoPath, "csgo\\resource\\overviews")).ToList().Where(f => f.ToLower().EndsWith(".txt")).Where(f =>
|
||||
this.mapFileNameValid(f)).ToList();
|
||||
|
||||
List<CsgoMapOverview> maps = new List<CsgoMapOverview>();
|
||||
|
||||
foreach (string file in mapTextFiles)
|
||||
{
|
||||
string potentialRadarFile = System.IO.Path.Combine(this.CsgoPath, "csgo\\resource\\overviews", System.IO.Path.GetFileNameWithoutExtension(file) + "_radar.dds");
|
||||
var map = new CsgoMapOverview();
|
||||
if (File.Exists(potentialRadarFile))
|
||||
{
|
||||
map.MapImagePath = potentialRadarFile;
|
||||
}
|
||||
|
||||
var vdf = new VDFFile(file);
|
||||
if (vdf.RootElements.Count > 0)
|
||||
{
|
||||
var rootNode = vdf.RootElements.First();
|
||||
if (float.TryParse(rootNode["scale"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float scale))
|
||||
{
|
||||
map.MapSizeMultiplier = scale;
|
||||
}
|
||||
if (float.TryParse(rootNode["pos_x"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float posX))
|
||||
{
|
||||
map.UpperLeftWorldXCoordinate = posX;
|
||||
}
|
||||
if (float.TryParse(rootNode["pos_y"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float posY))
|
||||
{
|
||||
map.UpperLeftWorldYCoordinate = posY;
|
||||
}
|
||||
if (float.TryParse(rootNode["CTSpawn_x"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float ctX))
|
||||
{
|
||||
map.CTSpawnMultiplierX = ctX;
|
||||
}
|
||||
if (float.TryParse(rootNode["CTSpawn_y"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float ctY))
|
||||
{
|
||||
map.CTSpawnMultiplierY = ctY;
|
||||
}
|
||||
if (float.TryParse(rootNode["TSpawn_x"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float tX))
|
||||
{
|
||||
map.TSpawnMultiplierX = tX;
|
||||
}
|
||||
if (float.TryParse(rootNode["TSpawn_y"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float tY))
|
||||
{
|
||||
map.TSpawnMultiplierY = tY;
|
||||
}
|
||||
if (float.TryParse(rootNode["bombA_x"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float bombAX))
|
||||
{
|
||||
map.BombAX = bombAX;
|
||||
}
|
||||
if (float.TryParse(rootNode["bombA_y"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float bombAY))
|
||||
{
|
||||
map.BombAY = bombAY;
|
||||
}
|
||||
if (float.TryParse(rootNode["bombB_x"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float bombBX))
|
||||
{
|
||||
map.BombBX = bombBX;
|
||||
}
|
||||
if (float.TryParse(rootNode["bombB_y"]?.Value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float bombBY))
|
||||
{
|
||||
map.BombBY = bombBY;
|
||||
}
|
||||
}
|
||||
|
||||
map.MapFileName = System.IO.Path.GetFileNameWithoutExtension(file).Split('_').Last();
|
||||
|
||||
DDSImage image;
|
||||
try
|
||||
{
|
||||
image = new DDSImage(System.IO.File.ReadAllBytes(map.MapImagePath));
|
||||
}
|
||||
catch
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (image.BitmapImage.Width != image.BitmapImage.Height)
|
||||
continue;
|
||||
|
||||
System.Windows.Application.Current.Dispatcher.Invoke((Action)delegate
|
||||
{
|
||||
map.MapImage = Globals.BitmapToImageSource(image.BitmapImage);
|
||||
});
|
||||
|
||||
maps.Add(map);
|
||||
}
|
||||
|
||||
return maps;
|
||||
}
|
||||
|
||||
public List<CsgoWeapon> GetWeapons()
|
||||
{
|
||||
string filePath = Path.Combine(this.CsgoPath, "csgo\\scripts\\items\\items_game.txt");
|
||||
if (!File.Exists(filePath))
|
||||
return null;
|
||||
|
||||
var vdfItems = new VDFFile(filePath);
|
||||
Element prefabs = vdfItems["items_game"]?["prefabs"];
|
||||
Element items = vdfItems["items_game"]?["items"];
|
||||
|
||||
if (prefabs == null || items == null)
|
||||
return null;
|
||||
|
||||
var weapons = new List<CsgoWeapon>();
|
||||
|
||||
foreach(var item in items.Children)
|
||||
{
|
||||
string itemPrefab = item["prefab"]?.Value;
|
||||
string itemName = item["name"].Value;
|
||||
|
||||
if (itemPrefab == null || !itemName.StartsWith("weapon_"))
|
||||
continue;
|
||||
|
||||
var weapon = new CsgoWeapon();
|
||||
weapon.ClassName = itemName;
|
||||
|
||||
if(this.tryPopulateWeapon(weapon, prefabs, itemPrefab))
|
||||
{
|
||||
weapons.Add(weapon);
|
||||
}
|
||||
}
|
||||
|
||||
return weapons;
|
||||
}
|
||||
|
||||
private bool tryPopulateWeapon(CsgoWeapon weapon, Element prefabs, string prefabName, List<string> prefabTrace = null)
|
||||
{
|
||||
Element prefab = prefabs[prefabName];
|
||||
|
||||
if (prefab == null)
|
||||
// Prefab not existent (example was prefab named "valve csgo_tool")
|
||||
return false;
|
||||
|
||||
string nextPrefab = prefab["prefab"]?.Value;
|
||||
|
||||
if (prefab == null || (nextPrefab == null && prefabTrace?.FirstOrDefault(pr => pr == "primary" || pr == "secondary") == null))
|
||||
// We've reached the end of abstraction but it wasn't found to be primary nor secondary
|
||||
return false;
|
||||
|
||||
bool gatheredAllInfo = true;
|
||||
|
||||
Element attributes = prefab["attributes"];
|
||||
|
||||
if (attributes == null)
|
||||
return false;
|
||||
|
||||
// =========================== ATTRIBUTES =========================== //
|
||||
|
||||
// Base damage
|
||||
if (weapon.BaseDamage == -1)
|
||||
{
|
||||
string damage = attributes["damage"]?.Value;
|
||||
if (damage != null)
|
||||
{
|
||||
// damage field exists
|
||||
if (int.TryParse(damage, out int dmg))
|
||||
{
|
||||
weapon.BaseDamage = dmg;
|
||||
}
|
||||
}
|
||||
else
|
||||
gatheredAllInfo = false;
|
||||
}
|
||||
|
||||
// Armor penetration
|
||||
if (weapon.ArmorPenetration == -1)
|
||||
{
|
||||
string penetration = attributes["armor ratio"]?.Value;
|
||||
if (penetration != null)
|
||||
{
|
||||
// Armor penetration field exists
|
||||
if (float.TryParse(penetration, NumberStyles.Any, CultureInfo.InvariantCulture, out float pen))
|
||||
{
|
||||
weapon.ArmorPenetration = pen * 100f / 2f;
|
||||
}
|
||||
}
|
||||
else
|
||||
gatheredAllInfo = false;
|
||||
}
|
||||
|
||||
// Damage dropoff
|
||||
if (weapon.DamageDropoff == -1)
|
||||
{
|
||||
string dropoff = attributes["range modifier"]?.Value;
|
||||
if (dropoff != null)
|
||||
{
|
||||
// Damage dropoff field exists
|
||||
if (double.TryParse(dropoff, NumberStyles.Any, CultureInfo.InvariantCulture, out double drop))
|
||||
{
|
||||
weapon.DamageDropoff = drop;
|
||||
}
|
||||
}
|
||||
else
|
||||
gatheredAllInfo = false;
|
||||
}
|
||||
|
||||
// Max range
|
||||
if (weapon.MaxBulletRange == -1)
|
||||
{
|
||||
string maxrange = attributes["range"]?.Value;
|
||||
if (maxrange != null)
|
||||
{
|
||||
// Max range field exists
|
||||
if (int.TryParse(maxrange, out int range))
|
||||
{
|
||||
weapon.MaxBulletRange = range;
|
||||
}
|
||||
}
|
||||
else
|
||||
gatheredAllInfo = false;
|
||||
}
|
||||
|
||||
// Headshot modifier
|
||||
if (weapon.HeadshotModifier == -1)
|
||||
{
|
||||
string headshotModifier = attributes["headshot multiplier"]?.Value;
|
||||
if (headshotModifier != null)
|
||||
{
|
||||
// Headshot modifier field exists
|
||||
if (float.TryParse(headshotModifier, NumberStyles.Any, CultureInfo.InvariantCulture, out float hs))
|
||||
{
|
||||
weapon.HeadshotModifier = hs;
|
||||
}
|
||||
}
|
||||
else
|
||||
gatheredAllInfo = false;
|
||||
}
|
||||
|
||||
// ================================================================== //
|
||||
|
||||
if (gatheredAllInfo || nextPrefab == null)
|
||||
return true; // ?
|
||||
|
||||
if (prefabTrace == null)
|
||||
prefabTrace = new List<string>();
|
||||
|
||||
prefabTrace.Add(prefab.Name);
|
||||
|
||||
return this.tryPopulateWeapon(weapon, prefabs, nextPrefab, prefabTrace);
|
||||
}
|
||||
|
||||
private bool mapFileNameValid(string mapPath)
|
||||
{
|
||||
string fileName = Path.GetFileName(mapPath.ToLower());
|
||||
|
||||
foreach(string prefix in this.validMapPrefixes)
|
||||
{
|
||||
if (fileName.StartsWith(prefix.ToLower()))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
2015
DamageCalculator/DamageCalculator/DDSImageParser.cs
Normal file
2015
DamageCalculator/DamageCalculator/DDSImageParser.cs
Normal file
File diff suppressed because it is too large
Load diff
159
DamageCalculator/DamageCalculator/DamageCalculator.csproj
Normal file
159
DamageCalculator/DamageCalculator/DamageCalculator.csproj
Normal file
|
@ -0,0 +1,159 @@
|
|||
<?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>{7A7AE40F-8677-44E3-873A-4AB7C9FCFEB4}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>Damage_Calculator</RootNamespace>
|
||||
<AssemblyName>CSGO Damage Calculator</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>
|
||||
<Deterministic>true</Deterministic>
|
||||
</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>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</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>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>27.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationFramework.Aero2" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="About.xaml.cs">
|
||||
<DependentUpon>About.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CsgoHelper.cs" />
|
||||
<Compile Include="DDSImageParser.cs" />
|
||||
<Compile Include="Globals.cs" />
|
||||
<Compile Include="Models\CsgoWeapon.cs" />
|
||||
<Compile Include="Models\CsgoMapOverview.cs" />
|
||||
<Compile Include="Models\MapPoint.cs" />
|
||||
<Compile Include="Models\Settings.cs" />
|
||||
<Compile Include="Models\SteamGame.cs" />
|
||||
<Compile Include="Models\SteamLibrary.cs" />
|
||||
<Compile Include="Serializer.cs" />
|
||||
<Compile Include="SteamHelper.cs" />
|
||||
<Compile Include="Themes\ColourfulDarkTheme.xaml.cs" />
|
||||
<Compile Include="Themes\ColourfulLightTheme.xaml.cs" />
|
||||
<Compile Include="Themes\DarkTheme.xaml.cs" />
|
||||
<Compile Include="Themes\LightTheme.xaml.cs" />
|
||||
<Compile Include="Themes\ThemesController.cs" />
|
||||
<Compile Include="ZatVdfParser\BackupVdfReader.cs" />
|
||||
<Compile Include="ZatVdfParser\Element.cs" />
|
||||
<Compile Include="ZatVdfParser\VdfFile.cs" />
|
||||
<Page Include="About.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="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="Themes\ColourfulDarkTheme.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Themes\ColourfulLightTheme.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Themes\DarkTheme.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Themes\LightTheme.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</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="27.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="icon_ct.png" />
|
||||
<Resource Include="icon_t.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="icon_a_site.png" />
|
||||
<Resource Include="icon_b_site.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
28
DamageCalculator/DamageCalculator/Globals.cs
Normal file
28
DamageCalculator/DamageCalculator/Globals.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Damage_Calculator
|
||||
{
|
||||
static class Globals
|
||||
{
|
||||
public static Models.Settings Settings = new Models.Settings();
|
||||
|
||||
public static BitmapImage BitmapToImageSource(Bitmap src)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
((System.Drawing.Bitmap)src).Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
|
||||
BitmapImage image = new BitmapImage();
|
||||
image.BeginInit();
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
image.StreamSource = ms;
|
||||
image.EndInit();
|
||||
return image;
|
||||
}
|
||||
}
|
||||
}
|
99
DamageCalculator/DamageCalculator/MainWindow.xaml
Normal file
99
DamageCalculator/DamageCalculator/MainWindow.xaml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<Window x:Class="Damage_Calculator.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:local="clr-namespace:Damage_Calculator"
|
||||
mc:Ignorable="d"
|
||||
Title="CS:GO Damage Calculator" Height="566" Width="826" MinHeight="560" MinWidth="450"
|
||||
Style="{DynamicResource CustomWindowStyle}"
|
||||
WindowStartupLocation="CenterScreen" Icon="27.ico"
|
||||
MouseMove="Window_MouseMove"
|
||||
KeyDown="Window_KeyDown">
|
||||
<Grid>
|
||||
<Menu>
|
||||
<MenuItem Header="View">
|
||||
<MenuItem Header="Themes">
|
||||
<MenuItem Header="Dark" Uid="0" Click="changeTheme_Click" />
|
||||
<MenuItem Header="Flashbang" Uid="1" Click="changeTheme_Click" />
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Help">
|
||||
<MenuItem x:Name="mnuHelp" Header="About..." Uid="0" Click="mnuHelp_Click" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="65" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel x:Name="topStackPanel" Orientation="Horizontal" HorizontalAlignment="Center" Grid.ColumnSpan="2" VerticalAlignment="Center">
|
||||
<TextBlock Text="Map:" VerticalAlignment="Center" FontWeight="Bold" />
|
||||
<ComboBox x:Name="comboBoxMaps" Margin="10,0,0,0" Height="25" Width="200" VerticalAlignment="Top" SelectionChanged="comboBoxMaps_SelectionChanged" />
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Right" Grid.Column="1" Margin="0,0,10,0">
|
||||
<TextBlock FontWeight="Bold" Text="Distance:" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="txtEasterEggMetres" Text="Metres:" />
|
||||
<TextBlock x:Name="textDistanceMetres" Text="0" Margin="10,0,0,0" Foreground="IndianRed" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Inches/Units:" />
|
||||
<TextBlock x:Name="textDistanceUnits" Text="0" Margin="10,0,0,0" Foreground="IndianRed" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Rectangle x:Name="rectTop" VerticalAlignment="Top" Grid.Row="1" Height="1" Fill="White" Grid.ColumnSpan="2" />
|
||||
<Rectangle x:Name="rectSide" HorizontalAlignment="Left" Width="1" Grid.Row="1" Grid.Column="1" Fill="White" />
|
||||
<StackPanel x:Name="leftStackPanel" Margin="10,20,0,0" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Stretch">
|
||||
<StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Armor:" FontSize="14" FontWeight="Bold" />
|
||||
<CheckBox x:Name="chkHelmet" Content="Helmet" Checked="settings_Updated" Unchecked="settings_Updated" />
|
||||
<CheckBox x:Name="chkKevlar" Content="Body armor" Checked="settings_Updated" Unchecked="settings_Updated" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,20,0,0">
|
||||
<TextBlock Text="Area hit:" FontSize="14" FontWeight="Bold" />
|
||||
<RadioButton x:Name="radioHead" Content="Head" Checked="settings_Updated" />
|
||||
<RadioButton x:Name="radioChestArms" Content="Chest/Arms" IsChecked="True" Checked="settings_Updated" />
|
||||
<RadioButton x:Name="radioStomach" Content="Stomach" Checked="settings_Updated" />
|
||||
<RadioButton x:Name="radioLegs" Content="Legs" Checked="settings_Updated" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,20,0,0">
|
||||
<TextBlock Text="Weapon used:" FontSize="14" FontWeight="Bold" />
|
||||
<ComboBox x:Name="comboWeapons" MinWidth="100" MaxWidth="200" HorizontalAlignment="Left" SelectionChanged="comboWeapons_SelectionChanged" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,20,0,0">
|
||||
<TextBlock Text="Resulting damage:" FontSize="14" FontWeight="Bold" />
|
||||
<TextBlock x:Name="txtResult" Text="0" Foreground="IndianRed" FontSize="18" />
|
||||
<TextBlock x:Name="txtResultArmor" Text="0" Foreground="CadetBlue" FontSize="14" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Bottom" Grid.Row="1" Margin="10,0,0,10">
|
||||
<TextBlock Text="Cursor position:" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="X:" />
|
||||
<TextBlock x:Name="txtCursorX" Text="0" Margin="10,0,0,0" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Y:" />
|
||||
<TextBlock x:Name="txtCursorY" Text="0" Margin="10,0,0,0" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Grid x:Name="rightGrid" Grid.Row="1" Grid.Column="1" Margin="10">
|
||||
<Image x:Name="mapImage" MouseLeftButtonUp="mapImage_MouseLeftButtonUp" HorizontalAlignment="Center" VerticalAlignment="Center" MouseRightButtonUp="mapImage_MouseRightButtonUp" LayoutUpdated="mapImage_LayoutUpdated" />
|
||||
<Canvas x:Name="pointsCanvas" Width="{Binding ActualWidth, ElementName=mapImage, Mode=OneWay}" Height="{Binding ActualHeight, ElementName=mapImage, Mode=OneWay}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid x:Name="gridLoading" Background="#B2000000" Visibility="Collapsed">
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="Loading maps and weapon stats..." HorizontalAlignment="Center" FontSize="18" />
|
||||
<TextBlock Text="(This can take up to a few minutes if this is the first start or the if weapon stats got updated recently.)" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
569
DamageCalculator/DamageCalculator/MainWindow.xaml.cs
Normal file
569
DamageCalculator/DamageCalculator/MainWindow.xaml.cs
Normal file
|
@ -0,0 +1,569 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
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 Damage_Calculator.Models;
|
||||
using Damage_Calculator.ZatVdfParser;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Damage_Calculator
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the point that will be there when left-clicking a map.
|
||||
/// </summary>
|
||||
private MapPoint leftPoint = new MapPoint();
|
||||
private Color leftPointColour = Color.FromArgb(140, 255, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the point that will be there when right-clicking a map.
|
||||
/// </summary>
|
||||
private MapPoint rightPoint = new MapPoint();
|
||||
private Color rightPointColour = Color.FromArgb(140, 0, 255, 0);
|
||||
|
||||
private Line connectingLine = new Line();
|
||||
|
||||
private Image CTSpawnIcon;
|
||||
private Image TSpawnIcon;
|
||||
private Image ASiteIcon;
|
||||
private Image BSiteIcon;
|
||||
|
||||
private double unitsDistance = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the currently loaded map.
|
||||
/// </summary>
|
||||
private CsgoMapOverview loadedMap;
|
||||
private CsgoWeapon selectedWeapon;
|
||||
|
||||
private BackgroundWorker bgWorker = new BackgroundWorker();
|
||||
|
||||
private bool lineDrawn = false;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Globals.Settings.CsgoHelper.CsgoPath = Globals.Settings.SteamHelper.GetGamePathFromExactName("Counter-Strike: Global Offensive");
|
||||
if (Globals.Settings.CsgoHelper.CsgoPath == null)
|
||||
{
|
||||
MessageBox.Show("Make sure you have installed CS:GO and Steam correctly.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
bgWorker.DoWork += BgWorker_DoWork;
|
||||
bgWorker.RunWorkerCompleted += BgWorker_RunWorkerCompleted;
|
||||
bgWorker.ProgressChanged += BgWorker_ProgressChanged;
|
||||
bgWorker.WorkerReportsProgress = true;
|
||||
|
||||
this.gridLoading.Visibility = Visibility.Visible;
|
||||
bgWorker.RunWorkerAsync();
|
||||
}
|
||||
|
||||
#region background worker
|
||||
private void BgWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
if (e.ProgressPercentage == 0)
|
||||
{
|
||||
// Add maps
|
||||
var maps = new List<ComboBoxItem>();
|
||||
|
||||
foreach (var map in e.UserState as List<CsgoMapOverview>)
|
||||
{
|
||||
var item = new ComboBoxItem();
|
||||
|
||||
item.Tag = map;
|
||||
item.Content = map.MapFileName;
|
||||
|
||||
maps.Add(item);
|
||||
}
|
||||
|
||||
this.comboBoxMaps.ItemsSource = maps.OrderBy(m => m.Content);
|
||||
if (maps.Count > 0)
|
||||
this.comboBoxMaps.SelectedIndex = 0;
|
||||
}
|
||||
else if(e.ProgressPercentage == 1)
|
||||
{
|
||||
// Add weapons
|
||||
var weaponItems = new List<ComboBoxItem>();
|
||||
|
||||
foreach (var wpn in e.UserState as List<CsgoWeapon>)
|
||||
{
|
||||
var item = new ComboBoxItem();
|
||||
|
||||
item.Tag = wpn;
|
||||
item.Content = wpn.ClassName.Substring(wpn.ClassName.IndexOf('_') + 1);
|
||||
|
||||
weaponItems.Add(item);
|
||||
}
|
||||
|
||||
comboWeapons.ItemsSource = weaponItems.OrderBy(w => w.Content);
|
||||
if (weaponItems.Count > 0)
|
||||
this.comboWeapons.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static string calculateMD5(string filename)
|
||||
{
|
||||
using (var md5 = System.Security.Cryptography.MD5.Create())
|
||||
{
|
||||
using (var stream = File.OpenRead(filename))
|
||||
{
|
||||
var hash = md5.ComputeHash(stream);
|
||||
return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
this.gridLoading.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void BgWorker_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var maps = Globals.Settings.CsgoHelper.GetMaps();
|
||||
bgWorker.ReportProgress(0, maps);
|
||||
var serializer = new XmlSerializer(typeof(List<CsgoWeapon>));
|
||||
|
||||
List<CsgoWeapon> weapons;
|
||||
|
||||
string itemsFile = System.IO.Path.Combine(Globals.Settings.CsgoHelper.CsgoPath, "csgo\\scripts\\items\\items_game.txt");
|
||||
string saveFileDir = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "CSGO Damage Calculator");
|
||||
string currentHash = calculateMD5(itemsFile);
|
||||
|
||||
if (Directory.Exists(saveFileDir))
|
||||
{
|
||||
string[] files = Directory.GetFiles(saveFileDir);
|
||||
if (files.Length == 1)
|
||||
{
|
||||
// Compare hashes
|
||||
string oldHash = System.IO.Path.GetFileName(files[0]);
|
||||
|
||||
if(currentHash == oldHash)
|
||||
{
|
||||
weapons = (List<CsgoWeapon>)serializer.Deserialize(new FileStream(System.IO.Path.Combine(saveFileDir, currentHash), FileMode.Open));
|
||||
bgWorker.ReportProgress(1, weapons);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (string file in files)
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach(string file in files)
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Directory.CreateDirectory(saveFileDir);
|
||||
}
|
||||
|
||||
weapons = Globals.Settings.CsgoHelper.GetWeapons();
|
||||
serializer.Serialize(new FileStream(System.IO.Path.Combine(saveFileDir, currentHash), FileMode.Create), weapons);
|
||||
bgWorker.ReportProgress(1, weapons);
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void resetCanvas()
|
||||
{
|
||||
this.pointsCanvas.Children.Clear();
|
||||
this.leftPoint = null;
|
||||
this.rightPoint = null;
|
||||
this.connectingLine = null;
|
||||
this.unitsDistance = -1;
|
||||
this.textDistanceMetres.Text = "0";
|
||||
this.textDistanceUnits.Text = "0";
|
||||
this.txtResult.Text = "0";
|
||||
this.txtResultArmor.Text = "0";
|
||||
}
|
||||
|
||||
private void loadMap(CsgoMapOverview map)
|
||||
{
|
||||
mapImage.Source = map.MapImage;
|
||||
}
|
||||
|
||||
private Ellipse getPointEllipse(Color strokeColour)
|
||||
{
|
||||
Ellipse circle = new Ellipse();
|
||||
circle.Fill = null;
|
||||
circle.Width = circle.Height = 14;
|
||||
circle.Stroke = new SolidColorBrush(strokeColour);
|
||||
circle.StrokeThickness = 2;
|
||||
circle.IsHitTestVisible = false;
|
||||
|
||||
return circle;
|
||||
}
|
||||
|
||||
private void updateCirclePositions()
|
||||
{
|
||||
if (this.connectingLine == null)
|
||||
this.connectingLine = new Line();
|
||||
|
||||
if (leftPoint?.Circle != null)
|
||||
{
|
||||
Canvas.SetLeft(leftPoint.Circle, (leftPoint.PercentageX * pointsCanvas.ActualWidth / 100f) - (leftPoint.Circle.Width / 2));
|
||||
Canvas.SetTop(leftPoint.Circle, (leftPoint.PercentageY * pointsCanvas.ActualHeight / 100f) - (leftPoint.Circle.Height / 2));
|
||||
}
|
||||
|
||||
if (rightPoint?.Circle != null)
|
||||
{
|
||||
Canvas.SetLeft(rightPoint.Circle, (rightPoint.PercentageX * pointsCanvas.ActualWidth / 100f) - (rightPoint.Circle.Width / 2));
|
||||
Canvas.SetTop(rightPoint.Circle, (rightPoint.PercentageY * pointsCanvas.ActualHeight / 100f) - (rightPoint.Circle.Height / 2));
|
||||
}
|
||||
|
||||
if(leftPoint?.Circle != null && rightPoint?.Circle != null)
|
||||
{
|
||||
this.connectingLine.X1 = Canvas.GetLeft(leftPoint.Circle) + (leftPoint.Circle.Width / 2);
|
||||
this.connectingLine.Y1 = Canvas.GetTop(leftPoint.Circle) + (leftPoint.Circle.Height / 2);
|
||||
this.connectingLine.X2 = Canvas.GetLeft(rightPoint.Circle) + (rightPoint.Circle.Width / 2);
|
||||
this.connectingLine.Y2 = Canvas.GetTop(rightPoint.Circle) + (rightPoint.Circle.Height / 2);
|
||||
this.connectingLine.Fill = null;
|
||||
this.connectingLine.Stroke = new SolidColorBrush(Color.FromArgb(140, 255, 255, 255));
|
||||
this.connectingLine.StrokeThickness = 2;
|
||||
this.connectingLine.IsHitTestVisible = false;
|
||||
|
||||
int indexLine = pointsCanvas.Children.IndexOf(this.connectingLine);
|
||||
if (indexLine < 0)
|
||||
{
|
||||
pointsCanvas.Children.Add(this.connectingLine);
|
||||
this.lineDrawn = true;
|
||||
}
|
||||
|
||||
this.unitsDistance = this.calculateDotDistanceInUnits();
|
||||
this.textDistanceUnits.Text = Math.Round(this.unitsDistance, 2).ToString();
|
||||
this.textDistanceMetres.Text = Math.Round(this.unitsDistance / 39.37, 2).ToString();
|
||||
this.settings_Updated(null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lineDrawn = false;
|
||||
}
|
||||
|
||||
if(this.loadedMap != null && this.loadedMap.CTSpawnMultiplierX != -1 && this.loadedMap.CTSpawnMultiplierY != -1)
|
||||
{
|
||||
// CT Icon
|
||||
if (this.CTSpawnIcon == null)
|
||||
{
|
||||
this.CTSpawnIcon = new Image();
|
||||
this.CTSpawnIcon.Source = new BitmapImage(new Uri("icon_ct.png", UriKind.RelativeOrAbsolute));
|
||||
this.CTSpawnIcon.Width = 25;
|
||||
this.CTSpawnIcon.Height = 25;
|
||||
this.CTSpawnIcon.Opacity = 0.6;
|
||||
this.CTSpawnIcon.IsHitTestVisible = false;
|
||||
}
|
||||
|
||||
if(pointsCanvas.Children.IndexOf(CTSpawnIcon) == -1)
|
||||
pointsCanvas.Children.Add(CTSpawnIcon);
|
||||
|
||||
|
||||
Canvas.SetLeft(CTSpawnIcon, this.loadedMap.CTSpawnMultiplierX * this.mapImage.ActualWidth - (CTSpawnIcon.ActualWidth / 2));
|
||||
Canvas.SetTop(CTSpawnIcon, this.loadedMap.CTSpawnMultiplierY * this.mapImage.ActualWidth - (CTSpawnIcon.ActualHeight / 2));
|
||||
|
||||
// T Icon
|
||||
if (this.TSpawnIcon == null)
|
||||
{
|
||||
this.TSpawnIcon = new Image();
|
||||
this.TSpawnIcon.Source = new BitmapImage(new Uri("icon_t.png", UriKind.RelativeOrAbsolute));
|
||||
this.TSpawnIcon.Width = 25;
|
||||
this.TSpawnIcon.Height = 25;
|
||||
this.TSpawnIcon.Opacity = 0.6;
|
||||
this.TSpawnIcon.IsHitTestVisible = false;
|
||||
}
|
||||
|
||||
if (pointsCanvas.Children.IndexOf(TSpawnIcon) == -1)
|
||||
pointsCanvas.Children.Add(TSpawnIcon);
|
||||
|
||||
Canvas.SetLeft(TSpawnIcon, this.loadedMap.TSpawnMultiplierX * this.mapImage.ActualWidth - (TSpawnIcon.ActualWidth / 2));
|
||||
Canvas.SetTop(TSpawnIcon, this.loadedMap.TSpawnMultiplierY * this.mapImage.ActualWidth - (TSpawnIcon.ActualHeight / 2));
|
||||
|
||||
// Bomb A Icon
|
||||
if (this.ASiteIcon == null)
|
||||
{
|
||||
this.ASiteIcon = new Image();
|
||||
this.ASiteIcon.Source = new BitmapImage(new Uri("icon_a_site.png", UriKind.RelativeOrAbsolute));
|
||||
this.ASiteIcon.Width = 25;
|
||||
this.ASiteIcon.Height = 25;
|
||||
this.ASiteIcon.Opacity = 0.6;
|
||||
this.ASiteIcon.IsHitTestVisible = false;
|
||||
}
|
||||
|
||||
if (pointsCanvas.Children.IndexOf(ASiteIcon) == -1)
|
||||
pointsCanvas.Children.Add(ASiteIcon);
|
||||
|
||||
Canvas.SetLeft(ASiteIcon, this.loadedMap.BombAX * this.mapImage.ActualWidth - (ASiteIcon.ActualWidth / 2));
|
||||
Canvas.SetTop(ASiteIcon, this.loadedMap.BombAY * this.mapImage.ActualWidth - (ASiteIcon.ActualHeight / 2));
|
||||
|
||||
// Bomb B Icon
|
||||
if (this.BSiteIcon == null)
|
||||
{
|
||||
this.BSiteIcon = new Image();
|
||||
this.BSiteIcon.Source = new BitmapImage(new Uri("icon_b_site.png", UriKind.RelativeOrAbsolute));
|
||||
this.BSiteIcon.Width = 25;
|
||||
this.BSiteIcon.Height = 25;
|
||||
this.BSiteIcon.Opacity = 0.6;
|
||||
this.BSiteIcon.IsHitTestVisible = false;
|
||||
}
|
||||
|
||||
if (pointsCanvas.Children.IndexOf(BSiteIcon) == -1)
|
||||
pointsCanvas.Children.Add(BSiteIcon);
|
||||
|
||||
Canvas.SetLeft(BSiteIcon, this.loadedMap.BombBX * this.mapImage.ActualWidth - (BSiteIcon.ActualWidth / 2));
|
||||
Canvas.SetTop(BSiteIcon, this.loadedMap.BombBY * this.mapImage.ActualWidth - (BSiteIcon.ActualHeight / 2));
|
||||
}
|
||||
}
|
||||
|
||||
private double calculateDotDistanceInUnits()
|
||||
{
|
||||
Ellipse circleLeft = pointsCanvas.Children[pointsCanvas.Children.IndexOf(leftPoint.Circle)] as Ellipse;
|
||||
double leftX = Canvas.GetLeft(circleLeft);
|
||||
double leftY = Canvas.GetTop(circleLeft);
|
||||
|
||||
Ellipse circleRight = pointsCanvas.Children[pointsCanvas.Children.IndexOf(rightPoint.Circle)] as Ellipse;
|
||||
double rightX = Canvas.GetLeft(circleRight);
|
||||
double rightY = Canvas.GetTop(circleRight);
|
||||
|
||||
// Distance in shown pixels
|
||||
double diffPixels = Math.Sqrt(Math.Pow(Math.Abs(leftX - rightX), 2) + Math.Pow(Math.Abs(leftY - rightY), 2));
|
||||
|
||||
// Percentage on shown pixels
|
||||
double diffPerc = diffPixels * 100f / this.mapImage.ActualWidth;
|
||||
|
||||
// Distance on original pixel scales
|
||||
double diffPixelsOriginal = diffPerc * (this.mapImage.Source as BitmapSource).PixelWidth / 100f;
|
||||
|
||||
// times scale multiplier
|
||||
double unitsDifference = diffPixelsOriginal * this.loadedMap.MapSizeMultiplier;
|
||||
|
||||
return unitsDifference;
|
||||
}
|
||||
|
||||
#region events
|
||||
private void mapImage_LayoutUpdated(object sender, EventArgs e)
|
||||
{
|
||||
this.updateCirclePositions();
|
||||
}
|
||||
|
||||
private void mapImage_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (this.leftPoint == null)
|
||||
leftPoint = new MapPoint();
|
||||
|
||||
Point mousePos = Mouse.GetPosition(pointsCanvas);
|
||||
pointsCanvas.Children.Remove(leftPoint.Circle);
|
||||
|
||||
var circle = this.getPointEllipse(this.leftPointColour);
|
||||
|
||||
pointsCanvas.Children.Add(circle);
|
||||
|
||||
leftPoint.PercentageX = mousePos.X * 100f / pointsCanvas.ActualWidth;
|
||||
leftPoint.PercentageY = mousePos.Y * 100f / pointsCanvas.ActualHeight;
|
||||
|
||||
leftPoint.Circle = circle;
|
||||
|
||||
this.updateCirclePositions();
|
||||
}
|
||||
|
||||
private void mapImage_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (this.rightPoint == null)
|
||||
this.rightPoint = new MapPoint();
|
||||
|
||||
Point mousePos = Mouse.GetPosition(pointsCanvas);
|
||||
pointsCanvas.Children.Remove(rightPoint.Circle);
|
||||
|
||||
var circle = this.getPointEllipse(this.rightPointColour);
|
||||
|
||||
pointsCanvas.Children.Add(circle);
|
||||
|
||||
rightPoint.PercentageX = mousePos.X * 100f / pointsCanvas.ActualWidth;
|
||||
rightPoint.PercentageY = mousePos.Y * 100f / pointsCanvas.ActualHeight;
|
||||
|
||||
rightPoint.Circle = circle;
|
||||
|
||||
this.updateCirclePositions();
|
||||
}
|
||||
|
||||
private void changeTheme_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
switch (int.Parse(((MenuItem)sender).Uid))
|
||||
{
|
||||
case 0: REghZyFramework.Themes.ThemesController.SetTheme(REghZyFramework.Themes.ThemesController.ThemeTypes.Dark);
|
||||
rectTop.Fill = rectSide.Fill = new SolidColorBrush(Colors.White);
|
||||
txtEasterEggMetres.Text = "Metres:";
|
||||
break;
|
||||
case 1: REghZyFramework.Themes.ThemesController.SetTheme(REghZyFramework.Themes.ThemesController.ThemeTypes.Light);
|
||||
rectTop.Fill = rectSide.Fill = new SolidColorBrush(Colors.Black);
|
||||
txtEasterEggMetres.Text = "Meters:";
|
||||
break;
|
||||
}
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void comboBoxMaps_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
var map = ((sender as ComboBox).SelectedItem as ComboBoxItem)?.Tag as CsgoMapOverview;
|
||||
|
||||
if (map != null)
|
||||
this.loadMap(map);
|
||||
|
||||
this.resetCanvas();
|
||||
this.loadedMap = map;
|
||||
}
|
||||
|
||||
private void settings_Updated(object sender, EventArgs e)
|
||||
{
|
||||
if (this.selectedWeapon == null || !this.lineDrawn)
|
||||
{
|
||||
if(txtResult != null && txtResultArmor != null)
|
||||
txtResult.Text = txtResultArmor.Text = "0";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
double damage = this.selectedWeapon.BaseDamage;
|
||||
double absorbedDamageByArmor = 0;
|
||||
bool wasArmorHit = false;
|
||||
|
||||
if(this.unitsDistance > this.selectedWeapon.MaxBulletRange)
|
||||
{
|
||||
damage = 0;
|
||||
txtResult.Text = txtResultArmor.Text = damage.ToString();
|
||||
return;
|
||||
}
|
||||
|
||||
// Range
|
||||
damage *= Math.Pow(this.selectedWeapon.DamageDropoff, double.Parse((this.unitsDistance / 500f).ToString()));
|
||||
|
||||
// Multipliers and armor penetration
|
||||
if (radioHead.IsChecked == true)
|
||||
{
|
||||
// Headshot
|
||||
damage *= this.selectedWeapon.HeadshotModifier;
|
||||
|
||||
if (chkHelmet.IsChecked == true)
|
||||
{
|
||||
// Has helmet
|
||||
double previousDamage = damage;
|
||||
damage *= this.selectedWeapon.ArmorPenetration / 100f;
|
||||
absorbedDamageByArmor = previousDamage - (int)damage;
|
||||
wasArmorHit = true;
|
||||
}
|
||||
}
|
||||
else if(radioChestArms.IsChecked == true)
|
||||
{
|
||||
// Chest or arms
|
||||
if (chkKevlar.IsChecked == true)
|
||||
{
|
||||
// Has kevlar
|
||||
double previousDamage = damage;
|
||||
damage *= this.selectedWeapon.ArmorPenetration / 100f;
|
||||
absorbedDamageByArmor = previousDamage - (int)damage;
|
||||
wasArmorHit = true;
|
||||
}
|
||||
}
|
||||
else if(radioStomach.IsChecked == true)
|
||||
{
|
||||
// Stomach
|
||||
damage *= 1.25f;
|
||||
|
||||
if (chkKevlar.IsChecked == true)
|
||||
{
|
||||
// Has kevlar
|
||||
double previousDamage = damage;
|
||||
damage *= this.selectedWeapon.ArmorPenetration / 100f;
|
||||
absorbedDamageByArmor = previousDamage - (int)damage;
|
||||
wasArmorHit = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Legs
|
||||
damage *= 0.75f;
|
||||
}
|
||||
|
||||
txtResult.Text = ((int)damage).ToString();
|
||||
|
||||
txtResultArmor.Text = (wasArmorHit ? (int)(absorbedDamageByArmor / 2) : 0).ToString();
|
||||
|
||||
// TODO: HP and armor and HP and armor left after shot
|
||||
}
|
||||
|
||||
private void comboWeapons_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
var weapon = ((sender as ComboBox).SelectedItem as ComboBoxItem)?.Tag as CsgoWeapon;
|
||||
|
||||
this.selectedWeapon = weapon;
|
||||
settings_Updated(null, null);
|
||||
}
|
||||
|
||||
private void mnuHelp_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
About about = new About();
|
||||
about.Owner = this;
|
||||
about.ShowDialog();
|
||||
}
|
||||
|
||||
private void Window_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (this.mapImage.Source == null)
|
||||
return;
|
||||
|
||||
var position = Mouse.GetPosition(mapImage);
|
||||
if (position.X >= 0 && position.Y >= 0 && position.X <= mapImage.ActualWidth && position.Y <= mapImage.ActualHeight)
|
||||
{
|
||||
// Percentage on shown pixels
|
||||
double diffPercX = position.X * 100f / this.mapImage.ActualWidth;
|
||||
// Distance on original pixel scales
|
||||
double diffPixelsOriginalX = diffPercX * (this.mapImage.Source as BitmapSource).PixelWidth / 100f;
|
||||
// times scale multiplier
|
||||
double unitsDifferenceX = diffPixelsOriginalX * this.loadedMap.MapSizeMultiplier;
|
||||
txtCursorX.Text = Math.Round(this.loadedMap.UpperLeftWorldXCoordinate + unitsDifferenceX, 2).ToString(System.Globalization.CultureInfo.InvariantCulture);
|
||||
|
||||
// Percentage on shown pixels
|
||||
double diffPercY = position.Y * 100f / this.mapImage.ActualWidth;
|
||||
// Distance on original pixel scales
|
||||
double diffPixelsOriginalY = diffPercY * (this.mapImage.Source as BitmapSource).PixelWidth / 100f;
|
||||
// times scale multiplier
|
||||
double unitsDifferenceY = diffPixelsOriginalY * this.loadedMap.MapSizeMultiplier;
|
||||
txtCursorY.Text = Math.Round(this.loadedMap.UpperLeftWorldYCoordinate - unitsDifferenceY, 2).ToString(System.Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtCursorX.Text = txtCursorY.Text = "0";
|
||||
}
|
||||
}
|
||||
private void Window_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.C && Keyboard.Modifiers == ModifierKeys.Control)
|
||||
{
|
||||
Clipboard.SetText(txtCursorX.Text + " " + txtCursorY.Text);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
41
DamageCalculator/DamageCalculator/Models/CsgoMapOverview.cs
Normal file
41
DamageCalculator/DamageCalculator/Models/CsgoMapOverview.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Damage_Calculator.Models
|
||||
{
|
||||
public class CsgoMapOverview
|
||||
{
|
||||
public BitmapSource MapImage { get; set; }
|
||||
|
||||
public string MapImagePath { get; set; }
|
||||
|
||||
public string MapFileName { get; set; }
|
||||
|
||||
public float MapSizeMultiplier { get; set; }
|
||||
|
||||
public float UpperLeftWorldXCoordinate { get; set; } = -1;
|
||||
|
||||
public float UpperLeftWorldYCoordinate { get; set; } = -1;
|
||||
|
||||
public float CTSpawnMultiplierX { get; set; } = -1;
|
||||
|
||||
public float CTSpawnMultiplierY { get; set; } = -1;
|
||||
|
||||
public float TSpawnMultiplierX { get; set; } = -1;
|
||||
|
||||
public float TSpawnMultiplierY { get; set; } = -1;
|
||||
|
||||
public float BombAX { get; set; } = -1;
|
||||
|
||||
public float BombAY { get; set; } = -1;
|
||||
|
||||
public float BombBX { get; set; } = -1;
|
||||
|
||||
public float BombBY { get; set; } = -1;
|
||||
}
|
||||
}
|
49
DamageCalculator/DamageCalculator/Models/CsgoWeapon.cs
Normal file
49
DamageCalculator/DamageCalculator/Models/CsgoWeapon.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Damage_Calculator.Models
|
||||
{
|
||||
public class CsgoWeapon
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the class name of this weapon.
|
||||
/// e.g. AK47 would be "weapon_ak47"
|
||||
/// </summary>
|
||||
public string ClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the base damage that the weapon deals, in health points.
|
||||
/// e.g. AK47 would have 36 base damage
|
||||
/// </summary>
|
||||
public int BaseDamage { get; set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the armor penetration of this weapon as a percentage.
|
||||
/// In the files this is saved as a float from 0 (0% penetration) to 2 (100% penetration).
|
||||
/// </summary>
|
||||
public float ArmorPenetration { get; set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the damage dropoff that this weapon has at 500 units distance. It's saved as a "RangeModifier" stat,
|
||||
/// where the modifier is a float value between 0 and 1 that contains the factor of the damage left.
|
||||
/// A value of 0.75 would mean, at 500 units the weapon loses 25% of its damage.
|
||||
/// The damage left can be calculated by: DAMAGE * RangeModifier^(DISTANCE / 500)
|
||||
/// </summary>
|
||||
public double DamageDropoff { get; set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum range a bullet of this weapon can travel in units. After this distance the "bullet" will just disappear.
|
||||
/// </summary>
|
||||
public int MaxBulletRange { get; set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the multiplier of headshots by this weapon. At the point of writing this is "4" for all weapons except two.
|
||||
/// </summary>
|
||||
public float HeadshotModifier { get; set; } = -1;
|
||||
}
|
||||
}
|
17
DamageCalculator/DamageCalculator/Models/MapPoint.cs
Normal file
17
DamageCalculator/DamageCalculator/Models/MapPoint.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Damage_Calculator.Models
|
||||
{
|
||||
class MapPoint
|
||||
{
|
||||
public System.Windows.Shapes.Ellipse Circle { get; set; }
|
||||
|
||||
public double PercentageX { get; set; }
|
||||
|
||||
public double PercentageY { get; set; }
|
||||
}
|
||||
}
|
15
DamageCalculator/DamageCalculator/Models/Settings.cs
Normal file
15
DamageCalculator/DamageCalculator/Models/Settings.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Damage_Calculator.Models
|
||||
{
|
||||
public class Settings
|
||||
{
|
||||
public SteamHelper SteamHelper = new SteamHelper();
|
||||
|
||||
public CsgoHelper CsgoHelper = new CsgoHelper();
|
||||
}
|
||||
}
|
62
DamageCalculator/DamageCalculator/Models/SteamGame.cs
Normal file
62
DamageCalculator/DamageCalculator/Models/SteamGame.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Damage_Calculator.Models
|
||||
{
|
||||
public class SteamGame
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string InstallFolderName { get; set; }
|
||||
|
||||
public int AppId { get; set; }
|
||||
|
||||
public int GameState { get; set; }
|
||||
|
||||
public DateTime LastUpdated { get; set; }
|
||||
|
||||
public long LastOwnerSteam64Id { get; set; }
|
||||
|
||||
public long BytesToDownload { get; set; }
|
||||
|
||||
public long BytesDownloaded { get; set; }
|
||||
|
||||
public long BytesToStage { get; set; }
|
||||
|
||||
public long BytesStaged { get; set; }
|
||||
|
||||
public bool KeepAutomaticallyUpdated { get; set; }
|
||||
|
||||
public bool AllowOtherUpdatesWhileRunning { get; set; }
|
||||
}
|
||||
|
||||
[Flags]
|
||||
enum GameState
|
||||
{
|
||||
StateInvalid = 0,
|
||||
StateUninstalled = 1,
|
||||
StateUpdateRequired = 2,
|
||||
StateFullyInstalled = 4,
|
||||
StateEncrypted = 8,
|
||||
StateLocked = 16,
|
||||
StateFilesMissing = 32,
|
||||
StateAppRunning = 64,
|
||||
StateFilesCorrupt = 128,
|
||||
StateUpdateRunning = 256,
|
||||
StateUpdatePaused = 512,
|
||||
StateUpdateStarted = 1024,
|
||||
StateUninstalling = 2048,
|
||||
StateBackupRunning = 4096,
|
||||
StateReconfiguring = 65536,
|
||||
StateValidating = 131072,
|
||||
StateAddingFiles = 262144,
|
||||
StatePreallocating = 524288,
|
||||
StateDownloading = 1048576,
|
||||
StateStaging = 2097152,
|
||||
StateCommitting = 4194304,
|
||||
StateUpdateStopping = 8388608
|
||||
}
|
||||
}
|
32
DamageCalculator/DamageCalculator/Models/SteamLibrary.cs
Normal file
32
DamageCalculator/DamageCalculator/Models/SteamLibrary.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Damage_Calculator.Models
|
||||
{
|
||||
public class SteamLibrary
|
||||
{
|
||||
public SteamLibrary()
|
||||
{
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
public SteamLibrary(string path)
|
||||
{
|
||||
this.Path = path;
|
||||
this.DoesExist = System.IO.Directory.Exists(path);
|
||||
}
|
||||
|
||||
public SteamLibrary(string path, bool doesExist)
|
||||
{
|
||||
this.Path = path;
|
||||
this.DoesExist = doesExist;
|
||||
}
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public bool DoesExist { get; set; }
|
||||
}
|
||||
}
|
55
DamageCalculator/DamageCalculator/Properties/AssemblyInfo.cs
Normal file
55
DamageCalculator/DamageCalculator/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("CSGO Damage Calculator")]
|
||||
[assembly: AssemblyDescription("CS:GO Damage Calculator")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Matty_L")]
|
||||
[assembly: AssemblyProduct("CSGO Damage Calculator")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[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
DamageCalculator/DamageCalculator/Properties/Resources.Designer.cs
generated
Normal file
63
DamageCalculator/DamageCalculator/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 Damage_Calculator.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", "16.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("Damage_Calculator.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
DamageCalculator/DamageCalculator/Properties/Resources.resx
Normal file
117
DamageCalculator/DamageCalculator/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
DamageCalculator/DamageCalculator/Properties/Settings.Designer.cs
generated
Normal file
26
DamageCalculator/DamageCalculator/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 Damage_Calculator.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
31
DamageCalculator/DamageCalculator/Serializer.cs
Normal file
31
DamageCalculator/DamageCalculator/Serializer.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Damage_Calculator
|
||||
{
|
||||
static class Serializer
|
||||
{
|
||||
public static void ToXml(object obj, string path)
|
||||
{
|
||||
var serializer = new XmlSerializer(obj.GetType());
|
||||
using(var writer = XmlWriter.Create(path))
|
||||
{
|
||||
serializer.Serialize(writer, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public static object FromXml(Type type, string pathToXml)
|
||||
{
|
||||
var serializer = new XmlSerializer(type);
|
||||
using (var reader = XmlReader.Create(pathToXml))
|
||||
{
|
||||
return serializer.Deserialize(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
267
DamageCalculator/DamageCalculator/SteamHelper.cs
Normal file
267
DamageCalculator/DamageCalculator/SteamHelper.cs
Normal file
|
@ -0,0 +1,267 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Damage_Calculator.ZatVdfParser;
|
||||
using Microsoft.Win32;
|
||||
using Damage_Calculator.Models;
|
||||
|
||||
namespace Damage_Calculator
|
||||
{
|
||||
public class SteamHelper
|
||||
{
|
||||
private string steamPath;
|
||||
private List<SteamLibrary> steamLibraries;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute path to the Steam install directory.
|
||||
/// If it can't be fetched (i.e. Steam is not installed) null is returned.
|
||||
/// </summary>
|
||||
public string SteamPath
|
||||
{
|
||||
get
|
||||
{
|
||||
if(this.steamPath == null)
|
||||
{
|
||||
this.UpdateSteamPath();
|
||||
}
|
||||
return this.steamPath;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all Steam libraries, and whether they're existent or not.
|
||||
/// If it can't be fetched (i.e. Steam is not installed) null is returned.
|
||||
/// </summary>
|
||||
public List<SteamLibrary> SteamLibraries
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.steamLibraries == null)
|
||||
{
|
||||
this.UpdateSteamLibraries();
|
||||
}
|
||||
return this.steamLibraries;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forcefully tries to update the <see cref="SteamPath"/> property with the current Steam path, even if it should be already set.
|
||||
/// </summary>
|
||||
public void UpdateSteamPath()
|
||||
{
|
||||
this.steamPath = this.GetSteamPath();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the Steam install directory. (For external use <see cref="SteamPath"/> is preferred.)
|
||||
/// </summary>
|
||||
/// <returns>The absolute path to the Steam install directory, or null if it can't be fetched.</returns>
|
||||
public string GetSteamPath()
|
||||
{
|
||||
var steamKey = Registry.CurrentUser.OpenSubKey("software\\valve\\steam");
|
||||
|
||||
if (steamKey == null)
|
||||
return null;
|
||||
|
||||
var steamPath = steamKey.GetValue("SteamPath");
|
||||
|
||||
if (steamPath == null)
|
||||
return null;
|
||||
|
||||
return steamPath.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forcefully tries to update the <see cref="SteamPath"/> property with the current Steam path, even if it should be already set.
|
||||
/// </summary>
|
||||
public void UpdateSteamLibraries()
|
||||
{
|
||||
this.steamLibraries = this.GetSteamLibraries();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches a list of Steam libraries, which are deposited in the Steam config, as well as whether the libraries exist on the drive.
|
||||
/// </summary>
|
||||
/// <returns>A list of all deposited Steam libraries, and if they exist.</returns>
|
||||
public List<SteamLibrary> GetSteamLibraries()
|
||||
{
|
||||
if (this.steamPath == null)
|
||||
this.steamPath = this.GetSteamPath();
|
||||
|
||||
if (this.steamPath == null)
|
||||
return null;
|
||||
|
||||
string configFilePath = Path.Combine(this.steamPath, "config\\config.vdf");
|
||||
if (!File.Exists(configFilePath))
|
||||
return null;
|
||||
|
||||
// Fetch additional libraries
|
||||
var configFile = new VDFFile(configFilePath);
|
||||
IEnumerable<string> additionalSteamLibraries = configFile["InstallConfigStore"]?["Software"]?["valve"]?["Steam"].Children.Where(c => c.Name.StartsWith("BaseInstallFolder_")).Select(c => c.Value);
|
||||
|
||||
// List libraries plus default Steam directory, because that's the default library
|
||||
var allLibraries = new List<SteamLibrary> { new SteamLibrary(this.steamPath) };
|
||||
foreach(string addLib in additionalSteamLibraries)
|
||||
{
|
||||
allLibraries.Add(new SteamLibrary(addLib.Replace("\\\\", "\\")));
|
||||
}
|
||||
|
||||
return allLibraries;
|
||||
}
|
||||
|
||||
public List<SteamGame> GetInstalledGames()
|
||||
{
|
||||
var steamLibraries = this.GetSteamLibraries();
|
||||
|
||||
if (steamLibraries == null)
|
||||
return null;
|
||||
|
||||
var allGames = new List<SteamGame>();
|
||||
|
||||
foreach(var library in steamLibraries)
|
||||
{
|
||||
if (!library.DoesExist)
|
||||
continue;
|
||||
|
||||
List<string> manifestFiles = Directory.GetFiles(Path.Combine(library.Path, "steamapps")).ToList().Where(f => this.isAppManifestFile(f)).ToList();
|
||||
|
||||
foreach (string manifestFile in manifestFiles)
|
||||
{
|
||||
var manifestVDF = new VDFFile(manifestFile);
|
||||
|
||||
if (manifestVDF.RootElements.Count < 1)
|
||||
// App manifest might be still existent but the game might not be installed (happened during testing)
|
||||
continue;
|
||||
|
||||
var root = manifestVDF["AppState"];
|
||||
|
||||
var currGame = new SteamGame();
|
||||
|
||||
this.populateGameInfo(currGame, root);
|
||||
|
||||
if((currGame.GameState & (int)GameState.StateFullyInstalled) != 0)
|
||||
{
|
||||
// Game was fully installed according to steam
|
||||
allGames.Add(currGame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return allGames;
|
||||
}
|
||||
|
||||
public string GetGamePathFromExactName(string gameName)
|
||||
{
|
||||
var steamLibraries = this.GetSteamLibraries();
|
||||
|
||||
if (steamLibraries == null)
|
||||
return null;
|
||||
|
||||
var allGames = new List<SteamGame>();
|
||||
|
||||
foreach (var library in steamLibraries)
|
||||
{
|
||||
if (!library.DoesExist)
|
||||
continue;
|
||||
|
||||
List<string> manifestFiles = Directory.GetFiles(Path.Combine(library.Path, "steamapps")).ToList().Where(f => this.isAppManifestFile(f)).ToList();
|
||||
|
||||
foreach (string manifestFile in manifestFiles)
|
||||
{
|
||||
var manifestVDF = new VDFFile(manifestFile);
|
||||
|
||||
if (manifestVDF.RootElements.Count < 1)
|
||||
// App manifest might be still existent but the game might not be installed (happened during testing)
|
||||
continue;
|
||||
|
||||
var root = manifestVDF["AppState"];
|
||||
|
||||
if(root["name"].Value.Trim().ToLower() != gameName.Trim().ToLower())
|
||||
{
|
||||
// Not our wanted game, skip
|
||||
continue;
|
||||
}
|
||||
|
||||
var currGame = new SteamGame();
|
||||
|
||||
this.populateGameInfo(currGame, root);
|
||||
|
||||
if ((currGame.GameState & (int)GameState.StateFullyInstalled) != 0)
|
||||
{
|
||||
// Game was fully installed according to steam
|
||||
return Path.Combine(library.Path, "steamapps", "common", currGame.InstallFolderName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
private bool isAppManifestFile(string filePath)
|
||||
{
|
||||
return System.Text.RegularExpressions.Regex.IsMatch(filePath.Split(new[] { '\\', '/' }).Last(), "appmanifest_\\d+.acf"); ;
|
||||
}
|
||||
|
||||
private DateTime fromUnixFormat(long unixFormat)
|
||||
{
|
||||
DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local);
|
||||
return dateTime.AddSeconds(unixFormat);
|
||||
}
|
||||
|
||||
private void populateGameInfo(SteamGame game, Element appStateVdf)
|
||||
{
|
||||
game.Name = appStateVdf["name"].Value;
|
||||
|
||||
game.InstallFolderName = appStateVdf["installdir"].Value;
|
||||
|
||||
if (int.TryParse(appStateVdf["appid"].Value, out int appId))
|
||||
{
|
||||
game.AppId = appId;
|
||||
}
|
||||
|
||||
if (int.TryParse(appStateVdf["StateFlags"].Value, out int stateFlags))
|
||||
{
|
||||
game.GameState = stateFlags;
|
||||
}
|
||||
|
||||
if (long.TryParse(appStateVdf["LastUpdated"].Value, out long lastUpdated))
|
||||
{
|
||||
game.LastUpdated = fromUnixFormat(lastUpdated);
|
||||
}
|
||||
|
||||
if (long.TryParse(appStateVdf["LastOwner"].Value, out long lastOwner))
|
||||
{
|
||||
game.LastOwnerSteam64Id = lastOwner;
|
||||
}
|
||||
|
||||
if (long.TryParse(appStateVdf["BytesToDownload"].Value, out long bytesToDownload))
|
||||
{
|
||||
game.BytesToDownload = bytesToDownload;
|
||||
}
|
||||
|
||||
if (long.TryParse(appStateVdf["BytesDownloaded"].Value, out long bytesDownloaded))
|
||||
{
|
||||
game.BytesDownloaded = bytesDownloaded;
|
||||
}
|
||||
|
||||
if (long.TryParse(appStateVdf["BytesToStage"].Value, out long bytesToStage))
|
||||
{
|
||||
game.BytesToStage = bytesToStage;
|
||||
}
|
||||
|
||||
if (long.TryParse(appStateVdf["BytesStaged"].Value, out long bytesStaged))
|
||||
{
|
||||
game.BytesStaged = bytesStaged;
|
||||
}
|
||||
|
||||
game.KeepAutomaticallyUpdated = appStateVdf["AutoUpdateBehavior"].Value != "0";
|
||||
|
||||
game.AllowOtherUpdatesWhileRunning = appStateVdf["AllowOtherDownloadsWhileRunning"].Value != "0";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
4496
DamageCalculator/DamageCalculator/Themes/ColourfulDarkTheme.xaml
Normal file
4496
DamageCalculator/DamageCalculator/Themes/ColourfulDarkTheme.xaml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,33 @@
|
|||
using System.Windows;
|
||||
|
||||
namespace REghZyFramework.Themes
|
||||
{
|
||||
public partial class ColourfulDarkTheme
|
||||
{
|
||||
private void CloseWindow_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { CloseWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void AutoMinimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MaximizeRestore(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void Minimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MinimizeWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
|
||||
public void CloseWind(Window window) => window.Close();
|
||||
public void MaximizeRestore(Window window)
|
||||
{
|
||||
if (window.WindowState == WindowState.Maximized)
|
||||
window.WindowState = WindowState.Normal;
|
||||
else if (window.WindowState == WindowState.Normal)
|
||||
window.WindowState = WindowState.Maximized;
|
||||
}
|
||||
public void MinimizeWind(Window window) => window.WindowState = WindowState.Minimized;
|
||||
}
|
||||
}
|
4546
DamageCalculator/DamageCalculator/Themes/ColourfulLightTheme.xaml
Normal file
4546
DamageCalculator/DamageCalculator/Themes/ColourfulLightTheme.xaml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,33 @@
|
|||
using System.Windows;
|
||||
|
||||
namespace REghZyFramework.Themes
|
||||
{
|
||||
public partial class ColourfulLightTheme
|
||||
{
|
||||
private void CloseWindow_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { CloseWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void AutoMinimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MaximizeRestore(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void Minimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MinimizeWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
|
||||
public void CloseWind(Window window) => window.Close();
|
||||
public void MaximizeRestore(Window window)
|
||||
{
|
||||
if (window.WindowState == WindowState.Maximized)
|
||||
window.WindowState = WindowState.Normal;
|
||||
else if (window.WindowState == WindowState.Normal)
|
||||
window.WindowState = WindowState.Maximized;
|
||||
}
|
||||
public void MinimizeWind(Window window) => window.WindowState = WindowState.Minimized;
|
||||
}
|
||||
}
|
4467
DamageCalculator/DamageCalculator/Themes/DarkTheme.xaml
Normal file
4467
DamageCalculator/DamageCalculator/Themes/DarkTheme.xaml
Normal file
File diff suppressed because it is too large
Load diff
33
DamageCalculator/DamageCalculator/Themes/DarkTheme.xaml.cs
Normal file
33
DamageCalculator/DamageCalculator/Themes/DarkTheme.xaml.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System.Windows;
|
||||
|
||||
namespace REghZyFramework.Themes
|
||||
{
|
||||
public partial class DarkTheme
|
||||
{
|
||||
private void CloseWindow_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { CloseWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void AutoMinimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MaximizeRestore(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void Minimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MinimizeWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
|
||||
public void CloseWind(Window window) => window.Close();
|
||||
public void MaximizeRestore(Window window)
|
||||
{
|
||||
if (window.WindowState == WindowState.Maximized)
|
||||
window.WindowState = WindowState.Normal;
|
||||
else if (window.WindowState == WindowState.Normal)
|
||||
window.WindowState = WindowState.Maximized;
|
||||
}
|
||||
public void MinimizeWind(Window window) => window.WindowState = WindowState.Minimized;
|
||||
}
|
||||
}
|
4452
DamageCalculator/DamageCalculator/Themes/LightTheme.xaml
Normal file
4452
DamageCalculator/DamageCalculator/Themes/LightTheme.xaml
Normal file
File diff suppressed because it is too large
Load diff
33
DamageCalculator/DamageCalculator/Themes/LightTheme.xaml.cs
Normal file
33
DamageCalculator/DamageCalculator/Themes/LightTheme.xaml.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System.Windows;
|
||||
|
||||
namespace REghZyFramework.Themes
|
||||
{
|
||||
public partial class LightTheme
|
||||
{
|
||||
private void CloseWindow_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { CloseWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void AutoMinimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MaximizeRestore(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
private void Minimize_Event(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.Source != null)
|
||||
try { MinimizeWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
|
||||
}
|
||||
|
||||
public void CloseWind(Window window) => window.Close();
|
||||
public void MaximizeRestore(Window window)
|
||||
{
|
||||
if (window.WindowState == WindowState.Maximized)
|
||||
window.WindowState = WindowState.Normal;
|
||||
else if (window.WindowState == WindowState.Normal)
|
||||
window.WindowState = WindowState.Maximized;
|
||||
}
|
||||
public void MinimizeWind(Window window) => window.WindowState = WindowState.Minimized;
|
||||
}
|
||||
}
|
46
DamageCalculator/DamageCalculator/Themes/ThemesController.cs
Normal file
46
DamageCalculator/DamageCalculator/Themes/ThemesController.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace REghZyFramework.Themes
|
||||
{
|
||||
public static class ThemesController
|
||||
{
|
||||
public enum ThemeTypes
|
||||
{
|
||||
Light, ColourfulLight,
|
||||
Dark, ColourfulDark
|
||||
}
|
||||
|
||||
public static ThemeTypes CurrentTheme { get; set; }
|
||||
|
||||
private static ResourceDictionary ThemeDictionary
|
||||
{
|
||||
get { return Application.Current.Resources.MergedDictionaries[0]; }
|
||||
set { Application.Current.Resources.MergedDictionaries[0] = value; }
|
||||
}
|
||||
|
||||
private static void ChangeTheme(Uri uri)
|
||||
{
|
||||
ThemeDictionary = new ResourceDictionary() { Source = uri };
|
||||
}
|
||||
public static void SetTheme(ThemeTypes theme)
|
||||
{
|
||||
string themeName = null;
|
||||
CurrentTheme = theme;
|
||||
switch (theme)
|
||||
{
|
||||
case ThemeTypes.Dark: themeName = "DarkTheme"; break;
|
||||
case ThemeTypes.Light: themeName = "LightTheme"; break;
|
||||
case ThemeTypes.ColourfulDark: themeName = "ColourfulDarkTheme"; break;
|
||||
case ThemeTypes.ColourfulLight: themeName = "ColourfulLightTheme"; break;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(themeName))
|
||||
ChangeTheme(new Uri($"Themes/{themeName}.xaml", UriKind.Relative));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Damage_Calculator.ZatVdfParser
|
||||
{
|
||||
/// <summary>
|
||||
/// This class was copied from <see cref="https://stackoverflow.com/questions/39065573/reading-values-from-an-acf-manifest-file">here</see> as a backup, in case <see cref="VDFFile"/> didn't work well enough.
|
||||
/// </summary>
|
||||
class AcfReader
|
||||
{
|
||||
public string FileLocation { get; private set; }
|
||||
|
||||
public AcfReader(string FileLocation)
|
||||
{
|
||||
if (File.Exists(FileLocation))
|
||||
this.FileLocation = FileLocation;
|
||||
else
|
||||
throw new FileNotFoundException("Error", FileLocation);
|
||||
}
|
||||
|
||||
public bool CheckIntegrity()
|
||||
{
|
||||
string Content = File.ReadAllText(FileLocation);
|
||||
int quote = Content.Count(x => x == '"');
|
||||
int braceleft = Content.Count(x => x == '{');
|
||||
int braceright = Content.Count(x => x == '}');
|
||||
|
||||
return ((braceleft == braceright) && (quote % 2 == 0));
|
||||
}
|
||||
|
||||
public ACF_Struct ACFFileToStruct()
|
||||
{
|
||||
return ACFFileToStruct(File.ReadAllText(FileLocation));
|
||||
}
|
||||
|
||||
private ACF_Struct ACFFileToStruct(string RegionToReadIn)
|
||||
{
|
||||
ACF_Struct ACF = new ACF_Struct();
|
||||
int LengthOfRegion = RegionToReadIn.Length;
|
||||
int CurrentPos = 0;
|
||||
while (LengthOfRegion > CurrentPos)
|
||||
{
|
||||
int FirstItemStart = RegionToReadIn.IndexOf('"', CurrentPos);
|
||||
if (FirstItemStart == -1)
|
||||
break;
|
||||
int FirstItemEnd = RegionToReadIn.IndexOf('"', FirstItemStart + 1);
|
||||
CurrentPos = FirstItemEnd + 1;
|
||||
string FirstItem = RegionToReadIn.Substring(FirstItemStart + 1, FirstItemEnd - FirstItemStart - 1);
|
||||
|
||||
int SecondItemStartQuote = RegionToReadIn.IndexOf('"', CurrentPos);
|
||||
int SecondItemStartBraceleft = RegionToReadIn.IndexOf('{', CurrentPos);
|
||||
if (SecondItemStartBraceleft == -1 || SecondItemStartQuote < SecondItemStartBraceleft)
|
||||
{
|
||||
int SecondItemEndQuote = RegionToReadIn.IndexOf('"', SecondItemStartQuote + 1);
|
||||
string SecondItem = RegionToReadIn.Substring(SecondItemStartQuote + 1, SecondItemEndQuote - SecondItemStartQuote - 1);
|
||||
CurrentPos = SecondItemEndQuote + 1;
|
||||
ACF.SubItems.Add(FirstItem, SecondItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
int SecondItemEndBraceright = RegionToReadIn.NextEndOf('{', '}', SecondItemStartBraceleft + 1);
|
||||
ACF_Struct ACFS = ACFFileToStruct(RegionToReadIn.Substring(SecondItemStartBraceleft + 1, SecondItemEndBraceright - SecondItemStartBraceleft - 1));
|
||||
CurrentPos = SecondItemEndBraceright + 1;
|
||||
ACF.SubACF.Add(FirstItem, ACFS);
|
||||
}
|
||||
}
|
||||
|
||||
return ACF;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ACF_Struct
|
||||
{
|
||||
public Dictionary<string, ACF_Struct> SubACF { get; private set; }
|
||||
public Dictionary<string, string> SubItems { get; private set; }
|
||||
|
||||
public ACF_Struct()
|
||||
{
|
||||
SubACF = new Dictionary<string, ACF_Struct>();
|
||||
SubItems = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public void WriteToFile(string File)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return ToString(0);
|
||||
}
|
||||
|
||||
private string ToString(int Depth)
|
||||
{
|
||||
StringBuilder SB = new StringBuilder();
|
||||
foreach (KeyValuePair<string, string> item in SubItems)
|
||||
{
|
||||
SB.Append('\t', Depth);
|
||||
SB.AppendFormat("\"{0}\"\t\t\"{1}\"\r\n", item.Key, item.Value);
|
||||
}
|
||||
foreach (KeyValuePair<string, ACF_Struct> item in SubACF)
|
||||
{
|
||||
SB.Append('\t', Depth);
|
||||
SB.AppendFormat("\"{0}\"\n", item.Key);
|
||||
SB.Append('\t', Depth);
|
||||
SB.AppendLine("{");
|
||||
SB.Append(item.Value.ToString(Depth + 1));
|
||||
SB.Append('\t', Depth);
|
||||
SB.AppendLine("}");
|
||||
}
|
||||
return SB.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
static class Extension
|
||||
{
|
||||
public static int NextEndOf(this string str, char Open, char Close, int startIndex)
|
||||
{
|
||||
if (Open == Close)
|
||||
throw new Exception("\"Open\" and \"Close\" char are equivalent!");
|
||||
|
||||
int OpenItem = 0;
|
||||
int CloseItem = 0;
|
||||
for (int i = startIndex; i < str.Length; i++)
|
||||
{
|
||||
if (str[i] == Open)
|
||||
{
|
||||
OpenItem++;
|
||||
}
|
||||
if (str[i] == Close)
|
||||
{
|
||||
CloseItem++;
|
||||
if (CloseItem > OpenItem)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new Exception("Not enough closing characters!");
|
||||
}
|
||||
}
|
||||
}
|
95
DamageCalculator/DamageCalculator/ZatVdfParser/Element.cs
Normal file
95
DamageCalculator/DamageCalculator/ZatVdfParser/Element.cs
Normal file
|
@ -0,0 +1,95 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Damage_Calculator.ZatVdfParser
|
||||
{
|
||||
public class Element
|
||||
{
|
||||
#region CONSTANTS
|
||||
private const string EMPTY = "<empty>";
|
||||
#endregion
|
||||
|
||||
#region PROPERTIES
|
||||
public List<Element> Children { get; set; }
|
||||
public Element Parent { get; set; }
|
||||
public string Value { get; set; }
|
||||
public string Name { get; set; }
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTOR
|
||||
public Element()
|
||||
{
|
||||
Children = new List<Element>();
|
||||
Value = EMPTY;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OPERATORS
|
||||
public Element this[int key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Children[key];
|
||||
}
|
||||
}
|
||||
public Element this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Children.FirstOrDefault(x => x.Name == key);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region METHODS
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0}: {1}, {2} children]", Name, Value, Children.Count);
|
||||
}
|
||||
public string ToList(int indent = 0)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
string tabs = new string(' ', indent);
|
||||
if (Value != EMPTY)
|
||||
{
|
||||
builder.AppendFormat("{2}{0} = {1}\n", Name, Value, tabs);
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.AppendFormat("{0}{1}\n", tabs, Name);
|
||||
foreach (Element child in Children)
|
||||
builder.Append(child.ToList(indent + 1));
|
||||
}
|
||||
return builder.ToString();
|
||||
}
|
||||
public string ToVDF(int indent = 0)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
string tabs = new string('\t', indent);
|
||||
if (Value != EMPTY)
|
||||
{
|
||||
builder.AppendFormat("{2}\"{0}\"\t\t\"{1}\"\n", Name, Value, tabs);
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.AppendFormat("{0}\"{1}\"\n{0}{2}\n", tabs, Name, "{");
|
||||
//builder.AppendFormat("{0}{1}\n{0}{2}\n", tabs, Name, "{"); //Uncomment this to not include quotes at empty-value names
|
||||
foreach (Element child in Children)
|
||||
builder.Append(child.ToVDF(indent + 1));
|
||||
builder.AppendFormat("{0}{1}\n", tabs, "}");
|
||||
}
|
||||
return builder.ToString();
|
||||
}
|
||||
public bool ContainsElement(string key)
|
||||
{
|
||||
return Children.Any(x => x.Name == key);
|
||||
}
|
||||
public bool ContainsValue(string key)
|
||||
{
|
||||
return Children.Any(x => x.Value == key);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
111
DamageCalculator/DamageCalculator/ZatVdfParser/VdfFile.cs
Normal file
111
DamageCalculator/DamageCalculator/ZatVdfParser/VdfFile.cs
Normal file
|
@ -0,0 +1,111 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Damage_Calculator.ZatVdfParser
|
||||
{
|
||||
public class VDFFile
|
||||
{
|
||||
#region VARIABLES
|
||||
private Regex regNested = new Regex(@"(\"")?([a-zA-Z0-9]*?)(\"")?");
|
||||
private Regex regValuePair = new Regex(@"\""(.*?)\""\s*\""(.*?)\""");
|
||||
#endregion
|
||||
|
||||
#region PROPERTIES
|
||||
public List<Element> RootElements { get; set; }
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
public VDFFile(string filePath)
|
||||
{
|
||||
RootElements = new List<Element>();
|
||||
Parse(filePath);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region METHODS
|
||||
public string ToVDF()
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
foreach (Element child in RootElements)
|
||||
builder.Append(child.ToVDF());
|
||||
return builder.ToString();
|
||||
}
|
||||
private void Parse(string filePath)
|
||||
{
|
||||
Element currentLevel = null;
|
||||
using (StreamReader reader = new StreamReader(filePath))
|
||||
{
|
||||
string line = null;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
if (line.StartsWith("\0"))
|
||||
return;
|
||||
|
||||
line = line.Trim();
|
||||
string[] parts = line.Split('"');
|
||||
|
||||
if (line.StartsWith("//"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (regValuePair.Match(line).Success)
|
||||
{
|
||||
Element subElement = new Element();
|
||||
subElement.Name = parts[1];
|
||||
subElement.Value = parts[3];
|
||||
subElement.Parent = currentLevel;
|
||||
if (currentLevel == null)
|
||||
RootElements.Add(subElement);
|
||||
else
|
||||
currentLevel.Children.Add(subElement);
|
||||
}
|
||||
else if (regNested.Match(line).Success && !String.IsNullOrEmpty(line) && line != "{" && line != "}")
|
||||
{
|
||||
Element nestedElement = new Element();
|
||||
if(parts.Length == 3)
|
||||
nestedElement.Name = parts[1];
|
||||
else
|
||||
nestedElement.Name = parts[0];
|
||||
nestedElement.Parent = currentLevel;
|
||||
if (currentLevel == null)
|
||||
RootElements.Add(nestedElement);
|
||||
else
|
||||
currentLevel.Children.Add(nestedElement);
|
||||
currentLevel = nestedElement;
|
||||
}
|
||||
else if (line == "}")
|
||||
{
|
||||
currentLevel = currentLevel.Parent;
|
||||
}
|
||||
/*else if (line == "{")
|
||||
{
|
||||
//Nothing to do here
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OPERATORS
|
||||
public Element this[int key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return RootElements[key];
|
||||
}
|
||||
}
|
||||
public Element this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return RootElements.FirstOrDefault(x => x.Name == key);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
Binary file not shown.
BIN
DamageCalculator/DamageCalculator/icon_a_site.png
Normal file
BIN
DamageCalculator/DamageCalculator/icon_a_site.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
BIN
DamageCalculator/DamageCalculator/icon_b_site.png
Normal file
BIN
DamageCalculator/DamageCalculator/icon_b_site.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
BIN
DamageCalculator/DamageCalculator/icon_ct.png
Normal file
BIN
DamageCalculator/DamageCalculator/icon_ct.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7 KiB |
BIN
DamageCalculator/DamageCalculator/icon_t.png
Normal file
BIN
DamageCalculator/DamageCalculator/icon_t.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4 KiB |
|
@ -0,0 +1,4 @@
|
|||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
89
DamageCalculator/DamageCalculator/obj/Debug/About.g.cs
Normal file
89
DamageCalculator/DamageCalculator/obj/Debug/About.g.cs
Normal file
|
@ -0,0 +1,89 @@
|
|||
#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "37E1FF543713157BA51051A0414DEE84DBCDAE6BCA2335383D581644C899BA8C"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Damage_Calculator;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Damage_Calculator {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// About
|
||||
/// </summary>
|
||||
public partial class About : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 19 "..\..\About.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtVersion;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/about.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\About.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.txtVersion = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
89
DamageCalculator/DamageCalculator/obj/Debug/About.g.i.cs
Normal file
89
DamageCalculator/DamageCalculator/obj/Debug/About.g.i.cs
Normal file
|
@ -0,0 +1,89 @@
|
|||
#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "37E1FF543713157BA51051A0414DEE84DBCDAE6BCA2335383D581644C899BA8C"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Damage_Calculator;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Damage_Calculator {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// About
|
||||
/// </summary>
|
||||
public partial class About : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 19 "..\..\About.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtVersion;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/about.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\About.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.txtVersion = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
83
DamageCalculator/DamageCalculator/obj/Debug/App.g.cs
Normal file
83
DamageCalculator/DamageCalculator/obj/Debug/App.g.cs
Normal file
|
@ -0,0 +1,83 @@
|
|||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "E4A9E95446C09434F0F7DC8F1F23ACF00873399D14C91F2C18F2357F71458A2B"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Damage_Calculator;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Damage_Calculator {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/app.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\App.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
Damage_Calculator.App app = new Damage_Calculator.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
83
DamageCalculator/DamageCalculator/obj/Debug/App.g.i.cs
Normal file
83
DamageCalculator/DamageCalculator/obj/Debug/App.g.i.cs
Normal file
|
@ -0,0 +1,83 @@
|
|||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "E4A9E95446C09434F0F7DC8F1F23ACF00873399D14C91F2C18F2357F71458A2B"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Damage_Calculator;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Damage_Calculator {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/app.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\App.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
Damage_Calculator.App app = new Damage_Calculator.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,20 @@
|
|||
CSGO Damage Calculator
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\
|
||||
Damage_Calculator
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\App.xaml
|
||||
6-2134167639
|
||||
|
||||
26-1617113909
|
||||
15-2024074300
|
||||
About.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml;
|
||||
|
||||
True
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
CSGO Damage Calculator
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\
|
||||
Damage_Calculator
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\App.xaml
|
||||
6-2134167639
|
||||
|
||||
26-1617113909
|
||||
15-2024074300
|
||||
About.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml;
|
||||
|
||||
False
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\App.xaml;;
|
||||
FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\About.xaml;;
|
||||
FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\MainWindow.xaml;;
|
||||
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
83dda55da06eb4699ea468f8adf7c22031e9c459
|
|
@ -0,0 +1,26 @@
|
|||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\ColourfulDarkTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\ColourfulLightTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\DarkTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\LightTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\MainWindow.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\ColourfulDarkTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\ColourfulLightTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\DarkTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Themes\LightTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\App.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\App.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\MainWindow.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Config Manager.csproj.GenerateResource.cache
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Config Manager.csproj.CoreCompileInputs.cache
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Config Manager.csproj.AssemblyReference.cache
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\About.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\About.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\bin\Debug\CSGO Damage Calculator.exe.config
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\bin\Debug\CSGO Damage Calculator.exe
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\bin\Debug\CSGO Damage Calculator.pdb
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\CSGO Damage Calculator_MarkupCompile.cache
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\CSGO Damage Calculator_MarkupCompile.lref
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\CSGO Damage Calculator.g.resources
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\CSGO Damage Calculator.exe
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\CSGO Damage Calculator.pdb
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\Damage_Calculator.Properties.Resources.resources
|
Binary file not shown.
|
@ -0,0 +1,13 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("27.ico")]
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
Config Manager
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Debug\
|
||||
Config_Manager
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\App.xaml
|
||||
6-2134167639
|
||||
|
||||
26-1617113909
|
||||
16-1341956867
|
||||
About.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml;
|
||||
|
||||
False
|
||||
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
122c08730e8337de833cb8cdc126614cbd177202
|
|
@ -0,0 +1,25 @@
|
|||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\bin\Debug\CSGO Damage Calculator.exe.config
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\bin\Debug\CSGO Damage Calculator.exe
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\bin\Debug\CSGO Damage Calculator.pdb
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\ColourfulDarkTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\ColourfulLightTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\DarkTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\LightTheme.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\About.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\MainWindow.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\ColourfulDarkTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\ColourfulLightTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\DarkTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Themes\LightTheme.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\App.g.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\CSGO Damage Calculator_MarkupCompile.cache
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\CSGO Damage Calculator_MarkupCompile.lref
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\App.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\About.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\MainWindow.baml
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\CSGO Damage Calculator.g.resources
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\Damage_Calculator.Properties.Resources.resources
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\DamageCalculator.csproj.GenerateResource.cache
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\DamageCalculator.csproj.CoreCompileInputs.cache
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\CSGO Damage Calculator.exe
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\DamageCalculator\obj\Debug\CSGO Damage Calculator.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
456
DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.cs
Normal file
456
DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.cs
Normal file
|
@ -0,0 +1,456 @@
|
|||
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "ED5BBC5CC0EF7E0364C4C9F7606BFAD438DA441A3D87364DB6EA1B2DD7DB2529"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Damage_Calculator;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Damage_Calculator {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MainWindow
|
||||
/// </summary>
|
||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 22 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.MenuItem mnuHelp;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 34 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.StackPanel topStackPanel;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 36 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ComboBox comboBoxMaps;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 41 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtEasterEggMetres;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 42 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock textDistanceMetres;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 46 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock textDistanceUnits;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 49 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Rectangle rectTop;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 50 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Rectangle rectSide;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 51 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.StackPanel leftStackPanel;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox chkHelmet;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox chkKevlar;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 60 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioHead;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 61 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioChestArms;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 62 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioStomach;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 63 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioLegs;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 67 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ComboBox comboWeapons;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 71 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtResult;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 72 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtResultArmor;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 80 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtCursorX;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 84 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtCursorY;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 87 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid rightGrid;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Image mapImage;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 89 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Canvas pointsCanvas;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 92 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid gridLoading;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/mainwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\MainWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 11 "..\..\MainWindow.xaml"
|
||||
((Damage_Calculator.MainWindow)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Window_MouseMove);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\MainWindow.xaml"
|
||||
((Damage_Calculator.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 2:
|
||||
|
||||
#line 17 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 3:
|
||||
|
||||
#line 18 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 4:
|
||||
this.mnuHelp = ((System.Windows.Controls.MenuItem)(target));
|
||||
|
||||
#line 22 "..\..\MainWindow.xaml"
|
||||
this.mnuHelp.Click += new System.Windows.RoutedEventHandler(this.mnuHelp_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 5:
|
||||
this.topStackPanel = ((System.Windows.Controls.StackPanel)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.comboBoxMaps = ((System.Windows.Controls.ComboBox)(target));
|
||||
|
||||
#line 36 "..\..\MainWindow.xaml"
|
||||
this.comboBoxMaps.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBoxMaps_SelectionChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 7:
|
||||
this.txtEasterEggMetres = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 8:
|
||||
this.textDistanceMetres = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.textDistanceUnits = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.rectTop = ((System.Windows.Shapes.Rectangle)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.rectSide = ((System.Windows.Shapes.Rectangle)(target));
|
||||
return;
|
||||
case 12:
|
||||
this.leftStackPanel = ((System.Windows.Controls.StackPanel)(target));
|
||||
return;
|
||||
case 13:
|
||||
this.chkHelmet = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
this.chkHelmet.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
this.chkHelmet.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 14:
|
||||
this.chkKevlar = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
this.chkKevlar.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
this.chkKevlar.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 15:
|
||||
this.radioHead = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 60 "..\..\MainWindow.xaml"
|
||||
this.radioHead.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 16:
|
||||
this.radioChestArms = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 61 "..\..\MainWindow.xaml"
|
||||
this.radioChestArms.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 17:
|
||||
this.radioStomach = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 62 "..\..\MainWindow.xaml"
|
||||
this.radioStomach.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 18:
|
||||
this.radioLegs = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 63 "..\..\MainWindow.xaml"
|
||||
this.radioLegs.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 19:
|
||||
this.comboWeapons = ((System.Windows.Controls.ComboBox)(target));
|
||||
|
||||
#line 67 "..\..\MainWindow.xaml"
|
||||
this.comboWeapons.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboWeapons_SelectionChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 20:
|
||||
this.txtResult = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 21:
|
||||
this.txtResultArmor = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 22:
|
||||
this.txtCursorX = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 23:
|
||||
this.txtCursorY = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 24:
|
||||
this.rightGrid = ((System.Windows.Controls.Grid)(target));
|
||||
return;
|
||||
case 25:
|
||||
this.mapImage = ((System.Windows.Controls.Image)(target));
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
this.mapImage.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseLeftButtonUp);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
this.mapImage.MouseRightButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseRightButtonUp);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
this.mapImage.LayoutUpdated += new System.EventHandler(this.mapImage_LayoutUpdated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 26:
|
||||
this.pointsCanvas = ((System.Windows.Controls.Canvas)(target));
|
||||
return;
|
||||
case 27:
|
||||
this.gridLoading = ((System.Windows.Controls.Grid)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
456
DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.i.cs
Normal file
456
DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.i.cs
Normal file
|
@ -0,0 +1,456 @@
|
|||
#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "ED5BBC5CC0EF7E0364C4C9F7606BFAD438DA441A3D87364DB6EA1B2DD7DB2529"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Damage_Calculator;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Damage_Calculator {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MainWindow
|
||||
/// </summary>
|
||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 22 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.MenuItem mnuHelp;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 34 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.StackPanel topStackPanel;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 36 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ComboBox comboBoxMaps;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 41 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtEasterEggMetres;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 42 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock textDistanceMetres;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 46 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock textDistanceUnits;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 49 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Rectangle rectTop;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 50 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Rectangle rectSide;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 51 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.StackPanel leftStackPanel;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox chkHelmet;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox chkKevlar;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 60 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioHead;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 61 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioChestArms;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 62 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioStomach;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 63 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton radioLegs;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 67 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ComboBox comboWeapons;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 71 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtResult;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 72 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtResultArmor;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 80 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtCursorX;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 84 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtCursorY;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 87 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid rightGrid;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Image mapImage;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 89 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Canvas pointsCanvas;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 92 "..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid gridLoading;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/mainwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\MainWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 11 "..\..\MainWindow.xaml"
|
||||
((Damage_Calculator.MainWindow)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Window_MouseMove);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\MainWindow.xaml"
|
||||
((Damage_Calculator.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 2:
|
||||
|
||||
#line 17 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 3:
|
||||
|
||||
#line 18 "..\..\MainWindow.xaml"
|
||||
((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 4:
|
||||
this.mnuHelp = ((System.Windows.Controls.MenuItem)(target));
|
||||
|
||||
#line 22 "..\..\MainWindow.xaml"
|
||||
this.mnuHelp.Click += new System.Windows.RoutedEventHandler(this.mnuHelp_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 5:
|
||||
this.topStackPanel = ((System.Windows.Controls.StackPanel)(target));
|
||||
return;
|
||||
case 6:
|
||||
this.comboBoxMaps = ((System.Windows.Controls.ComboBox)(target));
|
||||
|
||||
#line 36 "..\..\MainWindow.xaml"
|
||||
this.comboBoxMaps.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBoxMaps_SelectionChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 7:
|
||||
this.txtEasterEggMetres = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 8:
|
||||
this.textDistanceMetres = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.textDistanceUnits = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.rectTop = ((System.Windows.Shapes.Rectangle)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.rectSide = ((System.Windows.Shapes.Rectangle)(target));
|
||||
return;
|
||||
case 12:
|
||||
this.leftStackPanel = ((System.Windows.Controls.StackPanel)(target));
|
||||
return;
|
||||
case 13:
|
||||
this.chkHelmet = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
this.chkHelmet.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\MainWindow.xaml"
|
||||
this.chkHelmet.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 14:
|
||||
this.chkKevlar = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
this.chkKevlar.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\MainWindow.xaml"
|
||||
this.chkKevlar.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 15:
|
||||
this.radioHead = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 60 "..\..\MainWindow.xaml"
|
||||
this.radioHead.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 16:
|
||||
this.radioChestArms = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 61 "..\..\MainWindow.xaml"
|
||||
this.radioChestArms.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 17:
|
||||
this.radioStomach = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 62 "..\..\MainWindow.xaml"
|
||||
this.radioStomach.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 18:
|
||||
this.radioLegs = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 63 "..\..\MainWindow.xaml"
|
||||
this.radioLegs.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 19:
|
||||
this.comboWeapons = ((System.Windows.Controls.ComboBox)(target));
|
||||
|
||||
#line 67 "..\..\MainWindow.xaml"
|
||||
this.comboWeapons.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboWeapons_SelectionChanged);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 20:
|
||||
this.txtResult = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 21:
|
||||
this.txtResultArmor = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 22:
|
||||
this.txtCursorX = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 23:
|
||||
this.txtCursorY = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
case 24:
|
||||
this.rightGrid = ((System.Windows.Controls.Grid)(target));
|
||||
return;
|
||||
case 25:
|
||||
this.mapImage = ((System.Windows.Controls.Image)(target));
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
this.mapImage.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseLeftButtonUp);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
this.mapImage.MouseRightButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseRightButtonUp);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\MainWindow.xaml"
|
||||
this.mapImage.LayoutUpdated += new System.EventHandler(this.mapImage_LayoutUpdated);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 26:
|
||||
this.pointsCanvas = ((System.Windows.Controls.Canvas)(target));
|
||||
return;
|
||||
case 27:
|
||||
this.gridLoading = ((System.Windows.Controls.Grid)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\ColourfulDarkTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3B952CE3C88D5C3050FE3A912305FE8B316F96CC6E771F5C89DCAEF5294FE7B1"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ColourfulDarkTheme
|
||||
/// </summary>
|
||||
public partial class ColourfulDarkTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/colourfuldarktheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4102 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4115 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4123 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4226 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4239 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\ColourfulDarkTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3B952CE3C88D5C3050FE3A912305FE8B316F96CC6E771F5C89DCAEF5294FE7B1"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ColourfulDarkTheme
|
||||
/// </summary>
|
||||
public partial class ColourfulDarkTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/colourfuldarktheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4102 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4115 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4123 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4226 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4239 "..\..\..\Themes\ColourfulDarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\ColourfulLightTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "56E361D96CF99F194A37C64E6941A22B16B1CAF8CB1A857B15F1260B8CFF906E"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ColourfulLightTheme
|
||||
/// </summary>
|
||||
public partial class ColourfulLightTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/colourfullighttheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4153 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4166 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4174 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4276 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4289 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\ColourfulLightTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "56E361D96CF99F194A37C64E6941A22B16B1CAF8CB1A857B15F1260B8CFF906E"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ColourfulLightTheme
|
||||
/// </summary>
|
||||
public partial class ColourfulLightTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/colourfullighttheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4153 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4166 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4174 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4276 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4289 "..\..\..\Themes\ColourfulLightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\DarkTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "EBD4C76F6944703ECE294544CEB148CB9A78DD382484D3939DFA4CBF8A5FBEAE"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DarkTheme
|
||||
/// </summary>
|
||||
public partial class DarkTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/darktheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\DarkTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4074 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4087 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4095 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4197 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4210 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\DarkTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "EBD4C76F6944703ECE294544CEB148CB9A78DD382484D3939DFA4CBF8A5FBEAE"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DarkTheme
|
||||
/// </summary>
|
||||
public partial class DarkTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/darktheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\DarkTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4074 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4087 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4095 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4197 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4210 "..\..\..\Themes\DarkTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\LightTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "BFFA759F1070949A7B4A94972C1F829957F6529F712A3A90E1B39B3108F3CA5C"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// LightTheme
|
||||
/// </summary>
|
||||
public partial class LightTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/lighttheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\LightTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4059 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4072 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4080 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4182 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4195 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
#pragma checksum "..\..\..\Themes\LightTheme.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "BFFA759F1070949A7B4A94972C1F829957F6529F712A3A90E1B39B3108F3CA5C"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Windows.Themes;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace REghZyFramework.Themes {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// LightTheme
|
||||
/// </summary>
|
||||
public partial class LightTheme : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/themes/lighttheme.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\Themes\LightTheme.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
|
||||
#line 4059 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 2:
|
||||
|
||||
#line 4072 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoMinimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 3:
|
||||
|
||||
#line 4080 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 4:
|
||||
|
||||
#line 4182 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Minimize_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
case 5:
|
||||
|
||||
#line 4195 "..\..\..\Themes\LightTheme.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseWindow_Event);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
BIN
DamageCalculator/DamageCalculator/obj/Release/About.baml
Normal file
BIN
DamageCalculator/DamageCalculator/obj/Release/About.baml
Normal file
Binary file not shown.
89
DamageCalculator/DamageCalculator/obj/Release/About.g.cs
Normal file
89
DamageCalculator/DamageCalculator/obj/Release/About.g.cs
Normal file
|
@ -0,0 +1,89 @@
|
|||
#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6461A709CC94A0A4932F265FD1370B5FF61F10A365D5FBB5C6BCBB5CF0C3E147"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Config_Manager;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Config_Manager {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// About
|
||||
/// </summary>
|
||||
public partial class About : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 19 "..\..\About.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtVersion;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/about.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\About.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.txtVersion = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
89
DamageCalculator/DamageCalculator/obj/Release/About.g.i.cs
Normal file
89
DamageCalculator/DamageCalculator/obj/Release/About.g.i.cs
Normal file
|
@ -0,0 +1,89 @@
|
|||
#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6461A709CC94A0A4932F265FD1370B5FF61F10A365D5FBB5C6BCBB5CF0C3E147"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Config_Manager;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Config_Manager {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// About
|
||||
/// </summary>
|
||||
public partial class About : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 19 "..\..\About.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock txtVersion;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/about.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\About.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||
switch (connectionId)
|
||||
{
|
||||
case 1:
|
||||
this.txtVersion = ((System.Windows.Controls.TextBlock)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
DamageCalculator/DamageCalculator/obj/Release/App.baml
Normal file
BIN
DamageCalculator/DamageCalculator/obj/Release/App.baml
Normal file
Binary file not shown.
83
DamageCalculator/DamageCalculator/obj/Release/App.g.cs
Normal file
83
DamageCalculator/DamageCalculator/obj/Release/App.g.cs
Normal file
|
@ -0,0 +1,83 @@
|
|||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0FF9D30D9DA2EB74BEF621923D1BC79F1169277C3C50549C96E09A58E71EE464"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Config_Manager;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Config_Manager {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/app.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\App.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
Config_Manager.App app = new Config_Manager.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
83
DamageCalculator/DamageCalculator/obj/Release/App.g.i.cs
Normal file
83
DamageCalculator/DamageCalculator/obj/Release/App.g.i.cs
Normal file
|
@ -0,0 +1,83 @@
|
|||
#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0FF9D30D9DA2EB74BEF621923D1BC79F1169277C3C50549C96E09A58E71EE464"
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Config_Manager;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Ink;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Effects;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Media.TextFormatting;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Shell;
|
||||
|
||||
|
||||
namespace Config_Manager {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// App
|
||||
/// </summary>
|
||||
public partial class App : System.Windows.Application {
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent
|
||||
/// </summary>
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public void InitializeComponent() {
|
||||
if (_contentLoaded) {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
|
||||
#line 5 "..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
System.Uri resourceLocater = new System.Uri("/CSGO Damage Calculator;component/app.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\App.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Application Entry Point.
|
||||
/// </summary>
|
||||
[System.STAThreadAttribute()]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() {
|
||||
Config_Manager.App app = new Config_Manager.App();
|
||||
app.InitializeComponent();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,20 @@
|
|||
CSGO Damage Calculator
|
||||
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\obj\Release\
|
||||
Config_Manager
|
||||
none
|
||||
false
|
||||
TRACE
|
||||
D:\source\repos\_Git Repos\ConfigManager\Config Manager\Config Manager\App.xaml
|
||||
6-2134167639
|
||||
|
||||
25-862544125
|
||||
15-2024074300
|
||||
About.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml;
|
||||
|
||||
False
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue