summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-16 23:20:31 +0100
committeremkael <emkael@tlen.pl>2018-11-16 23:20:31 +0100
commita6d968da1ea8031767fbdef02ccc89953d3de2a2 (patch)
tree766ab54798a70b3f1685079ba26def30ed878159
parentf20dc6512a46f7a567fc752eb653a764d9b6af3b (diff)
Scoring settings warnings expanded
-rw-r--r--Aktywator/Bws.cs14
-rw-r--r--Aktywator/MainForm.Designer.cs17
-rw-r--r--Aktywator/MainForm.cs22
-rw-r--r--Aktywator/MainForm.resx19
4 files changed, 61 insertions, 11 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs
index 55b83a2..3d111e2 100644
--- a/Aktywator/Bws.cs
+++ b/Aktywator/Bws.cs
@@ -548,11 +548,7 @@ namespace Aktywator
public void sectionGroupWarning()
{
- main.lGroupSectionsWarning.Visible = false;
- if (main.xShowResults.Checked || this.detectDifferentRecordsInSections())
- {
- main.lGroupSectionsWarning.Visible = true;
- }
+ main.lGroupSectionsWarning.Visible = this.detectDifferentRecordsInSections();
}
private int getSectionGroupCount()
@@ -589,7 +585,13 @@ namespace Aktywator
Setting.save("BM2PINcode", "'" + main.xPINcode.Text + "'", this, errors, section);
Setting.save("BM2ResultsOverview", main.xResultsOverview.SelectedIndex.ToString(), this, errors, section);
Setting.saveSectionGroups(this.sql, main.xGroupSections.Checked, (this.getMySQLDatabaseForSection() != null) ? Convert.ToInt32(main.numTeamsTableOffset.Value) : 0);
- Setting.saveScoringType(this.sql, main.getScoringType(), section);
+ int scoringType = main.getScoringType();
+ Setting.saveScoringType(this.sql, scoringType, section);
+ if (scoringType > 1 && scoringType < 4)
+ {
+ MessageBox.Show("Pamiętaj o skonfigurowaniu opcji liczenia turnieju na IMP (średnia, odrzucanie w butlerze, uśrednianie cavendisha) w Bridgemate Control Software ***PRZED*** wystartowaniem sesji!", "Ustawienia obliczania wyników",
+ MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
this.loadSettings();
}
diff --git a/Aktywator/MainForm.Designer.cs b/Aktywator/MainForm.Designer.cs
index 6f4bd7d..91ed12b 100644
--- a/Aktywator/MainForm.Designer.cs
+++ b/Aktywator/MainForm.Designer.cs
@@ -84,6 +84,7 @@
this.xAutoBoardNumber = new System.Windows.Forms.CheckBox();
this.xCollectBidding = new System.Windows.Forms.CheckBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.lScoringOptionsWarning = new System.Windows.Forms.Label();
this.rbIMPButler = new System.Windows.Forms.RadioButton();
this.rbIMPCavendish = new System.Windows.Forms.RadioButton();
this.rbIMPTeams = new System.Windows.Forms.RadioButton();
@@ -730,6 +731,7 @@
//
// groupBox4
//
+ this.groupBox4.Controls.Add(this.lScoringOptionsWarning);
this.groupBox4.Controls.Add(this.rbIMPButler);
this.groupBox4.Controls.Add(this.rbIMPCavendish);
this.groupBox4.Controls.Add(this.rbIMPTeams);
@@ -748,6 +750,17 @@
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Protokół";
//
+ // lScoringOptionsWarning
+ //
+ this.lScoringOptionsWarning.Cursor = System.Windows.Forms.Cursors.Help;
+ this.lScoringOptionsWarning.Image = ((System.Drawing.Image)(resources.GetObject("lScoringOptionsWarning.Image")));
+ this.lScoringOptionsWarning.Location = new System.Drawing.Point(9, 41);
+ this.lScoringOptionsWarning.Name = "lScoringOptionsWarning";
+ this.lScoringOptionsWarning.Size = new System.Drawing.Size(22, 18);
+ this.lScoringOptionsWarning.TabIndex = 34;
+ this.lScoringOptionsWarning.Visible = false;
+ this.lScoringOptionsWarning.Click += new System.EventHandler(this.lScoringOptionsWarning_Click);
+ //
// rbIMPButler
//
this.rbIMPButler.AutoSize = true;
@@ -823,11 +836,12 @@
this.xGroupSections.TabIndex = 4;
this.xGroupSections.Text = "wspólny dla wszystkich sektorów";
this.xGroupSections.UseVisualStyleBackColor = true;
+ this.xGroupSections.CheckedChanged += new System.EventHandler(this.xGroupSections_CheckedChanged);
//
// xShowPercentage
//
this.xShowPercentage.AutoSize = true;
- this.xShowPercentage.Location = new System.Drawing.Point(12, 42);
+ this.xShowPercentage.Location = new System.Drawing.Point(34, 42);
this.xShowPercentage.Name = "xShowPercentage";
this.xShowPercentage.Size = new System.Drawing.Size(128, 17);
this.xShowPercentage.TabIndex = 3;
@@ -1736,6 +1750,7 @@
private System.Windows.Forms.RadioButton rbIMPCavendish;
private System.Windows.Forms.RadioButton rbIMPTeams;
private System.Windows.Forms.RadioButton rbMatchpoints;
+ public System.Windows.Forms.Label lScoringOptionsWarning;
}
}
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index aad3170..2b413ad 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -93,6 +93,7 @@ namespace Aktywator
bws.loadSettings();
this.checkRecordsForSectionGroups();
+ this.scoringOptionsWarning();
tournament = this.detectTeamyTournament();
if (tournament != null)
@@ -355,7 +356,7 @@ namespace Aktywator
bws.loadSettings();
}
- static public string sectionGroupWarningLabel = "Opcja grupowania zapisów w sektorach (albo osobnego maksowania sektorów) nie może być zaktualizowana w trakcie trwania sesji!";
+ static public string sectionGroupWarningLabel = "Opcje sposobu liczenia wyników i grupowania zapisów w sektorach (albo osobnego maksowania sektorów) nie mogą być zaktualizowane w trakcie trwania sesji!";
static public string differentRecordsInSections = "BWS zawiera różne rozkłady w różnych sektorach, opcja grupowania sektorów musi być wyłączona.";
public void xShowResults_CheckedChanged(object sender, EventArgs e)
@@ -649,8 +650,7 @@ namespace Aktywator
private void lGroupSectionsWarning_Click(object sender, EventArgs e)
{
- string message = bws.detectDifferentRecordsInSections() ? MainForm.differentRecordsInSections : MainForm.sectionGroupWarningLabel;
- MessageBox.Show(message, "Ustawienia grupowania zapisów w sektorach", MessageBoxButtons.OK, MessageBoxIcon.Question);
+ MessageBox.Show(MainForm.differentRecordsInSections, "Ustawienia grupowania zapisów w sektorach", MessageBoxButtons.OK, MessageBoxIcon.Question);
}
private void bTeamsNamesSettings_Click(object sender, EventArgs e)
@@ -748,6 +748,7 @@ namespace Aktywator
this.rbIMPButler.Enabled = xShowPercentage.Checked && !teamsTournament;
this.rbIMPCavendish.Enabled = xShowPercentage.Checked && !teamsTournament;
this.rbIMPTeams.Enabled = xShowPercentage.Checked && teamsTournament;
+ this.scoringOptionsWarning();
}
internal int getScoringType()
@@ -772,5 +773,20 @@ namespace Aktywator
type.Key.Checked = (type.Value == scoringType);
}
}
+
+ private void scoringOptionsWarning()
+ {
+ lScoringOptionsWarning.Visible = (xGroupSections.Checked || xShowPercentage.Checked);
+ }
+
+ private void lScoringOptionsWarning_Click(object sender, EventArgs e)
+ {
+ MessageBox.Show(MainForm.sectionGroupWarningLabel, "Ustawienia wyświetlania wyników", MessageBoxButtons.OK, MessageBoxIcon.Question);
+ }
+
+ private void xGroupSections_CheckedChanged(object sender, EventArgs e)
+ {
+ this.scoringOptionsWarning();
+ }
}
}
diff --git a/Aktywator/MainForm.resx b/Aktywator/MainForm.resx
index e7ec248..842be7b 100644
--- a/Aktywator/MainForm.resx
+++ b/Aktywator/MainForm.resx
@@ -191,6 +191,23 @@
EAdVRRzaJOwXoV/4N8D6AwpMvVRjyTFwAAAAAElFTkSuQmCC
</value>
</data>
+ <data name="lScoringOptionsWarning.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
+ JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACaklE
+ QVQ4T6WRX0hTYRjGdxMkikcqmeWURbeamAg60pVK82KgppIzCh3WNvwzRtjCuahhCYabyzRrFcQyVEbQ
+ hSj+YaKrkCBnDpuSTsu55lEXG1mG29PZuRiunau6+MH3PTzPw/u9HwvAf8EoBlmcKOa+GTi7p68ndrsV
+ xGEmTxBGMcjbgfz5JfvN3/MzSn9HLTHI5AnCKFr68oTzU5f9vp9PsbnWCNsID50NxEkmb4QQ5P3rQvLz
+ chdUzTUQiYpgGZOht4XjYvJGCGYjX2mflvibVFdgMpmg0WiQyEmAdTADulpC8rc/7EItLurjkHA3OLqo
+ shw6nQ5SqRRsNgFyqRovNfG/qIUe2J8JKxh/ntO3sqCm3v4MzepqKBQK5PLPQFGfg+2vcixbTge0MsK4
+ PxM6WPrzkuyTInpxvh0DzGY1Ss+XIj0tBeahKnhWrmJroQyjj7gB6mu5EQVmY67V/U27Rxd49XA7WyAQ
+ nIKoPBO2dxXY/FRCUYTVMY5fX0fYwgqGDDy+Y0YWoMO+Tni3W7G6qIThQTG62gVYmy3DxgceNqx8uKa4
+ GNTGBNqlscJQgaU/3+3beUKN/pgOf3erqLEluFhZguzsLOg1KSDnCkDOFsA1mYQvw1HoUhBeuuBVR4bS
+ 6bgN7w9DKOxZk2PVVgVhYTrSUo9hcSIL7ulUuCzHsT7BhnM0GuaH0YG74thelrYhOeDx9mCLbAuFtx1i
+ emHk3Dlq9Oyw8Po4AefIQQzrY3BPGk+yeho5U93XT8BwIxnd1xJp7suPQleXQNNaE09zR3wEty4domm6
+ EAdVRRzaJOwXoV/4N8D6AwpMvVRjyTFwAAAAAElFTkSuQmCC
+</value>
+ </data>
<data name="lGroupSectionsWarning.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
@@ -489,7 +506,7 @@ to także należy ręcznie zrobić Upload.</value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAs
- CwAAAk1TRnQBSQFMAgEBBAEAAXABAAFwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CwAAAk1TRnQBSQFMAgEBBAEAAYABAAGAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA