private void loginToolStripMenuItem_Click(object sender, EventArgs e) { loginForm u = new loginForm(); u.catchusepass += new catchusepassHandler(Catchusepass); u.ShowDialog(); // if (this.username != "" && this.password != "") { conn = new Connection(); //ip = ConfigurationSettings.AppSettings["serverIP"]; ip = "127.0.0.1"; label3.Text = ip; conn.ip = ip; conn.username = this.username; conn.password = this.password; conn.result += new connectionAnswer(conn_result); conn.received += new receptionHandler(receptionEventHandler); conn.idUpdate += new idUpdateHandler(conn_idUpdate); conn.Login(); } }