Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit 8ad71b1

Browse files
committed
Update OperatingSystem2 2.0.0
1 parent 65f425e commit 8ad71b1

68 files changed

Lines changed: 1561 additions & 65 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<LangVersion>9.0</LangVersion>
3+
<LangVersion>10.0</LangVersion>
44
<Nullable>enable</Nullable>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>..\NotifyIcon.snk</AssemblyOriginatorKeyFile>

Directory.Packages.props

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@
22
<ItemGroup>
33
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
44
<PackageVersion Include="MonoMac.NetStandard" Version="0.0.4" />
5-
<PackageVersion Include="OperatingSystem2" Version="1.4.2.1" />
6-
<PackageVersion Include="GtkSharp" Version="3.24.24.34" />
5+
<PackageVersion Include="OperatingSystem2" Version="2.0.0" />
6+
<PackageVersion Include="GtkSharp" Version="3.24.24.38" />
77
<PackageVersion Include="System.Drawing.Common" Version="6.0.0" Condition=" $(TargetFramework.StartsWith('net6')) " />
88
<PackageVersion Include="System.Drawing.Common" Version="5.0.3" Condition=" $(TargetFramework.StartsWith('net5')) " />
99
<PackageVersion Include="System.Drawing.Common" Version="4.6.0" Condition=" $(TargetFramework.StartsWith('netstandard2')) " />
1010
<PackageVersion Include="Microsoft.Win32.Primitives" Version="4.3.0" />
11-
<PackageVersion Include="ReactiveUI" Version="16.3.10" />
12-
<PackageVersion Include="Avalonia" Version="0.10.10" />
13-
<PackageVersion Include="Avalonia.Desktop" Version="0.10.10" />
14-
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.10" />
11+
<PackageVersion Include="ReactiveUI" Version="18.0.10" />
12+
<PackageVersion Include="Avalonia" Version="0.10.14" />
13+
<PackageVersion Include="Avalonia.Desktop" Version="0.10.14" />
14+
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.14" />
1515
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
1616
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
17-
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2-preview.155" />
18-
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.155" />
19-
<PackageVersion Include="SkiaSharp" Version="2.88.0-preview.155" />
20-
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.155" />
21-
<PackageVersion Include="NotifyIcon.Base" Version="1.0.5" />
22-
<PackageVersion Include="NotifyIcon" Version="1.0.5" />
23-
<PackageVersion Include="NotifyIcon.Windows" Version="1.0.5" />
24-
<PackageVersion Include="NotifyIcon.Mac" Version="1.0.5" />
25-
<PackageVersion Include="NotifyIcon.Linux" Version="1.0.5" />
17+
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2" />
18+
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2" />
19+
<PackageVersion Include="SkiaSharp" Version="2.88.0" />
20+
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0" />
21+
<PackageVersion Include="NotifyIcon.Base" Version="1.1.0" />
22+
<PackageVersion Include="NotifyIcon" Version="1.1.0" />
23+
<PackageVersion Include="NotifyIcon.Windows" Version="1.1.0" />
24+
<PackageVersion Include="NotifyIcon.Mac" Version="1.1.0" />
25+
<PackageVersion Include="NotifyIcon.Linux" Version="1.1.0" />
26+
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.0.3" />
27+
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" />
2628
</ItemGroup>
2729
</Project>

NotifyIcon.Platform.Linux/LinuxNotifyIcon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !XAMARIN_MAC && !__MACOS__ && !NET6_0_MACOS10_14 && !NET5_0_WINDOWS && !NET6_0_WINDOWS && !NETSTANDARD1_0 && !NET35 && !NET40 && !NET45 && !NETSTANDARD1_1
1+
#if !XAMARIN_MAC && !__MACOS__ && !NET6_0_MACOS10_14 && !NET_WINDOWS && !NET5_0_WINDOWS && !NET6_0_WINDOWS && !NETSTANDARD1_0 && !NET35 && !NET40 && !NET45 && !NETSTANDARD1_1
22
using Gdk;
33
using Gtk;
44
using System.IO;

NotifyIcon.Platform.Linux/NotifyIcon.Platform.Linux.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PackageId>NotifyIcon.Linux</PackageId>
99
<DefineConstants>LINUX;SINGLE_PLATFORM;$(DefineConstants)</DefineConstants>
1010
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11-
<Version>1.0.5.1</Version>
11+
<Version>1.1.0</Version>
1212
</PropertyGroup>
1313

1414
<PropertyGroup Condition="'$(Configuration)'=='Release'">

