コード例 #1
0
        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);
        }
コード例 #2
0
 public static IAsyncContextMenu ShowAsyncContextMenu(this IIdeActions ideActions, string header, params ContextMenuItem[] contextMenuItems)
 {
     return(ideActions.ShowContextMenu(header, true, contextMenuItems));
 }
コード例 #3
0
 public ActionsSetter(StubIdeScope ideScope, IIdeActions actions)
 {
     _ideScope         = ideScope;
     _originalActions  = _ideScope.Actions;
     _ideScope.Actions = actions;
 }
コード例 #4
0
 public static void ShowSyncContextMenu(this IIdeActions ideActions, string header, params ContextMenuItem[] contextMenuItems)
 {
     ideActions.ShowContextMenu(header, false, contextMenuItems);
 }
コード例 #5
0
 public IDisposable SetActions(IIdeActions actions)
 {
     return(new ActionsSetter(this, actions));
 }