Пример #1
0
        // Used to open a connection to a Perforce depot
        public void CloseConnection()
        {
            if (SccService.ScmProvider != null)
            {
                BroadcastNewConnection(null);
                SccService.ScmProvider.Dispose();
                SccService.ScmProvider = null;
            }
            SuppressConnection     = false;
            SccService.ScmProvider = null;

            BroadcastNewConnection(SccService.ScmProvider);

            Cursor oldCursor = Cursor.Current;

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                // now refresh the selected nodes' glyphs
                Glyphs.RefreshNodesGlyphs(null, null);

                omcConnectionComboSelChanged.Invoke(Resources.ConnectionDropDownCombo_NoConnection, IntPtr.Zero);
                omcActiveChangelistComboSelChanged.Invoke(Resources.Changelist_Default, IntPtr.Zero);
            }
            catch (Exception ex)
            {
                FileLogger.LogException("P4VsProvider.CloseConnection", ex);
            }
            finally
            {
                Cursor.Current = oldCursor;
            }
        }
Пример #2
0
        public void CheckText()
        {
            OleMenuCommand command = DynamicTextCommandWrapper.GetDynamicTextCommandInstance(
                new CommandID(new Guid(), 77),
                "Test");
            string returnedText = command.Text;

            Assert.AreEqual("Test (Clicked 0 times)", returnedText, "Text not correct before first click.");

            // Simulate the click calling invoke.
            command.Invoke(null);
            // Get the new text
            returnedText = command.Text;
            Assert.AreEqual("Test (Clicked 1 times)", returnedText, "Text not correct after first click.");
        }
Пример #3
0
 public void InvokeAction()
 {
     _supportedManagePackageCommand.Invoke(_searchText + TabProvider);
 }
Пример #4
0
 private void InvokeAddLicenseHeaderCommandFromLinkedCmd()
 {
     _isCalledByLinkedCommand = true;
     _addHeaderCommand.Invoke(false);
     _isCalledByLinkedCommand = false;
 }
 public void Invoke()
 {
     _menuItem.Invoke();
 }