private void MessengerWindow_Load(object sender, EventArgs e) { MinimumSize = this.Size; if (isadmin) { join_room_button.Text = "Create Video Room"; Message_Box.Text = "Server successfully created with ip: " + Server.GetIPAddress(); Thread accept_user = new Thread(new ThreadStart(AcceptUser)); accept_user.Start(); kick_button.Enabled = true; Thread kickcheck = new Thread(new ThreadStart(activatekick)); kickcheck.Start(); if (username == "Admin") { AddMember(username); } else { AddMember(username + "(Admin)"); } } else { join_room_button.Text = "Join Video Room"; Message_Box.Text = "Successfully connected to the server"; Thread client_thread = new Thread(new ThreadStart(ClientThread)); client_thread.Start(); } Thread typeinf = new Thread(new ThreadStart(typetester)); typeinf.Start(); }
private void info_button_Click(object sender, EventArgs e) { string ip = ""; if (isadmin) { ip = Server.GetIPAddress(); } else { ip = client.EndPoint; } MessageBox.Show("Server ip: " + ip + "\nServer password: "******"Server Info"); }