private void chatWindowToolStripMenuItem_Click(object sender, EventArgs e) { try { if (_Controller != null) { ChatDialog c = new ChatDialog(_Controller); List<string> dm_list = DDD_Global.Instance.DM_List; dm_list.Remove(DDD_Global.Instance.PlayerID); c.Members = dm_list; if (c.ShowProperties() == DialogResult.OK) { List<string> selected = c.SelectedMembers; if (selected != null) { if (selected.Count > 0) { selected.Add(DDD_Global.Instance.PlayerID); _Controller.RequestChatRoomCreate(c.GroupId, selected, DDD_Global.Instance.PlayerID); } else { MessageBox.Show("At least one DM is necessary to create a chat room.", "Chat Room Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } c.Dispose(); } } catch (Exception exc) { throw new Exception(exc.Message); } }