public LoreTOC(LoreViewer parent) { _parent = parent; this.Width = LoreTOC.width; this.Height = parent.ClientRectangle.Height - (padding * 3) - parent.CurrentComboBox.Height; this.Location = new Point(padding, (padding * 2) + parent.CurrentComboBox.Height); this.BorderStyle = BorderStyle.Fixed3D; this.BackColor = Color.Black; this.ForeColor = Color.White; this.Resize += LoreTOC_Resize; TOC.ItemSelectionChanged += TOC_ItemSelectionChanged; parent.Controls.Add(this); TOC.BackColor = Color.Black; TOC.ForeColor = Color.White; TOC.BorderStyle = BorderStyle.None; TOC.Height = this.ClientRectangle.Height; TOC.Width = this.ClientRectangle.Width; TOC.View = View.Details; TOC.Columns.Add("Id"); TOC.Columns.Add("Name"); TOC.HeaderStyle = ColumnHeaderStyle.None; TOC.Font = labelFont; TOC.FullRowSelect = true; TOC.Columns[0].Width = 0; TOC.Columns[1].Width = TOC.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth - padding; this.Controls.Add(TOC); PopulateList(); }
public LoreText(LoreViewer parent) { _parent = parent; this.Resize += LoreText_Resize; this.Width = _parent.ClientRectangle.Width - offset - padding; this.Height = _parent.ClientRectangle.Height - (padding * 3) - parent.CurrentComboBox.Height; this.BackColor = Color.Black; this.ForeColor = Color.White; this.BorderStyle = BorderStyle.FixedSingle; this.Location = new Point(offset, (padding * 2) + parent.CurrentComboBox.Height); _parent.Controls.Add(this); ImagePanel.Size = new Size(imageDimensions, imageDimensions); this.Controls.Add(ImagePanel); Title.Size = new Size(this.ClientRectangle.Width - imageDimensions, imageDimensions); Title.Location = new Point(imageDimensions, 0); Title.BackColor = Color.Black; Title.ForeColor = Color.White; Title.Font = titleFont; Title.BorderStyle = BorderStyle.None; Title.ReadOnly = true; Title.SelectionAlignment = HorizontalAlignment.Center; this.Controls.Add(Title); DescriptionText.Size = new Size(this.ClientRectangle.Width, this.ClientRectangle.Height - imageDimensions); DescriptionText.Location = new Point(0, imageDimensions); DescriptionText.BackColor = Color.Black; DescriptionText.ForeColor = Color.White; DescriptionText.Font = textFont; DescriptionText.BorderStyle = BorderStyle.None; DescriptionText.ReadOnly = true; this.Controls.Add(DescriptionText); }