示例#1
0
 internal void Close()
 {
     _divContainer.Hide();
     _progressContainer.Hide();
     _btnAbort.Hide();
     _overlay.Hide();
     _progressInstance = null;
 }
示例#2
0
        public IDisposable Show(string title, Progress <int> progress, CancellationTokenSource cancellationTokenSource)
        {
            _progressInstance = new ProgressInstance(this, title, progress, cancellationTokenSource);
            _overlay.Show();
            _divContainer.Show();

            SetTitle(title);

            if (cancellationTokenSource != null)
            {
                _btnAbort.Show();
            }

            if (progress != null)
            {
                _progressContainer.Show();
                progress.ProgressChanged += (sender, i) =>
                {
                    _progressBar.Percent = i;
                };
            }

            return(_progressInstance);
        }