private void CreateRoomBTN_Click(object sender, EventArgs e) { if (Playlist.Count != 0) { var room = new Room { UniqName = RoomNameTB.Text, Name = RoomNameTB.Text, Password = RoomPasswordTB.Text, Medias = Playlist }; if (room.CreateRoom()) { PlayerForm playerForm = new PlayerForm(Playlist); playerForm.ShowDialog(); this.Close(); } else { MessageBox.Show("Something went wrong....", "Filmst"); } } else { MessageBox.Show("Fill playlist", "Filmst"); } }
private void ConnectBTN_Click(object sender, EventArgs e) { if (Playlist.Count != 0) { string response = RoomFindPostRequest(RoomNameTB.Text, RoomPasswordTB.Text, Playlist); if (response == "dfvdfdfbdfb") { PlayerForm playerForm = new PlayerForm(currentUser, Playlist); playerForm.Show(); this.Close(); } else { //error message } } else { MessageBox.Show("Fill playlist", "Filmst"); } }
private void ConnectBTN_Click(object sender, EventArgs e) { if (Playlist.Count != 0) { var room = new Room { UniqName = RoomNameTB.Text, Name = RoomNameTB.Text, Password = RoomPasswordTB.Text }; if (room.ConntectToRoom()) { PlayerForm playerForm = new PlayerForm(Playlist); playerForm.ShowDialog(); this.Close(); } else { //error message } } else { MessageBox.Show("Fill playlist", "Filmst"); } }