Начало работы над кастомным деревом вывода
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user