public void DoLogin() { log.Info("Login: Checking if previous instance detected"); if (m_ComMgr.IsPreviousInstanceDetected(username)) { log.Info("Login: Checking current health."); CheckPermsHealth(); } else { m_OrderClient.OnDemandMode = false; log.Info("Executing DoLogin with " + memberId + ", " + username); while (!m_ComMgr.DoLogin(memberId, username, password, "")) { log.Error("Login Failed!!! Retrying in 5 seconds."); int iMaxWait = 5000; int dwStart = Environment.TickCount; while (!closePending && Environment.TickCount < dwStart + iMaxWait) { Application.DoEvents(); Thread.Sleep(5); } } lastChangeQuotes = lastChangeOrders = lastChangePerms = lastChangeReaders = Environment.TickCount; log.Info("Login Succeeded - Please wait for all accounts to load."); } }
private void _loginbut_Click(object sender, EventArgs e) { m_ComMgr.DoLogin((int)_id.Value, _user.Text, _pass.Text, ""); }