public void Logout() { _store.SetSession(null); currentSession = null; OnLogout?.Invoke(this, EventArgs.Empty); SessionChanged?.Invoke(this, EventArgs.Empty); }
public void Logout() { Token = ""; IsLoggedIn = false; OnLogout?.Invoke(this, EventArgs.Empty); }
public override WebResourceResponse ShouldInterceptRequest(WebView view, IWebResourceRequest request) { if (request.Url.LastPathSegment != null) { if (request.Url.LastPathSegment.EndsWith("s")) { if (request.Url.LastPathSegment.EndsWith("common.css")) { return(CssHelper.GetCssResponse(CssHelper.CommonCssSettings)); } } if (request.Url.LastPathSegment.EndsWith(@"t/")) { if (request.Url.ToString() == @"https://www.bitchute.com/accounts/logout/") { if (request.Method == "GET") { if (OnLogout == null) { OnLogout += RunOnLogout; OnLogout += RunPostAuthEvent.OnPostLogout; } OnLogout.Invoke(new LogoutEventArgs()); AppState.UserIsLoggedIn = false; } } } } return(base.ShouldInterceptRequest(view, request)); }
private void TryLogout() { UnityWebRequest httpClient = new UnityWebRequest(player.HttpServerAddress + "api/Account/Logout", "POST"); httpClient.SetRequestHeader("Authorization", "bearer " + player.Token); httpClient.SendWebRequest(); while (!httpClient.isDone) { Task.Delay(1); } if (httpClient.isNetworkError || httpClient.isHttpError) { throw new Exception("Login > TryLogout: " + httpClient.error); } else { OnLogout?.Invoke("" + httpClient.responseCode); player.Token = string.Empty; player.Id = string.Empty; player.Email = string.Empty; player.Name = string.Empty; player.BirthDay = DateTime.MinValue; } }
public void Logout(object caller) { LoggedIn = false; ApiClient.ClearAuth(); ChangeView(EvotoView.Login); OnLogout?.Invoke(caller, EventArgs.Empty); }
public void Logout() { m_CanvasGroup.alpha = 1; loginPanel.SetActive(true); OnLogout?.Invoke(); }
void LogoutInvoke() { _timer.Change((long)Timeouts.Logout, (long)Timeouts.Logout); OnLogout?.Invoke(this, new AgentStateEventArgs { Mode = _mode }, _monitorId); }
private void LogOutButton_Click(object sender, EventArgs e) { controller.LogOut(); OnLogout?.Invoke(this, EventArgs.Empty); // No need to reset the view as we are expecting the parent to dispose it. }
public async void Logout() { await authenticationManager.Logout(); await Shell.Current.GoToAsync("//login"); OnLogout?.Invoke(this, EventArgs.Empty); }
private void LoginWithConnectCode(string connectCode) { socket.EmitAsync("connectCode", connectCode).ContinueWith(task => { if (!task.IsCompleted) { OnLogout?.Invoke(this, "LoginFail"); } else { "OK".Log(); } }); }
private void LoginWithDiscord(string discordID) { socket.EmitAsync("discordID", discordID).ContinueWith(task => { if (!task.IsCompleted) { OnLogout?.Invoke(this, "LoginFail"); } else { "OK".Log(); } }); }
private void FrameworkOnOnUpdateEvent(Framework framework) { if (this.Condition.Any() && this.lastConditionNone == true) { Log.Debug("Is login"); this.lastConditionNone = false; OnLogin?.Invoke(this, null); } if (!this.Condition.Any() && this.lastConditionNone == false) { Log.Debug("Is logout"); this.lastConditionNone = true; OnLogout?.Invoke(this, null); } }
public void Logout() { if (UserCredential?.Token?.RefreshToken != null) { // Not sure if it's possible for m_User to be null here. if (Profile != null) { ControllerConsoleScript.m_Instance.AddNewLine(Profile.name + " logged out."); } else { ControllerConsoleScript.m_Instance.AddNewLine("Logged out."); } m_CredentialRequest.RevokeCredential(); m_TokenDataStore.ClearAsync(); Profile = null; } OnLogout?.Invoke(); }
public void Logout() { if (!isLogin) { OnError?.Invoke("Вы еще не авторизировались."); } else { string path = "token.json"; if (Directory.Exists(path)) { Directory.Delete(path, true); } isLogin = false; credential = null; isAlreadyInLoginProcess = false; OnLogout?.Invoke(); } }
private void RaiseOnResponse(string message) { var rawMessage = message.Split(':'); var type = rawMessage[0]; if (type.Contains("error")) { OnLoginError?.Invoke(rawMessage[2]); return; } if (type.Contains("shutdown")) { OnLoginError?.Invoke(rawMessage[2]); return; } if (type.Contains("login")) { OnLogin?.Invoke(); return; } if (type.Contains("logout")) { DestroyRunTask(); OnLogout?.Invoke(); return; } if (type.Contains("message")) { OnMessage?.Invoke(rawMessage[2]); return; } if (type.Contains("members")) { OnMembers?.Invoke(rawMessage[2]); return; } }
public void RaiseOnLogout() { OnLogout?.Invoke(); }
/// <summary> /// /// </summary> /// <param name="action"></param> public void Logout(OnLogout onLogout) { player = new PlayerInfo(); onLogout.Invoke(); }
internal void OnLogoutCall(HeaderMessage header) { OnLogout?.Invoke((header)); }
private void Init() { socket = new SocketIO(); socket.OnError += (sender, s) => { MOD.log.LogMessage($"Error {s}"); }; socket.OnReconnecting += (sender, i) => { MOD.log.LogMessage($"Reconnecting {i}"); }; socket.OnReconnectFailed += (sender, exception) => exception.Log(); socket.OnConnected += (sender, e) => { if (!string.IsNullOrEmpty(ConnectCode)) { Login(ConnectCode); } OnConnected?.Invoke(this, socket.ServerUri.ToString()); }; // Handle socket disconnection events. socket.OnDisconnected += (sender, e) => { MOD.log.LogMessage("Disconnected" + e); OnDisconnected?.Invoke(this, EventArgs.Empty); }; socket.OnReceivedEvent += (sender, args) => { $"Event {args.Event} received".Log(); }; socket.On("refresh", response => OnRefresh?.Invoke(null, null)); socket.On("error", response => { if (response.Count == 0) { return; } MOD.log.LogMessage($@"Error Received: {response}"); }); socket.On("register", response => { MOD.log.LogMessage($@"Register Received: {response}"); if (response.Count != 1) { return; } var id = response.GetValue().ToString(); if (id.Length != 18) { return; } OnLogin?.Invoke(this, id); }); socket.On("matchID", response => { MOD.log.LogMessage("MatchID Received: " + response); var matchID = response.GetValue().ToString(); int.TryParse(matchID, out var id); OnMatchID?.Invoke(null, id); }); socket.On("unregister", response => { MOD.log.LogMessage("Unregister Received: " + response); var motive = ""; if (response.Count == 1) { motive = "Motive: " + response.GetValue(); } OnLogout?.Invoke(this, motive); }); }
private void InitControls() { #region Staff Panel var staffTitle = new Label("___Panel Pracownika___") { X = Pos.Center() - 11, Y = Pos.Percent(10), }; var reservationManageButton = new Button("Zarządzaj rezerwacjami [F1]") { X = Pos.Percent(33) - 11, Y = Pos.Percent(20), }; var carManageButton = new Button("Zarządzaj samochodami [F2]") { X = Pos.Percent(66) - 11, Y = Pos.Percent(20), }; var modelManageButton = new Button("Zarządzaj modelami [F3]") { X = Pos.Percent(33) - 9, Y = Pos.Percent(30), }; var markManageButton = new Button("Zarządzaj markami [F4]") { X = Pos.Percent(66) - 9, Y = Pos.Percent(30), }; var settingsButton = new Button("Ustawienia Aplikacji [F5]") { X = Pos.Center() - 10, Y = Pos.Percent(40), }; Add(staffTitle); Add(reservationManageButton); Add(carManageButton); Add(modelManageButton); Add(markManageButton); Add(settingsButton); #endregion #region Admin Panel var adminTitle = new Label("___Panel Administratora___") { X = Pos.Center() - 13, Y = Pos.Percent(50), }; var userManageButton = new Button("Zarządzaj użytkownikami") { X = Pos.Center() - 12, Y = Pos.Percent(60), }; if (user.Rola == Model.UserRole.Admin) { Add(adminTitle); Add(userManageButton); } #endregion #region Logout and Exit Button var exitButton = new Button("Wyjdź [F6]") { X = Pos.Percent(50) - 15, Y = Pos.Percent(100) - 2, }; Add(exitButton); var logoutButton = new Button("Wyloguj [F7]") { X = Pos.Percent(50) + 5, Y = Pos.Percent(100) - 2, }; Add(logoutButton); #endregion #region bind-button-events exitButton.Clicked += () => { //Close(); OnExit?.Invoke(); }; logoutButton.Clicked += () => { //Close(); OnLogout?.Invoke(); }; reservationManageButton.Clicked += () => { //Close(); OnSelect?.Invoke(1); }; carManageButton.Clicked += () => { //Close(); OnSelect?.Invoke(2); }; modelManageButton.Clicked += () => { //Close(); OnSelect?.Invoke(3); }; markManageButton.Clicked += () => { //Close(); OnSelect?.Invoke(4); }; userManageButton.Clicked += () => { //Close(); OnSelect?.Invoke(5); }; settingsButton.Clicked += () => { OnSelect?.Invoke(6); }; KeyDown += (a) => { switch (a.KeyEvent.Key) { case Key.F1: OnSelect?.Invoke(1); break; case Key.F2: OnSelect?.Invoke(2); break; case Key.F3: OnSelect?.Invoke(3); break; case Key.F4: OnSelect?.Invoke(4); break; case Key.F5: OnSelect?.Invoke(6); break; case Key.F6: OnExit?.Invoke(); break; case Key.F7: OnLogout?.Invoke(); break; default: break; } }; #endregion }
private void Opt_Logout_Click(object sender, RoutedEventArgs e) { OnLogout?.Invoke(this, e); }
public static void HandleLogout(object sender, EventArgs e) { OnLogout.Invoke(sender, e); }
private void BtnLogout_OnClick() { OnLogout?.Invoke(); }
private void InitControls() { #region User Panel var showCarsButton = new Button("Przeglądaj samochody [F1] ") { X = Pos.Percent(33) - 12, Y = Pos.Percent(10), }; var rentCarButton = new Button("Wypożycz samochód [F2] ") { X = Pos.Percent(66) - 11, Y = Pos.Percent(10), }; var historyButton = new Button("Historia wypożyczeń [F3] ") { X = Pos.Percent(33) - 12, Y = Pos.Percent(20), }; var accountButton = new Button("Moje Konto [F4] ") { X = Pos.Percent(66) - 7, Y = Pos.Percent(20), }; var setingsButton = new Button("Ustawienia [F5] ") { X = Pos.Percent(33) - 7, Y = Pos.Percent(30), }; var exitButton = new Button("Wyjdź [F6] ") { X = Pos.Percent(66) - 5, Y = Pos.Percent(30), }; Add(showCarsButton); Add(rentCarButton); Add(historyButton); Add(accountButton); Add(setingsButton); Add(exitButton); StringBuilder carImage = new StringBuilder(); carImage.AppendLine(@" yNNNNNNNNNNNNNNNNNNNNNNy "); carImage.AppendLine(@" .MM MM. "); carImage.AppendLine(@" :Md dM: "); carImage.AppendLine(@" oMy yMo "); carImage.AppendLine(@" yMdssssssssssssssssssssdMy "); carImage.AppendLine(@"omMNdmMMMMMMMMMMMMMMMMMMmdNMmo"); carImage.AppendLine(@"MMy /MMMMMMMMMMMMMMMM/ yMM"); carImage.AppendLine(@"MMh. `sMMMMMMMMMMMMMMMMs` .hMM"); carImage.AppendLine(@"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM"); carImage.AppendLine(@"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM"); carImage.AppendLine(@"+mMMMMMMMMMMMMMMMMMMMMMMMMMMm+"); carImage.AppendLine(@" sMMMm mMMMs "); carImage.AppendLine(@" sMMMm mMMMs "); carImage.AppendLine(@" :mMN+ +mNd- "); carImage.AppendLine(""); var imageLabel = new Label(carImage.ToString()) { X = Pos.Percent(38), Y = Pos.Percent(40), }; Add(imageLabel); #endregion #region Logout Button var logoutButton = new Button("Wyloguj [F7] ") { X = Pos.Center() - 7, Y = Pos.Percent(100) - 2, }; Add(logoutButton); #endregion #region bind-button-events exitButton.Clicked += () => { //Close(); OnExit?.Invoke(); }; logoutButton.Clicked += () => { //Close(); OnLogout?.Invoke(); }; showCarsButton.Clicked += () => { //Close(); OnSelect?.Invoke(1); }; rentCarButton.Clicked += () => { //Close(); OnSelect?.Invoke(2); }; historyButton.Clicked += () => { //Close(); OnSelect?.Invoke(3); }; accountButton.Clicked += () => { //Close(); OnSelect?.Invoke(4); }; setingsButton.Clicked += () => { //Close(); OnSelect?.Invoke(5); }; #endregion KeyDown += (a) => { switch (a.KeyEvent.Key) { case Key.F1: OnSelect?.Invoke(1); break; case Key.F2: OnSelect?.Invoke(2); break; case Key.F3: OnSelect?.Invoke(3); break; case Key.F4: OnSelect?.Invoke(4); break; case Key.F5: OnSelect?.Invoke(5); break; case Key.F6: OnExit?.Invoke(); break; case Key.F7: OnLogout?.Invoke(); break; default: break; } }; }
public void LogoutClick(object sender, RoutedEventArgs e) { OnLogout?.Invoke(sender, e); }
public void RaiseOnLogout() { ThreadManager.ExecuteOnMainThread(() => OnLogout?.Invoke()); }
public static void InvokeLogout(Mobile m) { OnLogout?.Invoke(m); }
public void Handle(OnLogout message) { ActiveItem = _loginWindowViewModel; }
public void Logout(OnLogout action) { action.Invoke(); }
public void Offline(string user) { OnLogout?.Invoke(user); }