private void show_notif_Click(object sender, EventArgs e) { labelF1.Hide(); labelF2.Hide(); text_add_friend.Hide(); button_add_friend.Hide(); FriendsList.Hide(); show_friends.Show(); show_notif.Hide(); Invite_Panel.Show(); }
private void button1_Click(object sender, EventArgs e) { button_connect.Enabled = true; textBox_message.Enabled = false; button_send.Enabled = false; connected = false; button1.Enabled = false; textBox_ip.Enabled = true; textBox_port.Enabled = true; user_name.Enabled = true; Mess2Friend.Enabled = false; Send2Friend.Enabled = false; labelF1.Hide(); labelF2.Hide(); text_add_friend.Hide(); button_add_friend.Hide(); FriendsList.Hide(); show_friends.Show(); show_notif.Hide(); Invite_Panel.Show(); show_friends.Enabled = false; Byte[] buffer = new Byte[64]; buffer = Encoding.Default.GetBytes("Im disconnecting"); try { clientSocket.Send(buffer); } catch { } clientSocket.Close(); this.Invoke((MethodInvoker) delegate() { Invite_Panel.Controls.Clear(); }); Notifs.Clear(); }