public FormChatRoom(SocketController sctctrl, string chatRoomID) { InitializeComponent(); this.chatRoomID = chatRoomID; this.sctctrl = sctctrl; this.FormClosing += formChatRoom_FormClosing; this.lblChatRoomName.Text = chatRoomID; }
private void FormChatManager_Load(object sender, EventArgs e) { this.Visible = false; // Try catch block for Server connection try { sctctrl = new SocketController(this); } catch (Exception exc) { MessageBox.Show(exc.Message); Application.Exit(); } // creates and displays the login form FormLoginSignup FormLogin = new FormLoginSignup(sctctrl); FormLogin.ShowDialog(); sctctrl.SendChatroomsRequest(); sctctrl.SendFriendslistRequest(); }
public FormLoginSignup(SocketController sctctrl) { InitializeComponent(); this.sctctrl = sctctrl; this.FormClosing += this.loginForm_FormClosing; }