コード例 #1
0
 public void OnRotate(RotationDirection direction, DialEventArgs e)
 {
     if (direction == RotationDirection.Right)
     {
         e.Handled = VsHelpers.ExecuteCommand("View.ZoomIn");
     }
     else
     {
         e.Handled = VsHelpers.ExecuteCommand("View.ZoomOut");
     }
 }
コード例 #2
0
 public override bool OnRotate(RotationDirection direction)
 {
     if (direction == RotationDirection.Right)
     {
         return(VsHelpers.ExecuteCommand("View.ZoomIn"));
     }
     else
     {
         return(VsHelpers.ExecuteCommand("View.ZoomOut"));
     }
 }
コード例 #3
0
        public bool OnRotate(RotationDirection direction)
        {
            if (direction == RotationDirection.Right)
            {
                VsHelpers.ExecuteCommand("View.NextError");
            }
            else
            {
                VsHelpers.ExecuteCommand("View.PreviousError");
            }

            return(true);
        }
コード例 #4
0
        public override bool OnRotate(RotationDirection direction)
        {
            if (direction == RotationDirection.Right)
            {
                VsHelpers.ExecuteCommand("Edit.NextBookmark");
            }
            else
            {
                VsHelpers.ExecuteCommand("Edit.PreviousBookmark");
            }

            return true;
        }
コード例 #5
0
        public override bool OnClick()
        {
            IWpfTextView view = VsHelpers.GetCurentTextView();

            if (view == null || view.ZoomLevel == 100)
            {
                return(false);
            }

            view.ZoomLevel = 100;
            VsHelpers.ExecuteCommand("View.ZoomOut");
            VsHelpers.ExecuteCommand("View.ZoomIn");

            return(true);
        }
コード例 #6
0
        public void OnRotate(RotationDirection direction, DialEventArgs e)
        {
            if (direction == RotationDirection.Right)
            {
                VsHelpers.ExecuteCommand("View.NextError");
                e.Action = "Go to next error";
            }
            else
            {
                VsHelpers.ExecuteCommand("View.PreviousError");
                e.Action = "Go to previous error";
            }

            e.Handled = true;
        }
コード例 #7
0
        public override bool OnClick()
        {
            dbgDebugMode?debugMode = VsHelpers.DTE.Application?.Debugger.CurrentMode;

            if (debugMode == dbgDebugMode.dbgBreakMode)
            {
                VsHelpers.DTE.Application.Debugger.StepInto();
            }
            else if (debugMode == dbgDebugMode.dbgDesignMode)
            {
                VsHelpers.ExecuteCommand("Debug.ToggleBreakpoint");
            }

            return(true);
        }
コード例 #8
0
        public void OnClick(DialEventArgs e)
        {
            dbgDebugMode?debugMode = VsHelpers.DTE.Application?.Debugger.CurrentMode;

            if (debugMode == dbgDebugMode.dbgBreakMode)
            {
                VsHelpers.DTE.Application.Debugger.StepInto();
                e.Action = "Step into";
            }
            else if (debugMode == dbgDebugMode.dbgDesignMode)
            {
                VsHelpers.ExecuteCommand("Debug.ToggleBreakpoint");
                e.Action = "Toggle breakpoint";
            }

            e.Handled = true;
        }
コード例 #9
0
        public override bool OnClick()
        {
            _view = VsHelpers.GetCurentTextView();

            if (_view == null || !_view.HasAggregateFocus)
            {
                return(false);
            }

            if (_broker.IsCompletionActive(_view))
            {
                _broker.GetSessions(_view)[0].Commit();
            }
            else
            {
                VsHelpers.ExecuteCommand("Edit.ListMembers");
            }

            return(true);
        }
コード例 #10
0
        public void OnRotate(RotationDirection direction, DialEventArgs e)
        {
            if (VsHelpers.DTE.ActiveWindow.IsDocument())
            {
                IWpfTextView view = VsHelpers.GetCurentTextView();

                if (view != null && view.HasAggregateFocus)
                {
                    string cmd = direction == RotationDirection.Left ? "Edit.ScrollLineUp" : "Edit.ScrollLineDown";
                    e.Handled = VsHelpers.ExecuteCommand(cmd);
                }
            }

            if (!e.Handled)
            {
                string key = direction == RotationDirection.Left ? "{UP}" : "{DOWN}";
                SendKeys.Send(key);
            }

            e.Handled = true;
        }
コード例 #11
0
        public override bool OnRotate(RotationDirection direction)
        {
            bool handled = false;

            if (VsHelpers.DTE.ActiveWindow.IsDocument())
            {
                IWpfTextView view = VsHelpers.GetCurentTextView();

                if (view != null && view.HasAggregateFocus)
                {
                    string cmd = direction == RotationDirection.Left ? "Edit.ScrollLineUp" : "Edit.ScrollLineDown";
                    handled = VsHelpers.ExecuteCommand(cmd);
                }
            }

            if (!handled)
            {
                string key = direction == RotationDirection.Left ? "{UP}" : "{DOWN}";
                SendKeys.Send(key);
            }

            return(true);
        }
コード例 #12
0
 public override bool OnClick()
 {
     VsHelpers.ExecuteCommand("Edit.ToggleBookmark");
     return true;
 }
コード例 #13
0
 public override void OnActivate()
 {
     VsHelpers.ExecuteCommand("View.BookmarkWindow");
 }