diff --git a/DamageCalculator/.vs/DamageCalculator/v17/.suo b/DamageCalculator/.vs/DamageCalculator/v17/.suo index 817af84..7f919d1 100644 Binary files a/DamageCalculator/.vs/DamageCalculator/v17/.suo and b/DamageCalculator/.vs/DamageCalculator/v17/.suo differ diff --git a/DamageCalculator/DamageCalculator/About.xaml b/DamageCalculator/DamageCalculator/About.xaml index 7e48e49..8be484d 100644 --- a/DamageCalculator/DamageCalculator/About.xaml +++ b/DamageCalculator/DamageCalculator/About.xaml @@ -7,7 +7,7 @@ mc:Ignorable="d" Style="{DynamicResource CustomWindowStyle}" WindowStartupLocation="CenterOwner" - Title="About" Height="323" Width="410" ResizeMode="NoResize"> + Title="About" Height="335" Width="422" ResizeMode="NoResize"> @@ -15,6 +15,8 @@ + + diff --git a/DamageCalculator/DamageCalculator/DamageCalculator.csproj b/DamageCalculator/DamageCalculator/DamageCalculator.csproj index fb0fd5e..86341f4 100644 --- a/DamageCalculator/DamageCalculator/DamageCalculator.csproj +++ b/DamageCalculator/DamageCalculator/DamageCalculator.csproj @@ -66,16 +66,24 @@ About.xaml + + ctrlPlayerSpawn.xaml + + + Help.xaml + + + @@ -90,6 +98,14 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/DamageCalculator/DamageCalculator/Help.xaml b/DamageCalculator/DamageCalculator/Help.xaml new file mode 100644 index 0000000..3af7d2f --- /dev/null +++ b/DamageCalculator/DamageCalculator/Help.xaml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DamageCalculator/DamageCalculator/Help.xaml.cs b/DamageCalculator/DamageCalculator/Help.xaml.cs new file mode 100644 index 0000000..d52a4ab --- /dev/null +++ b/DamageCalculator/DamageCalculator/Help.xaml.cs @@ -0,0 +1,27 @@ +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 +{ + /// + /// Interaction logic for Help.xaml + /// + public partial class Help : Window + { + public Help() + { + InitializeComponent(); + } + } +} diff --git a/DamageCalculator/DamageCalculator/MainWindow.xaml b/DamageCalculator/DamageCalculator/MainWindow.xaml index 05b4cc8..84dccbe 100644 --- a/DamageCalculator/DamageCalculator/MainWindow.xaml +++ b/DamageCalculator/DamageCalculator/MainWindow.xaml @@ -5,21 +5,30 @@ 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="690" + Title="CS:GO Damage Calculator" Height="566" Width="826" MinHeight="700" MinWidth="700" Style="{DynamicResource CustomWindowStyle}" WindowStartupLocation="CenterScreen" Icon="27.ico" + WindowState="Maximized" MouseMove="Window_MouseMove" KeyDown="Window_KeyDown"> + + + + + + + - + + @@ -28,7 +37,7 @@ - + @@ -81,21 +90,39 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + diff --git a/DamageCalculator/DamageCalculator/MainWindow.xaml.cs b/DamageCalculator/DamageCalculator/MainWindow.xaml.cs index f6546f8..3ce6aa4 100644 --- a/DamageCalculator/DamageCalculator/MainWindow.xaml.cs +++ b/DamageCalculator/DamageCalculator/MainWindow.xaml.cs @@ -17,6 +17,7 @@ using System.Windows.Shapes; using Damage_Calculator.Models; using Damage_Calculator.ZatVdfParser; using System.Xml.Serialization; +using System.Globalization; namespace Damage_Calculator { @@ -218,61 +219,161 @@ namespace Damage_Calculator if (map.BspFilePath != null) { // Map radar has an actual existing BSP map file - map.EntityList = Globals.Settings.CsgoHelper.ReadEntityListFromBsp(map.BspFilePath); - - // Separate all entities, which removes curly braces from the start or end of entities - string[] entities = map.EntityList.Split(new string[] { "}\n{" }, StringSplitOptions.None); - for (int i = 0; i < entities.Length; i++) - { - // Add start or end curly brace back, if nonexistent - if (!entities[i].StartsWith("{")) - entities[i] = "{" + entities[i]; - else if (!entities[i].EndsWith("}")) - entities[i] += "}"; - - // Add a generic name for the object, to fool it into complying with normal VDF standards - entities[i] = "\"entity\"\n" + entities[i]; - - VDFFile vdf = new VDFFile(entities[i], parseTextDirectly: true); - var elementRootVdf = vdf["entity"]; - if(elementRootVdf["classname"].Value == "info_map_parameters") - { - string bombRadius = elementRootVdf["bombradius"]?.Value; - if (bombRadius != null) - { - // Custom bomb radius - if (float.TryParse(bombRadius, out float bombRad) && bombRad >= 0) - { - // bombradius is valid and not negative - map.BombDamage = bombRad; - } - } - break; - } - } + this.parseBspData(map); } + // Set indicator checkboxes + this.chkHasMapFile.IsChecked = map.BspFilePath != null; + this.chkHasNavFile.IsChecked = map.NavFilePath != null; + this.resetCanvas(); if (map.MapType == CsgoMap.eMapType.Defusal) { this.radioModeBomb.IsEnabled = true; + this.txtBombMaxDamage.Text = map.BombDamage.ToString(); + this.txtBombRadius.Text = (map.BombDamage * 3.5f).ToString(); } else { this.radioModeBomb.IsEnabled = false; // Select the only other working one in that case this.radioModeShooting.IsChecked = true; + this.txtBombMaxDamage.Text = this.txtBombRadius.Text = "None"; } this.loadedMap = map; } + private void parseBspData(CsgoMap map) + { + map.EntityList = Globals.Settings.CsgoHelper.ReadEntityListFromBsp(map.BspFilePath); + + // Current format for one entity is: + // + // { + // "property" "value" + // } + // + // but we want this format like in VDF files, so we can use our VDF parser: + // + // "sometext" + // { + // "property" "value" + // } + // + + // Separate all entities, which temporarily removes curly braces from the start and/or end of entities + string[] entities = map.EntityList.Split(new string[] { "}\n{" }, StringSplitOptions.None); + for (int i = 0; i < entities.Length; i++) + { + // Add start or end curly brace back, if nonexistent, because we removed it during separation + if (!entities[i].StartsWith("{")) + entities[i] = "{" + entities[i]; + else if (!entities[i].EndsWith("}")) + entities[i] += "}"; + + // Add a generic name for the object, to fool it into complying with normal VDF standards, + // we'll just call every entity "entity" for simplicity + entities[i] = "\"entity\"\n" + entities[i]; + + VDFFile vdf = new VDFFile(entities[i], parseTextDirectly: true); + var entityRootVdf = vdf["entity"]; + string className = entityRootVdf["classname"].Value; + + // Check for map parameters entity + if (className == "info_map_parameters") + { + string bombRadius = entityRootVdf["bombradius"]?.Value; + if (bombRadius != null) + { + // Map has custom bomb radius + if (float.TryParse(bombRadius, out float bombRad) && bombRad >= 0) + { + // bombradius is valid and not negative + map.BombDamage = bombRad; + } + } + } + + if (className == "info_player_terrorist" || className == "info_player_counterterrorist") + { + // Entity is spawn point + var spawn = new PlayerSpawn(); + spawn.Team = className == "info_player_terrorist" ? ePlayerTeam.Terrorist : ePlayerTeam.CounterTerrorist; + spawn.Origin = this.stringToVector3(entityRootVdf["origin"]?.Value) ?? Vector3.Empty; + spawn.Angles = this.stringToVector3(entityRootVdf["angles"]?.Value) ?? Vector3.Empty; + + // highest priority by default. if ALL spawns are high priority, then there are no priority spawns, + // in that case we will later check the amount of priority spawns and if it is the same as the total spawns. + // This is done for each team separately. + int priority = 0; + int.TryParse(entityRootVdf["priority"]?.Value, out priority); + + if (priority < 1) // 0 or nothing means it's highest priority, then counts up as an integer with decreasing priority + { + spawn.IsPriority = true; + // Count prio spawns + if (spawn.Team == ePlayerTeam.CounterTerrorist) + map.AmountPrioritySpawnsCT++; + else + map.AmountPrioritySpawnsT++; + } + + // Count all (prio and normal) spawns + if (spawn.Team == ePlayerTeam.CounterTerrorist) + map.AmountSpawnsCT++; + else + map.AmountSpawnsT++; + + if (entityRootVdf["targetname"]?.Value == "spawnpoints.2v2") + { + spawn.Type = eSpawnType.Wingman; + } + + map.SpawnPoints.Add(spawn); + } + } + } + + private Vector3 stringToVector3(string coords) + { + Vector3 vector = new Vector3(); + string[] coordsArray = coords.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); + + if (coordsArray.Length != 3) + return null; + + float x, y, z; + + bool succX = float.TryParse(coordsArray[0], NumberStyles.Any, CultureInfo.InvariantCulture, out x); + bool succY = float.TryParse(coordsArray[1], NumberStyles.Any, CultureInfo.InvariantCulture, out y); + bool succZ = float.TryParse(coordsArray[2], NumberStyles.Any, CultureInfo.InvariantCulture, out z); + + if(succX && succY && succZ) + { + vector.X = x; + vector.Y = y; + vector.Z = z; + return vector; + } + + return null; + } + private double getPixelsFromUnits(double units) { int mapSizePixels = (this.mapImage.Source as BitmapSource).PixelWidth; double mapSizeUnits = mapSizePixels * this.loadedMap.MapSizeMultiplier; - return units * this.pointsCanvas.ActualWidth / mapSizeUnits; + return Math.Abs(units) * this.pointsCanvas.ActualWidth / mapSizeUnits; + } + + private Point getPointFromGameCoords(double x, double y) + { + Point p = new Point(); + p.X = this.getPixelsFromUnits(this.loadedMap.UpperLeftWorldXCoordinate - x); + p.Y = this.getPixelsFromUnits(this.loadedMap.UpperLeftWorldYCoordinate - y); + return p; } private Ellipse getPointEllipse(Color strokeColour) @@ -303,10 +404,40 @@ namespace Damage_Calculator return circle; } + private ctrlPlayerSpawn getSpawnBlip(PlayerSpawn spawn) + { + ctrlPlayerSpawn spawnBlip = new ctrlPlayerSpawn(); + spawnBlip.Width = spawnBlip.Height = this.getPixelsFromUnits(50); + Color blipColour; + + if (spawn.Team == ePlayerTeam.Terrorist) + blipColour = Color.FromArgb(255, 252, 151, 0); + else + blipColour = Color.FromArgb(255, 0, 57, 245); + + spawnBlip.SetColour(blipColour); + Color colourPriority = Color.FromArgb(150, 200, 200, 0); + Color colourNoPriority = Color.FromArgb(150, 20, 20, 0); + + // If all are priority spawns, just mark all of them as low prio, for consistency + if (spawn.Team == ePlayerTeam.Terrorist && this.loadedMap.HasPrioritySpawnsT || spawn.Team == ePlayerTeam.CounterTerrorist && this.loadedMap.HasPrioritySpawnsCT) + { + // This team has at least 1 priority spawn, so only colour the priority ones bright + spawnBlip.SetEllipseFill(spawn.IsPriority ? colourPriority : colourNoPriority); + } + else + { + // This team doesn't have any priority spawns, so colour it all dark + spawnBlip.SetEllipseFill(colourNoPriority); + } + + spawnBlip.SetRotation(360 - spawn.Angles.Y + 90); + + return spawnBlip; + } + private void updateCirclePositions() { - // TODO: Update bomb circle size - if (this.connectingLine == null) this.connectingLine = new Line(); @@ -333,22 +464,28 @@ namespace Damage_Calculator if((this.leftPoint?.Circle != null || this.bombCircle?.Circle != null) && this.rightPoint?.Circle != null) { + // Right click cirle exists, and left click circle or left click bomb circle exists + // Ready to calculate damage and draw the in-between line if (this.DrawMode == eDrawMode.Shooting) { + // Update line start pos to left click circle this.connectingLine.X1 = Canvas.GetLeft(this.leftPoint.Circle) + (this.leftPoint.Circle.Width / 2); this.connectingLine.Y1 = Canvas.GetTop(this.leftPoint.Circle) + (this.leftPoint.Circle.Height / 2); } else { + // Update line start pos to left click bomb circle this.connectingLine.X1 = Canvas.GetLeft(this.bombCircle.Circle) + (this.bombCircle.Circle.Width / 2); this.connectingLine.Y1 = Canvas.GetTop(this.bombCircle.Circle) + (this.bombCircle.Circle.Height / 2); } + // Update line end pos to right click circle this.connectingLine.X2 = Canvas.GetLeft(this.rightPoint.Circle) + (this.rightPoint.Circle.Width / 2); this.connectingLine.Y2 = Canvas.GetTop(this.rightPoint.Circle) + (this.rightPoint.Circle.Height / 2); this.connectingLine.Fill = null; - this.connectingLine.Stroke = new SolidColorBrush(Color.FromArgb(140, 255, 255, 255)); + this.connectingLine.Stroke = new SolidColorBrush(Color.FromArgb(140, 255, 255, 255)); // White, slightly transparent this.connectingLine.StrokeThickness = 2; + // Make it not clickable this.connectingLine.IsHitTestVisible = false; int indexLine = pointsCanvas.Children.IndexOf(this.connectingLine); @@ -358,9 +495,13 @@ namespace Damage_Calculator this.lineDrawn = true; } + // Update top right corner distance texts this.unitsDistance = this.calculateDotDistanceInUnits(); + this.textDistanceUnits.Text = Math.Round(this.unitsDistance, 2).ToString(); this.textDistanceMetres.Text = Math.Round(this.unitsDistance / 39.37, 2).ToString(); + + // Recalculate damage this.settings_Updated(null, null); } else @@ -369,82 +510,143 @@ namespace Damage_Calculator this.lineDrawn = false; } - if(this.loadedMap != null && this.loadedMap.CTSpawnMultiplierX != -1 && this.loadedMap.CTSpawnMultiplierY != -1) + if(this.loadedMap != null) { this.positionIcons(); + this.positionSpawns(); + } + } + + private void positionSpawns() + { + double size = this.getPixelsFromUnits(70); + foreach (var spawn in this.loadedMap.SpawnPoints) + { + if (!spawn.IsPriority && mnuAllowNonPrioritySpawns.IsChecked == false) + continue; + + if (spawn.Type == eSpawnType.Standard && mnuShowStandardSpawns.IsChecked == false) + continue; + else if (spawn.Type == eSpawnType.Wingman && mnuShow2v2Spawns.IsChecked == false) + continue; + + var existingViewBox = this.pointsCanvas.Children.OfType().FirstOrDefault(v => v.Tag == spawn); + if (existingViewBox == null) + { + Viewbox box = new Viewbox(); + + var blipControl = this.getSpawnBlip(spawn); + box.Tag = spawn; + box.Child = blipControl; + box.Width = box.Height = size; + + Point newCoords = this.getPointFromGameCoords(spawn.Origin.X, spawn.Origin.Y); + + pointsCanvas.Children.Add(box); + Canvas.SetLeft(box, newCoords.X - box.Width / 2); + Canvas.SetTop(box, newCoords.Y - box.Height / 2); + } } } private void positionIcons() { - // CT Icon - if (this.CTSpawnIcon == null) + double left; + double top; + + if (mnuShowSpawnAreas.IsChecked == true) { - 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; + // 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 && this.loadedMap.CTSpawnMultiplierX >= 0 && this.loadedMap.CTSpawnMultiplierY >= 0) + pointsCanvas.Children.Add(CTSpawnIcon); + + left = this.loadedMap.CTSpawnMultiplierX * this.mapImage.ActualWidth - (CTSpawnIcon.ActualWidth / 2); + top = this.loadedMap.CTSpawnMultiplierY * this.mapImage.ActualWidth - (CTSpawnIcon.ActualHeight / 2); + if (left >= 0 && left <= this.mapImage.ActualWidth && top >= 0 && top <= this.mapImage.ActualHeight) + { + Canvas.SetLeft(CTSpawnIcon, left); + Canvas.SetTop(CTSpawnIcon, top); + } + + // 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 && this.loadedMap.TSpawnMultiplierX >= 0 && this.loadedMap.TSpawnMultiplierY >= 0) + pointsCanvas.Children.Add(TSpawnIcon); + + left = this.loadedMap.TSpawnMultiplierX * this.mapImage.ActualWidth - (TSpawnIcon.ActualWidth / 2); + top = this.loadedMap.TSpawnMultiplierY * this.mapImage.ActualWidth - (TSpawnIcon.ActualHeight / 2); + if (left >= 0 && left <= this.mapImage.ActualWidth && top >= 0 && top <= this.mapImage.ActualHeight) + { + Canvas.SetLeft(TSpawnIcon, left); + Canvas.SetTop(TSpawnIcon, top); + } } - 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) + if (mnuShowBombSites.IsChecked == true) { - 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; + // 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 && this.loadedMap.BombAX >= 0 && this.loadedMap.BombAY >= 0) + pointsCanvas.Children.Add(ASiteIcon); + + left = this.loadedMap.BombAX * this.mapImage.ActualWidth - (ASiteIcon.ActualWidth / 2); + top = this.loadedMap.BombAY * this.mapImage.ActualWidth - (ASiteIcon.ActualHeight / 2); + if (left >= 0 && left <= this.mapImage.ActualWidth && top >= 0 && top <= this.mapImage.ActualHeight) + { + Canvas.SetLeft(ASiteIcon, left); + Canvas.SetTop(ASiteIcon, top); + } + + // 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 && this.loadedMap.BombBX >= 0 && this.loadedMap.BombBY >= 0) + pointsCanvas.Children.Add(BSiteIcon); + + left = this.loadedMap.BombBX * this.mapImage.ActualWidth - (BSiteIcon.ActualWidth / 2); + top = this.loadedMap.BombBY * this.mapImage.ActualWidth - (BSiteIcon.ActualHeight / 2); + if (left >= 0 && left <= this.mapImage.ActualWidth && top >= 0 && top <= this.mapImage.ActualHeight) + { + Canvas.SetLeft(BSiteIcon, left); + Canvas.SetTop(BSiteIcon, top); + } } - - 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() @@ -588,6 +790,13 @@ namespace Damage_Calculator } #region events + + private void visibilityMenu_CheckChanged(object sender, RoutedEventArgs e) + { + this.resetCanvas(); + this.UpdateLayout(); + } + private void radioModeShooting_Checked(object sender, RoutedEventArgs e) { this.resetCanvas(); @@ -728,13 +937,20 @@ namespace Damage_Calculator settings_Updated(null, null); } - private void mnuHelp_Click(object sender, RoutedEventArgs e) + private void mnuAbout_Click(object sender, RoutedEventArgs e) { About about = new About(); about.Owner = this; about.ShowDialog(); } + private void mnuHelp_Click(object sender, RoutedEventArgs e) + { + Help help = new Help(); + help.Owner = this; + help.ShowDialog(); + } + private void Window_MouseMove(object sender, MouseEventArgs e) { if (this.mapImage.Source == null) diff --git a/DamageCalculator/DamageCalculator/Models/CsgoMap.cs b/DamageCalculator/DamageCalculator/Models/CsgoMap.cs index a42c7e2..7e10de2 100644 --- a/DamageCalculator/DamageCalculator/Models/CsgoMap.cs +++ b/DamageCalculator/DamageCalculator/Models/CsgoMap.cs @@ -122,5 +122,31 @@ namespace Damage_Calculator.Models /// Raw list of entities in this map, as stored in the BSP file. /// public string EntityList { get; set; } + + public int AmountPrioritySpawnsCT { get; set; } + + public int AmountSpawnsCT { get; set; } + + public int AmountPrioritySpawnsT { get; set; } + + public int AmountSpawnsT { get; set; } + + public bool HasPrioritySpawnsT + { + get + { + return this.AmountPrioritySpawnsT < this.AmountSpawnsT; + } + } + + public bool HasPrioritySpawnsCT + { + get + { + return this.AmountPrioritySpawnsCT < this.AmountSpawnsCT; + } + } + + public List SpawnPoints { get; set; } = new List(); } } diff --git a/DamageCalculator/DamageCalculator/Models/PlayerSpawn.cs b/DamageCalculator/DamageCalculator/Models/PlayerSpawn.cs new file mode 100644 index 0000000..5000046 --- /dev/null +++ b/DamageCalculator/DamageCalculator/Models/PlayerSpawn.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Damage_Calculator.Models +{ + public class PlayerSpawn + { + /// + /// The team of the player spawn. + /// + public ePlayerTeam Team { get; set; } + + /// + /// If this spawn is priority. If a team has priority spawns, fill them first. + /// + public bool IsPriority { get; set; } + + /// + /// The world position of the player spawn. + /// + public Vector3 Origin { get; set; } + + /// + /// The rotation of the player spawn. + /// Y is used most here, 0 is East, goes to 360 clockwise. + /// + public Vector3 Angles { get; set; } + + /// + /// The type of spawn (standard, 2v2, ...) + /// + public eSpawnType Type { get; set; } + } + + public enum ePlayerTeam { Terrorist, CounterTerrorist } + + public enum eSpawnType { Standard, Wingman } +} diff --git a/DamageCalculator/DamageCalculator/Models/Vector3.cs b/DamageCalculator/DamageCalculator/Models/Vector3.cs new file mode 100644 index 0000000..d0599db --- /dev/null +++ b/DamageCalculator/DamageCalculator/Models/Vector3.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Damage_Calculator.Models +{ + public class Vector3 + { + public float X { get; set; } + + public float Y { get; set; } + + public float Z { get; set; } + + public static Vector3 Empty = new Vector3 { X = 0, Y = 0, Z = 0 }; + } +} diff --git a/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.exe b/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.exe index 5507d8e..1f6ea74 100644 Binary files a/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.exe and b/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.exe differ diff --git a/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.pdb b/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.pdb index d26fcf6..1a06771 100644 Binary files a/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.pdb and b/DamageCalculator/DamageCalculator/bin/Debug/CSGO Damage Calculator.pdb differ diff --git a/DamageCalculator/DamageCalculator/ctrlPlayerSpawn.xaml b/DamageCalculator/DamageCalculator/ctrlPlayerSpawn.xaml new file mode 100644 index 0000000..d5a6fb1 --- /dev/null +++ b/DamageCalculator/DamageCalculator/ctrlPlayerSpawn.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/DamageCalculator/DamageCalculator/ctrlPlayerSpawn.xaml.cs b/DamageCalculator/DamageCalculator/ctrlPlayerSpawn.xaml.cs new file mode 100644 index 0000000..ca239cd --- /dev/null +++ b/DamageCalculator/DamageCalculator/ctrlPlayerSpawn.xaml.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Damage_Calculator +{ + /// + /// Interaction logic for ctrlPlayerSpawn.xaml + /// + public partial class ctrlPlayerSpawn : UserControl + { + public ctrlPlayerSpawn() + { + InitializeComponent(); + } + + public void SetColour(Color colour) + { + this.ellipse.Stroke = this.rectangle.Fill = new SolidColorBrush(colour); + } + + public void SetEllipseFill(Color colour) + { + this.ellipse.Fill = new SolidColorBrush(colour); + } + + public void SetRotation(double angle) + { + gridControl.RenderTransform = new RotateTransform(angle); + } + } +} diff --git a/DamageCalculator/DamageCalculator/obj/Debug/About.baml b/DamageCalculator/DamageCalculator/obj/Debug/About.baml index a862a04..b3b11e8 100644 Binary files a/DamageCalculator/DamageCalculator/obj/Debug/About.baml and b/DamageCalculator/DamageCalculator/obj/Debug/About.baml differ diff --git a/DamageCalculator/DamageCalculator/obj/Debug/About.g.cs b/DamageCalculator/DamageCalculator/obj/Debug/About.g.cs index 297e6e2..df2d0b7 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/About.g.cs +++ b/DamageCalculator/DamageCalculator/obj/Debug/About.g.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "37E1FF543713157BA51051A0414DEE84DBCDAE6BCA2335383D581644C899BA8C" +#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "82986E0DBC50ED3A4B613F33015BC9AC5D1F983DE161E336F31FB41165D63510" //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -41,7 +41,7 @@ namespace Damage_Calculator { public partial class About : System.Windows.Window, System.Windows.Markup.IComponentConnector { - #line 19 "..\..\About.xaml" + #line 21 "..\..\About.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtVersion; diff --git a/DamageCalculator/DamageCalculator/obj/Debug/About.g.i.cs b/DamageCalculator/DamageCalculator/obj/Debug/About.g.i.cs index 297e6e2..df2d0b7 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/About.g.i.cs +++ b/DamageCalculator/DamageCalculator/obj/Debug/About.g.i.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "37E1FF543713157BA51051A0414DEE84DBCDAE6BCA2335383D581644C899BA8C" +#pragma checksum "..\..\About.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "82986E0DBC50ED3A4B613F33015BC9AC5D1F983DE161E336F31FB41165D63510" //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -41,7 +41,7 @@ namespace Damage_Calculator { public partial class About : System.Windows.Window, System.Windows.Markup.IComponentConnector { - #line 19 "..\..\About.xaml" + #line 21 "..\..\About.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtVersion; diff --git a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.exe b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.exe index 5507d8e..1f6ea74 100644 Binary files a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.exe and b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.exe differ diff --git a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.g.resources b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.g.resources index 5fabdd1..b9840ef 100644 Binary files a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.g.resources and b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.g.resources differ diff --git a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.pdb b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.pdb index d26fcf6..1a06771 100644 Binary files a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.pdb and b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator.pdb differ diff --git a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.cache b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.cache index 194ec0c..f4fcd99 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.cache +++ b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.cache @@ -10,11 +10,11 @@ none false DEBUG;TRACE D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\App.xaml -6-1451057398 +8-1784528412 -27-418087645 +31-767171675 15-431277860 -About.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml; +About.xaml;ctrlPlayerSpawn.xaml;Help.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml; False diff --git a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.i.cache b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.i.cache index 76bdf40..5e70a74 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.i.cache +++ b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.i.cache @@ -10,11 +10,11 @@ none false DEBUG;TRACE D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\App.xaml -6-1451057398 +8-1784528412 -281503690476 +321154606446 15-431277860 -About.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml; +About.xaml;ctrlPlayerSpawn.xaml;Help.xaml;MainWindow.xaml;Themes\ColourfulDarkTheme.xaml;Themes\ColourfulLightTheme.xaml;Themes\DarkTheme.xaml;Themes\LightTheme.xaml; -False +True diff --git a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.i.lref b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.i.lref new file mode 100644 index 0000000..969cbe4 --- /dev/null +++ b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.i.lref @@ -0,0 +1,6 @@ + + +FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\ctrlPlayerSpawn.xaml;; +FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\Help.xaml;; +FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\MainWindow.xaml;; + diff --git a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.lref b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.lref index e51e5c6..c02fa62 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.lref +++ b/DamageCalculator/DamageCalculator/obj/Debug/CSGO Damage Calculator_MarkupCompile.lref @@ -2,4 +2,6 @@ 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;; +FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\ctrlPlayerSpawn.xaml;; +FD:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\Help.xaml;; diff --git a/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.CoreCompileInputs.cache b/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.CoreCompileInputs.cache index c998576..1ffb243 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.CoreCompileInputs.cache +++ b/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -9c412881d045825628cde2338aa0ccf0cb1fd134 +de194050420e7811f720e035cc6148d59c7ac5fb diff --git a/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.FileListAbsolute.txt b/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.FileListAbsolute.txt index 98a1374..fe7b0a1 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.FileListAbsolute.txt +++ b/DamageCalculator/DamageCalculator/obj/Debug/DamageCalculator.csproj.FileListAbsolute.txt @@ -50,3 +50,7 @@ D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\ob D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\CSGO Damage Calculator.exe D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\CSGO Damage Calculator.pdb D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\DamageCalculator.csproj.SuggestedBindingRedirects.cache +D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\ctrlPlayerSpawn.g.cs +D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\ctrlPlayerSpawn.baml +D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\Help.g.cs +D:\source\repos\_Git Repos\DamageCalculator\DamageCalculator\DamageCalculator\obj\Debug\Help.baml diff --git a/DamageCalculator/DamageCalculator/obj/Debug/Help.baml b/DamageCalculator/DamageCalculator/obj/Debug/Help.baml new file mode 100644 index 0000000..56bb482 Binary files /dev/null and b/DamageCalculator/DamageCalculator/obj/Debug/Help.baml differ diff --git a/DamageCalculator/DamageCalculator/obj/Debug/Help.g.cs b/DamageCalculator/DamageCalculator/obj/Debug/Help.g.cs new file mode 100644 index 0000000..2f33d3c --- /dev/null +++ b/DamageCalculator/DamageCalculator/obj/Debug/Help.g.cs @@ -0,0 +1,75 @@ +#pragma checksum "..\..\Help.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0BBD118A25710AD7297EFA440D952E55B704798D5E6B6F4E9B11039094AF8A14" +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 { + + + /// + /// Help + /// + public partial class Help : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [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/help.xaml", System.UriKind.Relative); + + #line 1 "..\..\Help.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; + } + } +} + diff --git a/DamageCalculator/DamageCalculator/obj/Debug/Help.g.i.cs b/DamageCalculator/DamageCalculator/obj/Debug/Help.g.i.cs new file mode 100644 index 0000000..2f33d3c --- /dev/null +++ b/DamageCalculator/DamageCalculator/obj/Debug/Help.g.i.cs @@ -0,0 +1,75 @@ +#pragma checksum "..\..\Help.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0BBD118A25710AD7297EFA440D952E55B704798D5E6B6F4E9B11039094AF8A14" +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 { + + + /// + /// Help + /// + public partial class Help : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [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/help.xaml", System.UriKind.Relative); + + #line 1 "..\..\Help.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; + } + } +} + diff --git a/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.baml b/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.baml index 55961d0..d0f6e49 100644 Binary files a/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.baml and b/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.baml differ diff --git a/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.cs b/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.cs index a64f0db..bd8c7f7 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.cs +++ b/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7FEF1C1C14931282E3CD4C845E600884ED2172B171609E698A3BF061C58787F7" +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9F019158B8352DCE8981F0BC66CF6ED55D2097B5B9C746213F2697B990FD5B48" //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -41,15 +41,71 @@ namespace Damage_Calculator { public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + #line 17 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowBombSites; + + #line default + #line hidden + + + #line 18 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowSpawnAreas; + + #line default + #line hidden + + + #line 19 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowStandardSpawns; + + #line default + #line hidden + + + #line 20 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShow2v2Spawns; + + #line default + #line hidden + + + #line 21 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuAllowNonPrioritySpawns; + + #line default + #line hidden + + #line 22 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowDrawnMarkers; + + #line default + #line hidden + + + #line 30 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuAbout; + + #line default + #line hidden + + + #line 31 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.MenuItem mnuHelp; #line default #line hidden - #line 36 "..\..\MainWindow.xaml" + #line 45 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioModeShooting; @@ -57,7 +113,7 @@ namespace Damage_Calculator { #line hidden - #line 37 "..\..\MainWindow.xaml" + #line 46 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioModeBomb; @@ -65,7 +121,7 @@ namespace Damage_Calculator { #line hidden - #line 39 "..\..\MainWindow.xaml" + #line 48 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel topStackPanel; @@ -73,7 +129,7 @@ namespace Damage_Calculator { #line hidden - #line 41 "..\..\MainWindow.xaml" + #line 50 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.ComboBox comboBoxMaps; @@ -81,7 +137,7 @@ namespace Damage_Calculator { #line hidden - #line 46 "..\..\MainWindow.xaml" + #line 55 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtEasterEggMetres; @@ -89,7 +145,7 @@ namespace Damage_Calculator { #line hidden - #line 47 "..\..\MainWindow.xaml" + #line 56 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock textDistanceMetres; @@ -97,7 +153,7 @@ namespace Damage_Calculator { #line hidden - #line 51 "..\..\MainWindow.xaml" + #line 60 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock textDistanceUnits; @@ -105,7 +161,7 @@ namespace Damage_Calculator { #line hidden - #line 54 "..\..\MainWindow.xaml" + #line 63 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Shapes.Rectangle rectTop; @@ -113,7 +169,7 @@ namespace Damage_Calculator { #line hidden - #line 55 "..\..\MainWindow.xaml" + #line 64 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Shapes.Rectangle rectSide; @@ -121,7 +177,7 @@ namespace Damage_Calculator { #line hidden - #line 56 "..\..\MainWindow.xaml" + #line 65 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel leftStackPanel; @@ -129,7 +185,7 @@ namespace Damage_Calculator { #line hidden - #line 60 "..\..\MainWindow.xaml" + #line 69 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel stackArmorSeparated; @@ -137,7 +193,7 @@ namespace Damage_Calculator { #line hidden - #line 61 "..\..\MainWindow.xaml" + #line 70 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox chkHelmet; @@ -145,7 +201,7 @@ namespace Damage_Calculator { #line hidden - #line 62 "..\..\MainWindow.xaml" + #line 71 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox chkKevlar; @@ -153,7 +209,7 @@ namespace Damage_Calculator { #line hidden - #line 64 "..\..\MainWindow.xaml" + #line 73 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox chkArmorAny; @@ -161,7 +217,7 @@ namespace Damage_Calculator { #line hidden - #line 66 "..\..\MainWindow.xaml" + #line 75 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel stackAreaHit; @@ -169,7 +225,7 @@ namespace Damage_Calculator { #line hidden - #line 68 "..\..\MainWindow.xaml" + #line 77 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioHead; @@ -177,7 +233,7 @@ namespace Damage_Calculator { #line hidden - #line 69 "..\..\MainWindow.xaml" + #line 78 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioChestArms; @@ -185,7 +241,7 @@ namespace Damage_Calculator { #line hidden - #line 70 "..\..\MainWindow.xaml" + #line 79 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioStomach; @@ -193,7 +249,7 @@ namespace Damage_Calculator { #line hidden - #line 71 "..\..\MainWindow.xaml" + #line 80 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioLegs; @@ -201,7 +257,7 @@ namespace Damage_Calculator { #line hidden - #line 73 "..\..\MainWindow.xaml" + #line 82 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel stackWeaponUsed; @@ -209,7 +265,7 @@ namespace Damage_Calculator { #line hidden - #line 75 "..\..\MainWindow.xaml" + #line 84 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.ComboBox comboWeapons; @@ -217,7 +273,7 @@ namespace Damage_Calculator { #line hidden - #line 79 "..\..\MainWindow.xaml" + #line 88 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtResult; @@ -225,7 +281,7 @@ namespace Damage_Calculator { #line hidden - #line 80 "..\..\MainWindow.xaml" + #line 89 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtResultArmor; @@ -233,33 +289,9 @@ namespace Damage_Calculator { #line hidden - #line 88 "..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock txtCursorX; - - #line default - #line hidden - - - #line 92 "..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock txtCursorY; - - #line default - #line hidden - - - #line 95 "..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Grid rightGrid; - - #line default - #line hidden - - #line 96 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Image mapImage; + internal System.Windows.Controls.CheckBox chkHasMapFile; #line default #line hidden @@ -267,7 +299,7 @@ namespace Damage_Calculator { #line 97 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Canvas pointsCanvas; + internal System.Windows.Controls.CheckBox chkHasNavFile; #line default #line hidden @@ -275,6 +307,62 @@ namespace Damage_Calculator { #line 100 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtBombMaxDamage; + + #line default + #line hidden + + + #line 104 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtBombRadius; + + #line default + #line hidden + + + #line 111 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtCursorX; + + #line default + #line hidden + + + #line 115 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtCursorY; + + #line default + #line hidden + + + #line 120 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Viewbox rightViewbox; + + #line default + #line hidden + + + #line 122 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Image mapImage; + + #line default + #line hidden + + + #line 123 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Canvas pointsCanvas; + + #line default + #line hidden + + + #line 127 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Grid gridLoading; #line default @@ -312,230 +400,341 @@ namespace Damage_Calculator { { case 1: - #line 11 "..\..\MainWindow.xaml" + #line 12 "..\..\MainWindow.xaml" ((Damage_Calculator.MainWindow)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Window_MouseMove); #line default #line hidden - #line 12 "..\..\MainWindow.xaml" + #line 13 "..\..\MainWindow.xaml" ((Damage_Calculator.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden return; case 2: + this.mnuShowBombSites = ((System.Windows.Controls.MenuItem)(target)); #line 17 "..\..\MainWindow.xaml" - ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); + this.mnuShowBombSites.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 17 "..\..\MainWindow.xaml" + this.mnuShowBombSites.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 3: + this.mnuShowSpawnAreas = ((System.Windows.Controls.MenuItem)(target)); #line 18 "..\..\MainWindow.xaml" - ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); + this.mnuShowSpawnAreas.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 18 "..\..\MainWindow.xaml" + this.mnuShowSpawnAreas.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 4: - this.mnuHelp = ((System.Windows.Controls.MenuItem)(target)); + this.mnuShowStandardSpawns = ((System.Windows.Controls.MenuItem)(target)); - #line 22 "..\..\MainWindow.xaml" - this.mnuHelp.Click += new System.Windows.RoutedEventHandler(this.mnuHelp_Click); + #line 19 "..\..\MainWindow.xaml" + this.mnuShowStandardSpawns.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 19 "..\..\MainWindow.xaml" + this.mnuShowStandardSpawns.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 5: - this.radioModeShooting = ((System.Windows.Controls.RadioButton)(target)); + this.mnuShow2v2Spawns = ((System.Windows.Controls.MenuItem)(target)); - #line 36 "..\..\MainWindow.xaml" - this.radioModeShooting.Checked += new System.Windows.RoutedEventHandler(this.radioModeShooting_Checked); + #line 20 "..\..\MainWindow.xaml" + this.mnuShow2v2Spawns.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 20 "..\..\MainWindow.xaml" + this.mnuShow2v2Spawns.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 6: - this.radioModeBomb = ((System.Windows.Controls.RadioButton)(target)); + this.mnuAllowNonPrioritySpawns = ((System.Windows.Controls.MenuItem)(target)); - #line 37 "..\..\MainWindow.xaml" - this.radioModeBomb.Checked += new System.Windows.RoutedEventHandler(this.radioModeBomb_Checked); + #line 21 "..\..\MainWindow.xaml" + this.mnuAllowNonPrioritySpawns.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 21 "..\..\MainWindow.xaml" + this.mnuAllowNonPrioritySpawns.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 7: - this.topStackPanel = ((System.Windows.Controls.StackPanel)(target)); + this.mnuShowDrawnMarkers = ((System.Windows.Controls.MenuItem)(target)); + + #line 22 "..\..\MainWindow.xaml" + this.mnuShowDrawnMarkers.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 22 "..\..\MainWindow.xaml" + this.mnuShowDrawnMarkers.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden return; case 8: - this.comboBoxMaps = ((System.Windows.Controls.ComboBox)(target)); - #line 41 "..\..\MainWindow.xaml" - this.comboBoxMaps.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBoxMaps_SelectionChanged); + #line 25 "..\..\MainWindow.xaml" + ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); #line default #line hidden return; case 9: - this.txtEasterEggMetres = ((System.Windows.Controls.TextBlock)(target)); + + #line 26 "..\..\MainWindow.xaml" + ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); + + #line default + #line hidden return; case 10: - this.textDistanceMetres = ((System.Windows.Controls.TextBlock)(target)); + this.mnuAbout = ((System.Windows.Controls.MenuItem)(target)); + + #line 30 "..\..\MainWindow.xaml" + this.mnuAbout.Click += new System.Windows.RoutedEventHandler(this.mnuAbout_Click); + + #line default + #line hidden return; case 11: - this.textDistanceUnits = ((System.Windows.Controls.TextBlock)(target)); + this.mnuHelp = ((System.Windows.Controls.MenuItem)(target)); + + #line 31 "..\..\MainWindow.xaml" + this.mnuHelp.Click += new System.Windows.RoutedEventHandler(this.mnuHelp_Click); + + #line default + #line hidden return; case 12: - this.rectTop = ((System.Windows.Shapes.Rectangle)(target)); + this.radioModeShooting = ((System.Windows.Controls.RadioButton)(target)); + + #line 45 "..\..\MainWindow.xaml" + this.radioModeShooting.Checked += new System.Windows.RoutedEventHandler(this.radioModeShooting_Checked); + + #line default + #line hidden return; case 13: - this.rectSide = ((System.Windows.Shapes.Rectangle)(target)); + this.radioModeBomb = ((System.Windows.Controls.RadioButton)(target)); + + #line 46 "..\..\MainWindow.xaml" + this.radioModeBomb.Checked += new System.Windows.RoutedEventHandler(this.radioModeBomb_Checked); + + #line default + #line hidden return; case 14: - this.leftStackPanel = ((System.Windows.Controls.StackPanel)(target)); + this.topStackPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 15: - this.stackArmorSeparated = ((System.Windows.Controls.StackPanel)(target)); + this.comboBoxMaps = ((System.Windows.Controls.ComboBox)(target)); + + #line 50 "..\..\MainWindow.xaml" + this.comboBoxMaps.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBoxMaps_SelectionChanged); + + #line default + #line hidden return; case 16: + this.txtEasterEggMetres = ((System.Windows.Controls.TextBlock)(target)); + return; + case 17: + this.textDistanceMetres = ((System.Windows.Controls.TextBlock)(target)); + return; + case 18: + this.textDistanceUnits = ((System.Windows.Controls.TextBlock)(target)); + return; + case 19: + this.rectTop = ((System.Windows.Shapes.Rectangle)(target)); + return; + case 20: + this.rectSide = ((System.Windows.Shapes.Rectangle)(target)); + return; + case 21: + this.leftStackPanel = ((System.Windows.Controls.StackPanel)(target)); + return; + case 22: + this.stackArmorSeparated = ((System.Windows.Controls.StackPanel)(target)); + return; + case 23: this.chkHelmet = ((System.Windows.Controls.CheckBox)(target)); - #line 61 "..\..\MainWindow.xaml" + #line 70 "..\..\MainWindow.xaml" this.chkHelmet.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden - #line 61 "..\..\MainWindow.xaml" + #line 70 "..\..\MainWindow.xaml" this.chkHelmet.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 17: + case 24: this.chkKevlar = ((System.Windows.Controls.CheckBox)(target)); - #line 62 "..\..\MainWindow.xaml" + #line 71 "..\..\MainWindow.xaml" this.chkKevlar.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden - #line 62 "..\..\MainWindow.xaml" + #line 71 "..\..\MainWindow.xaml" this.chkKevlar.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 18: + case 25: this.chkArmorAny = ((System.Windows.Controls.CheckBox)(target)); - #line 64 "..\..\MainWindow.xaml" + #line 73 "..\..\MainWindow.xaml" this.chkArmorAny.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden - #line 64 "..\..\MainWindow.xaml" + #line 73 "..\..\MainWindow.xaml" this.chkArmorAny.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 19: + case 26: this.stackAreaHit = ((System.Windows.Controls.StackPanel)(target)); return; - case 20: + case 27: this.radioHead = ((System.Windows.Controls.RadioButton)(target)); - #line 68 "..\..\MainWindow.xaml" + #line 77 "..\..\MainWindow.xaml" this.radioHead.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 21: + case 28: this.radioChestArms = ((System.Windows.Controls.RadioButton)(target)); - #line 69 "..\..\MainWindow.xaml" + #line 78 "..\..\MainWindow.xaml" this.radioChestArms.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 22: + case 29: this.radioStomach = ((System.Windows.Controls.RadioButton)(target)); - #line 70 "..\..\MainWindow.xaml" + #line 79 "..\..\MainWindow.xaml" this.radioStomach.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 23: + case 30: this.radioLegs = ((System.Windows.Controls.RadioButton)(target)); - #line 71 "..\..\MainWindow.xaml" + #line 80 "..\..\MainWindow.xaml" this.radioLegs.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 24: + case 31: this.stackWeaponUsed = ((System.Windows.Controls.StackPanel)(target)); return; - case 25: + case 32: this.comboWeapons = ((System.Windows.Controls.ComboBox)(target)); - #line 75 "..\..\MainWindow.xaml" + #line 84 "..\..\MainWindow.xaml" this.comboWeapons.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboWeapons_SelectionChanged); #line default #line hidden return; - case 26: + case 33: this.txtResult = ((System.Windows.Controls.TextBlock)(target)); return; - case 27: + case 34: this.txtResultArmor = ((System.Windows.Controls.TextBlock)(target)); return; - case 28: + case 35: + this.chkHasMapFile = ((System.Windows.Controls.CheckBox)(target)); + return; + case 36: + this.chkHasNavFile = ((System.Windows.Controls.CheckBox)(target)); + return; + case 37: + this.txtBombMaxDamage = ((System.Windows.Controls.TextBlock)(target)); + return; + case 38: + this.txtBombRadius = ((System.Windows.Controls.TextBlock)(target)); + return; + case 39: this.txtCursorX = ((System.Windows.Controls.TextBlock)(target)); return; - case 29: + case 40: this.txtCursorY = ((System.Windows.Controls.TextBlock)(target)); return; - case 30: - this.rightGrid = ((System.Windows.Controls.Grid)(target)); + case 41: + this.rightViewbox = ((System.Windows.Controls.Viewbox)(target)); return; - case 31: + case 42: this.mapImage = ((System.Windows.Controls.Image)(target)); - #line 96 "..\..\MainWindow.xaml" + #line 122 "..\..\MainWindow.xaml" this.mapImage.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseLeftButtonUp); #line default #line hidden - #line 96 "..\..\MainWindow.xaml" + #line 122 "..\..\MainWindow.xaml" this.mapImage.MouseRightButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseRightButtonUp); #line default #line hidden - #line 96 "..\..\MainWindow.xaml" + #line 122 "..\..\MainWindow.xaml" this.mapImage.LayoutUpdated += new System.EventHandler(this.mapImage_LayoutUpdated); #line default #line hidden return; - case 32: + case 43: this.pointsCanvas = ((System.Windows.Controls.Canvas)(target)); return; - case 33: + case 44: this.gridLoading = ((System.Windows.Controls.Grid)(target)); return; } diff --git a/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.i.cs b/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.i.cs index a64f0db..bd8c7f7 100644 --- a/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.i.cs +++ b/DamageCalculator/DamageCalculator/obj/Debug/MainWindow.g.i.cs @@ -1,4 +1,4 @@ -#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7FEF1C1C14931282E3CD4C845E600884ED2172B171609E698A3BF061C58787F7" +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9F019158B8352DCE8981F0BC66CF6ED55D2097B5B9C746213F2697B990FD5B48" //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -41,15 +41,71 @@ namespace Damage_Calculator { public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + #line 17 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowBombSites; + + #line default + #line hidden + + + #line 18 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowSpawnAreas; + + #line default + #line hidden + + + #line 19 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowStandardSpawns; + + #line default + #line hidden + + + #line 20 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShow2v2Spawns; + + #line default + #line hidden + + + #line 21 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuAllowNonPrioritySpawns; + + #line default + #line hidden + + #line 22 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuShowDrawnMarkers; + + #line default + #line hidden + + + #line 30 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.MenuItem mnuAbout; + + #line default + #line hidden + + + #line 31 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.MenuItem mnuHelp; #line default #line hidden - #line 36 "..\..\MainWindow.xaml" + #line 45 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioModeShooting; @@ -57,7 +113,7 @@ namespace Damage_Calculator { #line hidden - #line 37 "..\..\MainWindow.xaml" + #line 46 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioModeBomb; @@ -65,7 +121,7 @@ namespace Damage_Calculator { #line hidden - #line 39 "..\..\MainWindow.xaml" + #line 48 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel topStackPanel; @@ -73,7 +129,7 @@ namespace Damage_Calculator { #line hidden - #line 41 "..\..\MainWindow.xaml" + #line 50 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.ComboBox comboBoxMaps; @@ -81,7 +137,7 @@ namespace Damage_Calculator { #line hidden - #line 46 "..\..\MainWindow.xaml" + #line 55 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtEasterEggMetres; @@ -89,7 +145,7 @@ namespace Damage_Calculator { #line hidden - #line 47 "..\..\MainWindow.xaml" + #line 56 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock textDistanceMetres; @@ -97,7 +153,7 @@ namespace Damage_Calculator { #line hidden - #line 51 "..\..\MainWindow.xaml" + #line 60 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock textDistanceUnits; @@ -105,7 +161,7 @@ namespace Damage_Calculator { #line hidden - #line 54 "..\..\MainWindow.xaml" + #line 63 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Shapes.Rectangle rectTop; @@ -113,7 +169,7 @@ namespace Damage_Calculator { #line hidden - #line 55 "..\..\MainWindow.xaml" + #line 64 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Shapes.Rectangle rectSide; @@ -121,7 +177,7 @@ namespace Damage_Calculator { #line hidden - #line 56 "..\..\MainWindow.xaml" + #line 65 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel leftStackPanel; @@ -129,7 +185,7 @@ namespace Damage_Calculator { #line hidden - #line 60 "..\..\MainWindow.xaml" + #line 69 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel stackArmorSeparated; @@ -137,7 +193,7 @@ namespace Damage_Calculator { #line hidden - #line 61 "..\..\MainWindow.xaml" + #line 70 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox chkHelmet; @@ -145,7 +201,7 @@ namespace Damage_Calculator { #line hidden - #line 62 "..\..\MainWindow.xaml" + #line 71 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox chkKevlar; @@ -153,7 +209,7 @@ namespace Damage_Calculator { #line hidden - #line 64 "..\..\MainWindow.xaml" + #line 73 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.CheckBox chkArmorAny; @@ -161,7 +217,7 @@ namespace Damage_Calculator { #line hidden - #line 66 "..\..\MainWindow.xaml" + #line 75 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel stackAreaHit; @@ -169,7 +225,7 @@ namespace Damage_Calculator { #line hidden - #line 68 "..\..\MainWindow.xaml" + #line 77 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioHead; @@ -177,7 +233,7 @@ namespace Damage_Calculator { #line hidden - #line 69 "..\..\MainWindow.xaml" + #line 78 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioChestArms; @@ -185,7 +241,7 @@ namespace Damage_Calculator { #line hidden - #line 70 "..\..\MainWindow.xaml" + #line 79 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioStomach; @@ -193,7 +249,7 @@ namespace Damage_Calculator { #line hidden - #line 71 "..\..\MainWindow.xaml" + #line 80 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.RadioButton radioLegs; @@ -201,7 +257,7 @@ namespace Damage_Calculator { #line hidden - #line 73 "..\..\MainWindow.xaml" + #line 82 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.StackPanel stackWeaponUsed; @@ -209,7 +265,7 @@ namespace Damage_Calculator { #line hidden - #line 75 "..\..\MainWindow.xaml" + #line 84 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.ComboBox comboWeapons; @@ -217,7 +273,7 @@ namespace Damage_Calculator { #line hidden - #line 79 "..\..\MainWindow.xaml" + #line 88 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtResult; @@ -225,7 +281,7 @@ namespace Damage_Calculator { #line hidden - #line 80 "..\..\MainWindow.xaml" + #line 89 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.TextBlock txtResultArmor; @@ -233,33 +289,9 @@ namespace Damage_Calculator { #line hidden - #line 88 "..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock txtCursorX; - - #line default - #line hidden - - - #line 92 "..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock txtCursorY; - - #line default - #line hidden - - - #line 95 "..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Grid rightGrid; - - #line default - #line hidden - - #line 96 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Image mapImage; + internal System.Windows.Controls.CheckBox chkHasMapFile; #line default #line hidden @@ -267,7 +299,7 @@ namespace Damage_Calculator { #line 97 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Canvas pointsCanvas; + internal System.Windows.Controls.CheckBox chkHasNavFile; #line default #line hidden @@ -275,6 +307,62 @@ namespace Damage_Calculator { #line 100 "..\..\MainWindow.xaml" [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtBombMaxDamage; + + #line default + #line hidden + + + #line 104 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtBombRadius; + + #line default + #line hidden + + + #line 111 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtCursorX; + + #line default + #line hidden + + + #line 115 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock txtCursorY; + + #line default + #line hidden + + + #line 120 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Viewbox rightViewbox; + + #line default + #line hidden + + + #line 122 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Image mapImage; + + #line default + #line hidden + + + #line 123 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Canvas pointsCanvas; + + #line default + #line hidden + + + #line 127 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] internal System.Windows.Controls.Grid gridLoading; #line default @@ -312,230 +400,341 @@ namespace Damage_Calculator { { case 1: - #line 11 "..\..\MainWindow.xaml" + #line 12 "..\..\MainWindow.xaml" ((Damage_Calculator.MainWindow)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Window_MouseMove); #line default #line hidden - #line 12 "..\..\MainWindow.xaml" + #line 13 "..\..\MainWindow.xaml" ((Damage_Calculator.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden return; case 2: + this.mnuShowBombSites = ((System.Windows.Controls.MenuItem)(target)); #line 17 "..\..\MainWindow.xaml" - ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); + this.mnuShowBombSites.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 17 "..\..\MainWindow.xaml" + this.mnuShowBombSites.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 3: + this.mnuShowSpawnAreas = ((System.Windows.Controls.MenuItem)(target)); #line 18 "..\..\MainWindow.xaml" - ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); + this.mnuShowSpawnAreas.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 18 "..\..\MainWindow.xaml" + this.mnuShowSpawnAreas.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 4: - this.mnuHelp = ((System.Windows.Controls.MenuItem)(target)); + this.mnuShowStandardSpawns = ((System.Windows.Controls.MenuItem)(target)); - #line 22 "..\..\MainWindow.xaml" - this.mnuHelp.Click += new System.Windows.RoutedEventHandler(this.mnuHelp_Click); + #line 19 "..\..\MainWindow.xaml" + this.mnuShowStandardSpawns.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 19 "..\..\MainWindow.xaml" + this.mnuShowStandardSpawns.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 5: - this.radioModeShooting = ((System.Windows.Controls.RadioButton)(target)); + this.mnuShow2v2Spawns = ((System.Windows.Controls.MenuItem)(target)); - #line 36 "..\..\MainWindow.xaml" - this.radioModeShooting.Checked += new System.Windows.RoutedEventHandler(this.radioModeShooting_Checked); + #line 20 "..\..\MainWindow.xaml" + this.mnuShow2v2Spawns.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 20 "..\..\MainWindow.xaml" + this.mnuShow2v2Spawns.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 6: - this.radioModeBomb = ((System.Windows.Controls.RadioButton)(target)); + this.mnuAllowNonPrioritySpawns = ((System.Windows.Controls.MenuItem)(target)); - #line 37 "..\..\MainWindow.xaml" - this.radioModeBomb.Checked += new System.Windows.RoutedEventHandler(this.radioModeBomb_Checked); + #line 21 "..\..\MainWindow.xaml" + this.mnuAllowNonPrioritySpawns.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 21 "..\..\MainWindow.xaml" + this.mnuAllowNonPrioritySpawns.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); #line default #line hidden return; case 7: - this.topStackPanel = ((System.Windows.Controls.StackPanel)(target)); + this.mnuShowDrawnMarkers = ((System.Windows.Controls.MenuItem)(target)); + + #line 22 "..\..\MainWindow.xaml" + this.mnuShowDrawnMarkers.Checked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden + + #line 22 "..\..\MainWindow.xaml" + this.mnuShowDrawnMarkers.Unchecked += new System.Windows.RoutedEventHandler(this.visibilityMenu_CheckChanged); + + #line default + #line hidden return; case 8: - this.comboBoxMaps = ((System.Windows.Controls.ComboBox)(target)); - #line 41 "..\..\MainWindow.xaml" - this.comboBoxMaps.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBoxMaps_SelectionChanged); + #line 25 "..\..\MainWindow.xaml" + ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); #line default #line hidden return; case 9: - this.txtEasterEggMetres = ((System.Windows.Controls.TextBlock)(target)); + + #line 26 "..\..\MainWindow.xaml" + ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.changeTheme_Click); + + #line default + #line hidden return; case 10: - this.textDistanceMetres = ((System.Windows.Controls.TextBlock)(target)); + this.mnuAbout = ((System.Windows.Controls.MenuItem)(target)); + + #line 30 "..\..\MainWindow.xaml" + this.mnuAbout.Click += new System.Windows.RoutedEventHandler(this.mnuAbout_Click); + + #line default + #line hidden return; case 11: - this.textDistanceUnits = ((System.Windows.Controls.TextBlock)(target)); + this.mnuHelp = ((System.Windows.Controls.MenuItem)(target)); + + #line 31 "..\..\MainWindow.xaml" + this.mnuHelp.Click += new System.Windows.RoutedEventHandler(this.mnuHelp_Click); + + #line default + #line hidden return; case 12: - this.rectTop = ((System.Windows.Shapes.Rectangle)(target)); + this.radioModeShooting = ((System.Windows.Controls.RadioButton)(target)); + + #line 45 "..\..\MainWindow.xaml" + this.radioModeShooting.Checked += new System.Windows.RoutedEventHandler(this.radioModeShooting_Checked); + + #line default + #line hidden return; case 13: - this.rectSide = ((System.Windows.Shapes.Rectangle)(target)); + this.radioModeBomb = ((System.Windows.Controls.RadioButton)(target)); + + #line 46 "..\..\MainWindow.xaml" + this.radioModeBomb.Checked += new System.Windows.RoutedEventHandler(this.radioModeBomb_Checked); + + #line default + #line hidden return; case 14: - this.leftStackPanel = ((System.Windows.Controls.StackPanel)(target)); + this.topStackPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 15: - this.stackArmorSeparated = ((System.Windows.Controls.StackPanel)(target)); + this.comboBoxMaps = ((System.Windows.Controls.ComboBox)(target)); + + #line 50 "..\..\MainWindow.xaml" + this.comboBoxMaps.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboBoxMaps_SelectionChanged); + + #line default + #line hidden return; case 16: + this.txtEasterEggMetres = ((System.Windows.Controls.TextBlock)(target)); + return; + case 17: + this.textDistanceMetres = ((System.Windows.Controls.TextBlock)(target)); + return; + case 18: + this.textDistanceUnits = ((System.Windows.Controls.TextBlock)(target)); + return; + case 19: + this.rectTop = ((System.Windows.Shapes.Rectangle)(target)); + return; + case 20: + this.rectSide = ((System.Windows.Shapes.Rectangle)(target)); + return; + case 21: + this.leftStackPanel = ((System.Windows.Controls.StackPanel)(target)); + return; + case 22: + this.stackArmorSeparated = ((System.Windows.Controls.StackPanel)(target)); + return; + case 23: this.chkHelmet = ((System.Windows.Controls.CheckBox)(target)); - #line 61 "..\..\MainWindow.xaml" + #line 70 "..\..\MainWindow.xaml" this.chkHelmet.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden - #line 61 "..\..\MainWindow.xaml" + #line 70 "..\..\MainWindow.xaml" this.chkHelmet.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 17: + case 24: this.chkKevlar = ((System.Windows.Controls.CheckBox)(target)); - #line 62 "..\..\MainWindow.xaml" + #line 71 "..\..\MainWindow.xaml" this.chkKevlar.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden - #line 62 "..\..\MainWindow.xaml" + #line 71 "..\..\MainWindow.xaml" this.chkKevlar.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 18: + case 25: this.chkArmorAny = ((System.Windows.Controls.CheckBox)(target)); - #line 64 "..\..\MainWindow.xaml" + #line 73 "..\..\MainWindow.xaml" this.chkArmorAny.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden - #line 64 "..\..\MainWindow.xaml" + #line 73 "..\..\MainWindow.xaml" this.chkArmorAny.Unchecked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 19: + case 26: this.stackAreaHit = ((System.Windows.Controls.StackPanel)(target)); return; - case 20: + case 27: this.radioHead = ((System.Windows.Controls.RadioButton)(target)); - #line 68 "..\..\MainWindow.xaml" + #line 77 "..\..\MainWindow.xaml" this.radioHead.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 21: + case 28: this.radioChestArms = ((System.Windows.Controls.RadioButton)(target)); - #line 69 "..\..\MainWindow.xaml" + #line 78 "..\..\MainWindow.xaml" this.radioChestArms.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 22: + case 29: this.radioStomach = ((System.Windows.Controls.RadioButton)(target)); - #line 70 "..\..\MainWindow.xaml" + #line 79 "..\..\MainWindow.xaml" this.radioStomach.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 23: + case 30: this.radioLegs = ((System.Windows.Controls.RadioButton)(target)); - #line 71 "..\..\MainWindow.xaml" + #line 80 "..\..\MainWindow.xaml" this.radioLegs.Checked += new System.Windows.RoutedEventHandler(this.settings_Updated); #line default #line hidden return; - case 24: + case 31: this.stackWeaponUsed = ((System.Windows.Controls.StackPanel)(target)); return; - case 25: + case 32: this.comboWeapons = ((System.Windows.Controls.ComboBox)(target)); - #line 75 "..\..\MainWindow.xaml" + #line 84 "..\..\MainWindow.xaml" this.comboWeapons.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboWeapons_SelectionChanged); #line default #line hidden return; - case 26: + case 33: this.txtResult = ((System.Windows.Controls.TextBlock)(target)); return; - case 27: + case 34: this.txtResultArmor = ((System.Windows.Controls.TextBlock)(target)); return; - case 28: + case 35: + this.chkHasMapFile = ((System.Windows.Controls.CheckBox)(target)); + return; + case 36: + this.chkHasNavFile = ((System.Windows.Controls.CheckBox)(target)); + return; + case 37: + this.txtBombMaxDamage = ((System.Windows.Controls.TextBlock)(target)); + return; + case 38: + this.txtBombRadius = ((System.Windows.Controls.TextBlock)(target)); + return; + case 39: this.txtCursorX = ((System.Windows.Controls.TextBlock)(target)); return; - case 29: + case 40: this.txtCursorY = ((System.Windows.Controls.TextBlock)(target)); return; - case 30: - this.rightGrid = ((System.Windows.Controls.Grid)(target)); + case 41: + this.rightViewbox = ((System.Windows.Controls.Viewbox)(target)); return; - case 31: + case 42: this.mapImage = ((System.Windows.Controls.Image)(target)); - #line 96 "..\..\MainWindow.xaml" + #line 122 "..\..\MainWindow.xaml" this.mapImage.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseLeftButtonUp); #line default #line hidden - #line 96 "..\..\MainWindow.xaml" + #line 122 "..\..\MainWindow.xaml" this.mapImage.MouseRightButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mapImage_MouseRightButtonUp); #line default #line hidden - #line 96 "..\..\MainWindow.xaml" + #line 122 "..\..\MainWindow.xaml" this.mapImage.LayoutUpdated += new System.EventHandler(this.mapImage_LayoutUpdated); #line default #line hidden return; - case 32: + case 43: this.pointsCanvas = ((System.Windows.Controls.Canvas)(target)); return; - case 33: + case 44: this.gridLoading = ((System.Windows.Controls.Grid)(target)); return; } diff --git a/DamageCalculator/DamageCalculator/obj/Debug/PlayerSpawn.g.i.cs b/DamageCalculator/DamageCalculator/obj/Debug/PlayerSpawn.g.i.cs new file mode 100644 index 0000000..7099b19 --- /dev/null +++ b/DamageCalculator/DamageCalculator/obj/Debug/PlayerSpawn.g.i.cs @@ -0,0 +1,75 @@ +#pragma checksum "..\..\PlayerSpawn.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FFDEDEA8B8999972E9BF7E1F0789EE21D7A435585C46E63AE846EBB13CD9E5D4" +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 { + + + /// + /// PlayerSpawn + /// + public partial class PlayerSpawn : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [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/playerspawn.xaml", System.UriKind.Relative); + + #line 1 "..\..\PlayerSpawn.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; + } + } +} + diff --git a/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.baml b/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.baml new file mode 100644 index 0000000..6340093 Binary files /dev/null and b/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.baml differ diff --git a/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.g.cs b/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.g.cs new file mode 100644 index 0000000..253268d --- /dev/null +++ b/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.g.cs @@ -0,0 +1,111 @@ +#pragma checksum "..\..\ctrlPlayerSpawn.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "52E0901CDEE7706AF64B6F086D0E28AF076F4AD2AD06D8D38CB68287ACA6ED77" +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 { + + + /// + /// ctrlPlayerSpawn + /// + public partial class ctrlPlayerSpawn : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + + #line 10 "..\..\ctrlPlayerSpawn.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Grid gridControl; + + #line default + #line hidden + + + #line 16 "..\..\ctrlPlayerSpawn.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Shapes.Ellipse ellipse; + + #line default + #line hidden + + + #line 17 "..\..\ctrlPlayerSpawn.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Shapes.Rectangle rectangle; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [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/ctrlplayerspawn.xaml", System.UriKind.Relative); + + #line 1 "..\..\ctrlPlayerSpawn.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.gridControl = ((System.Windows.Controls.Grid)(target)); + return; + case 2: + this.ellipse = ((System.Windows.Shapes.Ellipse)(target)); + return; + case 3: + this.rectangle = ((System.Windows.Shapes.Rectangle)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.g.i.cs b/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.g.i.cs new file mode 100644 index 0000000..253268d --- /dev/null +++ b/DamageCalculator/DamageCalculator/obj/Debug/ctrlPlayerSpawn.g.i.cs @@ -0,0 +1,111 @@ +#pragma checksum "..\..\ctrlPlayerSpawn.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "52E0901CDEE7706AF64B6F086D0E28AF076F4AD2AD06D8D38CB68287ACA6ED77" +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 { + + + /// + /// ctrlPlayerSpawn + /// + public partial class ctrlPlayerSpawn : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { + + + #line 10 "..\..\ctrlPlayerSpawn.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Grid gridControl; + + #line default + #line hidden + + + #line 16 "..\..\ctrlPlayerSpawn.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Shapes.Ellipse ellipse; + + #line default + #line hidden + + + #line 17 "..\..\ctrlPlayerSpawn.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Shapes.Rectangle rectangle; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [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/ctrlplayerspawn.xaml", System.UriKind.Relative); + + #line 1 "..\..\ctrlPlayerSpawn.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.gridControl = ((System.Windows.Controls.Grid)(target)); + return; + case 2: + this.ellipse = ((System.Windows.Shapes.Ellipse)(target)); + return; + case 3: + this.rectangle = ((System.Windows.Shapes.Rectangle)(target)); + return; + } + this._contentLoaded = true; + } + } +} +