private void ItraderMain_Load(object sender, EventArgs e) { var res = new Login().ShowDialog(); if (res != System.Windows.Forms.DialogResult.OK) { LoadAccount(); this.Close(); } }
public Main(Login p_Login) { InitializeComponent(); m_frmLogin = p_Login; m_frmLogin.Hide(); Global.SetMainFrame(this); this.FormClosed += new FormClosedEventHandler(Main_FormClosed); }
private void linkLabel1_TabIndexChanged(object sender, EventArgs e) { Login li = new Login(); this.Close(); li.Show(); }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Login li = new Login(); this.Close(); li.Show(); }
private bool loginWin() { Login login = new Login(); login.ShowDialog(); if (login.state == 0) { this.Close(); return true; } try { client = new Client(); client.connect(); if (login.state == 2) { if (!(client.register(login.username, login.pass))) { MessageBox.Show(strings.alreadyRegistered); return false; } } } catch (Exception) { MessageBox.Show(strings.serverTimeout); return false; } client.login(login.username, login.pass); if (client.loggedIn) this.connect = true; else { MessageBox.Show(strings.incorrect); return false; } return true; }
private void Label_MouseUp_1(object sender, MouseButtonEventArgs e) { Login logW = new Login(); logW.Show(); this.Close(); }
public void FirstLoadWebSystem(Login login) { MethodInvoker method = null; if (Variable.sProjectID.Equals("zhongtong", StringComparison.OrdinalIgnoreCase) && (Variable.sWebMenuList.Trim().Length > 0)) { if (method == null) { method = () => this.gotoWebSystem(); } login.Invoke(method); this.LoadWebSystem.WaitOne(); } }