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