change UI to UI.WinForms
This commit is contained in:
18
Pilz.UI.WinForms.Telerik.Symbols/Factories/BasicFactory.cs
Normal file
18
Pilz.UI.WinForms.Telerik.Symbols/Factories/BasicFactory.cs
Normal 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";
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
13
Pilz.UI.WinForms.Telerik.Symbols/RadSymbols.cs
Normal file
13
Pilz.UI.WinForms.Telerik.Symbols/RadSymbols.cs
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user