protected override void ExecuteCore(SelectedItemCollection selection) { if (selection != null && selection.AllItemsAre<IXenObject>(x => x is Host || x is Pool)) MainWindowCommandInterface.ShowForm(typeof(BugToolWizard), selection.AsXenObjects<IXenObject>().ToArray()); else MainWindowCommandInterface.ShowForm(typeof(BugToolWizard)); }
protected override void ExecuteCore(SelectedItemCollection selection) { var host = selection.AsXenObjects <Host>().FirstOrDefault(); if (host != null && !host.Connection.Session.IsLocalSuperuser && !Registry.DontSudo && host.Connection.Session.Roles.All(r => r.name_label != Role.MR_ROLE_POOL_ADMIN)) { var currentRoles = host.Connection.Session.Roles; currentRoles.Sort(); var msg = string.Format(Messages.CERTIFICATE_RBAC_RESTRICTION, currentRoles[0].FriendlyName(), Role.FriendlyName(Role.MR_ROLE_POOL_ADMIN)); using (var dlg = new ErrorDialog(msg)) dlg.ShowDialog(Parent); return; } MainWindowCommandInterface.ShowForm(typeof(InstallCertificateDialog), new object[] { host }); }
protected override void ExecuteCore(SelectedItemCollection selection) { MainWindowCommandInterface.ShowForm(typeof(PatchingWizard)); }