- 删除LineAweSome字体图标,经过测试显示效果不理想
This commit is contained in:
parent
a7e6a65bd3
commit
2f1d1eb945
@ -63,21 +63,6 @@ namespace Sunny.UI
|
||||
/// </summary>
|
||||
public static readonly FontImages FontAwesomeV5Solid;
|
||||
|
||||
/// <summary>
|
||||
/// FontAwesomeV5Brands
|
||||
/// </summary>
|
||||
public static readonly FontImages LineAwesomeBrands;
|
||||
|
||||
/// <summary>
|
||||
/// FontAwesomeV5Regular
|
||||
/// </summary>
|
||||
public static readonly FontImages LineAwesomeRegular;
|
||||
|
||||
/// <summary>
|
||||
/// FontAwesomeV5Solid
|
||||
/// </summary>
|
||||
public static readonly FontImages LineAwesomeSolid;
|
||||
|
||||
//public const int FontAwesomeV4Count = 786;
|
||||
//public const int ElegantIconsCount = 360;
|
||||
//public const int FontAwesomeV5RegularCount = 151;
|
||||
@ -97,9 +82,6 @@ namespace Sunny.UI
|
||||
FontAwesomeV5Brands = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.fa-brands-400.ttf"));
|
||||
FontAwesomeV5Regular = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.fa-regular-400.ttf"));
|
||||
FontAwesomeV5Solid = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.fa-solid-900.ttf"));
|
||||
LineAwesomeBrands = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.la-brands-400.ttf"));
|
||||
LineAwesomeRegular = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.la-regular-400.ttf"));
|
||||
LineAwesomeSolid = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.la-solid-900.ttf"));
|
||||
}
|
||||
|
||||
private static byte[] ReadFontFileFromResource(string name)
|
||||
@ -235,12 +217,6 @@ namespace Sunny.UI
|
||||
return FontAwesomeV5Regular.GetFont(symbolValue, imageSize);
|
||||
case UISymbolType.FontAwesomeV5Solid:
|
||||
return FontAwesomeV5Solid.GetFont(symbolValue, imageSize);
|
||||
case UISymbolType.LineAwesomeBrands:
|
||||
return LineAwesomeBrands.GetFont(symbolValue, imageSize);
|
||||
case UISymbolType.LineAwesomeRegular:
|
||||
return LineAwesomeRegular.GetFont(symbolValue, imageSize);
|
||||
case UISymbolType.LineAwesomeSolid:
|
||||
return LineAwesomeSolid.GetFont(symbolValue, imageSize);
|
||||
default:
|
||||
if (symbol > 0xF000)
|
||||
return FontAwesomeV4.GetFont(symbolValue, imageSize);
|
||||
|
@ -38,9 +38,6 @@ namespace Sunny.UI
|
||||
FontAwesomeV4 = 0,
|
||||
FontAwesomeV5Brands = 1,
|
||||
FontAwesomeV5Regular = 2,
|
||||
FontAwesomeV5Solid = 3,
|
||||
LineAwesomeBrands = 4,
|
||||
LineAwesomeRegular = 5,
|
||||
LineAwesomeSolid = 6
|
||||
FontAwesomeV5Solid = 3
|
||||
}
|
||||
}
|
@ -39,9 +39,6 @@ namespace Sunny.UI
|
||||
private readonly ConcurrentQueue<Label> FontAwesomeV5SolidLabels = new ConcurrentQueue<Label>();
|
||||
private readonly ConcurrentQueue<Label> FontAwesomeV5BrandsLabels = new ConcurrentQueue<Label>();
|
||||
private readonly ConcurrentQueue<Label> FontAwesomeV5RegularLabels = new ConcurrentQueue<Label>();
|
||||
private readonly ConcurrentQueue<Label> LineAwesomeSolidLabels = new ConcurrentQueue<Label>();
|
||||
private readonly ConcurrentQueue<Label> LineAwesomeBrandsLabels = new ConcurrentQueue<Label>();
|
||||
private readonly ConcurrentQueue<Label> LineAwesomeRegularLabels = new ConcurrentQueue<Label>();
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
@ -116,36 +113,6 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
while (!LineAwesomeSolidLabels.IsEmpty)
|
||||
{
|
||||
if (LineAwesomeSolidLabels.TryDequeue(out Label lbl))
|
||||
{
|
||||
lpV5Solid.Controls.Add(lbl);
|
||||
SymbolValue symbol = (SymbolValue)lbl.Tag;
|
||||
toolTip.SetToolTip(lbl, symbol.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
while (!LineAwesomeRegularLabels.IsEmpty)
|
||||
{
|
||||
if (LineAwesomeRegularLabels.TryDequeue(out Label lbl))
|
||||
{
|
||||
lpV5Regular.Controls.Add(lbl);
|
||||
SymbolValue symbol = (SymbolValue)lbl.Tag;
|
||||
toolTip.SetToolTip(lbl, symbol.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
while (!LineAwesomeBrandsLabels.IsEmpty)
|
||||
{
|
||||
if (LineAwesomeBrandsLabels.TryDequeue(out Label lbl))
|
||||
{
|
||||
lpV5Brands.Controls.Add(lbl);
|
||||
SymbolValue symbol = (SymbolValue)lbl.Tag;
|
||||
toolTip.SetToolTip(lbl, symbol.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
@ -361,74 +328,46 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void bg_DoWork(object sender, DoWorkEventArgs e)
|
||||
private void LoadLabels(Type type, ConcurrentQueue<Label> labels, UISymbolType symbolType)
|
||||
{
|
||||
var t = typeof(FontAwesomeIcons);
|
||||
foreach (var fieldInfo in t.GetFields())
|
||||
foreach (var fieldInfo in type.GetFields())
|
||||
{
|
||||
var obj = fieldInfo.GetRawConstantValue();
|
||||
if (obj != null)
|
||||
if (obj is int value)
|
||||
{
|
||||
int value = obj.ToString().ToInt();
|
||||
FontAwesomeV4Labels.Enqueue(CreateLabel(fieldInfo.Name, value, UISymbolType.FontAwesomeV4));
|
||||
labels.Enqueue(CreateLabel(fieldInfo.Name, value, symbolType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void bg_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
//public const int FontAwesomeV4Count = 786;
|
||||
LoadLabels(typeof(FontAwesomeIcons), FontAwesomeV4Labels, UISymbolType.FontAwesomeV4);
|
||||
}
|
||||
|
||||
private void bg2_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var t = typeof(FontElegantIcons);
|
||||
foreach (var fieldInfo in t.GetFields())
|
||||
{
|
||||
var obj = fieldInfo.GetRawConstantValue();
|
||||
if (obj != null)
|
||||
{
|
||||
int value = obj.ToString().ToInt();
|
||||
ElegantIconsLabels.Enqueue(CreateLabel(fieldInfo.Name, value, UISymbolType.FontAwesomeV4));
|
||||
}
|
||||
}
|
||||
//public const int ElegantIconsCount = 360;
|
||||
LoadLabels(typeof(FontElegantIcons), ElegantIconsLabels, UISymbolType.FontAwesomeV4);
|
||||
}
|
||||
|
||||
private void bg3_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var t = typeof(FontAweSomeV5Brands);
|
||||
foreach (var fieldInfo in t.GetFields())
|
||||
{
|
||||
var obj = fieldInfo.GetRawConstantValue();
|
||||
if (obj != null)
|
||||
{
|
||||
int value = obj.ToString().ToInt();
|
||||
FontAwesomeV5BrandsLabels.Enqueue(CreateLabel(fieldInfo.Name, value, UISymbolType.FontAwesomeV5Brands));
|
||||
}
|
||||
}
|
||||
//public const int FontAwesomeV5BrandsCount = 457;
|
||||
LoadLabels(typeof(FontAweSomeV5Brands), FontAwesomeV5BrandsLabels, UISymbolType.FontAwesomeV5Brands);
|
||||
}
|
||||
|
||||
private void bg4_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var t = typeof(FontAweSomeV5Regular);
|
||||
foreach (var fieldInfo in t.GetFields())
|
||||
{
|
||||
var obj = fieldInfo.GetRawConstantValue();
|
||||
if (obj != null)
|
||||
{
|
||||
int value = obj.ToString().ToInt();
|
||||
FontAwesomeV5RegularLabels.Enqueue(CreateLabel(fieldInfo.Name, value, UISymbolType.FontAwesomeV5Regular));
|
||||
}
|
||||
}
|
||||
//public const int FontAwesomeV5RegularCount = 151;
|
||||
LoadLabels(typeof(FontAweSomeV5Regular), FontAwesomeV5RegularLabels, UISymbolType.FontAwesomeV5Regular);
|
||||
}
|
||||
|
||||
private void bg5_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var t = typeof(FontAweSomeV5Solid);
|
||||
foreach (var fieldInfo in t.GetFields())
|
||||
{
|
||||
var obj = fieldInfo.GetRawConstantValue();
|
||||
if (obj != null)
|
||||
{
|
||||
int value = obj.ToString().ToInt();
|
||||
FontAwesomeV5SolidLabels.Enqueue(CreateLabel(fieldInfo.Name, value, UISymbolType.FontAwesomeV5Solid));
|
||||
}
|
||||
}
|
||||
//public const int FontAwesomeV5SolidCount = 1001;
|
||||
LoadLabels(typeof(FontAweSomeV5Solid), FontAwesomeV5SolidLabels, UISymbolType.FontAwesomeV5Solid);
|
||||
}
|
||||
|
||||
int findCount = 0;
|
||||
|
@ -16,7 +16,8 @@
|
||||
* 当前版本: V3.1
|
||||
* 创建日期: 2020-02-26
|
||||
*
|
||||
* 2020-02-26: V3.2.2 增加文件说明
|
||||
* 2020-08-09: V3.2.2 增加文件说明
|
||||
* 2020-08-10: V3.2.2 经过测试,图标显示效果不好,故不增加图标,但保留此文件
|
||||
******************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -39,9 +39,6 @@
|
||||
<ItemGroup>
|
||||
<None Remove="Common\FastLZx64.dat" />
|
||||
<None Remove="Common\FastLZx86.dat" />
|
||||
<None Remove="Font\la-brands-400.ttf" />
|
||||
<None Remove="Font\la-regular-400.ttf" />
|
||||
<None Remove="Font\la-solid-900.ttf" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -63,9 +60,6 @@
|
||||
<EmbeddedResource Include="Font\fa-regular-400.ttf" />
|
||||
<EmbeddedResource Include="Font\fa-solid-900.ttf" />
|
||||
<EmbeddedResource Include="Font\FontAwesome.ttf" />
|
||||
<EmbeddedResource Include="Font\la-brands-400.ttf" />
|
||||
<EmbeddedResource Include="Font\la-regular-400.ttf" />
|
||||
<EmbeddedResource Include="Font\la-solid-900.ttf" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
|
||||
|
Loading…
x
Reference in New Issue
Block a user