private void btnLogin_Click(object sender, EventArgs e) { if (txtUserName.Text.Length > 0) { txtMsgs.Enabled = true; txtSend.Enabled = true; btnSend.Enabled = true; txtUserName.Enabled = false; btnLogin.Enabled = false; myName = txtUserName.Text.Trim(); rc = new ReceiveClient(); rc.Start(rc, myName); rc.NewNames += new GotNames(rc_NewNames); rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg); } else { txtUserName.Enabled = true; btnLogin.Enabled = true; txtMsgs.Enabled = false; txtSend.Enabled = false; btnSend.Enabled = false; } }
private void btnLogin_Click(object sender, EventArgs e) { try { if (txtUserName.Text.Length > 0) { myName = txtUserName.Text.Trim(); rc = new ReceiveClient(); rc.Start(rc, myName); rc.NewNames += new GotNames(rc_NewNames); rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg); txtEnabled(true); txtUserName.Enabled = false; btnLogin.Enabled = false; } else { txtEnabled(false); } } catch (Exception ex) { MessageBox.Show("Hata : " + ex.Message); //txtEnabled(false); } }
private void _log_() { // MessageBox.Show("",""); login = true; btnLogin.Enabled = false; if (txtUserName.Text.Length > 0) { txtMsgs.Enabled = true; txtSend.Enabled = true; btnSend.Enabled = true; myName = txtUserName.Text.Trim(); rc = new ReceiveClient(); rc.Start(rc, myName); rc.NewNames += new GotNames(rc_NewNames); rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg); } else { txtMsgs.Enabled = false; txtSend.Enabled = false; btnSend.Enabled = false; } timer1.Start(); }
private void btnLogin_Click(object sender, EventArgs e) { if (txtUserName.Text.Length > 0) { txtMsgs.Enabled = true; txtSend.Enabled = true; btnSend.Enabled = true; myName = txtUserName.Text.Trim(); rc = new ReceiveClient(); rc.Start(rc, myName); rc.NewNames += new GotNames(rc_NewNames); rc.ReceiveMsg += new ReceviedMessage(rc_ReceiveMsg); } else { txtMsgs.Enabled = false; txtSend.Enabled = false; btnSend.Enabled = false; } }