private void ExecuteLoginCommand() { Message = null; IsBusy = true; Action act = () => { if (RememberPassword || AutoLogin) { IsolatedStorageHelper.Save(LocalData.Transfer(this)); } else if (!RememberPassword) { IsolatedStorageHelper.Delete <LocalData>(); } CommunicateManager.Invoke <ILoginService>(p => { var token = p.Login(Num, LoginName, LoginPwd); LoginInfo.Token = token; LoginInfo.Code = Num.Trim(); LoginInfo.Account = LoginName.Trim(); LoginInfo.Guid = Guid.NewGuid(); LoginInfo.IsLogined = true; //登录成功 IsLogined = true; }, ShowErr); }; Task.Factory.StartNew(act).ContinueWith(task => { CommunicateManager.StartPushMessage(); InvokeSetBusy(false); }); }
public void Trim() { LoginName = LoginName.Trim(); LoginPwd = LoginPwd.Trim(); Email = Email.Trim(); if (!string.IsNullOrEmpty(AppKey)) { AppKey = AppKey.Trim(); } }