Skip to content

Commit 426d8b7

Browse files
committedNov 8, 2023
upgrade WicNet to v1.7.1
1 parent 5bf3bb5 commit 426d8b7

9 files changed

+9
-248
lines changed
 

‎Source/DXControl/D2Phap.DXControl.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Product>D2Phap.$(AssemblyName)</Product>
1313
<Description>A WinForms hybrid control that supports both Direct2D and GDI+ drawing thanks to WicNet. This control has being used in https://github.com/d2phap/ImageGlass since version 9.0.
1414
</Description>
15-
<Copyright>Copyright (C) 2022 - 2023 Duong Dieu Phap. All rights reserved.</Copyright>
15+
<Copyright>Copyright (C) 2022 - 2024 Duong Dieu Phap. All rights reserved.</Copyright>
1616
<PackageProjectUrl>https://github.com/d2phap/DXControl</PackageProjectUrl>
1717
<PackageReadmeFile>README.md</PackageReadmeFile>
1818
<RepositoryUrl>https://github.com/d2phap/DXControl</RepositoryUrl>
@@ -21,7 +21,7 @@
2121
<IncludeSymbols>True</IncludeSymbols>
2222
<PackageReleaseNotes>See release notes here: https://github.com/d2phap/DXControl/releases</PackageReleaseNotes>
2323
<Authors>Duong Dieu Phap</Authors>
24-
<VersionPrefix>2.7.0</VersionPrefix>
24+
<VersionPrefix>3.0.0</VersionPrefix>
2525
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2626
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2727
<EmbedUntrackedSources>true</EmbedUntrackedSources>
@@ -51,11 +51,12 @@
5151
</ItemGroup>
5252

5353
<ItemGroup>
54+
<PackageReference Include="DirectNStandard" Version="1.15.0.2" />
5455
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
5556
<PrivateAssets>all</PrivateAssets>
5657
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5758
</PackageReference>
58-
<PackageReference Include="WicNet" Version="1.6.5" />
59+
<PackageReference Include="WicNet" Version="1.7.1" />
5960
</ItemGroup>
6061

6162
</Project>

‎Source/DXControl/DXControl.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ MIT License
55
*/
66
using DirectN;
77
using System.ComponentModel;
8+
using WicNet.Utilities;
89

910
namespace D2Phap;
1011

@@ -289,7 +290,7 @@ protected override void WndProc(ref Message m)
289290
else
290291
{
291292
_device?.BeginDraw();
292-
_device?.Clear(_D3DCOLORVALUE.FromColor(BackColor));
293+
_device?.Clear(BackColor.ToD3DCOLORVALUE());
293294
_device?.EndDraw();
294295
}
295296
}
@@ -386,7 +387,7 @@ protected override void OnPaint(PaintEventArgs e)
386387
_graphicsD2d ??= new D2DGraphics(_device, _d2DFactory, _dWriteFactory);
387388

388389
_device.BeginDraw();
389-
_device.Clear(_D3DCOLORVALUE.FromColor(BackColor));
390+
_device.Clear(BackColor.ToD3DCOLORVALUE());
390391
OnRender(_graphicsD2d);
391392
_device.EndDraw();
392393
}

‎Source/DXControl/DirectN/DirectWrite/Extensions/VerticalBlankTicker.cs

-175
This file was deleted.

‎Source/DXControl/DirectN/DirectWrite/Extensions/VerticalBlankTickerErrorEventArgs.cs

-17
This file was deleted.

‎Source/DXControl/DirectN/DirectWrite/Extensions/VerticalBlankTickerEventArgs.cs

-12
This file was deleted.

‎Source/DXControl/DirectN/DirectWrite/Generated/D2D1_BITMAP_BRUSH_PROPERTIES.cs

-16
This file was deleted.

‎Source/DXControl/DirectN/DirectWrite/Generated/D2D1_BITMAP_BRUSH_PROPERTIES1.cs

-16
This file was deleted.

‎Source/Demo/Demo.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Platforms>AnyCPU;x64;x86</Platforms>
1010
<ApplicationManifest>app.manifest</ApplicationManifest>
11+
12+
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
1113
</PropertyGroup>
1214

1315
<ItemGroup>

‎Source/Demo/app.manifest

-7
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@
5252
5353
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
5454

55-
<application xmlns="urn:schemas-microsoft-com:asm.v3">
56-
<windowsSettings>
57-
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
58-
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
59-
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
60-
</windowsSettings>
61-
</application>
6255

6356

6457
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->

0 commit comments

Comments
 (0)