IEnumerator WaitForOnlineServiceInit() { // wait for authenticating, // always wait 1 frame do { yield return(null); } while (!OnlineService.IsAuthenicated); OnSignIn?.Invoke(OnlineService); // authenticated, now load inventory OnlineService.Load(); // wait for load do { yield return(null); } while (!OnlineService.IsLoaded); // load data to inventory DataSystem.LoadInventory(CurrentPlayer.Inventory, OnlineService.LoadedData, out lastLoadedInventoryData); OnGameInit?.Invoke(this); }
public void SignIn(CoopCredentials credentials) { new Thread(() => { var successfullySignedIn = webClient.SignIn(credentials); OnSignIn?.Invoke(this, new SignInEventArgs(credentials.Email, successfullySignedIn)); }).Start(); }
/// <summary> /// Test sign in /// </summary> public void SignIn() { Auth.SignInAnonymouslyAsync().ContinueWithOnMainThread <FirebaseUser>((task) => { CurrentUser = task.Result; OnSignIn?.Invoke(); }); }
public async Task OnAppleSignInRequest() { var account = await appleSignInService.SignInAsync(); if (account != null) { Preferences.Set(App.LoggedInKey, true); await SecureStorage.SetAsync(App.AppleUserIdKey, account.UserId); System.Diagnostics.Debug.WriteLine($"Signed in!\n Name: {account?.Name ?? string.Empty}\n Email: {account?.Email ?? string.Empty}\n UserId: {account?.UserId ?? string.Empty}"); OnSignIn?.Invoke(this, default(EventArgs)); } }
public LoginPageViewModel() { LoginInputKeyDown = new Command <KeyEventArgs>(OnLoginInputKeyDownExecute); LoginInputKeyUp = new Command <RevealPasswordBox>(OnLoginInputKeyUpExecute); Register = new Command(OnRegisterExecute); SignIn = new Command(OnSignInExecute); PasswordBoxContext.Size = 40; PageFontSize = 40; IsRememberMe = false; PasswordBoxContext.OnEnterKeyUp += () => { OnSignIn?.Invoke(Login, PasswordBoxContext.GetPassword()); }; ErrorTextVisibility = Visibility.Collapsed; KeyValuePair <string, string> signData = new EnvironmentHelperWpf().GetSignData(); Login = signData.Key; PasswordBoxContext.SetPassword(signData.Value); }
public void OnLoginAnswer(ProtobufPacket <LoginAnswerPacket> packet) { LoginAnswerPacket answer = packet.ProtobufMessage; if (answer.Success == true) { Debug.Log($"{answer.UserName} 님이 접속하셨습니다."); UserInfoManager.userName = answer.UserName; UserInfoManager.userState = MNetwork.Rooms.MNetworkPlayer.MPlayerState.LoginSuccess; } else { Debug.Log($"로그인 실패. [사유 : {answer.Context}]"); } OnSignIn?.Invoke(this, new Tuple <string, bool>(answer.Context, answer.Success)); }
private void OnSignInExecute() { if (OnSignIn != null) { if (Login.Length < 6 || PasswordBoxContext.GetPassword().Length < 8) { ErrorTextVisibility = Visibility.Visible; } else { if (!OnSignIn.Invoke(Login, PasswordBoxContext.GetPassword())) { ErrorTextVisibility = Visibility.Visible; } else if (IsRememberMe) { new EnvironmentHelperWpf().SaveSignData(Login, PasswordBoxContext.GetPassword()); } } } }
public void SignInClick(object sender, EventArgs e) //нажатие кнопки входа { OnSignIn.Invoke(this, new On_Sign_In(Login.Text, Password.Text, curatorEngine)); this.Dismiss(); }