summaryrefslogtreecommitdiff
path: root/Aktywator/Bws.cs
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 /Aktywator/Bws.cs
parente2f10a0dfcd102c76a7345a486c9614f20239467 (diff)
Game summary at the end of the session available
Fixes #51
Diffstat (limited to 'Aktywator/Bws.cs')
-rw-r--r--Aktywator/Bws.cs27
1 files changed, 25 insertions, 2 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();
}