public override void Execute()
 {
     if (OKBRoles.CheckAdminUserPermissions())
     {
         MainFormManager.MainForm.ShowContent(AdministrationClient.Instance);
     }
     else
     {
         MessageBox.Show("You don't have the permissions for administrating the OKB.", "Security check failed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Esempio n. 2
0
        protected override void OnActiveViewChanged(object sender, EventArgs e)
        {
            IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;

            ToolStripItem.Enabled = (activeView != null) && (activeView.Content != null) && ((activeView.Content is Experiment) || (activeView.Content is RunCollection) || (activeView.Content is IOptimizer)) && !activeView.Locked && OKBRoles.CheckUserPermissions();
        }