コード例 #1
0
ファイル: MessageBoxExt.cs プロジェクト: goldmon/BPiaoBao
        /// <summary>
        /// 显示支付成功界面
        /// </summary>
        /// <returns></returns>
        public static bool?ShowPay()
        {
            PayCompleted pay = new PayCompleted();

            pay.Owner = Application.Current.MainWindow;
            pay.ShowDialog();
            return(pay.IsOK);
        }
コード例 #2
0
        /// <summary>
        /// 显示支付成功界面
        /// </summary>
        public static bool?ShowPayWindow()
        {
            bool?result = false;

            try
            {
                Application.Current.Dispatcher.Invoke(new Action(() =>
                {
                    var pay = new PayCompleted {
                        Owner = Application.Current.MainWindow
                    };
                    pay.ShowDialog();
                    result = pay.IsOK;
                }));
            }
            catch (Exception exx)
            {
                Logger.WriteLog(LogType.ERROR, exx.Message, exx);
            }
            return(result);
        }