Ejemplo n.º 1
0
        private static void ShowProcess()
        {
            if (instance == null)
            {
                instance = new WaitDialogWPF();
            }

            // Showだと処理が流れてスレッドが終了してしまうので、ShowDialogで表示して
            // 別スレッド側は処理を待つ
            ((Window)instance).ShowDialog();
        }
Ejemplo n.º 2
0
        // クローズ処理
        public static new void Close()
        {
            if (instance == null)
            {
                return;
            }

            if (instance.Dispatcher.CheckAccess())
            {
                ((Window)instance).Close();
                instance = null;
            }
            else
            {
                instance.Dispatcher.Invoke(new Action(Close));
            }
        }