Example #1
0
        public static void CloseBusyIndicator()
        {
            if (progWindow != null)
            {
                //closes the Progress window
                progWindow.Dispatcher.Invoke(new Action(progWindow.Close));

                progWindow = null;
                _progressWindowWaitHandle = null;
            }
        }
Example #2
0
        private static void ShowProgWindow(object message)
        {
            //creates and shows the progress window
            progWindow         = new BusyIndicatorView();
            progWindow.Message = (string)message;
            progWindow.Show();

            //Notifies command thread the window has been created
            //_progressWindowWaitHandle.Set();
            progWindow.Dispatcher.BeginInvoke(new Func <bool>(_progressWindowWaitHandle.Set));//https://stackoverflow.com/a/18280446/8020304

            //Starts window dispatcher
            System.Windows.Threading.Dispatcher.Run();
        }