private void btnMessages_Click(object sender, EventArgs e) { if (windowactive) { Invoke(new Action(() => { tableLayoutPanel1.Visible = false; Chaat.remove_Thread_Dependency(network); frmChaat = Chaat.Instance; pnlFormL.Visible = true; pnlNav.Height = btnMessages.Height; pnlNav.Top = btnMessages.Top; btnMessages.BackColor = System.Drawing.Color.FromArgb(46, 51, 73); pnlNav.Show(); lblTitle.Text = "Messages"; this.pnlFormL.Controls.Clear(); frmChaat.FormBorderStyle = FormBorderStyle.None; frmChaat.TopLevel = false; this.pnlFormL.Controls.Add(frmChaat); frmChaat.Show(); })); } }
public Chatmoderator(Networking.Networking nv) { Chaat chatinstance = Chaat.Instance; InitializeComponent(); chatinstance.Dock = DockStyle.Fill; chatinstance.TopLevel = false; chatinstance.TopMost = true; pnlFormL.Visible = true; pnlNav.Show(); lblTitle.Text = "Messages"; this.pnlFormL.Controls.Clear(); frmHelp.FormBorderStyle = FormBorderStyle.None; this.pnlFormL.Controls.Add(chatinstance); chatinstance.Show(); network = nv; }
public static void remove_Thread_Dependency(Networking.Networking nw) { messageslist = new List <ListViewItem>(); foreach (ListViewItem lvi in chatmessages.Items) { messageslist.Add(lvi); } if (Application.OpenForms.OfType <Chaat>().Count() > 0) { chatinstance.Invoke(new Action(() => { chatinstance.Controls.Remove(chatmessages); chatinstance.Close(); })); } chatinstance = new Chaat(); chatinstance.network = nw; }
private void btnModerator_Click(object sender, EventArgs e) { network.requestModerator(); Chaat.addMessage(new Message(Message.Sender.Me, "Moderator request sent")); }