protected override void SetupCommandsProfile() { base.SetupCommandsProfile(); ResultsCommandProfile item = new ResultsCommandProfile { Command = new Command { Name = "restoreDetailsTemplate", Icon = Icons.RestoreDefaultTemplate, Text = Strings.RestoreDetailsTemplate }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true }, Action = new ResultsTaskCommandAction { CommandText = "Restore-DetailsTemplate", SingleSelectionConfirmation = new SingleSelectionMessageDelegate(Strings.RestoreDetailsTemplateConfirmMessage), MultipleSelectionConfirmation = new MultipleSelectionMessageDelegate(Strings.RestoreDetailsTemplatesConfirmMessage) } }; base.CommandsProfile.CustomSelectionCommands.Add(item); ResultsCommandProfile item2 = new ResultsCommandProfile { Command = new Command { Name = "Properties", Icon = Icons.DetailsTemplate, Text = Strings.EditDetailsTemplate }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true, RequiresSingleSelection = true, IsPropertiesCommand = true, UseSingleRowRefresh = true }, Action = new ShowDetailsTemplatesProperitiesAction() }; base.CommandsProfile.ShowSelectionPropertiesCommands.Add(item2); }
public ResultsCommandProfile GetProfile(Command command) { ResultsCommandProfile profile = this.GetProfile(this.ResultPaneCommands, command); if (profile == null) { profile = this.GetProfile(this.ResultPaneCommands, command); } if (profile == null) { profile = this.GetProfile(this.CustomSelectionCommands, command); } if (profile == null) { profile = this.GetProfile(this.DeleteSelectionCommands, command); } if (profile == null) { profile = this.GetProfile(this.ShowSelectionPropertiesCommands, command); } return(profile); }
protected override void SetupCommandsProfile() { base.SetupCommandsProfile(); ResultsCommandProfile resultsCommandProfile = new ResultsCommandProfile { Command = new Command { Name = "commandViewMessages", Icon = Icons.MessagesActive, Text = Strings.ViewMessagesCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true, RequiresSingleSelection = true, IsPropertiesCommand = true }, Action = new ViewQueueMessagesCommandAction() }; ResultsCommandProfile resultsCommandProfile2 = ResultsCommandProfile.CreateSeparator(); ResultsCommandProfile resultsCommandProfile3 = new ResultsCommandProfile { Command = new Command { Name = "commandFreezeQueue", Icon = Icons.QueuesFrozen, Text = Strings.SuspendCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true }, Action = new QueuesTaskCommandAction { CommandText = "Suspend-Queue" }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerQueuesResultPane.CanSuspendString, TrueValue = true, AllowMixedValues = true } }; ResultsCommandProfile resultsCommandProfile4 = new ResultsCommandProfile { Command = new Command { Name = "commandUnfreezeQueue", Icon = Icons.QueuesActive, Text = Strings.ResumeCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true }, Action = new QueuesTaskCommandAction { CommandText = "Resume-Queue" }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerQueuesResultPane.CanResumeString, TrueValue = true, AllowMixedValues = true } }; ResultsCommandProfile resultsCommandProfile5 = new ResultsCommandProfile { Command = new Command { Name = "commandRetryQueue", Icon = Icons.QueuesRetry, Text = Strings.RetryQueueCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true }, Action = new QueuesTaskCommandAction { CommandText = "Retry-Queue" }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerQueuesResultPane.CanForceRetryString, TrueValue = true, AllowMixedValues = true } }; ResultsCommandProfile resultsCommandProfile6 = ResultsCommandProfile.CreateSeparator(); ResultsCommandProfile resultsCommandProfile7 = new ResultsCommandProfile { Command = new Command { Name = "commandRemoveMessagesNDR", Icon = Icons.MessagesPendingDelete, Text = Strings.RemoveQueueMessagesNDRCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Delete, IsSelectionCommand = true, RequiresSingleSelection = true, UseSingleRowRefresh = false }, Action = new RemoveQueueMessagesTaskCommandAction { CommandText = "Remove-Message", Parameters = new MonadParameterCollection { new MonadParameter { ParameterName = "WithNDR", Value = true } }, SingleSelectionConfirmation = new SingleSelectionMessageDelegate(Strings.RemoveQueueMessagesNDRConfirmSingleText), MultipleSelectionConfirmation = new MultipleSelectionMessageDelegate(Strings.RemoveQueueMessagesNDRConfirmMultiText), UseCustomInputRequestedHandler = true }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerQueuesResultPane.CanRemoveString, TrueValue = true } }; ResultsCommandProfile resultsCommandProfile8 = new ResultsCommandProfile { Command = new Command { Name = "commandRemoveMessages", Icon = Icons.MessagesPendingDelete, Text = Strings.RemoveQueueMessagesNoNDRCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Delete, IsSelectionCommand = true, RequiresSingleSelection = true, UseSingleRowRefresh = false }, Action = new RemoveQueueMessagesTaskCommandAction { CommandText = "Remove-Message", Parameters = new MonadParameterCollection { new MonadParameter { ParameterName = "WithNDR", Value = false } }, SingleSelectionConfirmation = new SingleSelectionMessageDelegate(Strings.RemoveQueueMessagesNoNDRConfirmSingleText), MultipleSelectionConfirmation = new MultipleSelectionMessageDelegate(Strings.RemoveQueueMessagesNoNDRConfirmMultiText), UseCustomInputRequestedHandler = true }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerQueuesResultPane.CanRemoveString, TrueValue = true } }; base.CommandsProfile.CustomSelectionCommands.AddRange(new ResultsCommandProfile[] { resultsCommandProfile, resultsCommandProfile2, resultsCommandProfile3, resultsCommandProfile4, resultsCommandProfile5, resultsCommandProfile6, resultsCommandProfile7, resultsCommandProfile8 }); }
protected override void SetupCommandsProfile() { base.SetupCommandsProfile(); ResultsCommandProfile resultsCommandProfile = new ResultsCommandProfile { Command = new Command { Name = "freezeMessage", Icon = Icons.MessagesFrozen, Text = Strings.SuspendCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true, UseSingleRowRefresh = false }, Action = new MessagesTaskCommandAction { CommandText = "Suspend-Message" }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerMessagesResultPane.CanSuspendString, TrueValue = true, AllowMixedValues = true } }; ResultsCommandProfile resultsCommandProfile2 = new ResultsCommandProfile { Command = new Command { Name = "unfreezeMessage", Icon = Icons.MessagesQueued, Text = Strings.ResumeCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true, UseSingleRowRefresh = false }, Action = new MessagesTaskCommandAction { CommandText = "Resume-Message" }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerMessagesResultPane.CanResumeString, TrueValue = true, AllowMixedValues = true } }; ResultsCommandProfile resultsCommandProfile3 = ResultsCommandProfile.CreateSeparator(); ResultsCommandProfile resultsCommandProfile4 = new ResultsCommandProfile { Command = new Command { Name = "deleteNDRMessage", Icon = Icons.MessagesPendingDelete, Text = Strings.RemoveMessageNDRCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Delete, IsSelectionCommand = true, IsRemoveCommand = true, UseSingleRowRefresh = false }, Action = new MessagesTaskCommandAction { CommandText = "Remove-Message", Parameters = new MonadParameterCollection { new MonadParameter { ParameterName = "WithNDR", Value = true } }, SingleSelectionConfirmation = new SingleSelectionMessageDelegate(Strings.RemoveMessageNDRConfirmSingleText), MultipleSelectionConfirmation = new MultipleSelectionMessageDelegate(Strings.RemoveMessageNDRConfirmMultiText) }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerMessagesResultPane.CanRemoveString, TrueValue = true, AllowMixedValues = true } }; ResultsCommandProfile resultsCommandProfile5 = new ResultsCommandProfile { Command = new Command { Name = "deleteMessage", Icon = Icons.MessagesPendingDelete, Text = Strings.RemoveMessageNoNDRCommandText, Description = LocalizedString.Empty }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Delete, IsSelectionCommand = true, UseSingleRowRefresh = false }, Action = new MessagesTaskCommandAction { CommandText = "Remove-Message", Parameters = new MonadParameterCollection { new MonadParameter { ParameterName = "WithNDR", Value = false } }, SingleSelectionConfirmation = new SingleSelectionMessageDelegate(Strings.RemoveMessageNoNDRConfirmSingleText), MultipleSelectionConfirmation = new MultipleSelectionMessageDelegate(Strings.RemoveMessageNoNDRConfirmMultiText) }, UpdatingUtil = new SelectionCommandVisibilityBindingUtil { PropertyName = QueueViewerMessagesResultPane.CanRemoveString, TrueValue = true, AllowMixedValues = true } }; base.CommandsProfile.CustomSelectionCommands.AddRange(new ResultsCommandProfile[] { resultsCommandProfile, resultsCommandProfile2, resultsCommandProfile3, resultsCommandProfile4, resultsCommandProfile5 }); ResultsCommandProfile item = new ResultsCommandProfile { Command = new Command { Name = "Properties", Icon = Icons.Properties, Text = Strings.ShowPropertiesCommand }, Setting = new ResultsCommandSetting { Operation = CommandOperation.Update, IsSelectionCommand = true, IsPropertiesCommand = true, RequiresSingleSelection = true }, Action = new ShowQueueViewerMessagePropertiesCommandAction() }; base.CommandsProfile.ShowSelectionPropertiesCommands.Add(item); }