From ccac4f82996ef1a086de2b94dbac981bf9794494 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 27 Jul 2017 14:03:25 +0200 Subject: runBCS() is capable of running BCS from any specified location, defaulting to previously hard-coded value --- Aktywator/Bws.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Aktywator/Bws.cs') diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 335bc11..5d6e063 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -21,6 +21,7 @@ namespace Aktywator public List settings; private MainForm main; public bool settingsChanged = false; + private static string applicationPath = Common.ProgramFilesx86() + "\\Bridgemate Pro\\"; public Bws(string filename, MainForm main) { @@ -137,9 +138,15 @@ namespace Aktywator return this.getSectionList("HandRecord"); } + + internal static void setAppLocation(string appPath) + { + applicationPath = appPath; + } + public void runBCS() { - string app = Common.ProgramFilesx86() + "\\Bridgemate Pro\\BMPro.exe"; + string app = applicationPath + "BMPro.exe"; string param = ""; param += " /f[" + filename + " ]"; param += " /s"; -- cgit v1.2.3 From a9d27450cf24bb937d1b9f96d0a40e4a94578f38 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 27 Jul 2017 14:05:10 +0200 Subject: Version numbers associated with BWS settings --- Aktywator/Bws.cs | 48 ++++++++++++++++++++++++------------------------ Aktywator/Setting.cs | 6 +++++- 2 files changed, 29 insertions(+), 25 deletions(-) (limited to 'Aktywator/Bws.cs') diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 5d6e063..14a97ad 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -81,30 +81,30 @@ namespace Aktywator public void initSettings() { settings = new List(); - settings.Add(new Setting("ShowResults", main.xShowResults, this)); - settings.Add(new Setting("RepeatResults", main.xRepeatResults, this)); - settings.Add(new Setting("ShowPercentage", main.xShowPercentage, this)); - //settings.Add(new Setting("GroupSections", main.xGroupSections, this)); - settings.Add(new Setting("ShowPairNumbers", main.xShowPairNumbers, this)); - settings.Add(new Setting("IntermediateResults", main.xIntermediateResults, this)); - settings.Add(new Setting("ShowContract", main.xShowContract, this)); - settings.Add(new Setting("LeadCard", main.xLeadCard, this)); - settings.Add(new Setting("MemberNumbers", main.xMemberNumbers, this)); - settings.Add(new Setting("MemberNumbersNoBlankEntry", main.xMemberNumbersNoBlankEntry, this)); - settings.Add(new Setting("BoardOrderVerification", main.xBoardOrderVerification, this)); - settings.Add(new Setting("AutoShutDownBPC", main.xAutoShutDownBPC, this)); - settings.Add(new Setting("BM2ConfirmNP", main.xConfirmNP, this)); - settings.Add(new Setting("BM2RemainingBoards", main.xRemainingBoards, this)); - settings.Add(new Setting("BM2NextSeatings", main.xNextSeatings, this)); - settings.Add(new Setting("BM2ScoreRecap", main.xScoreRecap, this)); - settings.Add(new Setting("BM2AutoShowScoreRecap", main.xAutoShowScoreRecap, this)); - settings.Add(new Setting("BM2ScoreCorrection", main.xScoreCorrection, this)); - settings.Add(new Setting("BM2AutoBoardNumber", main.xAutoBoardNumber, this)); - settings.Add(new Setting("BM2ResetFunctionKey", main.xResetFunctionKey, this)); - settings.Add(new Setting("BM2ViewHandrecord", main.xViewHandrecord, this)); - settings.Add(new Setting("BM2RecordBidding", main.xCollectBidding, this)); - settings.Add(new Setting("BM2RecordPlay", main.xCollectPlay, this)); - settings.Add(new Setting("BM2ValidateLeadCard", main.xCheckLeadCard, this)); + settings.Add(new Setting("ShowResults", main.xShowResults, this, new Version(2, 0, 0), new Version(1, 3, 1))); + settings.Add(new Setting("RepeatResults", main.xRepeatResults, this, null, null)); + settings.Add(new Setting("ShowPercentage", main.xShowPercentage, this, null, null)); + //settings.Add(new Setting("GroupSections", main.xGroupSections, this, null, null)); + settings.Add(new Setting("ShowPairNumbers", main.xShowPairNumbers, this, null, null)); + settings.Add(new Setting("IntermediateResults", main.xIntermediateResults, this, null, new Version(1, 4, 1))); + settings.Add(new Setting("ShowContract", main.xShowContract, this, null, null)); + settings.Add(new Setting("LeadCard", main.xLeadCard, this, null, null)); + settings.Add(new Setting("MemberNumbers", main.xMemberNumbers, this, null, null)); + settings.Add(new Setting("MemberNumbersNoBlankEntry", main.xMemberNumbersNoBlankEntry, this, null, null)); + settings.Add(new Setting("BoardOrderVerification", main.xBoardOrderVerification, this, null, null)); + settings.Add(new Setting("AutoShutDownBPC", main.xAutoShutDownBPC, this, new Version(1, 7, 15), null)); + settings.Add(new Setting("BM2ConfirmNP", main.xConfirmNP, this, new Version(2, 0, 0), new Version(1, 0, 1))); + settings.Add(new Setting("BM2RemainingBoards", main.xRemainingBoards, this, new Version(2, 0, 0), new Version(1, 0, 1))); + settings.Add(new Setting("BM2NextSeatings", main.xNextSeatings, this, new Version(2, 0, 0), new Version(1, 0, 1))); + settings.Add(new Setting("BM2ScoreRecap", main.xScoreRecap, this, new Version(2, 0, 0), new Version(1, 0, 1))); + settings.Add(new Setting("BM2AutoShowScoreRecap", main.xAutoShowScoreRecap, this, new Version(2, 5, 1), new Version(1, 0, 1))); + settings.Add(new Setting("BM2ScoreCorrection", main.xScoreCorrection, this, new Version(2, 0, 0), new Version(1, 0, 1))); + settings.Add(new Setting("BM2AutoBoardNumber", main.xAutoBoardNumber, this, new Version(2, 0, 0), new Version(2, 0, 1))); + settings.Add(new Setting("BM2ResetFunctionKey", main.xResetFunctionKey, this, new Version(2, 0, 0), new Version(1, 0, 1))); + settings.Add(new Setting("BM2ViewHandrecord", main.xViewHandrecord, this, new Version(2, 6, 1), new Version(1, 6, 1))); + 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))); } private string getSectionList(string table) diff --git a/Aktywator/Setting.cs b/Aktywator/Setting.cs index 45d6b58..d31a452 100644 --- a/Aktywator/Setting.cs +++ b/Aktywator/Setting.cs @@ -14,12 +14,16 @@ namespace Aktywator public string table; public CheckBox field; private Bws bws; + public Version bcsV; + public Version fwV; - public Setting(string name, CheckBox field, Bws bws) + public Setting(string name, CheckBox field, Bws bws, Version bcsVersion, Version firmwareVersion) { this.name = name; this.field = field; this.bws = bws; + this.bcsV = bcsVersion; + this.fwV = firmwareVersion; } public void load() -- cgit v1.2.3 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/Bws.cs') 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