summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-18 01:31:30 +0100
committeremkael <emkael@tlen.pl>2018-11-18 01:31:30 +0100
commit067227bbe0e8ca34fff7cf4ddac72175f94ec8b9 (patch)
tree9ed7f6047fee4a7e182351add6b4cc13dcf16fa4
parente2f10a0dfcd102c76a7345a486c9614f20239467 (diff)
Game summary at the end of the session available
Fixes #51
-rw-r--r--Aktywator/Bws.cs27
-rw-r--r--Aktywator/MainForm.Designer.cs37
-rw-r--r--Aktywator/MainForm.cs1
-rw-r--r--Aktywator/MainForm.resx2
-rw-r--r--Aktywator/Resources/BuildDate.txt2
5 files changed, 53 insertions, 16 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs
index 8c12537..79e5121 100644
--- a/Aktywator/Bws.cs
+++ b/Aktywator/Bws.cs
@@ -385,8 +385,8 @@ namespace Aktywator
}
catch (OleDbException)
{
- }
-
+ }
+
try
{
sql.query("CREATE TABLE PlayerNames (ID integer, Name text(18));");
@@ -540,6 +540,10 @@ namespace Aktywator
this.sectionGroupWarning();
}
+ int ranking = 0;
+ Int32.TryParse(Setting.load("BM2Ranking", this, errors, section), out ranking);
+ main.xShowRecap.Checked = (ranking > 0) && (Setting.load("BM2GameSummary", this, errors, section).ToUpper().Equals("TRUE"));
+
if (errors.Length > 0)
{
MessageBox.Show("Nie można uzyskać dostępu do pól: \n" + errors.ToString() + ".\nPrawdopodobnie te pola nie istnieją.",
@@ -602,6 +606,25 @@ namespace Aktywator
Setting.saveSectionGroups(this.sql, main.xGroupSections.Checked, 0);
Setting.saveScoringType(this.sql, 1, section);
}
+ if (main.xShowRecap.Checked)
+ {
+ if (this.getMySQLDatabaseForSection() != null)
+ {
+ Setting.saveScoringType(this.sql, 4, section);
+ Setting.save("BM2SummaryPoints", "0", this, errors, section);
+ }
+ else
+ {
+ Setting.save("BM2SummaryPoints", "1", this, errors, section);
+ }
+ Setting.save("BM2Ranking", "2", this, errors, section);
+ Setting.save("BM2GameSummary", "true", this, errors, section);
+ }
+ else
+ {
+ Setting.save("BM2Ranking", "0", this, errors, section);
+ Setting.save("BM2GameSummary", "false", this, errors, section);
+ }
this.loadSettings();
}
diff --git a/Aktywator/MainForm.Designer.cs b/Aktywator/MainForm.Designer.cs
index 435485f..1e4b6bc 100644
--- a/Aktywator/MainForm.Designer.cs
+++ b/Aktywator/MainForm.Designer.cs
@@ -73,11 +73,13 @@
this.xMemberNumbersNoBlankEntry = new System.Windows.Forms.CheckBox();
this.xShowPlayerNames = new System.Windows.Forms.CheckBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
+ this.xShowRecap = new System.Windows.Forms.CheckBox();
this.xRemainingBoards = new System.Windows.Forms.CheckBox();
this.xNextSeatings = new System.Windows.Forms.CheckBox();
this.xScoreRecap = new System.Windows.Forms.CheckBox();
this.xAutoShowScoreRecap = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.xFirstBoardManually = new System.Windows.Forms.CheckBox();
this.xCollectPlay = new System.Windows.Forms.CheckBox();
this.xBoardOrderVerification = new System.Windows.Forms.CheckBox();
this.xIntermediateResults = new System.Windows.Forms.CheckBox();
@@ -156,7 +158,6 @@
this.bLaunch = new System.Windows.Forms.ToolStripButton();
this.bUpdateSession = new System.Windows.Forms.ToolStripButton();
this.namesTimer = new System.Windows.Forms.Timer(this.components);
- this.xFirstBoardManually = new System.Windows.Forms.CheckBox();
this.statusStrip1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout();
@@ -615,6 +616,7 @@
//
// groupBox6
//
+ this.groupBox6.Controls.Add(this.xShowRecap);
this.groupBox6.Controls.Add(this.xRemainingBoards);
this.groupBox6.Controls.Add(this.xNextSeatings);
this.groupBox6.Controls.Add(this.xScoreRecap);
@@ -626,6 +628,16 @@
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Koniec rundy";
//
+ // xShowRecap
+ //
+ this.xShowRecap.AutoSize = true;
+ this.xShowRecap.Location = new System.Drawing.Point(13, 114);
+ this.xShowRecap.Name = "xShowRecap";
+ this.xShowRecap.Size = new System.Drawing.Size(214, 17);
+ this.xShowRecap.TabIndex = 14;
+ this.xShowRecap.Text = "podgląd kontrolki/historii na koniec sesji";
+ this.xShowRecap.UseVisualStyleBackColor = true;
+ //
// xRemainingBoards
//
this.xRemainingBoards.AutoSize = true;
@@ -681,6 +693,17 @@
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Zapis rozdania";
//
+ // xFirstBoardManually
+ //
+ this.xFirstBoardManually.AutoSize = true;
+ this.xFirstBoardManually.Enabled = false;
+ this.xFirstBoardManually.Location = new System.Drawing.Point(190, 22);
+ this.xFirstBoardManually.Name = "xFirstBoardManually";
+ this.xFirstBoardManually.Size = new System.Drawing.Size(103, 17);
+ this.xFirstBoardManually.TabIndex = 4;
+ this.xFirstBoardManually.Text = "pierwszy ręcznie";
+ this.xFirstBoardManually.UseVisualStyleBackColor = true;
+ //
// xCollectPlay
//
this.xCollectPlay.AutoSize = true;
@@ -1562,17 +1585,6 @@
this.namesTimer.Interval = 3000;
this.namesTimer.Tick += new System.EventHandler(this.namesTimer_Tick);
//
- // xFirstBoardManually
- //
- this.xFirstBoardManually.AutoSize = true;
- this.xFirstBoardManually.Enabled = false;
- this.xFirstBoardManually.Location = new System.Drawing.Point(190, 22);
- this.xFirstBoardManually.Name = "xFirstBoardManually";
- this.xFirstBoardManually.Size = new System.Drawing.Size(103, 17);
- this.xFirstBoardManually.TabIndex = 4;
- this.xFirstBoardManually.Text = "pierwszy ręcznie";
- this.xFirstBoardManually.UseVisualStyleBackColor = true;
- //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1766,6 +1778,7 @@
private System.Windows.Forms.RadioButton rbMatchpoints;
public System.Windows.Forms.Label lScoringOptionsWarning;
public System.Windows.Forms.CheckBox xFirstBoardManually;
+ public System.Windows.Forms.CheckBox xShowRecap;
}
}
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index 6dc346f..876388a 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -89,6 +89,7 @@ namespace Aktywator
// cloning Setting List returned from Bws, because we're going to extend it for version tracking purposes
this.bwsSettings = new List<Setting>(bws.initSettings());
this.bwsSettings.Add(new Setting("BM2ShowPlayerNames", this.xShowPlayerNames, bws, new Version(2, 0, 0), new Version(1, 3, 1)));
+ this.bwsSettings.Add(new Setting("BM2GameSummary", this.xShowRecap, bws, new Version(3, 6, 0), new Version(3, 0, 1)));
bindSettingChanges();
bws.loadSettings();
diff --git a/Aktywator/MainForm.resx b/Aktywator/MainForm.resx
index ba3dd57..1d1bdc0 100644
--- a/Aktywator/MainForm.resx
+++ b/Aktywator/MainForm.resx
@@ -506,7 +506,7 @@ to także należy ręcznie zrobić Upload.</value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAs
- CwAAAk1TRnQBSQFMAgEBBAEAAYgBAAGIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CwAAAk1TRnQBSQFMAgEBBAEAAZgBAAGYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
diff --git a/Aktywator/Resources/BuildDate.txt b/Aktywator/Resources/BuildDate.txt
index 0ddc042..aeb1927 100644
--- a/Aktywator/Resources/BuildDate.txt
+++ b/Aktywator/Resources/BuildDate.txt
@@ -1 +1 @@
-2018-11-17
+2018-11-18