public MDIChildCommunication(MDIParent main, MDIChildServer mainWindow, string name, Dictionary <string, IRCConnection.UserInfo> whois) : base(main) { InitializeComponent(); this.mainWindow = mainWindow; this.whois = whois; this.bsUsers.DataSource = this.channelUsers; this.bsUsers.ResetBindings(true); }
public const string ReadSplitterString = @"38****************************"; // Первый символ невидим public MDIChildPrivate(MDIParent main, MDIChildServer mainWindow, string name, Dictionary <string, UserInfo> whois) : base(main, mainWindow, name, whois) { InitializeComponent(); this.Size = UISettings.Default.IRCWindowSize; this.Text = name; AddPerson(name, false); mainAreaSplitContainer.Panel2.Visible = false; mainAreaSplitContainer.SplitterDistance = mainAreaSplitContainer.Width; topicPanel.Visible = false; this.topPanel.Visible = false; }
public MDIChildChannel(MDIParent main, MDIChildServer mainWindow, Channel channel, Dictionary <string, UserInfo> whois) : base(main, mainWindow, channel.Name, whois) { InitializeComponent(); this.channel = channel; this.Size = UISettings.Default.IRCWindowSize; this.dgvUsers.ContextMenuStrip = new IRCContextMenuStrip(); this.dgvUsers.ContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tSMICtcp, this.toolStripMenuItem6, this.tsmiHalfOp, this.toolStripMenuItem9, this.toolStripSeparator2, this.tsmiCall, this.tsmiInvite, this.toolStripSeparator3, this.toolStripMenuItem13, this.tSMIBan, this.tsmiKickAndBan }); this.dgvUsers.ContextMenuStrip.Opened += (sender, e) => NeedUpdateWhois = false; this.winName = this.Channel.Name; this.Text = this.Channel.Name + " [0] []"; this.MyCmd += new CmdDel(MDIChildChannel_MyCmd); this.contextMenuStripChat.Items.Add(new ToolStripSeparator()); this.tSMIchannelModes = new ToolStripMenuItem(Resources.ChannelModes); this.contextMenuStripChat.Items.Add(tSMIchannelModes); modes['m'] = new ChannelMode('m', Resources.ModeM, ChannelModeHandler, tSMIchannelModes); tSMIchannelModes.DropDownItems.Add(new ToolStripSeparator()); modes['i'] = new ChannelMode('i', Resources.ModeI, ChannelModeHandler, tSMIchannelModes); modes['k'] = new ChannelMode('k', Resources.ModeK, ChannelModeHandler, tSMIchannelModes); modes['l'] = new ChannelMode('l', Resources.ModeL, ChannelModeHandler, tSMIchannelModes); tSMIchannelModes.DropDownItems.Add(new ToolStripSeparator()); modes['b'] = new ChannelMode('b', Resources.ModeB, ChannelModeHandler, tSMIchannelModes); modes['e'] = new ChannelMode('e', Resources.ModeE, ChannelModeHandler, tSMIchannelModes); modes['I'] = new ChannelMode('I', Resources.ModeBigI, ChannelModeHandler, tSMIchannelModes); tSMIchannelModes.DropDownItems.Add(new ToolStripSeparator()); modes['t'] = new ChannelMode('t', Resources.ModeT, ChannelModeHandler, tSMIchannelModes); modes['n'] = new ChannelMode('n', Resources.ModeN, ChannelModeHandler, tSMIchannelModes); modes['c'] = new ChannelMode('c', Resources.ModeC, ChannelModeHandler, tSMIchannelModes); modes['c'] = new ChannelMode('S', Resources.ModeBigS, ChannelModeHandler, tSMIchannelModes); tSMIchannelModes.DropDownItems.Add(new ToolStripSeparator()); modes['p'] = new ChannelMode('p', Resources.ModeP, ChannelModeHandler, tSMIchannelModes); modes['s'] = new ChannelMode('s', Resources.ModeS, ChannelModeHandler, tSMIchannelModes); modes['a'] = new ChannelMode('a', Resources.ModeA, ChannelModeHandler, tSMIchannelModes); this.dgvUsers.CellMouseDoubleClick += dgvUsers_CellMouseDoubleClick; this.dgvUsers.CellMouseEnter += dgvUsers_CellMouseEnter; this.dgvUsers.CellMouseLeave += (sender, e) => { currentRow = -1; NeedUpdateWhois = false; }; this.dgvUsers.MouseLeave += (sender, e) => { currentRow = -1; NeedUpdateWhois = false; this.userInfoToolTip1.Hide(this.dgvUsers); }; this.tsmiStick.Checked = this.Channel.Sticked; this.tsmiAutoOpen.Checked = this.Channel.AutoOpen; this.tsmiStick.CheckedChanged += (sender, e) => { this.Channel.Sticked = this.tsmiStick.Checked; if (this.Channel.Sticked) { this.ServerWindow.Server.Sticked = true; } }; this.tsmiAutoOpen.CheckedChanged += (sender, e) => this.Channel.AutoOpen = this.tsmiAutoOpen.Checked; this.Channel.PropertyChanged += (sender, e) => { if (e.PropertyName == "Sticked") { this.tsmiStick.Checked = this.Channel.Sticked; this.myNode.Sticked = this.Channel.Sticked; if (this.Channel.Sticked) { this.MyNode.Tag = this.Channel; } } }; }