Beispiel #1
0
        public static TimeSpan ShowLoadingScreen(AbortableBackgroundWorker bg, string message)
        {
            var p = new ProgressWindow(bg, message);

            p.ShowDialog();
            return(p._timer.Elapsed);
        }
Beispiel #2
0
 private ProgressWindow(AbortableBackgroundWorker worker, string message)
 {
     InitializeComponent();
     this.Left            = SystemParameters.PrimaryScreenWidth - this.Width - 10;
     MessageLabel.Content = message;
     _backgroundWorker    = worker;
     _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted;
     _timer = Stopwatch.StartNew();
     _backgroundWorker.RunWorkerAsync();
 }
Beispiel #3
0
 private ProgressWindow(AbortableBackgroundWorker worker, string message) : this(message) {
     _backgroundWorker = worker;
     _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted;
     _timer = Stopwatch.StartNew();
     _backgroundWorker.RunWorkerAsync();
 }