protected virtual void OnButtonRemoveClicked(object sender, System.EventArgs e) { CustomExecutionMode mode = GetSelectedMode(); if (mode != null && MessageService.Confirm(GettextCatalog.GetString("Are you sure you want to delete the custom execution mode '{0}'?", mode.Name), AlertButton.Delete)) { ExecutionModeCommandService.RemoveCustomCommand(ctx.Project, mode); Fill(); } }
protected virtual void OnButtonEditClicked(object sender, System.EventArgs e) { CustomExecutionMode mode = GetSelectedMode(); var dlg = new CustomExecutionModeDialog(); try { dlg.Initialize(ctx, null, mode); if (MessageService.RunCustomDialog(dlg, this) == (int)Gtk.ResponseType.Ok) { CustomExecutionMode newMode = dlg.GetConfigurationData(); ExecutionModeCommandService.SaveCustomCommand(ctx.Project, newMode); if (newMode.Scope != mode.Scope) { ExecutionModeCommandService.RemoveCustomCommand(ctx.Project, mode); } Fill(); } } finally { dlg.Destroy(); } }