ShowProgress() public méthode

public ShowProgress ( string operation, int percentComplete ) : void
operation string
percentComplete int
Résultat void
Exemple #1
0
        public void ShowProgress(string operation, int percentComplete)
        {
            if (!_uiDispatcher.CheckAccess())
            {
                _uiDispatcher.BeginInvoke(new Action <string, int>(ShowProgress), DispatcherPriority.Send, operation, percentComplete);
                return;
            }

            if (operation == null)
            {
                throw new ArgumentNullException("operation");
            }

            if (IsOpen)
            {
                if (percentComplete < 0)
                {
                    percentComplete = 0;
                }
                else if (percentComplete > 100)
                {
                    percentComplete = 100;
                }

                _currentWindow.ShowProgress(operation, percentComplete);
            }
        }