void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e) { if (e.Status == LoginStatus.Logged) { Clear(); } }
void EventSource_OnLoginStatus(object sender, LoginStatusEventArgs e) { requestedDisconnect = false; Dispatcher.Invoke(new Action <LoginStatusEventArgs>((args) => { InvokeLoginEvent(args); btnConnect.Content = "Disconnect"; }), e); }
static void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e) { if (e.Status == LoginStatus.Logged) { ClearExerciseCache(); ClearWorkoutPlansCache(); } }
private void EventSource_OnLoginStatus(object sender, LoginStatusEventArgs e) { bool loginAccepted = e.isLoggedIn; if (loginAccepted) { DispatchOnConnected(); } }
void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e) { if (TasksManager == null) { return; } UIHelper.BeginInvoke(new Action(delegate { LoginStatusChanged(e.Status); }), null); }
//Callback for TTUS Server Login Status Updates void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e) { if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success) { Console.WriteLine("Login was Successful"); //We have successfully logged in, so request users m_TTUSAPI.Initialize(); //Initialize the API to get all of the User, Fix Adapter, Account, and MGT data } else { Console.WriteLine("Error: Login failed"); } }
//Callback for TTUS Server Login Status Updates void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e) { if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success) { UpdateStatusBar("Login was Successful"); m_TTUSAPI.Initialize(); } else { UpdateStatusBar("Error: Login failed"); } }
void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e) { //if (ParentWindow == null) //{ // return; //} if (!CheckAccess()) { Dispatcher.BeginInvoke(new Action <LoginStatus>(LoginStatusChanged), e.Status); } else { LoginStatusChanged(e.Status); } }
void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e) { if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success) { UpdateStatusBar("Login was Successful"); Console.WriteLine("Login was Successful"); //We have successfully logged in, so request users and FA Servers... m_TTUSAPI.Initialize(); //Initialize the API to get all of the User, Fix Adapter, Account, and MGT data m_TTUSAPI.GetProducts(); } else { UpdateStatusBar("Error: Login failed"); Environment.Exit(0); } }
void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e) { if (TasksManager == null) { return; } SynchronizationContext.Send(delegate { LoginStatusChanged(e.Status); }, null); //if(!Created) //{ // return; //} //if(InvokeRequired) //{ // BeginInvoke(new Action<LoginStatus>(LoginStatusChanged), e.Status); //} //else //{ // LoginStatusChanged(e.Status); //} }
private void InvokeLoginEvent(LoginStatusEventArgs e) { UserListWPF.DisableAudioAlertForDuration(5.0); bool isLoggedIn = e.isLoggedIn; int version = e.version; string message = e.message; if (message != null) Console.WriteLine(message); var client = Client; if (!isLoggedIn && client != null && client.IsConnected) { Console.WriteLine("Server requests login."); if (invalidLoginAttempts == 0) { invalidLoginAttempts++; client.SendLoginInfo(); } else { invalidLoginAttempts++; if (version >= 1) { var pass = client.Password; if (LoginPassWindow.Prompt(password: ref pass, message: message) && !string.IsNullOrWhiteSpace(pass)) { Password = client.Password = pass; client.SendLoginInfo(); invalidLoginAttempts = 0; } else { Console.WriteLine("Server login canceled."); client.Dispose(); if (Client == client) Client = null; } } else { Console.WriteLine("Server login rejected."); client.Dispose(); if (Client == client) Client = null; } } } else { Console.WriteLine("Server login accepted."); invalidLoginAttempts = 0; } }
void EventSource_OnLoginStatus(object sender, LoginStatusEventArgs e) { requestedDisconnect = false; Dispatcher.Invoke(new Action<LoginStatusEventArgs>((args) => { InvokeLoginEvent(args); btnConnect.Content = "Disconnect"; }), e); }
private void InvokeLoginEvent(LoginStatusEventArgs e) { UserListWPF.DisableAudioAlertForDuration(5.0); bool isLoggedIn = e.isLoggedIn; int version = e.version; string message = e.message; if (message != null) { Console.WriteLine(message); } var client = Client; if (!isLoggedIn && client != null && client.IsConnected) { Console.WriteLine("Server requests login."); if (invalidLoginAttempts == 0) { invalidLoginAttempts++; client.SendLoginInfo(); } else { invalidLoginAttempts++; if (version >= 1) { var pass = client.Password; if (LoginPassWindow.Prompt(password: ref pass, message: message) && !string.IsNullOrWhiteSpace(pass)) { Password = client.Password = pass; client.SendLoginInfo(); invalidLoginAttempts = 0; } else { Console.WriteLine("Server login canceled."); client.Dispose(); if (Client == client) { Client = null; } } } else { Console.WriteLine("Server login rejected."); client.Dispose(); if (Client == client) { Client = null; } } } } else { Console.WriteLine("Server login accepted."); invalidLoginAttempts = 0; } }