From c1b70a12eb29d0cb16e490ff668161a5870cf58e Mon Sep 17 00:00:00 2001 From: Ilya Kozhemyakin Date: Mon, 5 May 2025 23:46:58 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=84=D0=BE=D1=80=D0=BC=D1=8B=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=81=D0=BC=D0=BE=D1=82=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DatabaseViewer/DatabaseQueryPerformer.cs | 6 +- .../DatabaseViewer/DatabaseViewerControl.cs | 5 +- .../EntityTreeViewerControl.cs | 14 + .../EntityTreeViewerControlRow.cs | 40 ++- .../EntityTreeViewerRow.Designer.cs | 130 --------- .../EntityTreeViewer/EntityTreeViewerRow.cs | 273 ------------------ .../EntityTreeViewer/EntityTreeViewerRow.resx | 120 -------- .../EntityTreeViewer/StructureBuilder.cs | 14 - Pf2eViewer/MainViewForm.Designer.cs | 14 +- 9 files changed, 67 insertions(+), 549 deletions(-) delete mode 100644 Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.Designer.cs delete mode 100644 Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.cs delete mode 100644 Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.resx diff --git a/Pf2eViewer/DatabaseViewer/DatabaseQueryPerformer.cs b/Pf2eViewer/DatabaseViewer/DatabaseQueryPerformer.cs index 6f0a516..e9cca11 100644 --- a/Pf2eViewer/DatabaseViewer/DatabaseQueryPerformer.cs +++ b/Pf2eViewer/DatabaseViewer/DatabaseQueryPerformer.cs @@ -49,7 +49,11 @@ internal class DatabaseQueryPerformer int count = query.Count(); - List entities = query.Skip((Page - 1) * PerPage).Take(PerPage).ToList(); + List entities = query + .OrderBy(e => e.Id) + .Skip((Page - 1) * PerPage) + .Take(PerPage) + .ToList(); DatabaseQueryResult result = new(count, entities); diff --git a/Pf2eViewer/DatabaseViewer/DatabaseViewerControl.cs b/Pf2eViewer/DatabaseViewer/DatabaseViewerControl.cs index 7cd2ce9..e589ee5 100644 --- a/Pf2eViewer/DatabaseViewer/DatabaseViewerControl.cs +++ b/Pf2eViewer/DatabaseViewer/DatabaseViewerControl.cs @@ -207,7 +207,10 @@ public partial class DatabaseViewerControl : UserControl DataGridView, view => { - view.DataSource = result.Entities.Select(e => new EntityGridRow(e)).ToList(); + view.DataSource = result + .Entities.Select(e => new EntityGridRow(e)) + .OrderBy(r => r.Id) + .ToList(); SetBusyStatus(false); diff --git a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControl.cs b/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControl.cs index 4343768..1e6d234 100644 --- a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControl.cs +++ b/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControl.cs @@ -47,6 +47,20 @@ public sealed partial class EntityTreeViewerControl : UserControl } private int _depthSize = 20; + [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] + [Category("Entity Render")] + [Description("The size of tab.")] + public float TypeFontSize + { + get => _typeFontSize; + set + { + _typeFontSize = value; + UpdateView(); + } + } + private float _typeFontSize = 9.5f; + [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [Category("Entity Render")] [Description("The size of plus/minus button.")] diff --git a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControlRow.cs b/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControlRow.cs index 031a00e..08460f8 100644 --- a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControlRow.cs +++ b/Pf2eViewer/EntityTreeViewer/EntityTreeViewerControlRow.cs @@ -26,6 +26,20 @@ internal class EntityTreeViewerControlRow } private Image? _cache; + public Image HoveredCache + { + get + { + if (_hoveredCache == null) + { + UpdateCache(); + } + return _hoveredCache!; + } + set => _hoveredCache = value; + } + private Image? _hoveredCache; + public List Ladder { get => _ladder; @@ -92,6 +106,11 @@ internal class EntityTreeViewerControlRow get => ParentControl.ButtonSize; set => ParentControl.ButtonSize = value; } + public float TypeFontSize + { + get => ParentControl.TypeFontSize; + set => ParentControl.TypeFontSize = value; + } // ValueText functions @@ -120,7 +139,9 @@ internal class EntityTreeViewerControlRow return result; } } - public Font TypeFont => new(Font.FontFamily, Font.Size * 0.6f, FontStyle.Italic); + + // public Font TypeFont => new(Font.FontFamily, TypeFontSize, FontStyle.Italic); + public Font TypeFont => new(Font.FontFamily, TypeFontSize); public string ValueText => Item.GetValueString(); public Font ValueFont => @@ -181,21 +202,29 @@ internal class EntityTreeViewerControlRow public void UpdateCache() { - Cache = new Bitmap(Width, Height); - Graphics g = Graphics.FromImage(Cache); + Cache = RenderCache(BackColor); + HoveredCache = RenderCache(HoverColor); + } + + private Image RenderCache(Color backColor) + { + Image cache = new Bitmap(Width, Height); + Graphics g = Graphics.FromImage(cache); + + g.FillRectangle(new SolidBrush(backColor), 0, 0, Width, Height); RenderLadder(g); RenderContent(g); g.Save(); + return cache; } public void Invalidate(Graphics? g = null) { g ??= Graphics.FromImage(ParentControl.ContentImage); - g.FillRectangle(new SolidBrush(Hovered ? HoverColor : BackColor), Target); - g.DrawImage(Cache, Target); + g.DrawImage(Hovered ? HoveredCache : Cache, Target); UpdateButton(); } @@ -329,6 +358,7 @@ internal class EntityTreeViewerControlRow _ => ForeColor, }, StructureFieldEnum => BlendColor(Color.Red), + StructureFieldNull => BlendColor(BackColor), _ => ForeColor, }; } diff --git a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.Designer.cs b/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.Designer.cs deleted file mode 100644 index 05f782b..0000000 --- a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.Designer.cs +++ /dev/null @@ -1,130 +0,0 @@ -namespace Pf2eViewer.EntityTreeViewer; - -sealed partial class EntityTreeViewerRow -{ - /// - /// Обязательная переменная конструктора. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором компонентов - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - NameLabel = new Label(); - IconPictureBox = new PictureBox(); - NamePanel = new Panel(); - ValuePanel = new Panel(); - TypeLabel = new Label(); - ValueLabel = new Label(); - ((System.ComponentModel.ISupportInitialize) IconPictureBox).BeginInit(); - NamePanel.SuspendLayout(); - ValuePanel.SuspendLayout(); - SuspendLayout(); - // - // NameLabel - // - NameLabel.Dock = DockStyle.Fill; - NameLabel.Location = new Point(0, 0); - NameLabel.Margin = new Padding(0); - NameLabel.Name = "NameLabel"; - NameLabel.Size = new Size(200, 38); - NameLabel.TabIndex = 0; - NameLabel.Text = "Name"; - NameLabel.TextAlign = ContentAlignment.MiddleLeft; - // - // IconPictureBox - // - IconPictureBox.Dock = DockStyle.Left; - IconPictureBox.Location = new Point(0, 0); - IconPictureBox.Margin = new Padding(0); - IconPictureBox.Name = "IconPictureBox"; - IconPictureBox.Size = new Size(20, 38); - IconPictureBox.TabIndex = 1; - IconPictureBox.TabStop = false; - IconPictureBox.Click += IconPictureBox_Click; - // - // NamePanel - // - NamePanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left; - NamePanel.Controls.Add(NameLabel); - NamePanel.Controls.Add(IconPictureBox); - NamePanel.Location = new Point(0, 0); - NamePanel.Name = "NamePanel"; - NamePanel.Size = new Size(200, 38); - NamePanel.TabIndex = 2; - // - // ValuePanel - // - ValuePanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - ValuePanel.BackColor = SystemColors.Control; - ValuePanel.Controls.Add(ValueLabel); - ValuePanel.Controls.Add(TypeLabel); - ValuePanel.Location = new Point(200, 0); - ValuePanel.Margin = new Padding(0); - ValuePanel.Name = "ValuePanel"; - ValuePanel.Size = new Size(288, 38); - ValuePanel.TabIndex = 4; - // - // TypeLabel - // - TypeLabel.Dock = DockStyle.Left; - TypeLabel.Location = new Point(0, 0); - TypeLabel.Margin = new Padding(0); - TypeLabel.Name = "TypeLabel"; - TypeLabel.Size = new Size(57, 38); - TypeLabel.TabIndex = 3; - TypeLabel.Text = "TypeText"; - TypeLabel.TextAlign = ContentAlignment.MiddleLeft; - // - // ValueLabel - // - ValueLabel.AutoEllipsis = true; - ValueLabel.Dock = DockStyle.Fill; - ValueLabel.Location = new Point(0, 0); - ValueLabel.Name = "ValueLabel"; - ValueLabel.Size = new Size(288, 38); - ValueLabel.TabIndex = 4; - ValueLabel.Text = "ValueText"; - ValueLabel.TextAlign = ContentAlignment.MiddleLeft; - // - // EntityTreeViewerRow - // - AutoScaleDimensions = new SizeF(7F, 15F); - AutoScaleMode = AutoScaleMode.Font; - Controls.Add(NamePanel); - Controls.Add(ValuePanel); - Name = "EntityTreeViewerRow"; - Size = new Size(488, 38); - ((System.ComponentModel.ISupportInitialize) IconPictureBox).EndInit(); - NamePanel.ResumeLayout(false); - ValuePanel.ResumeLayout(false); - ResumeLayout(false); - } - - #endregion - - private Label NameLabel; - private PictureBox IconPictureBox; - private Panel NamePanel; - private Panel ValuePanel; - private Label TypeLabel; - private Label ValueLabel; -} diff --git a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.cs b/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.cs deleted file mode 100644 index 3d3eafe..0000000 --- a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.cs +++ /dev/null @@ -1,273 +0,0 @@ -using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; -using System.Windows.Markup; -using FontAwesome.Sharp; - -namespace Pf2eViewer.EntityTreeViewer; - -internal sealed partial class EntityTreeViewerRow : UserControl -{ - public readonly EntityTreeViewerControl ParentControl; - - public readonly StructureField Item; - - public int ViewIndex = 0; - - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public Bitmap IconCache - { - get - { - if (_iconCache == null) - { - UpdateCache(); - } - return _iconCache!; - } - set => _iconCache = value; - } - private Bitmap? _iconCache; - - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public List Ladder - { - get => _ladder; - set - { - _ladder = value; - _iconCache = null; - } - } - private List _ladder = []; - - [AllowNull] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] - public override Font Font - { - get => ParentControl.Font; - set => ParentControl.Font = value; - } - - [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] - public override Color ForeColor - { - get => ParentControl.ForeColor; - set => ParentControl.ForeColor = value; - } - - [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] - public override Color BackColor - { - get => ParentControl.BackColor; - set => ParentControl.BackColor = value; - } - - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public int ItemHeight - { - get => ParentControl.ItemHeight; - set => ParentControl.ItemHeight = value; - } - - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public int DepthSize - { - get => ParentControl.ItemHeight; - set => ParentControl.ItemHeight = value; - } - - // ValueText functions - - public bool HasButton => Item.FieldType == StructureFieldType.Complex; - public int Depth => Item.Depth; - public int NameWidth => TextRenderer.MeasureText(NameLabel.Text, Font).Width + DepthSize; - - public EntityTreeViewerRow(EntityTreeViewerControl parent, StructureField item) - { - ParentControl = parent; - - Item = item; - - InitializeComponent(); - ApplyItem(); - Refresh(); - } - - private void ApplyItem() - { - TypeLabel.Font = new(Font.FontFamily, Font.Size - 2, FontStyle.Italic); - - NameLabel.Text = Item.Name; - TypeLabel.Text = Item.GetTypeString(); - if (TypeLabel.Text != "") - { - TypeLabel.Text = $@"({TypeLabel.Text})"; - } - - ValueLabel.Text = Item.GetValueString(); - TypeLabel.ForeColor = ValueLabel.ForeColor = GetValueColor(); - - if (Item.FieldType == StructureFieldType.Complex) - { - ValueLabel.Font = new(Font, FontStyle.Italic); - } - - UpdateCache(); - Refresh(); - } - - public new void Refresh() - { - base.Refresh(); - - Left = 0; - Top = ViewIndex * ParentControl.ItemHeight; - Width = ParentControl.ContentWidth - Left - SystemInformation.VerticalScrollBarWidth; - Height = ParentControl.ItemHeight; - - // Name Panel - NamePanel.Left = 0; - NamePanel.Width = ParentControl.NameWidth - NamePanel.Left; - - IconPictureBox.Width = IconCache.Width; - IconPictureBox.Image = IconCache; - - NameLabel.Left = IconPictureBox.Width; - NameLabel.Width = NamePanel.Width - NameLabel.Left; - - // ValueText Panel - ValuePanel.Left = NamePanel.Left + NamePanel.Width; - ValuePanel.Width = Width - ValuePanel.Left; - - Size typeSize = TextRenderer.MeasureText(TypeLabel.Text, TypeLabel.Font); - TypeLabel.Width = typeSize.Width + 3; - } - - private Color BlendColor(Color color, double rate = 0.5) - { - return BlendColor(ForeColor, color, rate); - } - - private Color BlendColor(Color color1, Color color2, double rate) - { - return Color.FromArgb( - Mix(color1.A, color2.A), - Mix(color1.R, color2.R), - Mix(color1.G, color2.G), - Mix(color1.B, color2.B) - ); - - int Mix(int a, int b) => Convert.ToInt32(Math.Round(a * rate + b * (1 - rate))); - } - - public Color GetValueColor() - { - return Item switch - { - StructureFieldPrimitive primitive => Type.GetTypeCode(primitive.Type) switch - { - TypeCode.Boolean => BlendColor(Color.DarkGoldenrod), - TypeCode.Int32 => BlendColor(Color.Blue), - TypeCode.Double => BlendColor(Color.Aqua), - TypeCode.String => BlendColor(Color.Green), - _ => ForeColor, - }, - StructureFieldEnum => BlendColor(Color.Red), - _ => ForeColor, - }; - } - - // Events - - private void IconPictureBox_Click(object sender, EventArgs e) - { - if (Item.GetType() != typeof(StructureFieldComplex)) - { - return; - } - - StructureFieldComplex complex = (StructureFieldComplex)Item; - - complex.Collapsed = !complex.Collapsed; - ParentControl.UpdateView(); - } - - private Bitmap? GetIconImage() - { - if (Item.GetType() != typeof(StructureFieldComplex)) - { - return null; - } - - StructureFieldComplex complex = (StructureFieldComplex)Item; - - int size = Convert.ToInt32(Math.Round(DepthSize * 0.6)); - - return complex.Collapsed - ? IconChar.PlusSquare.ToBitmap(IconFont.Auto, size, ForeColor) - : IconChar.MinusSquare.ToBitmap(IconFont.Auto, size, ForeColor); - } - - private void UpdateCache() - { - int n = Depth; - int h = ItemHeight; - int w = DepthSize; - - _iconCache = new(w * (n + 1), h); - - if (_ladder.Count < Depth) - { - return; - } - - Graphics g = Graphics.FromImage(_iconCache); - - Pen pen = new(Color.FromArgb(127, ForeColor.R, ForeColor.G, ForeColor.B), 1); - pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; - - float cy = 0.5f * h; - - for (int i = 0; i < n; i++) - { - float cx = (i + 1.5f) * w; - - switch (_ladder[i]) - { - case LadderType.Last: - g.DrawLine(pen, cx, 0, cx, cy); - break; - case LadderType.Through: - g.DrawLine(pen, cx, 0, cx, h); - break; - case LadderType.Empty: - default: - break; - } - - if (i == n - 1) - { - g.DrawLine(pen, cx, cy, (i + 2) * w, cy); - } - } - - Bitmap? icon = GetIconImage(); - - if (icon is not null) - { - float cx = (n + 0.5f) * w; - - g.FillRectangle( - new SolidBrush(BackColor), - cx - 0.5f * icon.Width - 1, - cy - 0.5f * icon.Height - 1, - icon.Width + 2, - icon.Height + 2 - ); - - g.DrawImage(icon, new PointF(cx - 0.5f * icon.Width, cy - 0.5f * icon.Height)); - } - - g.Save(); - } -} diff --git a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.resx b/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.resx deleted file mode 100644 index 8b2ff64..0000000 --- a/Pf2eViewer/EntityTreeViewer/EntityTreeViewerRow.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Pf2eViewer/EntityTreeViewer/StructureBuilder.cs b/Pf2eViewer/EntityTreeViewer/StructureBuilder.cs index 427d00d..2af955f 100644 --- a/Pf2eViewer/EntityTreeViewer/StructureBuilder.cs +++ b/Pf2eViewer/EntityTreeViewer/StructureBuilder.cs @@ -174,11 +174,6 @@ internal abstract class StructureField(StructureBuilder builder, string name, in public abstract string GetValueString(); - public virtual ICollection GetTextRows(EntityTreeViewerControl control) - { - return [new(control, this)]; - } - public virtual ICollection GetRows(Func func) { StructureField[] q = [this]; @@ -351,15 +346,6 @@ internal class StructureFieldComplex : StructureField } } - public override ICollection GetTextRows(EntityTreeViewerControl control) - { - List rows = base.GetTextRows(control).ToList(); - - rows.AddRange(Fields.SelectMany(f => f.GetTextRows(control)).ToList()); - - return rows; - } - public override ICollection GetRows(Func func) { return [.. base.GetRows(func), .. Fields.SelectMany(f => f.GetRows(func)).ToList()]; diff --git a/Pf2eViewer/MainViewForm.Designer.cs b/Pf2eViewer/MainViewForm.Designer.cs index f1edfba..b4379dc 100644 --- a/Pf2eViewer/MainViewForm.Designer.cs +++ b/Pf2eViewer/MainViewForm.Designer.cs @@ -34,9 +34,9 @@ partial class MainViewForm RootSplitContainer = new SplitContainer(); InnerSplitContainer = new SplitContainer(); TypesListBox = new ListBox(); + DatabaseViewer = new DatabaseViewerControl(); ResultSplitContainer = new SplitContainer(); EntityTreeViewerControl = new Pf2eViewer.EntityTreeViewer.EntityTreeViewerControl(); - DatabaseViewer = new DatabaseViewerControl(); DescriptionTextBox = new TextBox(); ((System.ComponentModel.ISupportInitialize)RootSplitContainer).BeginInit(); RootSplitContainer.Panel1.SuspendLayout(); @@ -44,6 +44,7 @@ partial class MainViewForm RootSplitContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)InnerSplitContainer).BeginInit(); InnerSplitContainer.Panel1.SuspendLayout(); + InnerSplitContainer.Panel2.SuspendLayout(); InnerSplitContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)ResultSplitContainer).BeginInit(); ResultSplitContainer.Panel1.SuspendLayout(); @@ -80,13 +81,13 @@ partial class MainViewForm // InnerSplitContainer.Panel1 // InnerSplitContainer.Panel1.Controls.Add(TypesListBox); - InnerSplitContainer.Size = new Size(322, 861); - InnerSplitContainer.SplitterDistance = 127; - InnerSplitContainer.TabIndex = 1; // // InnerSplitContainer.Panel2 // InnerSplitContainer.Panel2.Controls.Add(DatabaseViewer); + InnerSplitContainer.Size = new Size(322, 861); + InnerSplitContainer.SplitterDistance = 126; + InnerSplitContainer.TabIndex = 1; // // TypesListBox // @@ -94,7 +95,7 @@ partial class MainViewForm TypesListBox.FormattingEnabled = true; TypesListBox.Location = new Point(0, 0); TypesListBox.Name = "TypesListBox"; - TypesListBox.Size = new Size(322, 127); + TypesListBox.Size = new Size(322, 126); TypesListBox.TabIndex = 0; TypesListBox.SelectedIndexChanged += TypesListBox_SelectedIndexChanged; // @@ -103,6 +104,7 @@ partial class MainViewForm DatabaseViewer.Dock = DockStyle.Fill; DatabaseViewer.Location = new Point(0, 0); DatabaseViewer.Name = "DatabaseViewer"; + DatabaseViewer.Size = new Size(322, 731); DatabaseViewer.TabIndex = 1; // // ResultSplitContainer @@ -135,6 +137,7 @@ partial class MainViewForm EntityTreeViewerControl.Name = "EntityTreeViewerControl"; EntityTreeViewerControl.Size = new Size(582, 861); EntityTreeViewerControl.TabIndex = 0; + EntityTreeViewerControl.TypeFontSize = 7F; // // DescriptionTextBox // @@ -161,6 +164,7 @@ partial class MainViewForm ((System.ComponentModel.ISupportInitialize)RootSplitContainer).EndInit(); RootSplitContainer.ResumeLayout(false); InnerSplitContainer.Panel1.ResumeLayout(false); + InnerSplitContainer.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)InnerSplitContainer).EndInit(); InnerSplitContainer.ResumeLayout(false); ResultSplitContainer.Panel1.ResumeLayout(false);