From 252f77a86f9d70800e7cc9aa58de2557fba5fdaa Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 13 Apr 2018 17:05:46 +0200 Subject: Forcing section group settings and a warning if different records are uploaded to sections Fixes #42 --- Aktywator/Bws.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Aktywator/Bws.cs') diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 19a2463..15219f9 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -119,6 +119,16 @@ namespace Aktywator this.setHandRecordInfo(board.Key); } } + main.xShowResults_CheckedChanged(null, EventArgs.Empty); + if (this.detectDifferentRecordsInSections()) + { + if (main.xGroupSections.Checked) + { + MessageBox.Show(MainForm.differentRecordsInSections, "Ustawienia grupowania zapisów w sektorach", MessageBoxButtons.OK, MessageBoxIcon.Warning); + main.xGroupSections.Checked = false; + } + Setting.saveSectionGroups(this.sql, main.xGroupSections.Checked); + } } private void setHandRecordInfo(int board, string section = null, List layout = null, bool analysis = false) @@ -514,7 +524,7 @@ namespace Aktywator public void sectionGroupWarning() { main.lGroupSectionsWarning.Visible = false; - if (main.xShowResults.Checked) + if (main.xShowResults.Checked || this.detectDifferentRecordsInSections()) { main.lGroupSectionsWarning.Visible = true; } -- cgit v1.2.3