Начало работы над кастомным деревом вывода

This commit is contained in:
2025-04-28 00:26:50 +04:00
parent 06d154eccc
commit d6fef4c2c8
7 changed files with 626 additions and 1 deletions
+32
View File
@@ -0,0 +1,32 @@
using System;
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;
namespace Pf2eViewer;
public partial class TestForm : Form
{
public TestForm()
{
InitializeComponent();
_ = new DarkModeCS(this) { ColorMode = DarkModeCS.DisplayMode.SystemDefault };
Pf2eDbContext context = new();
int count = context.Entities.Count();
int id = Random.Shared.Next(1, count + 1);
Entity entity = context.Entities.FirstOrDefault(e => e.Id == id)!;
EntityView view = new(context, entity.Type, id);
entityTreeViewerControl1.EntityView = view;
}
}