change UI to UI.WinForms

This commit is contained in:
2025-06-16 11:50:17 +02:00
parent fa3a9da07e
commit 299867a910
116 changed files with 318 additions and 319 deletions

View File

@@ -0,0 +1,18 @@
using System.Reflection;
namespace Pilz.UI.WinForms.Telerik.Symbols.Factories;
public class BasicFactory<T>(string baseName) : RadSymbolFactory<T> where T : Enum
{
private Assembly? assembly;
public override Assembly GetImageResourceAssembly()
{
return assembly ??= Assembly.Load(baseName);
}
public override string GetImageRessourcePath(T svgImage)
{
return $"{baseName}.Files.{svgImage}.svg";
}
}

View File

@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<Version>1.2.0</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pilz.SymbolPacks" Version="1.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Pilz.UI.WinForms.Telerik\Pilz.UI.WinForms.Telerik.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
using Pilz.SymbolPacks.Sets;
using Pilz.UI.Telerik.Symbols.Factories;
namespace Pilz.UI.WinForms.Telerik.Symbols;
public static class RadSymbols
{
private static IRadSymbolFactory<SymbolsColor>? color;
private static IRadSymbolFactory<SymbolsFluent>? fluent;
public static IRadSymbolFactory<SymbolsColor> Color => color ??= new BasicFactory<SymbolsColor>("Pilz.SymbolPacks.Color");
public static IRadSymbolFactory<SymbolsFluent> Fluent => fluent ??= new BasicFactory<SymbolsFluent>("Pilz.SymbolPacks.Fluent");
}