From 5ae44afb4d3e63c9a7020689ffe3a2f14a5cc669 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 13 Apr 2018 16:59:21 +0200 Subject: Showing warning in settings panel if there are different hand records in multiple sections --- Aktywator/MainForm.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Aktywator/MainForm.cs') diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index d2cb88b..96b66a7 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -324,14 +324,14 @@ namespace Aktywator 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 differentRecordsInSections = "BWS zawiera różne rozkłady w różnych sektorach, opcja grupowania sektorów musi być wyłączona."; - private void xShowResults_CheckedChanged(object sender, EventArgs e) + public void xShowResults_CheckedChanged(object sender, EventArgs e) { if (xShowResults.Checked) { xRepeatResults.Enabled = true; xShowPercentage.Enabled = true; xResultsOverview.Enabled = true; - xGroupSections.Enabled = true; + xGroupSections.Enabled = !bws.detectDifferentRecordsInSections(); } else { @@ -341,7 +341,7 @@ namespace Aktywator xResultsOverview.Enabled = false; xGroupSections.Enabled = false; } - if (cbSettingsSection.Items.Count > 2) + if (cbSettingsSection.Items.Count > 2 || bws.detectDifferentRecordsInSections()) { bws.sectionGroupWarning(); } -- cgit v1.2.3