Возврат к основной форме (но есть ошибка при запуске...)

This commit is contained in:
2025-04-30 19:50:30 +04:00
parent 5d3c06e921
commit 197a9862b3
8 changed files with 99 additions and 71 deletions
+8 -12
View File
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using System.Diagnostics.CodeAnalysis;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using Pf2eModel;
@@ -16,7 +17,8 @@ public partial class MainViewForm : Form
public readonly string JsonViewerHtml;
public readonly EntityView Viewer;
[AllowNull]
public readonly EntityView Viewer = null;
public MainViewForm()
{
@@ -67,7 +69,8 @@ public partial class MainViewForm : Form
string json = result[..^1] + $",\"SubEntity\":{subResult}}}";
RenderJson(json);
EntityTreeViewerControl.EntityView = newEntity;
// RenderJson(json);
DescriptionTextBox.Text = newEntity.Entity!.Description;
}
@@ -85,6 +88,7 @@ public partial class MainViewForm : Form
public void RenderJson(string json)
{
/*
if (JsonWebView.CoreWebView2 == null)
{
JsonWebView.EnsureCoreWebView2Async();
@@ -93,14 +97,6 @@ public partial class MainViewForm : Form
string html = JsonViewerHtml.Replace("{JSON}", json);
JsonWebView.CoreWebView2.NavigateToString(html);
}
private void JsonWebView_CoreWebView2InitializationCompleted(
object sender,
Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e
)
{
JsonWebView.Visible = true;
DatabaseViewer_EntityChange(DatabaseViewer.CurrentEntity);
*/
}
}