Skip to content

Commit 05dc373

Browse files
committed
Examples: Upgrading package versions
1 parent 7d07a61 commit 05dc373

11 files changed

+38
-27
lines changed

Examples/Maui/KGySoft.Drawing.Examples.Maui.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
<ItemGroup>
5656
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.100" />
5757
<PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="3.116.1" />
58-
<PackageReference Include="KGySoft.Drawing.Core" Version="9.0.0-rc.1" />
59-
<PackageReference Include="KGySoft.CoreLibraries" Version="9.0.0" />
58+
<PackageReference Include="KGySoft.Drawing.Core" Version="9.0.0" />
6059
</ItemGroup>
6160

6261
<ItemGroup>

Examples/Maui/ViewModel/MainViewModel.cs

+17-6
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,20 @@ private sealed record Configuration : IQuantizerSettings, IDithererSettings // a
126126

127127
private static readonly HashSet<string> affectsDisplayImage = new()
128128
{
129-
nameof(ShowOverlay), nameof(OverlayShape), nameof(OutlineWidth), nameof(OutlineColor), nameof(UseLinearColorSpace),
130-
nameof(UseQuantizer), nameof(SelectedQuantizer), nameof(BackColor), nameof(AlphaThreshold), nameof(WhiteThreshold),
131-
nameof(PaletteSize), nameof(UseDithering), nameof(SelectedDitherer) };
129+
nameof(ShowOverlay),
130+
nameof(OverlayShape),
131+
nameof(OutlineWidth),
132+
nameof(OutlineColor),
133+
nameof(UseLinearColorSpace),
134+
nameof(UseQuantizer),
135+
nameof(SelectedQuantizer),
136+
nameof(BackColor),
137+
nameof(AlphaThreshold),
138+
nameof(WhiteThreshold),
139+
nameof(PaletteSize),
140+
nameof(UseDithering),
141+
nameof(SelectedDitherer)
142+
};
132143

133144
#endregion
134145

@@ -233,7 +244,7 @@ protected override async void OnPropertyChanged(PropertyChangedExtendedEventArgs
233244
await GenerateDisplayImage(Configuration.Capture(this));
234245
}
235246

