Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load icon path data from embedded json #343

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<ProjectReference Include="..\MahApps.Metro.IconPacks.Core\MahApps.Metro.IconPacks.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Resources\*.*" />
<EmbeddedResource Include="Resources\*.*" />
</ItemGroup>

<!-- WPF Items include -->
<ItemGroup Condition="'$(_SdkShortFrameworkIdentifier)' != 'uap'">
<None Remove="**\*.rd.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected override void UpdateData()
if (Kind != default(PackIconBootstrapIconsKind))
{
string data = null;
PackIconBootstrapIconsDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
PackIconDataFactory<PackIconBootstrapIconsKind>.DataIndex.Value?.TryGetValue(Kind, out data);
this.Data = data;
}
else
Expand Down
2,080 changes: 0 additions & 2,080 deletions src/MahApps.Metro.IconPacks.BootstrapIcons/PackIconBootstrapIconsDataFactory.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override string GetPathData(object iconKind)
string data = null;
if (iconKind is PackIconBootstrapIconsKind kind)
{
PackIconBootstrapIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
PackIconDataFactory<PackIconBootstrapIconsKind>.DataIndex.Value?.TryGetValue(kind, out data);
}
return data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ protected override string GetPathData(object iconKind)
string data = null;
if (iconKind is PackIconBootstrapIconsKind kind)
{
PackIconBootstrapIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
PackIconDataFactory<PackIconBootstrapIconsKind>.DataIndex.Value?.TryGetValue(kind, out data);
}
return data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public PathIconBootstrapIcons()
protected override void UpdateData()
{
string data = null;
PackIconBootstrapIconsDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
PackIconDataFactory<PackIconBootstrapIconsKind>.DataIndex.Value?.TryGetValue(Kind, out data);
if (string.IsNullOrEmpty(data))
{
this.Data = default(Geometry);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<ProjectReference Include="..\MahApps.Metro.IconPacks.Core\MahApps.Metro.IconPacks.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Resources\*.*" />
<EmbeddedResource Include="Resources\*.*" />
</ItemGroup>

<!-- WPF Items include -->
<ItemGroup Condition="'$(_SdkShortFrameworkIdentifier)' != 'uap'">
<None Remove="**\*.rd.xml" />
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro.IconPacks.BoxIcons/PackIconBoxIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected override void UpdateData()
if (Kind != default(PackIconBoxIconsKind))
{
string data = null;
PackIconBoxIconsDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
PackIconDataFactory<PackIconBoxIconsKind>.DataIndex.Value?.TryGetValue(Kind, out data);
this.Data = data;
}
else
Expand Down
1,664 changes: 0 additions & 1,664 deletions src/MahApps.Metro.IconPacks.BoxIcons/PackIconBoxIconsDataFactory.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override string GetPathData(object iconKind)
string data = null;
if (iconKind is PackIconBoxIconsKind kind)
{
PackIconBoxIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
PackIconDataFactory<PackIconBoxIconsKind>.DataIndex.Value?.TryGetValue(kind, out data);
}
return data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ protected override string GetPathData(object iconKind)
string data = null;
if (iconKind is PackIconBoxIconsKind kind)
{
PackIconBoxIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
PackIconDataFactory<PackIconBoxIconsKind>.DataIndex.Value?.TryGetValue(kind, out data);
}
return data;
}
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro.IconPacks.BoxIcons/PathIconBoxIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public PathIconBoxIcons()
protected override void UpdateData()
{
string data = null;
PackIconBoxIconsDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
PackIconDataFactory<PackIconBoxIconsKind>.DataIndex.Value?.TryGetValue(Kind, out data);
if (string.IsNullOrEmpty(data))
{
this.Data = default(Geometry);
Expand Down
1 change: 1 addition & 0 deletions src/MahApps.Metro.IconPacks.BoxIcons/Resources/Icons.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<ProjectReference Include="..\MahApps.Metro.IconPacks.Core\MahApps.Metro.IconPacks.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Resources\*.*" />
<EmbeddedResource Include="Resources\*.*" />
</ItemGroup>

<!-- WPF Items include -->
<ItemGroup Condition="'$(_SdkShortFrameworkIdentifier)' != 'uap'">
<None Remove="**\*.rd.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected override void UpdateData()
if (Kind != default(PackIconCircumIconsKind))
{
string data = null;
PackIconCircumIconsDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
PackIconDataFactory<PackIconCircumIconsKind>.DataIndex.Value?.TryGetValue(Kind, out data);
this.Data = data;
}
else
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override string GetPathData(object iconKind)
string data = null;
if (iconKind is PackIconCircumIconsKind kind)
{
PackIconCircumIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
PackIconDataFactory<PackIconCircumIconsKind>.DataIndex.Value?.TryGetValue(kind, out data);
}
return data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ protected override string GetPathData(object iconKind)
string data = null;
if (iconKind is PackIconCircumIconsKind kind)
{
PackIconCircumIconsDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
PackIconDataFactory<PackIconCircumIconsKind>.DataIndex.Value?.TryGetValue(kind, out data);
}
return data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public PathIconCircumIcons()
protected override void UpdateData()
{
string data = null;
PackIconCircumIconsDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
PackIconDataFactory<PackIconCircumIconsKind>.DataIndex.Value?.TryGetValue(Kind, out data);
if (string.IsNullOrEmpty(data))
{
this.Data = default(Geometry);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<ProjectReference Include="..\MahApps.Metro.IconPacks.Core\MahApps.Metro.IconPacks.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Resources\*.*" />
<EmbeddedResource Include="Resources\*.*" />
</ItemGroup>

<!-- WPF Items include -->
<ItemGroup Condition="'$(_SdkShortFrameworkIdentifier)' != 'uap'">
<None Remove="**\*.rd.xml" />
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro.IconPacks.Codicons/PackIconCodicons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected override void UpdateData()
if (Kind != default(PackIconCodiconsKind))
{
string data = null;
PackIconCodiconsDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
PackIconDataFactory<PackIconCodiconsKind>.DataIndex.Value?.TryGetValue(Kind, out data);
this.Data = data;
}
else
Expand Down
Loading
Loading