(1) Results are redrawn when iPerlCommForm is closed, (2) 'Stop draining' is password protected, (3) PW-s updated, ver. 2.18.901

This commit is contained in:
Milan Hanajik
2018-05-21 16:45:54 +02:00
parent e150624f4d
commit 2e593d11eb
7 changed files with 51 additions and 9 deletions
+38 -2
View File
@@ -248,17 +248,53 @@ namespace TBF.UiControls
private void emptyTank1Btn_Click(object sender, EventArgs e)
{
#if TURA_IPERL || TURA_SPECIAL
/// Prevent 'Stop draining' by password
if (drain1Highlighted && !Users.GlobalData.CurrentUser.IsMemberOf(Users.Grp.GID.TestingSpecialists))
{
if ((new Users.Forms.LoginDlg(Users.Grp.GID.TestingSpecialists)).ShowDialog() != DialogResult.OK)
return;
if (Program.MainWnd != null) Program.MainWnd.UpdateUser();
Bridge.Ui2Bench(UI2BenchCmd.StopDrainingTank1);
return;
}
#endif
Bridge.Ui2Bench(drain1Highlighted ? UI2BenchCmd.StopDrainingTank1 : UI2BenchCmd.DrainTank1);
}
private void emptyTank2Btn_Click(object sender, EventArgs e)
{
Bridge.Ui2Bench(drain2Highlighted ? UI2BenchCmd.StopDrainingTank2 : UI2BenchCmd.DrainTank2);
#if TURA_IPERL || TURA_SPECIAL
/// Prevent 'Stop draining' by password
if (drain1Highlighted && !Users.GlobalData.CurrentUser.IsMemberOf(Users.Grp.GID.TestingSpecialists))
{
if ((new Users.Forms.LoginDlg(Users.Grp.GID.TestingSpecialists)).ShowDialog() != DialogResult.OK)
return;
if (Program.MainWnd != null) Program.MainWnd.UpdateUser();
Bridge.Ui2Bench(UI2BenchCmd.StopDrainingTank2);
return;
}
#endif
Bridge.Ui2Bench(drain2Highlighted ? UI2BenchCmd.StopDrainingTank2 : UI2BenchCmd.DrainTank2);
}
private void emptyTank3Btn_Click(object sender, EventArgs e)
{
Bridge.Ui2Bench(drain3Highlighted ? UI2BenchCmd.StopDrainingTank3 : UI2BenchCmd.DrainTank3);
#if TURA_IPERL || TURA_SPECIAL
/// Prevent 'Stop draining' by password
if (drain1Highlighted && !Users.GlobalData.CurrentUser.IsMemberOf(Users.Grp.GID.TestingSpecialists))
{
if ((new Users.Forms.LoginDlg(Users.Grp.GID.TestingSpecialists)).ShowDialog() != DialogResult.OK)
return;
if (Program.MainWnd != null) Program.MainWnd.UpdateUser();
Bridge.Ui2Bench(UI2BenchCmd.StopDrainingTank3);
return;
}
#endif
Bridge.Ui2Bench(drain3Highlighted ? UI2BenchCmd.StopDrainingTank3 : UI2BenchCmd.DrainTank3);
}