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