Skip to content

Commit e036684

Browse files
committed
fixed warnings for Demo project
1 parent c64c5a4 commit e036684

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# D2Phap.DXControl
1+
# D2Phap.DXControl
22
- A WinForms control that supports drawing with Direct2D thanks to [WicNet](https://github.com/smourier/WicNet).
33
- This control has been used in [ImageGlass](https://github.com/d2phap/ImageGlass) software since version 9.0.
44

@@ -19,7 +19,7 @@
1919
- Supports animation drawing with Direct2D.
2020

2121
## Requirements:
22-
- .NET 6.0, 7.0, 8.0
22+
- .NET 8.0, 9.0
2323

2424
## Installation
2525
Run the command

Source/DXControl/D2Phap.DXControl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2424
<PackageReleaseNotes>See release notes here: https://github.com/d2phap/DXControl/releases</PackageReleaseNotes>
2525
<Authors>Duong Dieu Phap</Authors>
26-
<VersionPrefix>4.1.0</VersionPrefix>
26+
<VersionPrefix>4.2.0</VersionPrefix>
2727
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2828
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2929
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>

Source/DXControl/DXCanvas.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,23 @@ public class DXCanvas : Control
4848
/// Gets Direct2D factory.
4949
/// </summary>
5050
[Browsable(false)]
51+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
5152
public IComObject<ID2D1Factory1>? Direct2DFactory => _d2DFactory;
5253

5354

5455
/// <summary>
5556
/// Gets DirectWrite factory.
5657
/// </summary>
5758
[Browsable(false)]
59+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
5860
public IComObject<IDWriteFactory5>? DirectWriteFactory => _dWriteFactory;
5961

6062

6163
/// <summary>
6264
/// Gets render target for this control.
6365
/// </summary>
6466
[Browsable(false)]
67+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
6568
public IComObject<ID2D1HwndRenderTarget>? RenderTarget => _renderTarget;
6669

6770

@@ -76,20 +79,23 @@ public class DXCanvas : Control
7679
/// Gets the <see cref='DXGraphics'/> object used to draw in <see cref="Render"/>.
7780
/// </summary>
7881
[Browsable(false)]
82+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
7983
public DXGraphics? D2Graphics => _graphicsD2d;
8084

8185

8286
/// <summary>
8387
/// Gets the value indicates if control is fully loaded
8488
/// </summary>
8589
[Browsable(false)]
90+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
8691
public bool IsReady => !DesignMode && Created;
8792

8893

8994
/// <summary>
9095
/// Gets, sets the DPI for drawing when using <see cref="DXGraphics"/>.
9196
/// </summary>
9297
[Browsable(false)]
98+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
9399
public float BaseDpi
94100
{
95101
get => _dpi;
@@ -135,6 +141,7 @@ public virtual bool UseHardwareAcceleration
135141
/// Request to update logics of the current frame in the <see cref="OnFrame"/> event.
136142
/// </summary>
137143
[Browsable(false)]
144+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
138145
public bool RequestUpdateFrame { get; set; } = false;
139146

140147

@@ -150,13 +157,15 @@ public virtual bool UseHardwareAcceleration
150157
/// Enable FPS measurement.
151158
/// </summary>
152159
[Browsable(false)]
160+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
153161
public bool CheckFPS { get; set; } = false;
154162

155163

156164
/// <summary>
157165
/// Gets FPS info when the <see cref="CheckFPS"/> is set to <c>true</c>.
158166
/// </summary>
159167
[Browsable(false)]
168+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
160169
public int FPS => _lastFps;
161170

162171

Source/Demo/Demo.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.8.0" />
21-
<PackageReference Include="Magick.NET.SystemWindowsMedia" Version="7.2.4" />
20+
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.7.0" />
21+
<PackageReference Include="Magick.NET.SystemWindowsMedia" Version="8.0.7" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

Source/Demo/DemoCanvas.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ MIT License
55
*/
66
using D2Phap.DXControl;
77
using DirectN;
8+
using System.ComponentModel;
89
using WicNet;
910

1011
namespace Demo;
@@ -16,6 +17,7 @@ public class DemoCanvas : DXCanvas
1617
private WicBitmapSource? _wicSrc;
1718

1819

20+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
1921
public WicBitmapSource? Image
2022
{
2123
set

0 commit comments

Comments
 (0)