private void userListView_MouseDoubleClick(object sender, MouseEventArgs e) { foreach (int i in userListView.SelectedIndices) { Model.Peer z = allPeersInCircle[i]; UserPanel b = new UserPanel(z); b.Dock = DockStyle.Fill; ((MainForm)App.mainForm).addOrSelectPanel(z.username, b, "(!) Files for " + z.id.ToString()); } }
public void privateChatReceived(Model.Commands.PrivateChatCommand c, Model.Peer z) { UI.UserPanel b = new UI.UserPanel(z); b.Dock = DockStyle.Fill; this.Invoke(new Action(delegate() { Control p = ((MainForm)App.mainForm).addOrSelectPanel(z.username, b, "(!) Files for " + z.id.ToString()); ((UI.UserPanel)p).selectChat(); ((UI.UserPanel)p).addLine(DateTime.Now.ToShortTimeString() + " " + z.username + ": " + c.content); flash(); })); }
public void selectUser(Model.Peer z) { UI.UserPanel b = new UI.UserPanel(z); b.Dock = DockStyle.Fill; ((MainForm)App.mainForm).addOrSelectPanel(z.username, b, "(!) Files for " + z.id.ToString()); }