适应C#8.0语法

This commit is contained in:
Sunny 2023-10-30 17:13:18 +08:00
parent 922c52914c
commit b33e77975d
5 changed files with 6 additions and 11 deletions

View File

@ -748,11 +748,6 @@ namespace Sunny.UI
public UILineSeries Series { get; set; } public UILineSeries Series { get; set; }
public SeriesDataPoint()
{
}
public SeriesDataPoint(UILineSeries series, double x, double y) public SeriesDataPoint(UILineSeries series, double x, double y)
{ {
X = x; X = x;

View File

@ -160,7 +160,7 @@ namespace Sunny.UI
//当右键菜单未绑定ImageList并且ImageIndex>0时将ImageIndex绑定为Symbol绘制 //当右键菜单未绑定ImageList并且ImageIndex>0时将ImageIndex绑定为Symbol绘制
ToolStripItem item = e.Item; ToolStripItem item = e.Item;
while (item.Owner is not ContextMenuStrip) while (!(item.Owner is ContextMenuStrip))
{ {
if (item.Owner is ToolStripDropDownMenu) if (item.Owner is ToolStripDropDownMenu)
item = item.OwnerItem; item = item.OwnerItem;

View File

@ -39,7 +39,7 @@ namespace Sunny.UI
/// </summary> /// </summary>
public static class FontImageHelper public static class FontImageHelper
{ {
public static readonly Dictionary<UISymbolType, FontImages> Fonts = new(); public static readonly Dictionary<UISymbolType, FontImages> Fonts = new Dictionary<UISymbolType, FontImages>();
/// <summary> /// <summary>
/// 构造函数 /// 构造函数

View File

@ -17,9 +17,9 @@ namespace Sunny.UI
static UIFormServiceHelper() static UIFormServiceHelper()
{ {
WaitFormService = new(); WaitFormService = new UIWaitFormService();
ProcessFormService = new(); ProcessFormService = new UIProcessIndicatorFormService();
StatusFormService = new(); StatusFormService = new UIStatusFormService();
} }
/// <summary> /// <summary>

View File

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net472;net40</TargetFrameworks> <TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net472;net40</TargetFrameworks>
<LangVersion>11.0</LangVersion> <LangVersion>8.0</LangVersion>
<ProjectGuid>{AB1CB247-E20B-4CBE-B269-570ADDD96C53}</ProjectGuid> <ProjectGuid>{AB1CB247-E20B-4CBE-B269-570ADDD96C53}</ProjectGuid>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<RootNamespace>Sunny.UI</RootNamespace> <RootNamespace>Sunny.UI</RootNamespace>