Пример #1
0
        private void ExecuteGetAliPaySignCommand()
        {
            if (string.IsNullOrEmpty(AliPayEmail.Trim()))
            {
                UIManager.ShowMessage("请输入支付宝账户");
                return;
            }

            //var r = new Regex("^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$");
            //if (!r.IsMatch(AliPayEmail))
            //{
            //    UIManager.ShowMessage("请输入格式正确的邮箱地址");
            //    return;
            //}
            IsBusy = true;
            Action action = () => CommunicateManager.Invoke <IAccountService>(p =>
            {
                var url = p.GetAlipaySign(AliPayEmail);
                UIManager.OpenDefaultBrower(url);
            }, UIManager.ShowErr);

            Task.Factory.StartNew(action).ContinueWith(task =>
            {
                Action setAction = () => { IsBusy = false; };
                DispatcherHelper.UIDispatcher.Invoke(setAction);
            });
            LocalUIManager.ShowConfirmPwd(AliPayEmail, IsBinded ? 1 : 0, p => Initialize());
        }
Пример #2
0
 private void ExecuteShowConfirmPwdCommand()
 {
     if (string.IsNullOrEmpty(AliPayEmail.Trim()))
     {
         UIManager.ShowMessage("请输入支付宝账户");
         return;
     }
     //var r = new Regex("^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$");
     //if (!r.IsMatch(AliPayEmail))
     //{
     //    UIManager.ShowMessage("请输入格式正确的邮箱地址");
     //    return;
     //}
     LocalUIManager.ShowConfirmPwd(AliPayEmail, IsBinded ? 1 : 0, p => Initialize());
 }