236-
[SuppressMessage("ReSharper", "AsyncVoidMethod", Justification = "Dispose pattern.")]
247+
[SuppressMessage("ReSharper", "AsyncVoidMethod", Justification = "Dispose pattern")]
237248
protected override async void Dispose(bool disposing)
238249
{
239250
if (IsDisposed)
@@ -263,7 +274,7 @@ private async Task GenerateDisplayImage(Configuration cfg)
263274
baseImage ??= SKBitmap.Decode(Images.Information256);
264275

265276
// The awaits make this method reentrant, and a continuation can be spawn after any await at any time.
266-
// Therefore it is possible that despite of clearing generatePreviewTask in WaitForPendingGenerate it is not null upon starting the continuation.
277+
// Therefore, it is possible that despite of clearing generatePreviewTask in WaitForPendingGenerate it is not null upon starting the continuation.
267278
while (generateResultTask != null)
268279
{
269280
CancelRunningGenerate();
@@ -295,7 +306,7 @@ private async Task GenerateDisplayImage(Configuration cfg)
295306
var asyncConfig = new TaskConfig { CancellationToken = token, ThrowIfCanceled = false };
296307

297308
// NOTE: This GetReadableBitmapData is a local implementation using purely the KGySoft.Drawing.Core package.
298-
// For complete SkiaSharp support with all possible pixel formats the example at https://github.com/koszeggy/KGySoft.Drawing/tree/master/Examples/SkiaSharp_(Maui)
309+
// For complete SkiaSharp support with all possible pixel formats the example at https://github.com/koszeggy/KGySoft.Drawing/tree/master/Examples/SkiaSharp.Maui
299310
using IReadableBitmapData baseImageBitmapData = baseImage.GetReadableBitmapData(workingColorSpace);
300311

301312
// ===== a.) No overlay: just creating a clone bitmap with the specified quantizer/ditherer =====

Examples/SkiaSharp.Maui/KGySoft.Drawing.Examples.SkiaSharp.Maui.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656
<ItemGroup>
5757
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.100" />
5858
<PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="3.116.1" />
59-
<PackageReference Include="KGySoft.Drawing.SkiaSharp" Version="9.0.0-rc.1" />
60-
<PackageReference Include="KGySoft.CoreLibraries" Version="9.0.0" />
59+
<PackageReference Include="KGySoft.Drawing.SkiaSharp" Version="9.0.0" />
6160
</ItemGroup>
6261

6362
<ItemGroup>

Examples/SkiaSharp.Wpf/KGySoft.Drawing.Examples.SkiaSharp.Wpf.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="SkiaSharp.Views.WPF" Version="3.116.1" />
13-
<PackageReference Include="KGySoft.Drawing.SkiaSharp" Version="9.0.0-rc.1" />
14-
<PackageReference Include="KGySoft.CoreLibraries" Version="9.0.0" />
13+
<PackageReference Include="KGySoft.Drawing.SkiaSharp" Version="9.0.0" />
1514
</ItemGroup>
1615

1716
<Import Project="..\_Shared\KGySoft.Drawing.Examples.Shared.projitems" Label="Shared" />

Examples/Uwp/KGySoft.Drawing.Examples.Uwp.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@
164164
</ItemGroup>
165165
<ItemGroup>
166166
<PackageReference Include="KGySoft.Drawing.Uwp">
167-
<Version>9.0.0-rc.1</Version>
168-
</PackageReference>
169-
<PackageReference Include="KGySoft.CoreLibraries">
170167
<Version>9.0.0</Version>
171168
</PackageReference>
172169
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">

Examples/WinForms/KGySoft.Drawing.Examples.WinForms.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="KGySoft.Drawing" Version="9.0.0-rc.1" />
15-
<PackageReference Include="KGySoft.CoreLibraries" Version="9.0.0" />
14+
<PackageReference Include="KGySoft.Drawing" Version="9.0.0" />
1615
</ItemGroup>
1716

1817
<Import Project="..\_Shared\KGySoft.Drawing.Examples.Shared.projitems" Label="Shared" />

Examples/WinUI/KGySoft.Drawing.Examples.WinUI.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
</ItemGroup>
3434

3535
<ItemGroup>
36-
<PackageReference Include="KGySoft.Drawing.WinUI" Version="9.0.0-rc.1" />
37-
<PackageReference Include="KGySoft.CoreLibraries" Version="9.0.0" />
36+
<PackageReference Include="KGySoft.Drawing.WinUI" Version="9.0.0" />
3837
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.241114003" />
3938
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
4039
<Manifest Include="$(ApplicationManifest)" />

Examples/Wpf/KGySoft.Drawing.Examples.Wpf.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="KGySoft.Drawing.Wpf" Version="9.0.0-rc.1" />
13-
<PackageReference Include="KGySoft.CoreLibraries" Version="9.0.0" />
12+
<PackageReference Include="KGySoft.Drawing.Wpf" Version="9.0.0" />
1413
</ItemGroup>
1514

1615
<Import Project="..\_Shared\KGySoft.Drawing.Examples.Shared.projitems" Label="Shared" />

Examples/Wpf/ViewModel/MainViewModel.cs

+13-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,19 @@ private record Configuration // as a record so equality check compares the prope
243243

244244
private static readonly HashSet<string> affectsPreview = new()
245245
{
246-
nameof(ImageFile), nameof(OverlayFile), nameof(ShowOverlay), nameof(OverlayShape), nameof(OutlineWidth), nameof(OutlineColor), nameof(SelectedFormat),
247-
nameof(ForceLinearColorSpace), nameof(BackColor), nameof(AlphaThreshold), nameof(OptimizePalette), nameof(UseDithering), nameof(SelectedDitherer),
246+
nameof(ImageFile),
247+
nameof(OverlayFile),
248+
nameof(ShowOverlay),
249+
nameof(OverlayShape),
250+
nameof(OutlineWidth),
251+
nameof(OutlineColor),
252+
nameof(SelectedFormat),
253+
nameof(ForceLinearColorSpace),
254+
nameof(BackColor),
255+
nameof(AlphaThreshold),
256+
nameof(OptimizePalette),
257+
nameof(UseDithering),
258+
nameof(SelectedDitherer),
248259
};
249260

250261
#endregion

Examples/Xamarin/KGySoft.Drawing.Examples.Xamarin/KGySoft.Drawing.Examples.Xamarin.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515
<ItemGroup>
1616
<PackageReference Include="SkiaSharp.Views.Forms" Version="2.88.9" />
17-
<PackageReference Include="KGySoft.Drawing.Core" Version="9.0.0-rc.1" />
18-
<PackageReference Include="KGySoft.CoreLibraries" Version="9.0.0" />
17+
<PackageReference Include="KGySoft.Drawing.Core" Version="9.0.0" />
1918
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2662" />
2019
<PackageReference Include="Xamarin.Essentials" Version="1.8.1" />
2120
</ItemGroup>

Examples/_Shared/Model/QuantizerDescriptor.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#region Usings
1717

1818
using System;
19-
using System.ComponentModel;
2019
using System.Linq;
2120
using System.Reflection;
2221

@@ -102,7 +101,7 @@ private static MethodInfo GetMethod(Type type, string methodName)
102101
MemberInfo[] methods = type.GetMember(methodName, MemberTypes.Method, BindingFlags.Public | BindingFlags.Static);
103102
foreach (MemberInfo method in methods)
104103
{
105-
if (!Attribute.IsDefined(method, typeof(EditorBrowsableAttribute)))
104+
if (!Attribute.IsDefined(method, typeof(ObsoleteAttribute)))
106105
return (MethodInfo)method;
107106
}
108107

0 commit comments

Comments
 (0)