Слияние

This commit is contained in:
2025-04-30 16:14:36 +04:00
3 changed files with 7 additions and 15 deletions
@@ -36,7 +36,7 @@ sealed partial class EntityTreeViewerControl
ContentPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; ContentPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
ContentPanel.Location = new Point(0, 0); ContentPanel.Location = new Point(0, 0);
ContentPanel.Name = "ContentPanel"; ContentPanel.Name = "ContentPanel";
ContentPanel.Size = new Size(420, 520); ContentPanel.Size = new Size(400, 500);
ContentPanel.TabIndex = 2; ContentPanel.TabIndex = 2;
ContentPanel.Resize += ContentPanel_Resize; ContentPanel.Resize += ContentPanel_Resize;
// //
@@ -46,7 +46,7 @@ sealed partial class EntityTreeViewerControl
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
Controls.Add(ContentPanel); Controls.Add(ContentPanel);
Name = "EntityTreeViewerControl"; Name = "EntityTreeViewerControl";
Size = new Size(420, 520); Size = new Size(400, 500);
ResumeLayout(false); ResumeLayout(false);
} }
@@ -1,8 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using Pf2eViewer.EntityTreeViewer;
namespace Pf2eViewer.EntityTreeViewer; namespace Pf2eViewer.EntityTreeViewer;
public sealed partial class EntityTreeViewerControl : UserControl public sealed partial class EntityTreeViewerControl : UserControl
public partial class EntityTreeViewerControl : UserControl
{ {
private int _itemHeight = 20; private int _itemHeight = 20;
@@ -88,8 +89,8 @@ public sealed partial class EntityTreeViewerControl : UserControl
_viewerRows = _rows.SelectMany(r => r.GetTextRows(this)).ToList(); _viewerRows = _rows.SelectMany(r => r.GetTextRows(this)).ToList();
ContentPanel.Controls.Clear(); ContentPanel.Controls.Clear();
ContentPanel.Controls.AddRange(_viewerRows.ToArray<Control>()); ContentPanel.Controls.AddRange(_viewerRows.ToArray<Control>());
ContentPanel.Controls.AddRange(ViewerRows.ToArray());
UpdateView(); UpdateView();
} }
@@ -124,8 +125,8 @@ public sealed partial class EntityTreeViewerControl : UserControl
} }
private void BuildLadder(List<EntityTreeViewerRow> rows) private void BuildLadder(List<EntityTreeViewerRow> rows)
{
List<LadderType> lastLadder = []; List<LadderType> lastLadder = [];
ContentPanel.VerticalScroll.Visible = true;
for (int i = rows.Count - 1; i >= 0; i--) for (int i = rows.Count - 1; i >= 0; i--)
{ {
+1 -10
View File
@@ -1,13 +1,4 @@
using System; using Pf2eModel;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Pf2eModel;
using Pf2eModel.Model.Base; using Pf2eModel.Model.Base;
namespace Pf2eViewer; namespace Pf2eViewer;