NotifyIcon.Platform.Mac/MacNotifyIcon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !NET5_0_WINDOWS && !NET6_0_WINDOWS && !NETSTANDARD1_0 && !NET35 && !NET40 && !NET45 && !NETSTANDARD1_1
1+
#if !NET_WINDOWS && !NET5_0_WINDOWS && !NET6_0_WINDOWS && !NETSTANDARD1_0 && !NET35 && !NET40 && !NET45 && !NETSTANDARD1_1
22
#if MONO_MAC
33
using MonoMac.AppKit;
44
using MonoMac.Foundation;

NotifyIcon.Platform.Mac/NotifyIcon.Platform.Mac.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PackageId>NotifyIcon.Mac</PackageId>
99
<DefineConstants>MAC;SINGLE_PLATFORM;$(DefineConstants)</DefineConstants>
1010
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11-
<Version>1.0.5.1</Version>
11+
<Version>1.1.0</Version>
1212
</PropertyGroup>
1313

1414
<PropertyGroup Condition=" $(TargetFramework.Contains('-macos')) ">

NotifyIcon.Platform.Windows/NotifyIcon.Platform.Windows.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PackageId>NotifyIcon.Windows</PackageId>
99
<DefineConstants>WINDOWS;SINGLE_PLATFORM;$(DefineConstants)</DefineConstants>
1010
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11-
<Version>1.0.5.1</Version>
11+
<Version>1.1.0</Version>
1212
</PropertyGroup>
1313

1414
<PropertyGroup Condition="'$(Configuration)'=='Release'">
@@ -23,6 +23,10 @@
2323
<DefineConstants>NET5_0_OR_GREATER2;$(DefineConstants)</DefineConstants>
2424
</PropertyGroup>
2525

26+
<PropertyGroup Condition=" $(TargetFramework.Contains('-windows'))">
27+
<DefineConstants>NET_WINDOWS;$(DefineConstants)</DefineConstants>
28+
</PropertyGroup>
29+
2630
<ItemGroup Condition=" $(DefineConstants.Contains('MONO_MAC')) ">
2731
<PackageReference Include="MonoMac.NetStandard" />
2832
</ItemGroup>

NotifyIcon.Platform/NotifyIcon.Platform.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@
77
<Description>在通知区域创建图标的组件。</Description>
88
<PackageId>NotifyIcon.Base</PackageId>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10-
<Version>1.0.5.1</Version>
10+
<Version>1.1.0</Version>
1111
</PropertyGroup>
1212

1313
<PropertyGroup Condition=" !$(TargetFramework.StartsWith('net5')) AND !$(TargetFramework.StartsWith('net6')) AND !$(TargetFramework.StartsWith('Xamarin.Mac20')) ">
1414
<DefineConstants>__LIB_SYS_OS2__;$(DefineConstants)</DefineConstants>
1515
</PropertyGroup>
1616

17+
<PropertyGroup Condition=" $(TargetFramework.Contains('-windows'))">
18+
<DefineConstants>NET_WINDOWS;$(DefineConstants)</DefineConstants>
19+
</PropertyGroup>
20+
1721
<PropertyGroup Condition=" $(TargetFramework.StartsWith('net5')) OR $(TargetFramework.StartsWith('net6')) ">
1822
<DefineConstants>NET5_0_OR_GREATER2;$(DefineConstants)</DefineConstants>
1923
</PropertyGroup>

NotifyIcon.Platform/NotifyIcon.cs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -219,35 +219,19 @@ public MouseEventArgs(int x, int y)
219219
#elif WINDOWS || NET5_0_WINDOWS || NET6_0_WINDOWS
220220
return GetWindowsImplType();
221221
#else
222-
if (OperatingSystem2.IsWindows
223-
#if !__LIB_SYS_OS2__
224-
()
225-
#endif
226-
)
222+
if (OperatingSystem2.IsWindows())
227223
{
228224
return GetWindowsImplType();
229225
}
230-
else if (OperatingSystem2.IsMacOS
231-
#if !__LIB_SYS_OS2__
232-
()
233-
#endif
234-
)
226+
else if (OperatingSystem2.IsMacOS())
235227
{
236228
return GetMacOSImplType();
237229
}
238-
else if (OperatingSystem2.IsAndroid
239-
#if !__LIB_SYS_OS2__
240-
()
241-
#endif
242-
)
230+
else if (OperatingSystem2.IsAndroid())
243231
{
244232
return null;
245233
}
246-
else if (OperatingSystem2.IsLinux
247-
#if !__LIB_SYS_OS2__
248-
()
249-
#endif
250-
)
234+
else if (OperatingSystem2.IsLinux())
251235
{
252236
return GetLinuxImplType();
253237
}

0 commit comments

Comments
 (0)