private void InitializeComponent() { this.panelTopic = new System.Windows.Forms.Panel(); this.textTopic = new IceChat.TextWindow(); this.textWindow = new IceChat.TextWindow(); this.panelTopic.SuspendLayout(); this.SuspendLayout(); // // panelTopic // this.panelTopic.Controls.Add(this.textTopic); this.panelTopic.Dock = System.Windows.Forms.DockStyle.Top; this.panelTopic.Location = new System.Drawing.Point(0, 0); this.panelTopic.Name = "panelTopic"; this.panelTopic.Size = new System.Drawing.Size(304, 22); this.panelTopic.TabIndex = 1; this.panelTopic.Visible = false; // // textTopic // this.textTopic.Dock = System.Windows.Forms.DockStyle.Fill; this.textTopic.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textTopic.IRCBackColor = 0; this.textTopic.IRCForeColor = 1; this.textTopic.Location = new System.Drawing.Point(0, 0); this.textTopic.Name = "textTopic"; this.textTopic.NoColorMode = false; this.textTopic.ShowTimeStamp = true; this.textTopic.SingleLine = true; this.textTopic.Size = new System.Drawing.Size(304, 22); this.textTopic.TabIndex = 0; // // textWindow // this.textWindow.Dock = System.Windows.Forms.DockStyle.Fill; this.textWindow.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textWindow.IRCBackColor = 0; this.textWindow.IRCForeColor = 0; this.textWindow.Location = new System.Drawing.Point(0, 22); this.textWindow.Name = "textWindow"; this.textWindow.NoColorMode = false; this.textWindow.ShowTimeStamp = true; this.textWindow.SingleLine = false; this.textWindow.Size = new System.Drawing.Size(304, 166); this.textWindow.TabIndex = 0; // // TabWindow // this.Controls.Add(this.textWindow); this.Controls.Add(this.panelTopic); this.Size = new System.Drawing.Size(304, 188); this.panelTopic.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Temporary Method to create a NULL Connection for the Welcome Tab in the Console /// </summary> /// <param name="connection"></param> /// <param name="serverName"></param> internal void AddConsoleTab(string serverName) { //this is only used for now, to show the "Welcome" Tab ConsoleTab t = new ConsoleTab(serverName); TextWindow w = new TextWindow(); w.Dock = DockStyle.Fill; w.Font = new System.Drawing.Font(FormMain.Instance.IceChatFonts.FontSettings[0].FontName, FormMain.Instance.IceChatFonts.FontSettings[0].FontSize); w.IRCBackColor = FormMain.Instance.IceChatColors.ConsoleBackColor; t.Controls.Add(w); consoleTab.TabPages.Add(t); consoleTab.SelectedTab = t; }
/// <summary> /// Add a new Tab/Connection to the Console Tab Control /// </summary> /// <param name="connection"></param> internal void AddConsoleTab(IRCConnection connection) { ConsoleTab t = new ConsoleTab(connection.ServerSetting.ServerName); t.Connection = connection; TextWindow w = new TextWindow(); w.Dock = DockStyle.Fill; w.Font = new System.Drawing.Font(FormMain.Instance.IceChatFonts.FontSettings[0].FontName, FormMain.Instance.IceChatFonts.FontSettings[0].FontSize); w.IRCBackColor = FormMain.Instance.IceChatColors.ConsoleBackColor; w.NoEmoticons = true; t.Controls.Add(w); if (FormMain.Instance.IceChatOptions.LogConsole) { w.SetLogFile(FormMain.Instance.LogsFolder + System.IO.Path.DirectorySeparatorChar + connection.ServerSetting.ServerName); } consoleTab.TabPages.Add(t); consoleTab.SelectedTab = t; }
/// <summary> /// Add a new Tab/Connection to the Console Tab Control /// </summary> /// <param name="connection"></param> internal void AddConsoleTab(IRCConnection connection) { ConsoleTab t = new ConsoleTab(connection.ServerSetting.ServerName); t.Connection = connection; TextWindow w = new TextWindow(); w.Dock = DockStyle.Fill; w.Font = new System.Drawing.Font(FormMain.Instance.IceChatFonts.FontSettings[0].FontName, FormMain.Instance.IceChatFonts.FontSettings[0].FontSize); w.IRCBackColor = FormMain.Instance.IceChatColors.ConsoleBackColor; w.NoEmoticons = true; t.Controls.Add(w); if (FormMain.Instance.IceChatOptions.LogConsole) w.SetLogFile(FormMain.Instance.LogsFolder + System.IO.Path.DirectorySeparatorChar + connection.ServerSetting.ServerName); consoleTab.TabPages.Add(t); consoleTab.SelectedTab = t; }
private void AddConsole(ConsoleTab tab, TextWindow window) { if (this.InvokeRequired) { AddConsoleDelegate add = new AddConsoleDelegate(AddConsole); this.Invoke(add, new object[] { tab, window }); } else { tab.Controls.Add(window); if (FormMain.Instance.IceChatOptions.LogConsole) window.SetLogFile(); consoleTab.TabPages.Add(tab); consoleTab.SelectedTab = tab; } }
/// <summary> /// Add a new Tab/Connection to the Console Tab Control /// </summary> /// <param name="connection"></param> internal void AddConsoleTab(IRCConnection connection) { if (this.InvokeRequired) { AddConsoleTabDelegate act = new AddConsoleTabDelegate(AddConsoleTab); this.Invoke(act, new object[] { connection }); } else { ConsoleTab t; if (connection.ServerSetting.UseBNC) t = new ConsoleTab(connection.ServerSetting.BNCIP); else t = new ConsoleTab(connection.ServerSetting.ServerName); t.Connection = connection; TextWindow w = new TextWindow(); w.Dock = DockStyle.Fill; w.Font = new System.Drawing.Font(FormMain.Instance.IceChatFonts.FontSettings[0].FontName, FormMain.Instance.IceChatFonts.FontSettings[0].FontSize); w.IRCBackColor = FormMain.Instance.IceChatColors.ConsoleBackColor; w.NoEmoticons = true; AddConsole(t, w); } }