public IceTabPageDCC(WindowType windowType, string sCaption) : base(windowType, sCaption) { this.dccFileList = new FlickerFreeListView(); this.dccFileList.SuspendLayout(); this.SuspendLayout(); Panel dccPanel = new Panel(); dccPanel.BackColor = Color.LightGray; dccPanel.Size = new Size(this.Width, 55); dccPanel.Dock = DockStyle.Bottom; Button dccCancel = new Button(); dccCancel.Name = "dccCancel"; dccCancel.Click += new EventHandler(dccCancel_Click); dccCancel.Location = new Point(5, 5); dccCancel.Size = new Size(100, 35); dccCancel.Text = "Cancel"; dccCancel.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dccCancel.UseVisualStyleBackColor = true; dccPanel.Controls.Add(dccCancel); Button dccOpen = new Button(); dccOpen.Name = "dccOpen"; dccOpen.Click += new EventHandler(dccOpen_Click); dccOpen.Location = new Point(110, 5); dccOpen.Size = new Size(100, 35); dccOpen.Text = "Open Folder"; dccOpen.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dccOpen.UseVisualStyleBackColor = true; dccPanel.Controls.Add(dccOpen); Button dccRemove = new Button(); dccRemove.Name = "dccRemove"; dccRemove.Click += new EventHandler(dccRemove_Click); dccRemove.Location = new Point(220, 5); dccRemove.Size = new Size(100, 35); dccRemove.Text = "Remove"; dccRemove.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dccRemove.UseVisualStyleBackColor = true; dccPanel.Controls.Add(dccRemove); this.dccFileList.Dock = DockStyle.Fill; this.dccFileList.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dccFileList.View = View.Details; this.dccFileList.MultiSelect = false; this.dccFileList.FullRowSelect = true; this.dccFileList.HideSelection = false; this.dccFileList.DoubleClick += new EventHandler(dccFileList_DoubleClick); ColumnHeader fn = new ColumnHeader(); fn.Text = "File Name"; fn.Width = 250; fn.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); this.dccFileList.Columns.Add(fn); ColumnHeader n = new ColumnHeader(); n.Text = "Nick"; n.Width = 100; this.dccFileList.Columns.Add(n); ColumnHeader fs = new ColumnHeader(); fs.Text = "File Size"; fs.Width = 200; this.dccFileList.Columns.Add(fs); ColumnHeader s = new ColumnHeader(); s.Text = "Status"; s.Width = 150; s.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); this.dccFileList.Columns.Add(s); //store the dcc file style (upload/download) ColumnHeader st = new ColumnHeader(); st.Text = "Style"; st.Width = 0; st.AutoResize(ColumnHeaderAutoResizeStyle.None); this.dccFileList.Columns.Add(st); this.dccFileList.Columns[4].Width = 0; //store the path/folder for the dcc file ColumnHeader pa = new ColumnHeader(); pa.Text = "Path"; pa.Width = 0; pa.AutoResize(ColumnHeaderAutoResizeStyle.None); this.dccFileList.Columns.Add(pa); this.dccFileList.Columns[5].Width = 0; this.Controls.Add(dccFileList); this.Controls.Add(dccPanel); this.dccFileList.ResumeLayout(false); this.ResumeLayout(false); dccFiles = new List<DccFileStruct>(); }
private void InitializeComponent() { this.dccFileList = new FlickerFreeListView(); this.dccFileList.SuspendLayout(); this.SuspendLayout(); Panel dccPanel = new Panel(); dccPanel.BackColor = Color.LightGray; dccPanel.Size = new Size(this.Width, 45); dccPanel.Dock = DockStyle.Bottom; Button dccCancel = new Button(); dccCancel.Name = "dccCancel"; dccCancel.Click += new EventHandler(dccCancel_Click); dccCancel.Location = new Point(5, 5); dccCancel.Size = new Size(100, 35); dccCancel.Text = "Cancel"; dccCancel.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dccCancel.UseVisualStyleBackColor = true; dccPanel.Controls.Add(dccCancel); Button dccOpen = new Button(); dccOpen.Name = "dccOpen"; dccOpen.Click += new EventHandler(dccOpen_Click); dccOpen.Location = new Point(110, 5); dccOpen.Size = new Size(100, 35); dccOpen.Text = "Open Folder"; dccOpen.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dccOpen.UseVisualStyleBackColor = true; dccPanel.Controls.Add(dccOpen); Button dccRemove = new Button(); dccRemove.Name = "dccRemove"; dccRemove.Click += new EventHandler(dccRemove_Click); dccRemove.Location = new Point(220, 5); dccRemove.Size = new Size(100, 35); dccRemove.Text = "Remove"; dccRemove.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dccRemove.UseVisualStyleBackColor = true; dccPanel.Controls.Add(dccRemove); this.dccFileList.Dock = DockStyle.Fill; this.dccFileList.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dccFileList.View = View.Details; this.dccFileList.ShowItemToolTips = true; this.dccFileList.MultiSelect = false; this.dccFileList.FullRowSelect = true; this.dccFileList.HideSelection = false; this.dccFileList.DoubleClick += new EventHandler(dccFileList_DoubleClick); ColumnHeader fn = new ColumnHeader(); fn.Text = "File Name"; fn.Width = 200; fn.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); this.dccFileList.Columns.Add(fn); ColumnHeader n = new ColumnHeader(); n.Text = "Nick"; n.Width = 80; this.dccFileList.Columns.Add(n); ColumnHeader fs = new ColumnHeader(); fs.Text = "File Size"; fs.Width = 150; this.dccFileList.Columns.Add(fs); ColumnHeader sp = new ColumnHeader(); sp.Text = "Speed"; sp.Width = 100; this.dccFileList.Columns.Add(sp); ColumnHeader el = new ColumnHeader(); el.Text = "Elapsed"; el.Width = 100; this.dccFileList.Columns.Add(el); ColumnHeader s = new ColumnHeader(); s.Text = "Status"; s.Width = 100; s.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); this.dccFileList.Columns.Add(s); //store the dcc file style (upload/download) ColumnHeader st = new ColumnHeader(); st.Text = "Style"; st.Width = 0; st.AutoResize(ColumnHeaderAutoResizeStyle.None); this.dccFileList.Columns.Add(st); this.dccFileList.Columns[6].Width = 0; //store the server id of the connection ColumnHeader sid = new ColumnHeader(); sid.Text = "ServerID"; sid.Width = 0; sid.AutoResize(ColumnHeaderAutoResizeStyle.None); this.dccFileList.Columns.Add(sid); this.dccFileList.Columns[7].Width = 0; //store the path/folder for the dcc file ColumnHeader pa = new ColumnHeader(); pa.Text = "Path"; pa.Width = 0; pa.AutoResize(ColumnHeaderAutoResizeStyle.None); this.dccFileList.Columns.Add(pa); this.dccFileList.Columns[8].Width = 0; this.Controls.Add(dccFileList); this.Controls.Add(dccPanel); this.dccFileList.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Create the Channel List /// </summary> private void InitializeChannelList() { this.channelList = new FlickerFreeListView(); this.channelList.SuspendLayout(); this.SuspendLayout(); this.channelList.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.channelList.Location = new System.Drawing.Point(0, 0); this.channelList.Name = "channelList"; this.channelList.DoubleClick += new EventHandler(channelList_DoubleClick); this.channelList.ColumnClick += new ColumnClickEventHandler(channelList_ColumnClick); this.channelList.MouseDown += new MouseEventHandler(channelList_MouseDown); ColumnHeader c = new ColumnHeader(); c.Text = "Channel"; c.Width = 200; this.channelList.Columns.Add(c); this.channelList.Columns.Add("Users"); ColumnHeader t = new ColumnHeader(); t.Text = "Topic"; t.Width = 2000; this.channelList.Columns.Add(t); this.channelList.View = View.Details; this.channelList.MultiSelect = false; this.channelList.FullRowSelect = true; Panel searchPanel = new Panel(); searchPanel.Height = 30; Label searchLabel = new Label(); searchLabel.Text = "Search Channels:"; searchLabel.Dock = DockStyle.Left; searchLabel.AutoSize = true; searchLabel.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); searchText = new TextBox(); searchText.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); searchText.Dock = DockStyle.Fill; searchText.BorderStyle = BorderStyle.Fixed3D; Button searchButton = new Button(); searchButton.Text = "Search"; searchButton.Dock = DockStyle.Right; searchButton.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); searchButton.Click += new EventHandler(OnSearchButtonClick); searchPanel.Controls.Add(searchText); searchPanel.Controls.Add(searchLabel); searchPanel.Controls.Add(searchButton); searchPanel.Dock = DockStyle.Bottom; this.channelList.Dock = DockStyle.Fill; this.Controls.Add(channelList); this.Controls.Add(searchPanel); this.channelList.ResumeLayout(false); this.ResumeLayout(false); }