private void StartSession() { new System.Threading.Thread(() => { SetLoadingStatus(true); DisplayNotifyBox("Attempting to Sign In", "Please wait while we sign you in"); string passsword = PB_Password.Password.ToString(); Classes.Session session = new Classes.Session(GetUsername(), passsword); if (session.LoginSuccessfull) { DisplayNotifyBox("Signed In", "Welcome " + session.username); if (session.IsAdmin) { OpenAdminWindow(session.username); } else { OpenAgentWindow(session.username); } } else { DisplayNotifyBox("Invalid Username or Password", "Could not sign in"); } SetLoadingStatus(false); }).Start(); }
private void StartSession() { new System.Threading.Thread(() => { Classes.Cryptography crypto = new Classes.Cryptography(); SetLoadingStatus(true); DisplayNotifyBox("Attempting to Sign In", "Please wait while we sign you in"); string passsword = crypto.EncryptString(GetPassword()); Classes.Session session = new Classes.Session(GetUsername(), passsword); if (session.LoginSuccessfull) { DisplayNotifyBox("Signed In", "Welcome " + session.username); if( session.IsAdmin ) { OpenAdminWindow(session.username); } else { OpenAgentWindow(session.username); } } else { DisplayNotifyBox("Invalid Username or Password", "Could not sign in"); } SetLoadingStatus(false); }).Start(); }