private void button1_Click(object sender, EventArgs e) { chat chatserv = new chat(); try { chatserv.login("http://support.ekecompany.com/index.php", this.user, this.username.Text, this.password.Text); this.Close(); } catch (Exception exception) { } }
public void loadData(user userlogin) { this.user = userlogin; chat chatserv = new chat(); try { chatserv.getListChat("http://support.ekecompany.com/index.php", this.user, this.user.username, this.user.pass); } catch (Exception exception) { } }
static void Main() { chat chatserv = new chat(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var main = new MainForm(); login loginform = new login(); var result = loginform.ShowDialog(); if (result == DialogResult.OK) { if (loginform.user.status) { main.loadData(loginform.user); main.ShowDialog(); } } }