public static MessageBoxResult ShowSyncQuestion(this IIdeActions ideActions, string title, string description, bool includeCancel = false, MessageBoxResult defaultButton = MessageBoxResult.Yes) { MessageBoxResult result = MessageBoxResult.Cancel; ideActions.ShowQuestion( new QuestionDescription(title, description, _ => result = MessageBoxResult.Yes, _ => result = MessageBoxResult.No, includeCancel, defaultButton == MessageBoxResult.No)); return(result); }
public static IAsyncContextMenu ShowAsyncContextMenu(this IIdeActions ideActions, string header, params ContextMenuItem[] contextMenuItems) { return(ideActions.ShowContextMenu(header, true, contextMenuItems)); }
public ActionsSetter(StubIdeScope ideScope, IIdeActions actions) { _ideScope = ideScope; _originalActions = _ideScope.Actions; _ideScope.Actions = actions; }
public static void ShowSyncContextMenu(this IIdeActions ideActions, string header, params ContextMenuItem[] contextMenuItems) { ideActions.ShowContextMenu(header, false, contextMenuItems); }
public IDisposable SetActions(IIdeActions actions) { return(new ActionsSetter(this, actions)); }