private void Login_Button_Click(object sender, EventArgs e) { try { string nickname = loginBox.Text.Substring(0, loginBox.Text.IndexOf("@")); string server = loginBox.Text.Substring(loginBox.Text.IndexOf("@") + 1); string connserver = (server == "gmail.com") ? "talk.google.com" : ((server == "haupc") ? "192.168.1.4" : server); login = loginBox.Text; //[email protected] //abe2b33519 Exit.Show(); loginBox.Hide(); passwordBox.Hide(); Login_Button.Hide(); //Add_Users.Hide(); client = new ClientSide(server, connserver, nickname, passwordBox.Text); client.Receive += new ClientEvent(HandlerOnMessege); client.getPresence += new ClientEvent(HandlerOnPresence); client.onLoginEvent += new ClientEvent(HandlerOnLogin); } catch { MessageBox.Show("Неверный логин или пароль, попробуйте еще раз"); loginBox.Show(); passwordBox.Show(); Login_Button.Show(); passwordBox.Clear(); } }
private void Logout_Button_Click(object sender, EventArgs e) { Login_Button.Show(); Kuld_Button.Show(); Delete_Button.Hide(); Logout_Button.Hide(); Select_ListBox.Hide(); Update_Button.Hide(); }
private void Exit_Click(object sender, EventArgs e) { client.CloseConnection(); Exit.Hide(); loginBox.Show(); passwordBox.Show(); Login_Button.Show(); //Add_Users.Show(); createConference.Hide(); listBoxUsers.Items.Clear(); checkBoxConnected.Checked = false; }
private void Exit_Click(object sender, EventArgs e) { xmpp.Close(); listUsers.Items.Clear(); Exit.Hide(); loginBox.Show(); passwordBox.Show(); Login_Button.Show(); //Add_Users.Show(); buttonCreateConf.Hide(); buttonJoinConf.Hide(); buttonShowHideContacts.Hide(); checkBoxConnected.Checked = false; }
private void Login_Button_Click(object sender, EventArgs e) { try { string nickname = loginBox.Text.Substring(0, loginBox.Text.IndexOf("@")); string server = loginBox.Text.Substring(loginBox.Text.IndexOf("@") + 1); string connserver = (server == "gmail.com") ? "talk.google.com" : ((server == "haupc") ? "192.168.1.3" : server); mainJid = new Jid(loginBox.Text); Exit.Show(); loginBox.Hide(); passwordBox.Hide(); Login_Button.Hide(); connectXmpp(server, connserver, nickname, passwordBox.Text); //Add_Users.Hide(); } catch { MessageBox.Show("Неверный логин или пароль, попробуйте еще раз"); loginBox.Show(); passwordBox.Show(); Login_Button.Show(); passwordBox.Clear(); } }