From 09e1ea0969c0c851b9feb3baaa38f9f7961529f8 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Sep 2018 12:41:42 +0300 Subject: [PATCH 01/14] Fixed #24 --- OWTrack/MainForm.cs | 27 +++++++++++++++++++-------- OWTrack/Tracker.cs | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index cbb4641..832fb83 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -26,27 +26,38 @@ namespace OWTrack } private void checkStatus() - { + { + Time.Text = DateTime.Now.ToString("h:mm tt"); try { - Time.Text = DateTime.Now.ToString("h:mm tt"); - status.Text = NOT_RUNNING; - status.ForeColor = Color.Red; if (tr.owRunning()) { status.Text = IS_RUNNING; status.ForeColor = Color.FromArgb(0, 192, 0); - } + } + else + { + status.Text = NOT_RUNNING; + status.ForeColor = Color.Black; + } } catch (Exception e) { - MessageBox.Show(e.Message); + status.Text = e.Message; + status.ForeColor = Color.Red; } } private void loadSave() { - Directory.CreateDirectory("saves"); + try + { + Directory.CreateDirectory("saves"); + } + catch (Exception e) + { + MessageBox.Show("Can not create save directory.\n" + e.Message); + } if (saveManeger.saveExist()) { try @@ -92,7 +103,7 @@ namespace OWTrack if (result == DialogResult.OK) { //tr.gamePath = openFileDialog1.FileName; - MessageBox.Show("Saved Overwatch.exe location.\nPress Clear to rest\n" + openFileDialog1.FileName ); + MessageBox.Show("Saved Overwatch.exe location.\nPress Clear to rest"); return openFileDialog1.FileName; } else diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index a278053..6e23071 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -33,7 +33,7 @@ namespace OWTrack } catch (Exception) { - Exception ex = new Exception("Error in tracking Overwatch.exe"); + Exception ex = new Exception("Error"); throw ex; } } From 294a6e02fe4408a165dbcbf2d57fe2ec80f1d2ad Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Sep 2018 12:54:00 +0300 Subject: [PATCH 02/14] MIT Licance --- OWTrack/MainForm.cs | 20 ++++++++++++++++++++ OWTrack/Tracker.cs | 22 +++++++++++++++++++++- OWTrack/saveManeger.cs | 22 +++++++++++++++++++++- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index cbb4641..4973e0c 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -1,3 +1,23 @@ +/*Copyright(c) 2018 Hesham Systems LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.*/ + using System; using System.Drawing; using System.Windows.Forms; diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index a278053..6d0fbee 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -1,4 +1,24 @@ -using System; +/*Copyright(c) 2018 Hesham Systems LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.*/ + +using System; using System.Diagnostics; using System.Linq; using System.IO; diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index b903c23..f5b6936 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -1,4 +1,24 @@ -using Newtonsoft.Json; +/*Copyright(c) 2018 Hesham Systems LLC. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.*/ + +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; From 0817dbea298714830d4d9b14788f821d059f7fbe Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Sep 2018 13:00:31 +0300 Subject: [PATCH 03/14] Version --- OWTrack/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OWTrack/Program.cs b/OWTrack/Program.cs index 963e7e6..a9a0b63 100644 --- a/OWTrack/Program.cs +++ b/OWTrack/Program.cs @@ -18,7 +18,7 @@ namespace OWTrack Application.Run(new MainForm()); } - public static string Version { get; } = "1.4.0a2"; + public static string Version { get; } = "1.4.1a1"; //public static string Version = Application.ProductVersion; //public static Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; From c410f078b03c2d9ffd3355019bccd8d6b182a399 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 23 Sep 2018 15:14:11 +0300 Subject: [PATCH 04/14] Tracker Update --- .vscode/launch.json | 57 +++++++++++++++++++++++++++++++++++++++++++++ OWTrack/Tracker.cs | 5 ++-- 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1b1d40e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,57 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/bin/Debug//.dll", + "args": [], + "cwd": "${workspaceFolder}", + "console": "internalConsole", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart" + }, + { + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/bin/Debug//.dll", + "args": [], + "cwd": "${workspaceFolder}", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart", + "launchBrowser": { + "enabled": true, + "args": "${auto-detect-url}", + "windows": { + "command": "cmd.exe", + "args": "/C start ${auto-detect-url}" + }, + "osx": { + "command": "open" + }, + "linux": { + "command": "xdg-open" + } + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} \ No newline at end of file diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index d9e66c3..d734ecd 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -29,10 +29,10 @@ namespace OWTrack { class Tracker { - public int wins, losses, startSR, newSR = 0; + public int wins, losses, startSR, newSR, totalMatches = 0; public string gamePath; - public void Track() { } + public void Track() { }//Deserailize here public void reset() { wins = 0; losses = 0; startSR = 0; newSR = 0; gamePath = null; } public void addWin() { wins++; } public void addLoss() { losses++; } @@ -40,6 +40,7 @@ namespace OWTrack public void rediceLoss() { losses--; } public int GetWins() { return wins; } public int GetLosses() { return losses; } + public int GetTotalMatches() { return wins + losses; } public void setNewSR(int SR) { newSR = SR; } public int srDiff() { return newSR - startSR; } From f4c56e2bc2a59a2060d743b16df061528a502bd7 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 23 Sep 2018 15:25:51 +0300 Subject: [PATCH 05/14] saveManeger --- OWTrack/saveManeger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index f5b6936..e2df361 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -49,7 +49,7 @@ namespace OWTrack { try { - return JsonConvert.DeserializeObject(File.ReadAllText(Directory.GetCurrentDirectory() + "/data.json")); + return JsonConvert.DeserializeObject(File.ReadAllText(customPath + "/data.json")); } catch (Exception e) { From 3500430109836218624bcc5f7abb5e3b47d97d09 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 23 Sep 2018 16:08:46 +0300 Subject: [PATCH 06/14] use of save maneger --- OWTrack/MainForm.cs | 2 +- OWTrack/saveManeger.cs | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index da59458..beab07b 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -157,7 +157,7 @@ namespace OWTrack } else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff(); srTextBox.Text = null; - File.WriteAllText(Directory.GetCurrentDirectory() + "/saves/data.json", JsonConvert.SerializeObject(tr)); + saveManeger.SaveJSON(tr); } #region Events diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index e2df361..0ac4cb9 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -32,6 +32,10 @@ namespace OWTrack { private static string savesPath = Directory.GetCurrentDirectory() + "/saves/data.json"; + /// + /// Deserialize saved tracker instance. + /// + /// public static Tracker GetSavedTracker() { try @@ -44,7 +48,6 @@ namespace OWTrack } } - //TODO: use para public static Tracker GetSavedTracker(string customPath) { try @@ -57,11 +60,16 @@ namespace OWTrack } } + /// + ///Saves the Tracker Object. + /// + /// + /// public static bool SaveJSON(Tracker tracker) { try { - File.WriteAllText(Directory.GetCurrentDirectory() + "/data.json", JsonConvert.SerializeObject(tracker)); + File.WriteAllText(savesPath, JsonConvert.SerializeObject(tracker)); return true; } catch (Exception) @@ -70,6 +78,10 @@ namespace OWTrack } } + /// + /// Check if a 'data.json' exists in the default location '../saves/data.json'. + /// + /// Boolean Value public static bool saveExist() { try From f3f2b71d68e5abfa62783717b60ca398b7212e6b Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 23 Sep 2018 16:31:18 +0300 Subject: [PATCH 07/14] Design Done --- OWTrack/MainForm.Designer.cs | 117 ++++++++++++++++++++++------- OWTrack/MainForm.resx | 139 +++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+), 28 deletions(-) diff --git a/OWTrack/MainForm.Designer.cs b/OWTrack/MainForm.Designer.cs index 1e31cf7..62e7d35 100644 --- a/OWTrack/MainForm.Designer.cs +++ b/OWTrack/MainForm.Designer.cs @@ -49,12 +49,18 @@ this.srLabel = new System.Windows.Forms.Label(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.label5 = new System.Windows.Forms.Label(); + this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); + this.SettingsGroup = new System.Windows.Forms.GroupBox(); + this.SRCheckBx = new System.Windows.Forms.CheckBox(); + this.ExeTrackCheckBx = new System.Windows.Forms.CheckBox(); + this.ChngOWPathBtn = new System.Windows.Forms.Button(); + this.SettingsGroup.SuspendLayout(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 36); + this.label1.Location = new System.Drawing.Point(17, 36); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(75, 13); this.label1.TabIndex = 0; @@ -79,7 +85,7 @@ // Time // this.Time.AutoSize = true; - this.Time.Location = new System.Drawing.Point(15, 13); + this.Time.Location = new System.Drawing.Point(20, 13); this.Time.Name = "Time"; this.Time.Size = new System.Drawing.Size(35, 13); this.Time.TabIndex = 2; @@ -88,39 +94,39 @@ // Wins // this.Wins.AutoSize = true; - this.Wins.Font = new System.Drawing.Font("Miriam Mono CLM", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177))); + this.Wins.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177))); this.Wins.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.Wins.Location = new System.Drawing.Point(107, 78); + this.Wins.Location = new System.Drawing.Point(162, 78); this.Wins.Name = "Wins"; - this.Wins.Size = new System.Drawing.Size(40, 42); + this.Wins.Size = new System.Drawing.Size(39, 42); this.Wins.TabIndex = 3; this.Wins.Text = "0"; // // Losses // this.Losses.AutoSize = true; - this.Losses.Font = new System.Drawing.Font("Miriam Mono CLM", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177))); + this.Losses.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177))); this.Losses.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.Losses.Location = new System.Drawing.Point(176, 78); + this.Losses.Location = new System.Drawing.Point(231, 78); this.Losses.Name = "Losses"; - this.Losses.Size = new System.Drawing.Size(40, 42); + this.Losses.Size = new System.Drawing.Size(39, 42); this.Losses.TabIndex = 4; this.Losses.Text = "0"; // // label3 // this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Miriam Mono CLM", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177))); + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177))); this.label3.ForeColor = System.Drawing.Color.Black; - this.label3.Location = new System.Drawing.Point(151, 75); + this.label3.Location = new System.Drawing.Point(206, 75); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(40, 42); + this.label3.Size = new System.Drawing.Size(28, 42); this.label3.TabIndex = 5; this.label3.Text = ":"; // // WinBut // - this.WinBut.Location = new System.Drawing.Point(106, 136); + this.WinBut.Location = new System.Drawing.Point(161, 136); this.WinBut.Name = "WinBut"; this.WinBut.Size = new System.Drawing.Size(52, 26); this.WinBut.TabIndex = 6; @@ -130,7 +136,7 @@ // // button2 // - this.button2.Location = new System.Drawing.Point(164, 136); + this.button2.Location = new System.Drawing.Point(219, 136); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(52, 26); this.button2.TabIndex = 6; @@ -143,7 +149,7 @@ this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.Black; - this.label2.Location = new System.Drawing.Point(142, 76); + this.label2.Location = new System.Drawing.Point(197, 76); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(31, 42); this.label2.TabIndex = 5; @@ -161,7 +167,7 @@ // // reduceLossBut // - this.reduceLossBut.Location = new System.Drawing.Point(222, 137); + this.reduceLossBut.Location = new System.Drawing.Point(277, 137); this.reduceLossBut.Name = "reduceLossBut"; this.reduceLossBut.Size = new System.Drawing.Size(20, 24); this.reduceLossBut.TabIndex = 8; @@ -171,7 +177,7 @@ // // reduceWinBut // - this.reduceWinBut.Location = new System.Drawing.Point(82, 137); + this.reduceWinBut.Location = new System.Drawing.Point(137, 137); this.reduceWinBut.Name = "reduceWinBut"; this.reduceWinBut.Size = new System.Drawing.Size(20, 24); this.reduceWinBut.TabIndex = 9; @@ -181,17 +187,17 @@ // // clearBut // - this.clearBut.Location = new System.Drawing.Point(271, 200); + this.clearBut.Location = new System.Drawing.Point(19, 103); this.clearBut.Name = "clearBut"; - this.clearBut.Size = new System.Drawing.Size(49, 25); + this.clearBut.Size = new System.Drawing.Size(75, 25); this.clearBut.TabIndex = 10; - this.clearBut.Text = "clear"; + this.clearBut.Text = "Clear stats"; this.clearBut.UseVisualStyleBackColor = true; this.clearBut.Click += new System.EventHandler(this.clearBut_Click); // // srTextBox // - this.srTextBox.Location = new System.Drawing.Point(114, 168); + this.srTextBox.Location = new System.Drawing.Point(169, 168); this.srTextBox.Name = "srTextBox"; this.srTextBox.Size = new System.Drawing.Size(100, 20); this.srTextBox.TabIndex = 11; @@ -199,7 +205,7 @@ // // srBut // - this.srBut.Location = new System.Drawing.Point(129, 194); + this.srBut.Location = new System.Drawing.Point(184, 194); this.srBut.Name = "srBut"; this.srBut.Size = new System.Drawing.Size(75, 23); this.srBut.TabIndex = 12; @@ -210,11 +216,11 @@ // srLabel // this.srLabel.AutoSize = true; - this.srLabel.Font = new System.Drawing.Font("Noto Mono", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.srLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.srLabel.ForeColor = System.Drawing.Color.DarkOrchid; this.srLabel.Location = new System.Drawing.Point(189, 36); this.srLabel.Name = "srLabel"; - this.srLabel.Size = new System.Drawing.Size(65, 23); + this.srLabel.Size = new System.Drawing.Size(46, 24); this.srLabel.TabIndex = 13; this.srLabel.Text = "0 - 0"; // @@ -227,17 +233,66 @@ // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(190, 13); + this.label5.Location = new System.Drawing.Point(180, 13); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(87, 13); this.label5.TabIndex = 14; this.label5.Text = "Start - Gain/Loss"; // - // Form1 + // notifyIcon1 + // + this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); + this.notifyIcon1.Text = "OWtrack"; + this.notifyIcon1.Visible = true; + // + // SettingsGroup + // + this.SettingsGroup.Controls.Add(this.ChngOWPathBtn); + this.SettingsGroup.Controls.Add(this.ExeTrackCheckBx); + this.SettingsGroup.Controls.Add(this.SRCheckBx); + this.SettingsGroup.Controls.Add(this.clearBut); + this.SettingsGroup.Location = new System.Drawing.Point(12, 62); + this.SettingsGroup.Name = "SettingsGroup"; + this.SettingsGroup.Size = new System.Drawing.Size(116, 143); + this.SettingsGroup.TabIndex = 15; + this.SettingsGroup.TabStop = false; + this.SettingsGroup.Text = "Settings"; + // + // SRCheckBx + // + this.SRCheckBx.AutoSize = true; + this.SRCheckBx.Location = new System.Drawing.Point(11, 19); + this.SRCheckBx.Name = "SRCheckBx"; + this.SRCheckBx.Size = new System.Drawing.Size(86, 17); + this.SRCheckBx.TabIndex = 0; + this.SRCheckBx.Text = "SR Tracking"; + this.SRCheckBx.UseVisualStyleBackColor = true; + // + // ExeTrackCheckBx + // + this.ExeTrackCheckBx.AutoSize = true; + this.ExeTrackCheckBx.Location = new System.Drawing.Point(11, 44); + this.ExeTrackCheckBx.Name = "ExeTrackCheckBx"; + this.ExeTrackCheckBx.Size = new System.Drawing.Size(90, 17); + this.ExeTrackCheckBx.TabIndex = 0; + this.ExeTrackCheckBx.Text = "OW Tracking"; + this.ExeTrackCheckBx.UseVisualStyleBackColor = true; + // + // ChngOWPathBtn + // + this.ChngOWPathBtn.Location = new System.Drawing.Point(19, 74); + this.ChngOWPathBtn.Name = "ChngOWPathBtn"; + this.ChngOWPathBtn.Size = new System.Drawing.Size(75, 23); + this.ChngOWPathBtn.TabIndex = 1; + this.ChngOWPathBtn.Text = "OW Path"; + this.ChngOWPathBtn.UseVisualStyleBackColor = true; + // + // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(332, 237); + this.ClientSize = new System.Drawing.Size(342, 237); + this.Controls.Add(this.SettingsGroup); this.Controls.Add(this.label5); this.Controls.Add(this.srLabel); this.Controls.Add(this.srBut); @@ -245,7 +300,6 @@ this.Controls.Add(this.Time); this.Controls.Add(this.status); this.Controls.Add(this.label1); - this.Controls.Add(this.clearBut); this.Controls.Add(this.reduceWinBut); this.Controls.Add(this.reduceLossBut); this.Controls.Add(this.label4); @@ -258,9 +312,11 @@ this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "Form1"; + this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "OWTrack"; + this.SettingsGroup.ResumeLayout(false); + this.SettingsGroup.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -287,6 +343,11 @@ private System.Windows.Forms.Label srLabel; private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.Label label5; + private System.Windows.Forms.NotifyIcon notifyIcon1; + private System.Windows.Forms.GroupBox SettingsGroup; + private System.Windows.Forms.CheckBox ExeTrackCheckBx; + private System.Windows.Forms.CheckBox SRCheckBx; + private System.Windows.Forms.Button ChngOWPathBtn; } } diff --git a/OWTrack/MainForm.resx b/OWTrack/MainForm.resx index 478509f..c9e4c22 100644 --- a/OWTrack/MainForm.resx +++ b/OWTrack/MainForm.resx @@ -123,7 +123,146 @@ 104, 17 + + 244, 17 + + + + AAABAAMAICAAAAEAIACoEAAANgAAABgYAAABACAAiAkAAN4QAAAQEAAAAQAgAGgEAABmGgAAKAAAACAA + AABAAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA + AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAA////zP///8z////M////zP///8z/AAAA/////////////////wAA + AP///8z////M////zP///8z////M////zP///8z/AAAA////zP///8z////M/wAAAP8AAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD////M////zP8AAAD/AAAA//// + /////////////wAAAP///8z////M////zP///8z////M////zP8AAAD////M////zP///8z/AAAA/wAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/ZpnM/2aZzP8AAAD/AAAA/zPM + //8zzP//AAAA/////////////////wAAAP///8z////M////zP///8z////M////zP///8z////M//// + zP8AAAD/AAAAAAAAAABERET/AAAA/wAAAP9ERET/AAAAAAAAAAAAAAAAAAAA/2aZzP9mmcz/ZpnM/2aZ + zP9mmcz/AAAA/zPM//8zzP//AAAA/////////////////wAAAP8AAAD/AAAA////zP///8z////M//// + zP///8z////M/wAAAP8AAAAAAAAA/5lm//8AM5n/ADOZ/wAzmf8AAAD/AAAAAAAAAAAAAAAAAAAA/wAA + AP8AAAD/AAAA/2aZzP9mmcz/AAAA/zPM//8zzP//AAAA/////////////////wAAAP///8z////M//// + zP///8z////M////zP///8z/AAAA/0RERP8AM5n/mWb//wAAAP8AAAD/mWb//wAzmf9ERET/AAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAA/2aZzP9mmcz/AAAA/zPM//8zzP//AAAA/////////////////wAA + AP///8z////M////zP///8z/AAAA/wAAAP8AAAAAAAAA/5lm//8AAAD/AAAAAAAAAAAAAAD/ADOZ/wAA + AP8AAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP//////AAAA/2aZzP9mmcz/AAAA/zPM//8zzP//AAAA//// + /////////////wAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAD/mZn//wAAAP8AAAAAAAAAAAAA + AP8AM5n/AAAA/wAAAAAAAAAAAAAA/zMz//8zM///MzP//wAAAP8AAAD/AAAA/2aZzP8AAAD/M8z//zPM + //8zzP//AAAA//////8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAERERP+Zmf//mZn//wAA + AP8AAAD/ADOZ/wAzmf9ERET/AAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/MzP//zMz//8AAAD/ZpnM/wAA + AP8zzP//M8z//zPM//8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AP/M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D/AAAA/wAAAP8AAAD/AAAA/wAAAP8zzP//M8z//zPM//8zzP//M8z//zPM + //8AAAD/AAAA/zPM//8AAAD/AAAA/wAAAAAAAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAP8AAAD/M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM + //8AAAD/M8z//wAAAP8zzP//AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAD/M8z//zPM//8zzP//M8z//wAAAP8AAAD/AAAA/wAAAP9VVVX/M8z//zPM + //8zzP//M8z//zPM//8AAAD/AAAA/zPM//8zzP//M8z//wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8zzP//M8z//zPM//8AAAD////M////zP///8z////M/wAA + AP8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//wAAAP8AAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA////zP///8z/AAAA//// + zP///////////wAAAP8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//AAAA/wAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7u7v/AAAA//// + zP//////////////////////AAAA/zPM//8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM + //8zzP//AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAD///////////////////////////8AAAD/M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM + //8zzP//M8z//zPM//8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAALu7u/8AAAD/////////////////AAAA/zPM//8zzP//M8z//zPM//8zzP//M8z//zPM + //8zzP//M8z//zPM//8zzP//M8z//wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAALu7u/8AAAD/VVVV/wAAAP8zzP//M8z//zPM//8zzP//M8z//zPM + //8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/M8z//zPM//8zzP//M8z//zPM + //8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/M8z//zPM + //8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//AAAA/wAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAD/M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//zPM//8zzP//M8z//wAAAP8AAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAD/M8z//zPM//8zzP//M8z//zPM//8zzP//AAAA/zPM//8AAAD/AAAAAAAA + AP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAA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APAAAAD4AAAAAAAAAAgAAAAIBwAADA8AAOAPAACAAwAAwAMAAMAH + AADAAwAA8AMAAPADAAD8BwAA/gcAAP8HAAA= + + AAABAAMAICAAAAEAIACoEAAANgAAABgYAAABACAAiAkAAN4QAAAQEAAAAQAgAGgEAABmGgAAKAAAACAA From a77e5684c35b2201d45696482eddf855af76e989 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Wed, 26 Sep 2018 15:58:17 +0300 Subject: [PATCH 08/14] Paths enum (to be built) --- OWTrack/saveManeger.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index e2df361..58480a0 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -30,6 +30,11 @@ namespace OWTrack { class saveManeger { + public enum Paths + { + saves = "/saves/data.json", + saveJsonFile = "/data.json", + }; private static string savesPath = Directory.GetCurrentDirectory() + "/saves/data.json"; public static Tracker GetSavedTracker() From ccc2028b7f8a6e9c7e8c2f5af37cd39261b7f5af Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 27 Sep 2018 10:17:17 +0300 Subject: [PATCH 09/14] Paths class --- OWTrack/MainForm.cs | 10 ++++------ OWTrack/saveManeger.cs | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index da59458..5a09b97 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -32,7 +32,6 @@ namespace OWTrack Tracker tr = new Tracker(); private const string IS_RUNNING = "Running"; private const string NOT_RUNNING = " Not running"; - private string savesPath = Directory.GetCurrentDirectory() + "/saves/data.json"; private bool SRonce = false; public MainForm() @@ -82,7 +81,7 @@ namespace OWTrack { try { - using (StreamReader st = new StreamReader(savesPath)) + using (StreamReader st = new StreamReader(Paths.SAVES)) { string line = st.ReadLine(); if (line.Contains("Overwatch.exe")) @@ -122,9 +121,8 @@ namespace OWTrack if (result == DialogResult.OK) { - //tr.gamePath = openFileDialog1.FileName; MessageBox.Show("Saved Overwatch.exe location.\nPress Clear to rest"); - return openFileDialog1.FileName; + return openFileDialog1.FileName; } else { @@ -137,7 +135,7 @@ namespace OWTrack { try { - return JsonConvert.DeserializeObject(File.ReadAllText(savesPath)); + return JsonConvert.DeserializeObject(File.ReadAllText(Paths.SAVES)); } catch (Exception e) { @@ -157,7 +155,7 @@ namespace OWTrack } else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff(); srTextBox.Text = null; - File.WriteAllText(Directory.GetCurrentDirectory() + "/saves/data.json", JsonConvert.SerializeObject(tr)); + File.WriteAllText(Paths.SAVES, JsonConvert.SerializeObject(tr)); } #region Events diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index 58480a0..8e83a88 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -28,20 +28,20 @@ using System.Threading.Tasks; namespace OWTrack { - class saveManeger + static class Paths { - public enum Paths - { - saves = "/saves/data.json", - saveJsonFile = "/data.json", - }; - private static string savesPath = Directory.GetCurrentDirectory() + "/saves/data.json"; + private static string curDir = Directory.GetCurrentDirectory(); + public static string SAVES = curDir + "/saves/data.json"; + public static string JSON = curDir + "/data.json"; + } + class saveManeger + { public static Tracker GetSavedTracker() { try { - return JsonConvert.DeserializeObject(File.ReadAllText(savesPath)); + return JsonConvert.DeserializeObject(File.ReadAllText(Paths.SAVES)); } catch (Exception e) { @@ -54,7 +54,7 @@ namespace OWTrack { try { - return JsonConvert.DeserializeObject(File.ReadAllText(customPath + "/data.json")); + return JsonConvert.DeserializeObject(File.ReadAllText(customPath)); } catch (Exception e) { @@ -66,7 +66,7 @@ namespace OWTrack { try { - File.WriteAllText(Directory.GetCurrentDirectory() + "/data.json", JsonConvert.SerializeObject(tracker)); + File.WriteAllText(Paths.JSON, JsonConvert.SerializeObject(tracker)); return true; } catch (Exception) @@ -79,7 +79,7 @@ namespace OWTrack { try { - if (File.Exists(savesPath)) + if (File.Exists(Paths.SAVES)) { return true; } From b7e1bf3792667389839da29c547f49170648cf63 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 27 Sep 2018 10:29:30 +0300 Subject: [PATCH 10/14] fixed bug --- OWTrack/saveManeger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index 0c7d370..84f2045 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -74,7 +74,7 @@ namespace OWTrack { try { - File.WriteAllText(Directory.GetCurrentDirectory() + "/data.json", JsonConvert.SerializeObject(tracker)); + File.WriteAllText(Paths.SAVES, JsonConvert.SerializeObject(tracker)); return true; } catch (Exception) From 713b43b3a70134b435b657f014dd68fa2261e332 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 27 Sep 2018 10:34:14 +0300 Subject: [PATCH 11/14] refactor --- OWTrack/Tracker.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index d734ecd..bcb0994 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -34,10 +34,10 @@ namespace OWTrack public void Track() { }//Deserailize here public void reset() { wins = 0; losses = 0; startSR = 0; newSR = 0; gamePath = null; } - public void addWin() { wins++; } - public void addLoss() { losses++; } - public void reduceWin() { wins--; } - public void rediceLoss() { losses--; } + public void addWin() => wins++; + public void addLoss() => losses++; + public void reduceWin() => wins--; + public void rediceLoss() => losses--; public int GetWins() { return wins; } public int GetLosses() { return losses; } public int GetTotalMatches() { return wins + losses; } From b02b0ee65b04f5237cb8513d5710afda1c4a749b Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 27 Sep 2018 11:06:24 +0300 Subject: [PATCH 12/14] settings form done --- OWTrack/MainForm.Designer.cs | 71 ++++++++++++++++++++---------------- OWTrack/MainForm.cs | 38 +++++++++++++++++-- OWTrack/Tracker.cs | 23 +++++++----- 3 files changed, 88 insertions(+), 44 deletions(-) diff --git a/OWTrack/MainForm.Designer.cs b/OWTrack/MainForm.Designer.cs index 62e7d35..c244b4e 100644 --- a/OWTrack/MainForm.Designer.cs +++ b/OWTrack/MainForm.Designer.cs @@ -48,12 +48,12 @@ this.srBut = new System.Windows.Forms.Button(); this.srLabel = new System.Windows.Forms.Label(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.label5 = new System.Windows.Forms.Label(); + this.SRInfoLabel = new System.Windows.Forms.Label(); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.SettingsGroup = new System.Windows.Forms.GroupBox(); - this.SRCheckBx = new System.Windows.Forms.CheckBox(); - this.ExeTrackCheckBx = new System.Windows.Forms.CheckBox(); this.ChngOWPathBtn = new System.Windows.Forms.Button(); + this.ExeTrackCheckBx = new System.Windows.Forms.CheckBox(); + this.SRCheckBx = new System.Windows.Forms.CheckBox(); this.SettingsGroup.SuspendLayout(); this.SuspendLayout(); // @@ -230,14 +230,14 @@ this.openFileDialog1.InitialDirectory = "C:\\"; this.openFileDialog1.RestoreDirectory = true; // - // label5 + // SRInfoLabel // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(180, 13); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(87, 13); - this.label5.TabIndex = 14; - this.label5.Text = "Start - Gain/Loss"; + this.SRInfoLabel.AutoSize = true; + this.SRInfoLabel.Location = new System.Drawing.Point(180, 13); + this.SRInfoLabel.Name = "SRInfoLabel"; + this.SRInfoLabel.Size = new System.Drawing.Size(87, 13); + this.SRInfoLabel.TabIndex = 14; + this.SRInfoLabel.Text = "Start - Gain/Loss"; // // notifyIcon1 // @@ -258,26 +258,6 @@ this.SettingsGroup.TabStop = false; this.SettingsGroup.Text = "Settings"; // - // SRCheckBx - // - this.SRCheckBx.AutoSize = true; - this.SRCheckBx.Location = new System.Drawing.Point(11, 19); - this.SRCheckBx.Name = "SRCheckBx"; - this.SRCheckBx.Size = new System.Drawing.Size(86, 17); - this.SRCheckBx.TabIndex = 0; - this.SRCheckBx.Text = "SR Tracking"; - this.SRCheckBx.UseVisualStyleBackColor = true; - // - // ExeTrackCheckBx - // - this.ExeTrackCheckBx.AutoSize = true; - this.ExeTrackCheckBx.Location = new System.Drawing.Point(11, 44); - this.ExeTrackCheckBx.Name = "ExeTrackCheckBx"; - this.ExeTrackCheckBx.Size = new System.Drawing.Size(90, 17); - this.ExeTrackCheckBx.TabIndex = 0; - this.ExeTrackCheckBx.Text = "OW Tracking"; - this.ExeTrackCheckBx.UseVisualStyleBackColor = true; - // // ChngOWPathBtn // this.ChngOWPathBtn.Location = new System.Drawing.Point(19, 74); @@ -286,6 +266,33 @@ this.ChngOWPathBtn.TabIndex = 1; this.ChngOWPathBtn.Text = "OW Path"; this.ChngOWPathBtn.UseVisualStyleBackColor = true; + this.ChngOWPathBtn.Click += new System.EventHandler(this.ChngOWPathBtn_Click); + // + // ExeTrackCheckBx + // + this.ExeTrackCheckBx.AutoSize = true; + this.ExeTrackCheckBx.Checked = true; + this.ExeTrackCheckBx.CheckState = System.Windows.Forms.CheckState.Checked; + this.ExeTrackCheckBx.Location = new System.Drawing.Point(11, 44); + this.ExeTrackCheckBx.Name = "ExeTrackCheckBx"; + this.ExeTrackCheckBx.Size = new System.Drawing.Size(90, 17); + this.ExeTrackCheckBx.TabIndex = 0; + this.ExeTrackCheckBx.Text = "OW Tracking"; + this.ExeTrackCheckBx.UseVisualStyleBackColor = true; + this.ExeTrackCheckBx.CheckedChanged += new System.EventHandler(this.ExeTrackCheckBx_CheckedChanged); + // + // SRCheckBx + // + this.SRCheckBx.AutoSize = true; + this.SRCheckBx.Checked = true; + this.SRCheckBx.CheckState = System.Windows.Forms.CheckState.Checked; + this.SRCheckBx.Location = new System.Drawing.Point(11, 19); + this.SRCheckBx.Name = "SRCheckBx"; + this.SRCheckBx.Size = new System.Drawing.Size(86, 17); + this.SRCheckBx.TabIndex = 0; + this.SRCheckBx.Text = "SR Tracking"; + this.SRCheckBx.UseVisualStyleBackColor = true; + this.SRCheckBx.CheckedChanged += new System.EventHandler(this.SRCheckBx_CheckedChanged); // // MainForm // @@ -293,7 +300,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(342, 237); this.Controls.Add(this.SettingsGroup); - this.Controls.Add(this.label5); + this.Controls.Add(this.SRInfoLabel); this.Controls.Add(this.srLabel); this.Controls.Add(this.srBut); this.Controls.Add(this.srTextBox); @@ -342,7 +349,7 @@ private System.Windows.Forms.Button srBut; private System.Windows.Forms.Label srLabel; private System.Windows.Forms.OpenFileDialog openFileDialog1; - private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label SRInfoLabel; private System.Windows.Forms.NotifyIcon notifyIcon1; private System.Windows.Forms.GroupBox SettingsGroup; private System.Windows.Forms.CheckBox ExeTrackCheckBx; diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index da59458..9f657d2 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -24,7 +24,6 @@ using System.Windows.Forms; using Newtonsoft.Json; using System.IO; - namespace OWTrack { public partial class MainForm : Form @@ -57,8 +56,12 @@ namespace OWTrack } else { - status.Text = NOT_RUNNING; - status.ForeColor = Color.Black; + if (tr.TrackOW) + { + status.Text = NOT_RUNNING; + status.ForeColor = Color.Black; + } + else status.Text = ""; } } catch (Exception e) @@ -146,6 +149,17 @@ namespace OWTrack } } + private void SRSystem(bool state) + { + srBut.Enabled = state; + srTextBox.Enabled = state; + } + + private void OWTrackFunc(bool state) + { + tr.TrackOW = state; + } + private void update() { Wins.Text = tr.GetWins().ToString(); @@ -227,6 +241,24 @@ namespace OWTrack } update(); } + + private void SRCheckBx_CheckedChanged(object sender, EventArgs e) + { + SRSystem(SRCheckBx.Checked); + } + + private void ExeTrackCheckBx_CheckedChanged(object sender, EventArgs e) + { + OWTrackFunc(ExeTrackCheckBx.Checked); + } + + private void ChngOWPathBtn_Click(object sender, EventArgs e) + { + tr.gamePath = getGamePath(); + } + #endregion + + } } diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index d734ecd..c243f68 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -43,20 +43,25 @@ namespace OWTrack public int GetTotalMatches() { return wins + losses; } public void setNewSR(int SR) { newSR = SR; } public int srDiff() { return newSR - startSR; } + public bool TrackOW = true; public bool owRunning() { - try + if (TrackOW) { - bool isRunning = Process.GetProcessesByName("Overwatch") - .FirstOrDefault(p => p.MainModule.FileName.StartsWith(gamePath)) != default(Process); - return isRunning; - } - catch (Exception) - { - Exception ex = new Exception("Error"); - throw ex; + try + { + bool isRunning = Process.GetProcessesByName("Overwatch") + .FirstOrDefault(p => p.MainModule.FileName.StartsWith(gamePath)) != default(Process); + return isRunning; + } + catch (Exception) + { + Exception ex = new Exception("Error"); + throw ex; + } } + else return false; } public bool LoacteOW() From 7be0e816f11621ba9f58da8273f47e7795fe652a Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 27 Sep 2018 11:24:32 +0300 Subject: [PATCH 13/14] New Save Parameters --- OWTrack/MainForm.cs | 30 +++++++++++------------------- OWTrack/Tracker.cs | 1 + 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/OWTrack/MainForm.cs b/OWTrack/MainForm.cs index 445c524..ddf3b21 100644 --- a/OWTrack/MainForm.cs +++ b/OWTrack/MainForm.cs @@ -107,14 +107,16 @@ namespace OWTrack { MessageBox.Show(e.Message); } - update(); } else if (!tr.LoacteOW()) { tr.gamePath = getGamePath(); } - } - + ExeTrackCheckBx.Checked = tr.TrackOW; + SRCheckBx.Checked = tr.TrackSR; + update(); + } + private string getGamePath() { openFileDialog1.Title = "Select Overwatch.exe"; @@ -129,28 +131,15 @@ namespace OWTrack } else { - update(); return null; } - } - - private Tracker savedTracker() - { - try - { - return JsonConvert.DeserializeObject(File.ReadAllText(Paths.SAVES)); - } - catch (Exception e) - { - MessageBox.Show(e.Message); - return null; - } - } + } private void SRSystem(bool state) { srBut.Enabled = state; srTextBox.Enabled = state; + tr.TrackSR = state; } private void OWTrackFunc(bool state) @@ -242,17 +231,20 @@ namespace OWTrack private void SRCheckBx_CheckedChanged(object sender, EventArgs e) { - SRSystem(SRCheckBx.Checked); + SRSystem(SRCheckBx.Checked); + update(); } private void ExeTrackCheckBx_CheckedChanged(object sender, EventArgs e) { OWTrackFunc(ExeTrackCheckBx.Checked); + update(); } private void ChngOWPathBtn_Click(object sender, EventArgs e) { tr.gamePath = getGamePath(); + update(); } #endregion diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index 3a8a66c..58ab0c2 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -44,6 +44,7 @@ namespace OWTrack public void setNewSR(int SR) { newSR = SR; } public int srDiff() { return newSR - startSR; } public bool TrackOW = true; + public bool TrackSR = true; public bool owRunning() { From 05ab987a682555d5653a23302c222bd2f13fb4e4 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 27 Sep 2018 11:30:11 +0300 Subject: [PATCH 14/14] Version --- OWTrack/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OWTrack/Program.cs b/OWTrack/Program.cs index a9a0b63..78d94a1 100644 --- a/OWTrack/Program.cs +++ b/OWTrack/Program.cs @@ -18,7 +18,7 @@ namespace OWTrack Application.Run(new MainForm()); } - public static string Version { get; } = "1.4.1a1"; + public static string Version { get; } = "1.4.1"; //public static string Version = Application.ProductVersion; //public static Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;