Обновление до .NET 9
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<LangVersion>13.0</LangVersion>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateRuntimeConfigurationFiles>True</GenerateRuntimeConfigurationFiles>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pf2eModel;
|
||||
using System.ComponentModel;
|
||||
using Pf2eModel;
|
||||
using Pf2eModel.Model.Base;
|
||||
using Pf2eModel.Model.Common.I18n;
|
||||
using Pf2eModel.Model.Enum;
|
||||
@@ -15,6 +16,7 @@ public partial class DatabaseViewerControl : UserControl
|
||||
|
||||
private EntityType _type;
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public int PerPage
|
||||
{
|
||||
get => _perPage;
|
||||
@@ -25,6 +27,7 @@ public partial class DatabaseViewerControl : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public int Page
|
||||
{
|
||||
get => _page;
|
||||
@@ -35,12 +38,15 @@ public partial class DatabaseViewerControl : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public int Count { get; private set; }
|
||||
|
||||
public int MaxPage => Convert.ToInt32(Math.Ceiling(1.0 * Count / PerPage));
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public EntityView CurrentEntity { get; private set; } = null!;
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public EntityType Type
|
||||
{
|
||||
get => _type;
|
||||
@@ -51,7 +57,7 @@ public partial class DatabaseViewerControl : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
internal bool _updating = false;
|
||||
private bool _updating = false;
|
||||
|
||||
public DatabaseViewerControl()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Pf2eViewer.EntityTreeViewer;
|
||||
|
||||
namespace Pf2eViewer.EntityTreeViewer;
|
||||
@@ -11,6 +12,7 @@ public sealed partial class EntityTreeViewerControl : UserControl
|
||||
|
||||
private int _depthSize = 20;
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public int ItemHeight
|
||||
{
|
||||
get => _itemHeight;
|
||||
@@ -21,6 +23,7 @@ public sealed partial class EntityTreeViewerControl : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public EntityView? EntityView
|
||||
{
|
||||
get => _entityView;
|
||||
@@ -31,6 +34,7 @@ public sealed partial class EntityTreeViewerControl : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public int DepthSize
|
||||
{
|
||||
get => _depthSize;
|
||||
@@ -41,6 +45,7 @@ public sealed partial class EntityTreeViewerControl : UserControl
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public int NameWidth { get; private set; } = 200;
|
||||
|
||||
private readonly List<StructureField> _rows = [];
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Windows.Markup;
|
||||
using FontAwesome.Sharp;
|
||||
|
||||
namespace Pf2eViewer.EntityTreeViewer;
|
||||
@@ -11,6 +13,7 @@ internal sealed partial class EntityTreeViewerRow : UserControl
|
||||
|
||||
public int ViewIndex = 0;
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public Bitmap IconCache
|
||||
{
|
||||
get
|
||||
@@ -25,6 +28,7 @@ internal sealed partial class EntityTreeViewerRow : UserControl
|
||||
}
|
||||
private Bitmap? _iconCache;
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public List<LadderType> Ladder
|
||||
{
|
||||
get => _ladder;
|
||||
@@ -36,26 +40,36 @@ internal sealed partial class EntityTreeViewerRow : UserControl
|
||||
}
|
||||
private List<LadderType> _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;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<TargetFramework>net9.0-windows7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
Reference in New Issue
Block a user