From 5a24431dafb91d7dcf9eea9f27c2927271abf309 Mon Sep 17 00:00:00 2001 From: Devin Rowan Date: Tue, 20 Dec 2022 21:10:59 -0600 Subject: [PATCH 1/3] feat(settings): Add checkbox to enable or disable component Adds a checkbox to allow the user to disable the component, which will prevent split information from being uploaded when not desired Adds a setting to the XML settings, "IsEnabled", which is bound to the checkbox --- UI/Components/CollectorComponent.cs | 4 ++-- UI/Components/CollectorSettings.Designer.cs | 23 ++++++++++++++++++--- UI/Components/CollectorSettings.cs | 12 ++++++++++- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/UI/Components/CollectorComponent.cs b/UI/Components/CollectorComponent.cs index 5e0669f..f887f28 100644 --- a/UI/Components/CollectorComponent.cs +++ b/UI/Components/CollectorComponent.cs @@ -162,7 +162,7 @@ public async void HandleResume(object sender, object e) // TODO: Log or tell user when splits are invalid or when an error occurs. Don't just continue silently. public async void HandleSplit(object sender, object e) { - if (!AreSplitsValid()) return; + if (!AreSplitsValid() || !Settings.IsEnabled) return; try { @@ -176,7 +176,7 @@ public async void HandleSplit(object sender, object e) public async void HandleReset(object sender, TimerPhase value) { - if (!AreSplitsValid()) return; + if (!AreSplitsValid() || !Settings.IsEnabled) return; try { diff --git a/UI/Components/CollectorSettings.Designer.cs b/UI/Components/CollectorSettings.Designer.cs index 886a425..46e580c 100644 --- a/UI/Components/CollectorSettings.Designer.cs +++ b/UI/Components/CollectorSettings.Designer.cs @@ -31,6 +31,7 @@ private void InitializeComponent() this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.txtPath = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -41,17 +42,19 @@ private void InitializeComponent() this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Controls.Add(this.txtPath, 1, 0); this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.checkBox1, 1, 1); this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 67F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(476, 141); this.tableLayoutPanel1.TabIndex = 0; // // txtPath // this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtPath.Location = new System.Drawing.Point(85, 60); + this.txtPath.Location = new System.Drawing.Point(85, 27); this.txtPath.Name = "txtPath"; this.txtPath.Size = new System.Drawing.Size(388, 20); this.txtPath.TabIndex = 2; @@ -62,13 +65,26 @@ private void InitializeComponent() // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 64); + this.label1.Location = new System.Drawing.Point(3, 30); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(76, 13); this.label1.TabIndex = 1; this.label1.Text = "Upload Key"; this.label1.Click += new System.EventHandler(this.label1_Click); // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Checked = true; + this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox1.Location = new System.Drawing.Point(85, 77); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(65, 17); + this.checkBox1.TabIndex = 3; + this.checkBox1.Text = "Enabled"; + this.checkBox1.UseVisualStyleBackColor = true; + this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + // // CollectorSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -88,5 +104,6 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Label label1; public System.Windows.Forms.TextBox txtPath; + private System.Windows.Forms.CheckBox checkBox1; } } diff --git a/UI/Components/CollectorSettings.cs b/UI/Components/CollectorSettings.cs index 22ee38e..834e63e 100644 --- a/UI/Components/CollectorSettings.cs +++ b/UI/Components/CollectorSettings.cs @@ -10,14 +10,17 @@ public partial class CollectorSettings : UserControl public LayoutMode Mode { get; set; } public string Path { get; set; } + public bool IsEnabled { get; set; } public CollectorSettings() { InitializeComponent(); txtPath.DataBindings.Add("Text", this, "Path", false, DataSourceUpdateMode.OnPropertyChanged); + checkBox1.DataBindings.Add("Checked", this, "IsEnabled", false, DataSourceUpdateMode.OnPropertyChanged); Path = ""; + IsEnabled = true; } public void SetSettings(XmlNode node) @@ -26,6 +29,7 @@ public void SetSettings(XmlNode node) Version version = SettingsHelper.ParseVersion(element["Version"]); Path = SettingsHelper.ParseString(element["Path"]); + IsEnabled = SettingsHelper.ParseBool(element["IsEnabled"]); } public XmlNode GetSettings(XmlDocument document) @@ -43,7 +47,8 @@ public int GetSettingsHashCode() private int CreateSettingsNode(XmlDocument document, XmlElement parent) { return SettingsHelper.CreateSetting(document, parent, "Version", "1.0.0") ^ - SettingsHelper.CreateSetting(document, parent, "Path", Path); + SettingsHelper.CreateSetting(document, parent, "Path", Path) ^ + SettingsHelper.CreateSetting(document, parent, "IsEnabled", IsEnabled); } private void txtPath_TextChanged(object sender, EventArgs e) @@ -55,5 +60,10 @@ private void label1_Click(object sender, EventArgs e) { } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + + } } } From 4a2c0ba95604b19385822349c98ecfa7a4084974 Mon Sep 17 00:00:00 2001 From: Devin Rowan Date: Tue, 20 Dec 2022 21:13:13 -0600 Subject: [PATCH 2/3] Change bad checkbox name to something better --- UI/Components/CollectorSettings.Designer.cs | 27 ++++++++++----------- UI/Components/CollectorSettings.cs | 7 +----- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/UI/Components/CollectorSettings.Designer.cs b/UI/Components/CollectorSettings.Designer.cs index 46e580c..2d6c088 100644 --- a/UI/Components/CollectorSettings.Designer.cs +++ b/UI/Components/CollectorSettings.Designer.cs @@ -31,7 +31,7 @@ private void InitializeComponent() this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.txtPath = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); - this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.chkIsEnabled = new System.Windows.Forms.CheckBox(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -42,7 +42,7 @@ private void InitializeComponent() this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Controls.Add(this.txtPath, 1, 0); this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.checkBox1, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.chkIsEnabled, 1, 1); this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 2; @@ -72,18 +72,17 @@ private void InitializeComponent() this.label1.Text = "Upload Key"; this.label1.Click += new System.EventHandler(this.label1_Click); // - // checkBox1 + // chkIsEnabled // - this.checkBox1.AutoSize = true; - this.checkBox1.Checked = true; - this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox1.Location = new System.Drawing.Point(85, 77); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(65, 17); - this.checkBox1.TabIndex = 3; - this.checkBox1.Text = "Enabled"; - this.checkBox1.UseVisualStyleBackColor = true; - this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + this.chkIsEnabled.AutoSize = true; + this.chkIsEnabled.Checked = true; + this.chkIsEnabled.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkIsEnabled.Location = new System.Drawing.Point(85, 77); + this.chkIsEnabled.Name = "chkIsEnabled"; + this.chkIsEnabled.Size = new System.Drawing.Size(65, 17); + this.chkIsEnabled.TabIndex = 3; + this.chkIsEnabled.Text = "Enabled"; + this.chkIsEnabled.UseVisualStyleBackColor = true; // // CollectorSettings // @@ -104,6 +103,6 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Label label1; public System.Windows.Forms.TextBox txtPath; - private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.CheckBox chkIsEnabled; } } diff --git a/UI/Components/CollectorSettings.cs b/UI/Components/CollectorSettings.cs index 834e63e..a2e01af 100644 --- a/UI/Components/CollectorSettings.cs +++ b/UI/Components/CollectorSettings.cs @@ -17,7 +17,7 @@ public CollectorSettings() InitializeComponent(); txtPath.DataBindings.Add("Text", this, "Path", false, DataSourceUpdateMode.OnPropertyChanged); - checkBox1.DataBindings.Add("Checked", this, "IsEnabled", false, DataSourceUpdateMode.OnPropertyChanged); + chkIsEnabled.DataBindings.Add("Checked", this, "IsEnabled", false, DataSourceUpdateMode.OnPropertyChanged); Path = ""; IsEnabled = true; @@ -60,10 +60,5 @@ private void label1_Click(object sender, EventArgs e) { } - - private void checkBox1_CheckedChanged(object sender, EventArgs e) - { - - } } } From 813d6c61f2617601dc320ebbf385ccefad6478ed Mon Sep 17 00:00:00 2001 From: Devin Rowan Date: Wed, 21 Dec 2022 19:29:39 -0600 Subject: [PATCH 3/3] Changed checkbox to two checkboxes, updated minor, resolved comments --- Components/LiveSplit.TheRun.dll | Bin 30720 -> 32256 bytes UI/Components/CollectorComponent.cs | 10 ++-- UI/Components/CollectorFactory.cs | 2 +- UI/Components/CollectorSettings.Designer.cs | 56 +++++++++++++------- UI/Components/CollectorSettings.cs | 19 +++++-- update.LiveSplit.TheRun.xml | 9 ++++ 6 files changed, 67 insertions(+), 29 deletions(-) diff --git a/Components/LiveSplit.TheRun.dll b/Components/LiveSplit.TheRun.dll index 8d8f21ec396d7e96a54431e448b0039619d19f99..af6382f2c8bd270104e8969187b7113f74dde9d2 100644 GIT binary patch delta 12009 zcmbVy3w%`7wf;K$%$##(CYi}(GLIxk5*}d)goh&XhJ=T_6nQFwVubK0k%>t}xk;Qv zqLl&{VNlBzd}50gZEdiYRuKwfu~@|-YDFGZu&7m0(Q>75zqQUG30m*}|GUxo_WIUZ zd+oK?-shZsW@z|aYdE9bb9aY}6U$GM^LKNi>!tuA#)>(E(S3pM^m zPw^z*AJGqZb<5?aDM9f zVEfd6hI3N!us<~_oRQico|YUZ4yt~<(_yUL!B)pnBF>CiypG6QM4?`8+K3qi@xLBj zISKRY9LX!(ka!yA+b@A*=i+GL?H5BhYs^8BtA7bY=LWXKO@xbE0B_X^H&q((U#A|3 zlxmYwha#V9Gg7Zc3$$xfpG6lZ+pF3lbSUbe^m-AX=yqNq0unK(!6~hZ@5CS~UWV~h zZBIBRc0o~fqe+#jssb2^CSHQ3P}TNsu`U+tT^CrfHPCkycec&HX=|>Ug{- zn%!K3rYO`)r|XeSh^talilTUps=uXv9qXJ_Mimc{*o~Nx_#U9$)2QOmZPgM9F%T4$`Tp1krlxL$)E13`Wre_xh&-AL80|jEITs^HRqt> zQ_(-}g}w|b9$&?;Zc!B(`0qdT?jcp%9cAe5v)csrH3pCGMT7A|yX0 z3~yEaXBN5ks`@n+dx-ct#AH1eT~)JO&lOg++$FIOT*U=N5lg(m8r%36h|vy2zTwsT zAtv4gVELpY+hVZ&vGn`41F+e9AR0-$B_t`GYy)Q%Id5pA=d>a*r$ZY(XO7Kd2V#9B zQvEifCfm_r@`*p-PSj*867ke8PDn@y5n`Tq&`ykOhh*{P~eYwpbR$02lHR@=C& zjq){8?oDzkL^_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xBT)ehXz#?hdzo$nprYanij z`TbS@+~f00lP9BZqvnL0ntdr=_FydAK-)ieX#P6YE4OMvTaWr9r*kEY*fU8sw~ zpI03x7*gs)R>FPpl|8dlan(ecFYu&r`0}Qd10=ZNZxkxh^jFLr)|x=d8)=^FlsHnw>h`*KxREp6R$RaTE**?#GlxO;GD=iiTrZd-+KCU^GL-Nql@ z_t}A_50axF-hH{%bjgGl`1T$(WaiYmxwUmO$7kj)ojE!)=jtoxE?itUbHcnOb0;ra zFmG`uX;kLQMVWVD?`0zsU9q5uE@ diff --git a/UI/Components/CollectorComponent.cs b/UI/Components/CollectorComponent.cs index f887f28..69367c6 100644 --- a/UI/Components/CollectorComponent.cs +++ b/UI/Components/CollectorComponent.cs @@ -162,7 +162,7 @@ public async void HandleResume(object sender, object e) // TODO: Log or tell user when splits are invalid or when an error occurs. Don't just continue silently. public async void HandleSplit(object sender, object e) { - if (!AreSplitsValid() || !Settings.IsEnabled) return; + if (!AreSplitsValid() || !Settings.IsLiveTrackingEnabled) return; try { @@ -176,12 +176,14 @@ public async void HandleSplit(object sender, object e) public async void HandleReset(object sender, TimerPhase value) { - if (!AreSplitsValid() || !Settings.IsEnabled) return; + if (!AreSplitsValid()) return; try { SetGameAndCategory(); - await UpdateSplitsState(); + if (Settings.IsLiveTrackingEnabled) + await UpdateSplitsState(); + await UploadSplits(); } catch { } @@ -194,6 +196,8 @@ private bool AreSplitsValid() public async Task UploadSplits() { + if (!Settings.IsStatsUploadingEnabled) return; + string UploadKey = Settings.Path; string FileName = HttpUtility.UrlEncode(GameName) + "-" + HttpUtility.UrlEncode(CategoryName) + ".lss"; string FileUploadUrl = FileUploadBaseUrl + "?filename=" + FileName + "&uploadKey=" + UploadKey; diff --git a/UI/Components/CollectorFactory.cs b/UI/Components/CollectorFactory.cs index ccaff2b..e8cec8a 100644 --- a/UI/Components/CollectorFactory.cs +++ b/UI/Components/CollectorFactory.cs @@ -21,6 +21,6 @@ public class CollectorFactory : IComponentFactory public string UpdateURL => "https://raw.githubusercontent.com/therungg/LiveSplit.TheRun/main/"; public string XMLURL => UpdateURL + "update.LiveSplit.TheRun.xml"; - public Version Version => Version.Parse("0.1.7"); + public Version Version => Version.Parse("0.2.0"); } } \ No newline at end of file diff --git a/UI/Components/CollectorSettings.Designer.cs b/UI/Components/CollectorSettings.Designer.cs index 2d6c088..ba4cf8d 100644 --- a/UI/Components/CollectorSettings.Designer.cs +++ b/UI/Components/CollectorSettings.Designer.cs @@ -31,32 +31,35 @@ private void InitializeComponent() this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.txtPath = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); - this.chkIsEnabled = new System.Windows.Forms.CheckBox(); + this.chkStatsUploadEnabled = new System.Windows.Forms.CheckBox(); + this.chkLiveTrackingEnabled = new System.Windows.Forms.CheckBox(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 82F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 139F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Controls.Add(this.txtPath, 1, 0); this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.chkIsEnabled, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.chkLiveTrackingEnabled, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.chkStatsUploadEnabled, 0, 1); this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowCount = 3; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 67F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 58F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(476, 141); this.tableLayoutPanel1.TabIndex = 0; // // txtPath // this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtPath.Location = new System.Drawing.Point(85, 27); + this.txtPath.Location = new System.Drawing.Point(142, 17); this.txtPath.Name = "txtPath"; - this.txtPath.Size = new System.Drawing.Size(388, 20); + this.txtPath.Size = new System.Drawing.Size(331, 20); this.txtPath.TabIndex = 2; this.txtPath.UseSystemPasswordChar = true; this.txtPath.TextChanged += new System.EventHandler(this.txtPath_TextChanged); @@ -65,24 +68,36 @@ private void InitializeComponent() // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 30); + this.label1.Location = new System.Drawing.Point(3, 20); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(76, 13); + this.label1.Size = new System.Drawing.Size(133, 13); this.label1.TabIndex = 1; this.label1.Text = "Upload Key"; this.label1.Click += new System.EventHandler(this.label1_Click); // - // chkIsEnabled + // chkStatsUploadEnabled // - this.chkIsEnabled.AutoSize = true; - this.chkIsEnabled.Checked = true; - this.chkIsEnabled.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkIsEnabled.Location = new System.Drawing.Point(85, 77); - this.chkIsEnabled.Name = "chkIsEnabled"; - this.chkIsEnabled.Size = new System.Drawing.Size(65, 17); - this.chkIsEnabled.TabIndex = 3; - this.chkIsEnabled.Text = "Enabled"; - this.chkIsEnabled.UseVisualStyleBackColor = true; + this.chkStatsUploadEnabled.AutoSize = true; + this.chkStatsUploadEnabled.Checked = true; + this.chkStatsUploadEnabled.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkStatsUploadEnabled.Location = new System.Drawing.Point(3, 57); + this.chkStatsUploadEnabled.Name = "chkStatsUploadEnabled"; + this.chkStatsUploadEnabled.Size = new System.Drawing.Size(123, 17); + this.chkStatsUploadEnabled.TabIndex = 3; + this.chkStatsUploadEnabled.Text = "Enable Stats Upload"; + this.chkStatsUploadEnabled.UseVisualStyleBackColor = true; + // + // chkLiveTrackingEnabled + // + this.chkLiveTrackingEnabled.AutoSize = true; + this.chkLiveTrackingEnabled.Checked = true; + this.chkLiveTrackingEnabled.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkLiveTrackingEnabled.Location = new System.Drawing.Point(3, 86); + this.chkLiveTrackingEnabled.Name = "chkLiveTrackingEnabled"; + this.chkLiveTrackingEnabled.Size = new System.Drawing.Size(127, 17); + this.chkLiveTrackingEnabled.TabIndex = 4; + this.chkLiveTrackingEnabled.Text = "Enable Live Tracking"; + this.chkLiveTrackingEnabled.UseVisualStyleBackColor = true; // // CollectorSettings // @@ -103,6 +118,7 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Label label1; public System.Windows.Forms.TextBox txtPath; - private System.Windows.Forms.CheckBox chkIsEnabled; + private System.Windows.Forms.CheckBox chkLiveTrackingEnabled; + private System.Windows.Forms.CheckBox chkStatsUploadEnabled; } } diff --git a/UI/Components/CollectorSettings.cs b/UI/Components/CollectorSettings.cs index a2e01af..50dac7e 100644 --- a/UI/Components/CollectorSettings.cs +++ b/UI/Components/CollectorSettings.cs @@ -10,17 +10,22 @@ public partial class CollectorSettings : UserControl public LayoutMode Mode { get; set; } public string Path { get; set; } - public bool IsEnabled { get; set; } + public bool IsStatsUploadingEnabled { get; set; } + public bool IsLiveTrackingEnabled { get; set; } public CollectorSettings() { InitializeComponent(); txtPath.DataBindings.Add("Text", this, "Path", false, DataSourceUpdateMode.OnPropertyChanged); - chkIsEnabled.DataBindings.Add("Checked", this, "IsEnabled", false, DataSourceUpdateMode.OnPropertyChanged); + chkStatsUploadEnabled.DataBindings.Add("Checked", this, "IsStatsUploadingEnabled", + false, DataSourceUpdateMode.OnPropertyChanged); + chkLiveTrackingEnabled.DataBindings.Add("Checked", this, "IsLiveTrackingEnabled", + false, DataSourceUpdateMode.OnPropertyChanged); Path = ""; - IsEnabled = true; + IsStatsUploadingEnabled = true; + IsLiveTrackingEnabled = true; } public void SetSettings(XmlNode node) @@ -29,7 +34,8 @@ public void SetSettings(XmlNode node) Version version = SettingsHelper.ParseVersion(element["Version"]); Path = SettingsHelper.ParseString(element["Path"]); - IsEnabled = SettingsHelper.ParseBool(element["IsEnabled"]); + IsStatsUploadingEnabled = SettingsHelper.ParseBool(element["IsStatsUploadingEnabled"]); + IsLiveTrackingEnabled = SettingsHelper.ParseBool(element["IsLiveTrackingEnabled"]); } public XmlNode GetSettings(XmlDocument document) @@ -48,7 +54,10 @@ private int CreateSettingsNode(XmlDocument document, XmlElement parent) { return SettingsHelper.CreateSetting(document, parent, "Version", "1.0.0") ^ SettingsHelper.CreateSetting(document, parent, "Path", Path) ^ - SettingsHelper.CreateSetting(document, parent, "IsEnabled", IsEnabled); + SettingsHelper.CreateSetting(document, parent, + "IsStatsUploadingEnabled", IsStatsUploadingEnabled) ^ + SettingsHelper.CreateSetting(document, parent, + "IsLiveTrackingEnabled", IsLiveTrackingEnabled); } private void txtPath_TextChanged(object sender, EventArgs e) diff --git a/update.LiveSplit.TheRun.xml b/update.LiveSplit.TheRun.xml index fcdc277..8f6d913 100644 --- a/update.LiveSplit.TheRun.xml +++ b/update.LiveSplit.TheRun.xml @@ -1,4 +1,13 @@  + + + + + + Added checkbox to layout settings to enable / disable stats uploading. + Added checkbox to layout settings to enable / disable live tracking. + +