Exemplo n.º 1
0
        /// <summary>
        /// 显示进程窗口
        /// </summary>
        /// <returns></returns>
        protected Window ShowDlgProgress()
        {
            if (IsShowAsyncDlg)
            {
                return(null);
            }
            Window dlg = default;

            TokenMgt = new CancellationTokenSource();
            DispatcherOperation operation = DHelper.InvokeOnMain(() =>
            {
                Application.Current.MainWindow.IsEnabled = false;
                dlg       = DHelper.CreateInstance <Window>(ViewService.DlgProgress);
                dlg.Owner = Application.Current.MainWindow;
                dlg.Show();
            });

            operation.Wait();
            return(dlg);
        }