From 79bf7b0fa374e3f92c05dfa5dae34eef83d12a0c Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 27 Jul 2017 14:16:22 +0200 Subject: Storing setting checkbox-version number association separately from BWS operations --- Aktywator/Bws.cs | 3 ++- Aktywator/MainForm.cs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Aktywator') diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 14a97ad..0e574b8 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -78,7 +78,7 @@ namespace Aktywator return sections.ToArray(); } - public void initSettings() + public List initSettings() { settings = new List(); settings.Add(new Setting("ShowResults", main.xShowResults, this, new Version(2, 0, 0), new Version(1, 3, 1))); @@ -105,6 +105,7 @@ namespace Aktywator settings.Add(new Setting("BM2RecordBidding", main.xCollectBidding, this, new Version(2, 0, 0), new Version(1, 3, 1))); settings.Add(new Setting("BM2RecordPlay", main.xCollectPlay, this, new Version(2, 0, 0), new Version(1, 3, 1))); settings.Add(new Setting("BM2ValidateLeadCard", main.xCheckLeadCard, this, new Version(3, 2, 1), new Version(2, 2, 1))); + return settings; } private string getSectionList(string table) diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index cfe2324..5999e4a 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -16,6 +16,7 @@ namespace Aktywator public string date = "28.06.2017"; private Bws bws; + private List bwsSettings; private Tournament tournament; private Version BCSVersion; @@ -65,7 +66,9 @@ namespace Aktywator bws.convert(); labelFilename.Text = filename; - bws.initSettings(); + // cloning Setting List returned from Bws, because we're going to extend it for version tracking purposes + this.bwsSettings = new List(bws.initSettings()); + this.bwsSettings.Add(new Setting("BM2ShowPlayerNames", this.xShowPlayerNames, bws, new Version(2, 0, 0), new Version(1, 3, 1))); bws.loadSettings(); this.WindowState = FormWindowState.Normal; } -- cgit v1.2.3