Common..CurrentUser static class with Stack<UserAndForm> userStack, Change( ) and Restore( ).

This commit is contained in:
Milan Hanajik
2022-05-25 15:23:55 +02:00
parent 00fc9ea847
commit f1f662a419
71 changed files with 738 additions and 593 deletions
+8 -2
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -66,7 +66,8 @@ namespace TBF.UI.Bench.Transitions
InitializeComponent();
/// SharedDlgButtons configuration
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.Metrologists };
sharedButtons.ParentForm = this;
sharedButtons.RequiredGroupMembership = new GID[] { GID.Metrologists };
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
SharedButtons.Buttons.Export | SharedButtons.Buttons.Import |
@@ -703,5 +704,10 @@ namespace TBF.UI.Bench.Transitions
{
MessageBox.Show("Comparing sequences in not implemented yet");
}
private void TransitionsDlg_FormClosing(object sender, FormClosingEventArgs e)
{
if (CurrentUser.Restore(this)) Program.MainWnd.UpdateUser();
}
}
}