-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Development' into pages
- Loading branch information
Showing
300 changed files
with
5,837 additions
and
2,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
DebuggerVisualizers/Core/DebuggerVisualizers/CoreDebuggerHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#region Copyright | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// File: GdiPlusDebuggerHelper.cs | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (C) KGy SOFT, 2005-2024 - All Rights Reserved | ||
// | ||
// You should have received a copy of the LICENSE file at the top-level | ||
// directory of this distribution. | ||
// | ||
// Please refer to the LICENSE file if you want to use this source code. | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#endregion | ||
|
||
#region Usings | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
|
||
using KGySoft.Reflection; | ||
|
||
#endregion | ||
|
||
namespace KGySoft.Drawing.DebuggerVisualizers.Core | ||
{ | ||
/// <summary> | ||
/// A helper class to access the debugger visualizers of this assembly. | ||
/// </summary> | ||
public static class CoreDebuggerHelper | ||
{ | ||
#region Methods | ||
|
||
/// <summary> | ||
/// Gets the debugger visualizers of this assembly. | ||
/// </summary> | ||
/// <returns>The debugger visualizers of this assembly.</returns> | ||
public static Dictionary<Type, DebuggerVisualizerAttribute> GetDebuggerVisualizers() | ||
=> Attribute.GetCustomAttributes(typeof(CoreDebuggerHelper).Assembly, typeof(DebuggerVisualizerAttribute)) | ||
.Cast<DebuggerVisualizerAttribute>().ToDictionary(a => a.Target ?? Reflector.ResolveType(a.TargetTypeName!, ResolveTypeOptions.AllowPartialAssemblyMatch)!); | ||
|
||
#endregion | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
DebuggerVisualizers/Core/DebuggerVisualizers/DebuggerVisualizers/ColorDebuggerVisualizer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#region Copyright | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// File: ColorDebuggerVisualizer.cs | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (C) KGy SOFT, 2005-2024 - All Rights Reserved | ||
// | ||
// You should have received a copy of the LICENSE file at the top-level | ||
// directory of this distribution. | ||
// | ||
// Please refer to the LICENSE file if you want to use this source code. | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#endregion | ||
|
||
#region Usings | ||
|
||
using KGySoft.Drawing.DebuggerVisualizers.Core.Serialization; | ||
|
||
using Microsoft.VisualStudio.DebuggerVisualizers; | ||
|
||
#endregion | ||
|
||
namespace KGySoft.Drawing.DebuggerVisualizers.Core.DebuggerVisualizers | ||
{ | ||
internal sealed class ColorDebuggerVisualizer : DialogDebuggerVisualizer | ||
{ | ||
#region Methods | ||
|
||
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) | ||
=> DebuggerHelper.DebugCustomColor(SerializationHelper.DeserializeCustomColorInfo(objectProvider.GetData())); | ||
|
||
#endregion | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...ggerVisualizers/Core/DebuggerVisualizers/DebuggerVisualizers/PaletteDebuggerVisualizer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#region Copyright | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// File: PaletteDebuggerVisualizer.cs | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (C) KGy SOFT, 2005-2024 - All Rights Reserved | ||
// | ||
// You should have received a copy of the LICENSE file at the top-level | ||
// directory of this distribution. | ||
// | ||
// Please refer to the LICENSE file if you want to use this source code. | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#endregion | ||
|
||
#region Usings | ||
|
||
using KGySoft.Drawing.DebuggerVisualizers.Core.Serialization; | ||
|
||
using Microsoft.VisualStudio.DebuggerVisualizers; | ||
|
||
#endregion | ||
|
||
namespace KGySoft.Drawing.DebuggerVisualizers.Core.DebuggerVisualizers | ||
{ | ||
internal sealed class PaletteDebuggerVisualizer : DialogDebuggerVisualizer | ||
{ | ||
#region Methods | ||
|
||
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) | ||
=> DebuggerHelper.DebugCustomPalette(SerializationHelper.DeserializeCustomPaletteInfo(objectProvider.GetData())); | ||
|
||
#endregion | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...zers/Core/DebuggerVisualizers/DebuggerVisualizers/ReadableBitmapDataDebuggerVisualizer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#region Copyright | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// File: ReadableBitmapDataDebuggerVisualizer.cs | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (C) KGy SOFT, 2005-2024 - All Rights Reserved | ||
// | ||
// You should have received a copy of the LICENSE file at the top-level | ||
// directory of this distribution. | ||
// | ||
// Please refer to the LICENSE file if you want to use this source code. | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#endregion | ||
|
||
#region Usings | ||
|
||
using KGySoft.Drawing.DebuggerVisualizers.Core.Serialization; | ||
using KGySoft.Drawing.ImagingTools.Model; | ||
|
||
using Microsoft.VisualStudio.DebuggerVisualizers; | ||
|
||
#endregion | ||
|
||
namespace KGySoft.Drawing.DebuggerVisualizers.Core.DebuggerVisualizers | ||
{ | ||
internal class ReadableBitmapDataDebuggerVisualizer : DialogDebuggerVisualizer | ||
{ | ||
#region Methods | ||
|
||
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) | ||
{ | ||
using CustomBitmapInfo bitmapInfo = SerializationHelper.DeserializeCustomBitmapInfo(objectProvider.GetData()); | ||
DebuggerHelper.DebugCustomBitmap(bitmapInfo); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
DebuggerVisualizers/Core/DebuggerVisualizers/KGySoft.Drawing.DebuggerVisualizers.Core.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net35;net40;net45;net462;net6.0-windows</TargetFrameworks> | ||
<!--<TargetFrameworks>net462</TargetFrameworks>--> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<RootNamespace>KGySoft.Drawing.DebuggerVisualizers.Core</RootNamespace> | ||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile> | ||
<SignAssembly>true</SignAssembly> | ||
<AssemblyOriginatorKeyFile>..\..\..\KGySoft.snk</AssemblyOriginatorKeyFile> | ||
<LangVersion>latest</LangVersion> | ||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> | ||
<PackageLicenseFile>..\..\..\LICENSE</PackageLicenseFile> | ||
<Authors>György Kőszeg</Authors> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<!-- Common NuGet references --> | ||
<ItemGroup> | ||
<!--<PackageReference Include="KGySoft.Drawing" Version="8.0.0" />--> | ||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<!-- .NET Framework only references --> | ||
<ItemGroup Condition="'$(TargetFramework)'=='net35' OR '$(TargetFramework)'=='net40' OR '$(TargetFramework)'=='net45' OR '$(TargetFramework)'=='net462'"> | ||
<!--Note: VSSDK.DebuggerVisualizers does not work in VS2022 anymore if VSIX is also installed, because it causes | ||
"Unable to cast object [...] to type DialogDebuggerVisualizer"--> | ||
<PackageReference Include="Microsoft.VisualStudio.DebuggerVisualizers" Version="17.0.1061105" /> | ||
</ItemGroup> | ||
|
||
<!-- .NET only references (note: doesn't really make sense but allows testing from KGySoft.Drawing.DebuggerVisualizers.Core.Test) --> | ||
<ItemGroup Condition="'$(TargetFramework)'=='net6.0-windows'"> | ||
<Reference Include="Microsoft.VisualStudio.DebuggerVisualizers"> | ||
<HintPath>..\..\_ref\Microsoft.VisualStudio.DebuggerVisualizers.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
<!-- Project references --> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\_Common\KGySoft.Drawing.DebuggerVisualizers.csproj" /> | ||
<ProjectReference Include="..\..\..\KGySoft.Drawing.ImagingTools\KGySoft.Drawing.ImagingTools.csproj" /> | ||
</ItemGroup> | ||
|
||
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> | ||
<Exec Command="xcopy bin\$(ConfigurationName)\$(TargetFramework)\$(TargetFileName) ..\..\..\KGySoft.Drawing.ImagingTools\bin\$(ConfigurationName)\$(TargetFramework)\ /Y" /> | ||
</Target> | ||
|
||
</Project> |
108 changes: 108 additions & 0 deletions
108
DebuggerVisualizers/Core/DebuggerVisualizers/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#region Copyright | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// File: AssemblyInfo.cs | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (C) KGy SOFT, 2005-2024 - All Rights Reserved | ||
// | ||
// You should have received a copy of the LICENSE file at the top-level | ||
// directory of this distribution. | ||
// | ||
// Please refer to the LICENSE file if you want to use this source code. | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#endregion | ||
|
||
#region Usings | ||
|
||
using System.Diagnostics; | ||
using System.Drawing; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
using KGySoft.Drawing.DebuggerVisualizers.Core.DebuggerVisualizers; | ||
using KGySoft.Drawing.DebuggerVisualizers.Core.Serialization; | ||
using KGySoft.Drawing.Imaging; | ||
|
||
#endregion | ||
|
||
#region Assembly Attributes | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("KGySoft.Drawing.DebuggerVisualizers.Core")] | ||
[assembly: AssemblyDescription("KGy SOFT Drawing Core Debugger Visualizers")] | ||
#if DEBUG | ||
[assembly: AssemblyConfiguration("Debug")] | ||
#else | ||
[assembly: AssemblyConfiguration("Release")] | ||
#endif | ||
[assembly: AssemblyCompany("KGy SOFT")] | ||
[assembly: AssemblyProduct("KGy SOFT Debugger Visualizers")] | ||
[assembly: AssemblyCopyright("Copyright © KGy SOFT. All rights reserved.")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("fed0273c-6328-4cff-a1b0-2d115dca686e")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Revision and Build Numbers | ||
// by using the '*' as shown below: | ||
[assembly: AssemblyVersion("4.0.0")] | ||
[assembly: AssemblyFileVersion("4.0.0")] | ||
[assembly: AssemblyInformationalVersion("4.0.0")] | ||
|
||
// BitmapData | ||
[assembly: DebuggerVisualizer(typeof(ReadableBitmapDataDebuggerVisualizer), typeof(ReadableBitmapDataSerializer), | ||
TargetTypeName = "KGySoft.Drawing.Imaging.BitmapDataBase, KGySoft.Drawing.Core", | ||
Description = "KGy SOFT BitmapDataBase Debugger Visualizer")] | ||
|
||
// Palette | ||
[assembly: DebuggerVisualizer(typeof(PaletteDebuggerVisualizer), typeof(PaletteSerializer), | ||
Target = typeof(Palette), | ||
Description = "KGy SOFT Palette Debugger Visualizer")] | ||
|
||
// Color32 | ||
[assembly: DebuggerVisualizer(typeof(ColorDebuggerVisualizer), typeof(Color32Serializer), | ||
Target = typeof(Color32), | ||
Description = "KGy SOFT Color32 Debugger Visualizer")] | ||
|
||
// PColor32 | ||
[assembly: DebuggerVisualizer(typeof(ColorDebuggerVisualizer), typeof(PColor32Serializer), | ||
Target = typeof(PColor32), | ||
Description = "KGy SOFT PColor32 Debugger Visualizer")] | ||
|
||
// Color64 | ||
[assembly: DebuggerVisualizer(typeof(ColorDebuggerVisualizer), typeof(Color64Serializer), | ||
Target = typeof(Color64), | ||
Description = "KGy SOFT Color64 Debugger Visualizer")] | ||
|
||
// PColor64 | ||
[assembly: DebuggerVisualizer(typeof(ColorDebuggerVisualizer), typeof(PColor64Serializer), | ||
Target = typeof(PColor64), | ||
Description = "KGy SOFT PColor64 Debugger Visualizer")] | ||
|
||
// ColorF | ||
[assembly: DebuggerVisualizer(typeof(ColorDebuggerVisualizer), typeof(ColorFSerializer), | ||
Target = typeof(ColorF), | ||
Description = "KGy SOFT ColorF Debugger Visualizer")] | ||
|
||
// PColorF | ||
[assembly: DebuggerVisualizer(typeof(ColorDebuggerVisualizer), typeof(PColorFSerializer), | ||
Target = typeof(PColorF), | ||
Description = "KGy SOFT PColorF Debugger Visualizer")] | ||
|
||
#endregion |
36 changes: 36 additions & 0 deletions
36
DebuggerVisualizers/Core/DebuggerVisualizers/Serialization/Color32Serializer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#region Copyright | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// File: Color32Serializer.cs | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (C) KGy SOFT, 2005-2024 - All Rights Reserved | ||
// | ||
// You should have received a copy of the LICENSE file at the top-level | ||
// directory of this distribution. | ||
// | ||
// Please refer to the LICENSE file if you want to use this source code. | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#endregion | ||
|
||
#region Usings | ||
|
||
using System.IO; | ||
|
||
using KGySoft.Drawing.Imaging; | ||
|
||
using Microsoft.VisualStudio.DebuggerVisualizers; | ||
|
||
#endregion | ||
|
||
namespace KGySoft.Drawing.DebuggerVisualizers.Core.Serialization | ||
{ | ||
internal sealed class Color32Serializer : VisualizerObjectSource | ||
{ | ||
#region Methods | ||
|
||
public override void GetData(object target, Stream outgoingData) => SerializationHelper.SerializeCustomColorInfo((Color32)target, outgoingData); | ||
|
||
#endregion | ||
} | ||
} |
Oops, something went wrong.