Changeset 16240 for branches/2915-AbsoluteSymbol/HeuristicLab.Clients.Hive.Administrator/3.3/MenuItems/AdministratorMenuItem.cs
- Timestamp:
- 10/18/18 16:16:31 (6 years ago)
- Location:
- branches/2915-AbsoluteSymbol
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2915-AbsoluteSymbol
- Property svn:mergeinfo changed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Clients.Hive.Administrator
- Property svn:mergeinfo changed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Clients.Hive.Administrator/3.3/MenuItems/AdministratorMenuItem.cs
r15583 r16240 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 using HeuristicLab.Clients.Hive; 24 using System.Windows.Forms; 25 using HeuristicLab.Clients.Access; 24 26 using HeuristicLab.MainForm; 27 using HeuristicLab.Optimizer; 25 28 26 namespace HeuristicLab. Optimizer.MenuItems{27 public class AdministratorMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {29 namespace HeuristicLab.Clients.Hive.Administrator { 30 public class AdministratorMenuItem : MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 28 31 public override string Name { 29 32 get { return "&Administrator"; } 30 33 } 34 31 35 public override IEnumerable<string> Structure { 32 36 get { return new string[] { "&Services", "&Hive" }; } 33 37 } 38 34 39 public override void Execute() { 35 MainFormManager.MainForm.ShowContent(HiveAdminClient.Instance); 40 41 if (HiveRoles.CheckAdminUserPermissions() || HiveAdminClient.Instance.CheckAccessToAdminAreaGranted()) { 42 MainFormManager.MainForm.ShowContent(HiveAdminClient.Instance); 43 } else if (!UserInformation.Instance.UserExists) { 44 MessageBox.Show( 45 "Couldn't fetch user information from the server." + Environment.NewLine + 46 "Please verify that you have an existing user and that your user name and password is correct.", 47 "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error); 48 } else { 49 MessageBox.Show( 50 "You do not seem to have the permissions to use the Hive Administrator." + Environment.NewLine + 51 "If that's not the case or you have any questions please write an email to support@heuristiclab.com", 52 "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error); 53 } 36 54 } 55 37 56 public override int Position { 38 get { return 10000; } 57 get { return 8000; } 58 } 59 60 public override Keys ShortCutKeys { 61 get { return Keys.Control | Keys.Shift | Keys.H; } 39 62 } 40 63 }
Note: See TracChangeset
for help on using the changeset viewer.