make some projects compatible with netframework4.8 again
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|
||||||
<StartupObject />
|
<StartupObject />
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public static class Helpers
|
|||||||
var dateTime = DateTime.UtcNow.ToString("yyyyMMddHHmmssfffffff");
|
var dateTime = DateTime.UtcNow.ToString("yyyyMMddHHmmssfffffff");
|
||||||
var type = typeof(T).ToString();
|
var type = typeof(T).ToString();
|
||||||
var together = sn + dateTime + type + var;
|
var together = sn + dateTime + type + var;
|
||||||
var hash = BitConverter.ToString(MD5.HashData(Encoding.Default.GetBytes(together))).Replace("-", string.Empty);
|
var hash = BitConverter.ToString(new HMACMD5().ComputeHash(Encoding.Default.GetBytes(together))).Replace("-", string.Empty);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
<TargetFrameworks>net8.0-windows;netframework4.8</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Drawing.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Drawing.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
@@ -26,7 +27,7 @@
|
|||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.0.1</Version>
|
<Version>2.0.2</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>2.1.0</Version>
|
<Version>2.1.0</Version>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>annotations</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<StartupObject />
|
<StartupObject />
|
||||||
<RootNamespace>Pilz.S3DFileParser</RootNamespace>
|
<RootNamespace>Pilz.S3DFileParser</RootNamespace>
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Simple3DFileParser.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Simple3DFileParser.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFrameworks>net6.0-windows;net8.0-windows</TargetFrameworks>
|
<TargetFrameworks>net6.0-windows;net8.0-windows;netframework4.8</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<DocumentationFile>Pilz.Threading.xml</DocumentationFile>
|
<DocumentationFile>Pilz.Threading.xml</DocumentationFile>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
|
|||||||
@@ -100,11 +100,6 @@ public partial class RadFlyoutBase : UserControl
|
|||||||
ParentChanged += FlyoutDialogBase_ParentChanged;
|
ParentChanged += FlyoutDialogBase_ParentChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MemberNotNull(nameof(radButton_Cancel))]
|
|
||||||
[MemberNotNull(nameof(radButton_Confirm))]
|
|
||||||
[MemberNotNull(nameof(tableLayoutPanel_ActionPanel))]
|
|
||||||
[MemberNotNull(nameof(tableLayoutPanel_TitlePanel))]
|
|
||||||
[MemberNotNull(nameof(radLabel_Title))]
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
// radButton_Cancel
|
// radButton_Cancel
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Pilz.UI.Telerik.Extensions.Extensions;
|
|||||||
|
|
||||||
public static class RadFlyoutBaseExtensions
|
public static class RadFlyoutBaseExtensions
|
||||||
{
|
{
|
||||||
public static bool IsValid([NotNullWhen(true)] this RadFlyoutBase? @this)
|
public static bool IsValid(this RadFlyoutBase? @this)
|
||||||
{
|
{
|
||||||
return @this != null && @this.Result == DialogResult.OK;
|
return @this != null && @this.Result == DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,15 +16,16 @@ public static class RadListDataItemCollectionExtensions
|
|||||||
|
|
||||||
public static IEnumerable<RadListDataItem> AddEnumValues<T>(this RadListDataItemCollection @this, bool clearCollection, Func<T, bool>? filter, Func<T, string?>? format) where T : struct, Enum
|
public static IEnumerable<RadListDataItem> AddEnumValues<T>(this RadListDataItemCollection @this, bool clearCollection, Func<T, bool>? filter, Func<T, string?>? format) where T : struct, Enum
|
||||||
{
|
{
|
||||||
var values = Enum.GetValues<T>();
|
var values = Enum.GetValues(typeof(T));
|
||||||
var items = new List<RadListDataItem>();
|
var items = new List<RadListDataItem>();
|
||||||
|
|
||||||
format ??= v => Enum.GetName(v);
|
if (format == null)
|
||||||
|
format = v => Enum.GetName(typeof(T), v);
|
||||||
|
|
||||||
if (clearCollection)
|
if (clearCollection)
|
||||||
@this.Clear();
|
@this.Clear();
|
||||||
|
|
||||||
foreach (var value in values)
|
foreach (T value in values)
|
||||||
{
|
{
|
||||||
if (filter is null || filter(value))
|
if (filter is null || filter(value))
|
||||||
items.Add(new(format(value), value));
|
items.Add(new(format(value), value));
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
<TargetFrameworks>net8.0-windows;netframework4.8</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>annotations</Nullable>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.9.5</Version>
|
<Version>2.9.6</Version>
|
||||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -84,11 +84,6 @@ public partial class FlyoutBase : UserControl
|
|||||||
ParentChanged += FlyoutBase_ParentChanged;
|
ParentChanged += FlyoutBase_ParentChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MemberNotNull(nameof(tableLayoutPanel_TitlePanel))]
|
|
||||||
[MemberNotNull(nameof(label_Title))]
|
|
||||||
[MemberNotNull(nameof(tableLayoutPanel_ActionPanel))]
|
|
||||||
[MemberNotNull(nameof(button_Cancel))]
|
|
||||||
[MemberNotNull(nameof(button_Accept))]
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
// button_Accept
|
// button_Accept
|
||||||
@@ -180,7 +175,7 @@ public partial class FlyoutBase : UserControl
|
|||||||
base.OnLoad(e);
|
base.OnLoad(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FlyoutBase_ParentChanged(object? sender, EventArgs e)
|
private void FlyoutBase_ParentChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var frm = FindForm();
|
var frm = FindForm();
|
||||||
if (frm != null)
|
if (frm != null)
|
||||||
@@ -214,13 +209,13 @@ public partial class FlyoutBase : UserControl
|
|||||||
tableLayoutPanel_TitlePanel.Visible = !string.IsNullOrWhiteSpace(label_Title.Text);
|
tableLayoutPanel_TitlePanel.Visible = !string.IsNullOrWhiteSpace(label_Title.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Button_Accept_Click(object? sender, EventArgs e)
|
protected virtual void Button_Accept_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (ValidateOK())
|
if (ValidateOK())
|
||||||
Close(DialogResult.OK);
|
Close(DialogResult.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Button_Cancel_Click(object? sender, EventArgs e)
|
protected virtual void Button_Cancel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Close(DialogResult.Cancel);
|
Close(DialogResult.Cancel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Pilz.UI.Extensions;
|
|||||||
|
|
||||||
public static class FlyoutBaseExtensions
|
public static class FlyoutBaseExtensions
|
||||||
{
|
{
|
||||||
public static bool IsValid([NotNullWhen(true)] this FlyoutBase? @this)
|
public static bool IsValid(this FlyoutBase? @this)
|
||||||
{
|
{
|
||||||
return @this != null && @this.Result == DialogResult.OK;
|
return @this != null && @this.Result == DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ internal class HighlightPanel : Control
|
|||||||
Pilz.Win32.Native.User32.GetWindowRect(control.Handle, ref rect);
|
Pilz.Win32.Native.User32.GetWindowRect(control.Handle, ref rect);
|
||||||
var pp = control.Parent.PointToClient(new Point(rect.Left + 3, rect.Top + 3));
|
var pp = control.Parent.PointToClient(new Point(rect.Left + 3, rect.Top + 3));
|
||||||
var handle = Pilz.Win32.Native.User32.ChildWindowFromPointEx(control.Parent.Handle, new Pilz.Win32.Native.POINT(pp.X, pp.Y), (uint)Pilz.Win32.Native.WindowFromPointFlags.CWP_SKIPINVISIBLE);
|
var handle = Pilz.Win32.Native.User32.ChildWindowFromPointEx(control.Parent.Handle, new Pilz.Win32.Native.POINT(pp.X, pp.Y), (uint)Pilz.Win32.Native.WindowFromPointFlags.CWP_SKIPINVISIBLE);
|
||||||
if (handle == nint.Zero)
|
if (handle == IntPtr.Zero)
|
||||||
return control.Visible;
|
return control.Visible;
|
||||||
var c = Control.FromHandle(handle);
|
var c = Control.FromHandle(handle);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Microsoft.VisualBasic.CompilerServices;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
@@ -81,7 +80,7 @@ public class Highlighter : Component
|
|||||||
|
|
||||||
private void ControlHighlightVisibleChanged(object sender, EventArgs e)
|
private void ControlHighlightVisibleChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (_HighlightPanel is not null && Conversions.ToBoolean(Operators.ConditionalCompareObjectEqual(_HighlightPanel.FocusHighlightControl, sender, false)))
|
if (_HighlightPanel is not null && sender.Equals(_HighlightPanel.FocusHighlightControl))
|
||||||
UpdateHighlighterRegion();
|
UpdateHighlighterRegion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Microsoft.VisualBasic.CompilerServices;
|
using Pilz.Drawing;
|
||||||
using Pilz.Drawing;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -94,7 +93,7 @@ public class PaintingControl : UserControl, IPaintingObjectContainer
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Conversions.ToInteger(GetType().GetField("layoutSuspendCount", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(this)) != 0;
|
return Convert.ToInt32(GetType().GetField("layoutSuspendCount", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(this)) != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,8 +544,8 @@ public class PaintingControl : UserControl, IPaintingObjectContainer
|
|||||||
/// <param name="m"></param>
|
/// <param name="m"></param>
|
||||||
protected override void WndProc(ref Message m)
|
protected override void WndProc(ref Message m)
|
||||||
{
|
{
|
||||||
const int WM_NCHITTEST = 0x84;
|
const nint WM_NCHITTEST = 0x84;
|
||||||
const int HTTRANSPARENT = -1;
|
const nint HTTRANSPARENT = -1;
|
||||||
|
|
||||||
if (!VisibleForMouseEvents && m.Msg == WM_NCHITTEST)
|
if (!VisibleForMouseEvents && m.Msg == WM_NCHITTEST)
|
||||||
m.Result = HTTRANSPARENT;
|
m.Result = HTTRANSPARENT;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Microsoft.VisualBasic.CompilerServices;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -590,7 +589,7 @@ public class PaintingObject : ICloneable, IPaintingObjectContainer
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Tag is string)
|
if (Tag is string)
|
||||||
return Conversions.ToString(Tag);
|
return Convert.ToString(Tag);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
<TargetFrameworks>net8.0-windows;netframework4.8</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<DocumentationFile>Pilz.UI.xml</DocumentationFile>
|
<DocumentationFile>Pilz.UI.xml</DocumentationFile>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>annotations</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.4.5</Version>
|
<Version>2.4.6</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
|||||||
1
Pilz.UI/Resources.Designer.cs
generated
1
Pilz.UI/Resources.Designer.cs
generated
@@ -25,7 +25,6 @@ namespace Pilz.UI.My.Resources
|
|||||||
[System.CodeDom.Compiler.GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[System.CodeDom.Compiler.GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[DebuggerNonUserCode()]
|
[DebuggerNonUserCode()]
|
||||||
[System.Runtime.CompilerServices.CompilerGenerated()]
|
[System.Runtime.CompilerServices.CompilerGenerated()]
|
||||||
[HideModuleName()]
|
|
||||||
internal static class Resources
|
internal static class Resources
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
|
using Pilz.Win32.Native;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using Pilz.Win32.Native;
|
|
||||||
using Keys = System.Windows.Forms.Keys;
|
using Keys = System.Windows.Forms.Keys;
|
||||||
|
|
||||||
namespace Pilz.Win32.Mapped;
|
namespace Pilz.Win32.Mapped;
|
||||||
@@ -11,7 +9,7 @@ public class Keyboard
|
|||||||
|
|
||||||
public static bool IsKeyDown(int keyCode)
|
public static bool IsKeyDown(int keyCode)
|
||||||
{
|
{
|
||||||
return Conversions.ToDouble(User32.GetKeyState(keyCode).ToString() + 0x8000) < 0d;
|
return Convert.ToDouble(User32.GetKeyState(keyCode).ToString() + 0x8000) < 0d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsKeyDown(Keys keyCode)
|
public static bool IsKeyDown(Keys keyCode)
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ public static class NativeTools
|
|||||||
[Obsolete("Use \"Environment.ProcessPath\" instead.")]
|
[Obsolete("Use \"Environment.ProcessPath\" instead.")]
|
||||||
public static string GetExecutablePath(bool checkRealOS = false)
|
public static string GetExecutablePath(bool checkRealOS = false)
|
||||||
{
|
{
|
||||||
|
#if NET8_0_OR_GREATER
|
||||||
if (RuntimeInformationsEx.IsOSPlatform(OSType.Windows, checkRealOS))
|
if (RuntimeInformationsEx.IsOSPlatform(OSType.Windows, checkRealOS))
|
||||||
return Environment.ProcessPath;
|
return Environment.ProcessPath;
|
||||||
|
#endif
|
||||||
return Process.GetCurrentProcess().MainModule.FileName;
|
return Process.GetCurrentProcess().MainModule.FileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
<TargetFrameworks>net8.0-windows;netframework4.8</TargetFrameworks>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<Version>2.1.0</Version>
|
<Version>2.1.1</Version>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>annotations</Nullable>
|
<Nullable>annotations</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class AppVersion(Version version, int build, AppChannel channel) : ICompa
|
|||||||
throw new FormatException();
|
throw new FormatException();
|
||||||
|
|
||||||
if (input.StartsWith("version", StringComparison.InvariantCultureIgnoreCase))
|
if (input.StartsWith("version", StringComparison.InvariantCultureIgnoreCase))
|
||||||
input = input[7..];
|
input = input.Substring(7);
|
||||||
|
|
||||||
var splitted = input.Trim().Split(' ');
|
var splitted = input.Trim().Split(' ');
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0</TargetFrameworks>
|
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>annotations</Nullable>
|
<Nullable>annotations</Nullable>
|
||||||
<Version>2.3.0</Version>
|
<Version>2.3.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user