TBF.UI.Procedures clean-up

This commit is contained in:
Milan Hanajik
2021-10-11 09:14:19 +02:00
parent 078bd8aaf4
commit b5e2a7bdc9
2 changed files with 9 additions and 8 deletions
+7 -7
View File
@@ -75,9 +75,9 @@ namespace TBF.UI.Procedures
/// SharedDlgButtons configuration /// SharedDlgButtons configuration
#if KEMPNO_50 || KRAKOW_50 #if KEMPNO_50 || KRAKOW_50
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.TestingSpecialists, Common.GID.WaterMeterAuthority }; sharedButtons.RequiredGroupMembership = new GID[] { GID.TestingSpecialists, GID.WaterMeterAuthority };
#else #else
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.TestingSpecialists, Common.GID.Metrologists }; sharedButtons.RequiredGroupMembership = new GID[] { GID.TestingSpecialists, GID.Metrologists };
#endif #endif
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | sharedButtons.OptionalButtons = SharedButtons.Buttons.Add |
@@ -130,11 +130,11 @@ namespace TBF.UI.Procedures
this.initialMode = initialMode; this.initialMode = initialMode;
#if KEMPNO_50 || KRAKOW_50 #if KEMPNO_50 || KRAKOW_50
sharedButtons.RequiredGroupMembership = procedure.Protected ? new Common.GID[] { Common.GID.WaterMeterAuthority } sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.WaterMeterAuthority }
: new Common.GID[] { Common.GID.TestingSpecialists, Common.GID.WaterMeterAuthority }; : new GID[] { GID.TestingSpecialists, GID.WaterMeterAuthority };
#else #else
sharedButtons.RequiredGroupMembership = procedure.Protected ? new Common.GID[] { Common.GID.Metrologists } sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.Metrologists }
: new Common.GID[] { Common.GID.TestingSpecialists, Common.GID.Metrologists }; : new GID[] { GID.TestingSpecialists, GID.Metrologists };
#endif #endif
if (initialMode == Mode.PermanentlyLocked) sharedButtons.DisableUnlock(); if (initialMode == Mode.PermanentlyLocked) sharedButtons.DisableUnlock();
@@ -1924,7 +1924,7 @@ namespace TBF.UI.Procedures
procNameTextBox.Enabled = true; procNameTextBox.Enabled = true;
descriptionTextBox.Enabled = true; descriptionTextBox.Enabled = true;
variantTextBox.Enabled = true; variantTextBox.Enabled = true;
protectedCheckBox.Enabled = GlobalData.CurrentUser.IsMemberOf(Common.GID.Metrologists); protectedCheckBox.Enabled = GlobalData.CurrentUser.IsMemberOf(GID.Metrologists);
mustBeCompleteCheckBox.Enabled = true; mustBeCompleteCheckBox.Enabled = true;
manualControlDisabledCheckBox.Enabled = true; manualControlDisabledCheckBox.Enabled = true;
dataEntryComboBox.Enabled = true; dataEntryComboBox.Enabled = true;
+2 -1
View File
@@ -4,6 +4,7 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using log4net; using log4net;
using Common;
using TBF.Resources; using TBF.Resources;
using TBF.UI.Shared; using TBF.UI.Shared;
@@ -24,7 +25,7 @@ namespace TBF.UI.Procedures
InitializeComponent(); InitializeComponent();
/// SharedDlgButtons configuration /// SharedDlgButtons configuration
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.TestingSpecialists, Common.GID.Metrologists }; sharedButtons.RequiredGroupMembership = new GID[] { GID.TestingSpecialists, GID.Metrologists };
#if TEST_PROFILES #if TEST_PROFILES
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove | sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |