private void WriteProgress(string operation, int percentComplete)
        {
            if (operation == null)
            {
                throw new ArgumentNullException("operation");
            }

            if (percentComplete < 0)
            {
                percentComplete = 0;
            }

            if (percentComplete > 100)
            {
                percentComplete = 100;
            }

            if (percentComplete == 100)
            {
                HideProgress();
            }
            else
            {
                VsStatusBar.Progress(
                    ref _pdwCookieForStatusBar,
                    1 /* in progress */,
                    operation,
                    (uint)percentComplete,
                    (uint)100);
            }
        }
 private void HideProgress()
 {
     VsStatusBar.Progress(
         ref _pdwCookieForStatusBar,
         0 /* completed */,
         String.Empty,
         (uint)100,
         (uint)100);
 }
Exemple #3
0
 private void HideProgress()
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     VsStatusBar.Progress(
         ref _pdwCookieForStatusBar,
         0 /* completed */,
         string.Empty,
         (uint)100,
         (uint)100);
 }