Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/04/17 13:56:38 (7 years ago)
Author:
jkarder
Message:

#2839:

  • worked on hive administrator view
  • updated service clients
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/JobManagerMenuItem.cs

    r14185 r15401  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using System.Windows.Forms;
     25using HeuristicLab.Clients.Access;
    2426using HeuristicLab.MainForm;
    2527using HeuristicLab.Optimizer;
    2628
    2729namespace HeuristicLab.Clients.Hive.JobManager {
    28   public class JobManagerMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
     30  public class JobManagerMenuItem : MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    2931    public override string Name {
    3032      get { return "&Job Manager"; }
    3133    }
     34
    3235    public override IEnumerable<string> Structure {
    3336      get { return new string[] { "&Services", "&Hive" }; }
    3437    }
     38
    3539    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      }
    3753    }
     54
    3855    public override int Position {
    3956      get { return 10000; }
    4057    }
     58
    4159    public override Keys ShortCutKeys {
    4260      get { return Keys.Control | Keys.H; }
Note: See TracChangeset for help on using the changeset viewer.