字体预览工具 v1.0.0 初始版本
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 关于对话框:显示版本、功能简介与技术说明。独立窗体,不影响主程序逻辑。
|
||||
/// </summary>
|
||||
public class AboutDialog : Form
|
||||
{
|
||||
public AboutDialog()
|
||||
{
|
||||
Text = "关于";
|
||||
FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
ClientSize = new Size(460, 320);
|
||||
Font = new Font("Microsoft YaHei UI", 9f);
|
||||
|
||||
Assembly asm = Assembly.GetExecutingAssembly();
|
||||
string ver = asm.GetName().Version != null ? asm.GetName().Version.ToString() : "1.0";
|
||||
|
||||
Label title = new Label
|
||||
{
|
||||
Text = AppInfo.FullTitle,
|
||||
Font = new Font("Microsoft YaHei UI", 14f, FontStyle.Bold),
|
||||
Location = new Point(18, 16),
|
||||
Size = new Size(420, 30)
|
||||
};
|
||||
|
||||
TextBox body = new TextBox
|
||||
{
|
||||
Multiline = true,
|
||||
ReadOnly = true,
|
||||
ScrollBars = ScrollBars.Vertical,
|
||||
Location = new Point(18, 56),
|
||||
Size = new Size(424, 218),
|
||||
BackColor = Color.White,
|
||||
BorderStyle = BorderStyle.FixedSingle,
|
||||
Text =
|
||||
"免安装字体预览 / 批量管理工具\r\n\r\n" +
|
||||
"主要功能:\r\n" +
|
||||
"• 直接预览未安装的 TTF / OTF / TTC 字体\r\n" +
|
||||
"• 卡片式批量预览,后台渲染、可随时停止\r\n" +
|
||||
"• 绿色快捷方式安装 / 注册表安装双模式\r\n" +
|
||||
"• 批量移动、批量重命名、标签与分类管理\r\n" +
|
||||
"• 支持局域网 / NAS 网络共享盘字体\r\n" +
|
||||
"• 导出系统字体、自定义字色底色与字号\r\n\r\n" +
|
||||
"技术:.NET WinForms,PrivateFontCollection 免加载预览,完全离线运行。\r\n\r\n" +
|
||||
"提示:右键“预览文字”框可一键填入中文样例。"
|
||||
};
|
||||
|
||||
Button ok = new Button
|
||||
{
|
||||
Text = "确定",
|
||||
DialogResult = DialogResult.OK,
|
||||
Location = new Point(360, 284),
|
||||
Size = new Size(82, 28)
|
||||
};
|
||||
|
||||
Controls.Add(title);
|
||||
Controls.Add(body);
|
||||
Controls.Add(ok);
|
||||
AcceptButton = ok;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 全局应用信息:软件名、版本号集中在此,其他地方一律引用,不硬编码。
|
||||
/// </summary>
|
||||
public static class AppInfo
|
||||
{
|
||||
public const string AppName = "字体预览工具";
|
||||
|
||||
public static string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
var v = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
if (v == null) return "1.0.0";
|
||||
// 只显示 3 级版本号
|
||||
return v.Major + "." + v.Minor + "." + v.Build;
|
||||
}
|
||||
}
|
||||
|
||||
public static string FullTitle => AppName + " v" + Version;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 字体对比对话框。
|
||||
/// 模式一(showList=true):把已加入对比列表的多个字体纵向滚动排列,同一文字/字号并排渲染。
|
||||
/// 模式二(showList=false):从全部字体里选两个下拉框对比。
|
||||
/// </summary>
|
||||
public class CompareDialog : Form
|
||||
{
|
||||
private List<FontItem> items;
|
||||
private bool listMode;
|
||||
private ComboBox cboA;
|
||||
private ComboBox cboB;
|
||||
private TextBox txtText;
|
||||
private NumericUpDown numSize;
|
||||
private PictureBox picA;
|
||||
private PictureBox picB;
|
||||
private Label lblNameA;
|
||||
private Label lblNameB;
|
||||
private Panel scrollPanel;
|
||||
private List<PictureBox> listPics = new List<PictureBox>();
|
||||
private List<Label> listNames = new List<Label>();
|
||||
private List<RoundPanel> listCards = new List<RoundPanel>();
|
||||
private Action<string> installCallback;
|
||||
|
||||
public CompareDialog(List<FontItem> items, bool showList, Action<string> installCallback = null)
|
||||
{
|
||||
this.installCallback = installCallback;
|
||||
this.items = items;
|
||||
this.listMode = showList;
|
||||
Text = listMode ? "字体多字体对比(已加入 " + items.Count + " 个)" : "字体并排对比";
|
||||
FormBorderStyle = FormBorderStyle.SizableToolWindow;
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
ClientSize = new Size(820, 600);
|
||||
Font = new Font("Microsoft YaHei UI", 9f);
|
||||
MinimumSize = new Size(620, 460);
|
||||
|
||||
// 顶部:文字 + 字号 + 渲染
|
||||
Label lt = new Label { Text = "文字:", Location = new Point(12, 15), Size = new Size(44, 20) };
|
||||
txtText = new TextBox { Location = new Point(62, 12), Size = new Size(560, 24), Text = "永字八法 横平竖直 你好世界 ABC 0123" };
|
||||
Label ls = new Label { Text = "字号:", Location = new Point(632, 15), Size = new Size(40, 20) };
|
||||
numSize = new NumericUpDown { Location = new Point(676, 12), Size = new Size(60, 24), Minimum = 12, Maximum = 120, Value = 36 };
|
||||
Button btnGo = new Button { Text = "渲染", Location = new Point(744, 11), Size = new Size(58, 26) };
|
||||
btnGo.Click += OnRender;
|
||||
numSize.ValueChanged += OnRender;
|
||||
txtText.Leave += delegate { OnRender(null, null); };
|
||||
txtText.KeyDown += delegate (object s, KeyEventArgs k) { if (k.KeyCode == Keys.Enter) { OnRender(null, null); k.SuppressKeyPress = true; } };
|
||||
Controls.Add(lt); Controls.Add(txtText); Controls.Add(ls); Controls.Add(numSize); Controls.Add(btnGo);
|
||||
|
||||
if (listMode)
|
||||
{
|
||||
scrollPanel = new Panel { Location = new Point(12, 44), Size = new Size(790, 544), AutoScroll = true, BackColor = Color.White };
|
||||
Controls.Add(scrollPanel);
|
||||
RebuildList();
|
||||
}
|
||||
else
|
||||
{
|
||||
Label la = new Label { Text = "字体 A:", Location = new Point(12, 48), Size = new Size(50, 20) };
|
||||
cboA = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList, Location = new Point(62, 45), Size = new Size(360, 24) };
|
||||
Label lb = new Label { Text = "字体 B:", Location = new Point(430, 48), Size = new Size(50, 20) };
|
||||
cboB = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList, Location = new Point(480, 45), Size = new Size(268, 24) };
|
||||
foreach (FontItem it in items)
|
||||
{
|
||||
string s = it.DisplayName + " —— " + it.Name;
|
||||
cboA.Items.Add(s);
|
||||
cboB.Items.Add(s);
|
||||
}
|
||||
if (cboA.Items.Count > 0) cboA.SelectedIndex = 0;
|
||||
if (cboB.Items.Count > 1) cboB.SelectedIndex = 1; else if (cboB.Items.Count > 0) cboB.SelectedIndex = 0;
|
||||
lblNameA = new Label { Location = new Point(12, 82), Size = new Size(776, 18), ForeColor = Color.DimGray };
|
||||
lblNameB = new Label { Location = new Point(12, 282), Size = new Size(776, 18), ForeColor = Color.DimGray };
|
||||
picA = new PictureBox { Location = new Point(12, 102), Size = new Size(776, 176), BackColor = Color.FromArgb(242, 244, 247), SizeMode = PictureBoxSizeMode.Zoom, BorderStyle = BorderStyle.FixedSingle };
|
||||
picB = new PictureBox { Location = new Point(12, 302), Size = new Size(776, 176), BackColor = Color.FromArgb(242, 244, 247), SizeMode = PictureBoxSizeMode.Zoom, BorderStyle = BorderStyle.FixedSingle };
|
||||
Controls.Add(la); Controls.Add(cboA);
|
||||
Controls.Add(lb); Controls.Add(cboB);
|
||||
Controls.Add(lblNameA); Controls.Add(lblNameB);
|
||||
Controls.Add(picA); Controls.Add(picB);
|
||||
}
|
||||
|
||||
Shown += delegate { OnRender(null, null); };
|
||||
}
|
||||
|
||||
private void RebuildList()
|
||||
{
|
||||
scrollPanel.Controls.Clear();
|
||||
listPics.Clear();
|
||||
listNames.Clear();
|
||||
listCards.Clear();
|
||||
int w = scrollPanel.ClientSize.Width - 24;
|
||||
if (w < 400) w = 400;
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
FontItem it = items[i];
|
||||
RoundPanel card = UiTheme.CreateCard(w, 180);
|
||||
Panel accent = UiTheme.CreateAccentBar(14, 16);
|
||||
Label name = UiTheme.CreateCardTitle(it.DisplayName, 26, 12, w - 44);
|
||||
PictureBox pic = UiTheme.CreatePreviewBox(18, 46, w - 36, 120);
|
||||
// 右键:以快捷方式安装
|
||||
ContextMenuStrip cm = new ContextMenuStrip();
|
||||
ToolStripMenuItem miInstall = new ToolStripMenuItem("以快捷方式安装(复制到左侧目录)");
|
||||
miInstall.Click += delegate
|
||||
{
|
||||
if (installCallback != null) installCallback(it.Path);
|
||||
};
|
||||
cm.Items.Add(miInstall);
|
||||
card.ContextMenuStrip = cm;
|
||||
pic.ContextMenuStrip = cm;
|
||||
name.ContextMenuStrip = cm;
|
||||
// 左键复制字体名
|
||||
card.Cursor = Cursors.Hand;
|
||||
EventHandler copyClick = delegate { try { Clipboard.SetText(it.Name); } catch { } };
|
||||
card.MouseClick += (MouseEventHandler)delegate (object s, MouseEventArgs e) { if (e.Button == MouseButtons.Left) copyClick(s, e); };
|
||||
pic.MouseClick += (MouseEventHandler)delegate (object s, MouseEventArgs e) { if (e.Button == MouseButtons.Left) copyClick(s, e); };
|
||||
name.MouseClick += (MouseEventHandler)delegate (object s, MouseEventArgs e) { if (e.Button == MouseButtons.Left) copyClick(s, e); };
|
||||
card.Controls.Add(accent);
|
||||
card.Controls.Add(name);
|
||||
card.Controls.Add(pic);
|
||||
scrollPanel.Controls.Add(card);
|
||||
listCards.Add(card);
|
||||
listNames.Add(name);
|
||||
listPics.Add(pic);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRender(object sender, EventArgs e)
|
||||
{
|
||||
if (listMode)
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
RenderOne(i, listPics[i], listNames[i]);
|
||||
}
|
||||
LayoutList();
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderOne(cboA.SelectedIndex, picA, lblNameA);
|
||||
RenderOne(cboB.SelectedIndex, picB, lblNameB);
|
||||
}
|
||||
}
|
||||
|
||||
// 按每张图片实际高度重排卡片纵向位置
|
||||
private void LayoutList()
|
||||
{
|
||||
int y = 8;
|
||||
int w = scrollPanel.ClientSize.Width - 24;
|
||||
if (w < 400) w = 400;
|
||||
for (int i = 0; i < listCards.Count; i++)
|
||||
{
|
||||
int h = (listPics[i].Image != null) ? listPics[i].Image.Height : 120;
|
||||
if (h > 400) h = 400;
|
||||
if (h < 60) h = 60;
|
||||
listCards[i].Width = w;
|
||||
listCards[i].Height = 46 + h + 10;
|
||||
listCards[i].Top = y;
|
||||
listCards[i].Left = 8;
|
||||
listPics[i].Height = h;
|
||||
y += listCards[i].Height + 12;
|
||||
}
|
||||
}
|
||||
|
||||
private void RenderOne(int idx, PictureBox pic, Label nameLbl)
|
||||
{
|
||||
if (idx < 0 || idx >= items.Count) return;
|
||||
FontItem it = items[idx];
|
||||
bool failed;
|
||||
Bitmap bmp = Worker.RenderFont(it.Path, it.Name, txtText.Text, (int)numSize.Value, Color.Black, Color.White, out failed);
|
||||
nameLbl.Text = it.DisplayName;
|
||||
if (bmp != null)
|
||||
{
|
||||
// 新图画好后再一次性替换旧图,避免中间空白闪烁
|
||||
Bitmap old = (Bitmap)pic.Image;
|
||||
pic.Image = bmp;
|
||||
if (old != null) old.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
nameLbl.Text = it.DisplayName + "(渲染失败)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
[ComImport]
|
||||
[Guid("DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7")]
|
||||
internal class FileOpenDialogRCW
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 字体清单缓存:首次扫描后落盘,后续启动直接读缓存秒显,
|
||||
/// 后台再按 文件路径/大小/修改时间 做增量对比,未变化的不重新解析。
|
||||
/// </summary>
|
||||
public class FontCache
|
||||
{
|
||||
public struct Stamp
|
||||
{
|
||||
public long Size;
|
||||
public long Mtime;
|
||||
}
|
||||
|
||||
public string RootDir;
|
||||
public List<FontItem> Items = new List<FontItem>();
|
||||
public Dictionary<string, Stamp> Stamps = new Dictionary<string, Stamp>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
private static string CachePath => Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "fontcache.txt");
|
||||
|
||||
public static bool TryLoad(string rootDir, out FontCache cache)
|
||||
{
|
||||
cache = null;
|
||||
try
|
||||
{
|
||||
if (!File.Exists(CachePath)) return false;
|
||||
string[] lines = File.ReadAllLines(CachePath, Encoding.UTF8);
|
||||
if (lines.Length < 2 || lines[0] != "#FontCache v1") return false;
|
||||
string rd = null;
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
if (lines[i].StartsWith("rootdir=")) { rd = lines[i].Substring(8).Trim(); break; }
|
||||
}
|
||||
if (rd == null || !string.Equals(rd, rootDir.Trim(), StringComparison.OrdinalIgnoreCase)) return false;
|
||||
|
||||
FontCache c = new FontCache();
|
||||
c.RootDir = rootDir;
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
string l = lines[i];
|
||||
if (string.IsNullOrEmpty(l) || l[0] == '#' || l.StartsWith("rootdir=")) continue;
|
||||
string[] p = l.Split('\t');
|
||||
if (p.Length < 6) continue;
|
||||
FontItem it = new FontItem { Cat = p[0], Path = p[1], Name = p[2], DisplayName = p[3] };
|
||||
c.Items.Add(it);
|
||||
long size, mt;
|
||||
if (long.TryParse(p[4], out size) && long.TryParse(p[5], out mt))
|
||||
{
|
||||
c.Stamps[it.Path] = new Stamp { Size = size, Mtime = mt };
|
||||
}
|
||||
}
|
||||
if (c.Items.Count == 0) return false;
|
||||
cache = c;
|
||||
return true;
|
||||
}
|
||||
catch { return false; }
|
||||
}
|
||||
|
||||
public static void Save(FontCache c)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("#FontCache v1");
|
||||
sb.AppendLine("rootdir=" + c.RootDir);
|
||||
foreach (FontItem it in c.Items)
|
||||
{
|
||||
Stamp st;
|
||||
c.Stamps.TryGetValue(it.Path, out st);
|
||||
string dn = (it.DisplayName ?? "").Replace("\t", " ");
|
||||
sb.Append(it.Cat).Append('\t').Append(it.Path).Append('\t')
|
||||
.Append(it.Name).Append('\t').Append(dn).Append('\t')
|
||||
.Append(st.Size).Append('\t').Append(st.Mtime).Append('\n');
|
||||
}
|
||||
string tmp = CachePath + ".tmp";
|
||||
File.WriteAllText(tmp, sb.ToString(), new UTF8Encoding(false));
|
||||
if (File.Exists(CachePath)) { File.Copy(tmp, CachePath, true); File.Delete(tmp); }
|
||||
else { File.Move(tmp, CachePath); }
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 轻量 cmap 表解析器:纯字节读取字体文件,判断某 Unicode 码点是否有字形。
|
||||
/// 支持 TTF/OTF/TTC,覆盖 cmap 格式 4(BMP)与格式 12(全平面)。
|
||||
/// 不依赖 GDI+/DirectWrite,跨平台可编译。
|
||||
/// </summary>
|
||||
public class FontCmap
|
||||
{
|
||||
private List<int[]> ranges = new List<int[]>(); // 排序的 [start, end] 闭区间
|
||||
|
||||
public static FontCmap Load(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] d = File.ReadAllBytes(path);
|
||||
FontCmap c = new FontCmap();
|
||||
c.Parse(d);
|
||||
return c.ranges.Count > 0 ? c : null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static ushort RU16(byte[] d, uint o)
|
||||
{
|
||||
return (ushort)(d[o] * 256u + d[o + 1]);
|
||||
}
|
||||
|
||||
private static uint RU32(byte[] d, uint o)
|
||||
{
|
||||
return (uint)(d[o] * 16777216u + d[o + 1] * 65536u + d[o + 2] * 256u + d[o + 3]);
|
||||
}
|
||||
|
||||
private static string Tag(byte[] d, uint o)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Encoding.ASCII.GetString(d, (int)o, 4);
|
||||
}
|
||||
catch { return ""; }
|
||||
}
|
||||
|
||||
private void Parse(byte[] d)
|
||||
{
|
||||
uint sfntOff = 0;
|
||||
if (Tag(d, 0) == "ttcf")
|
||||
{
|
||||
sfntOff = RU32(d, 8); // TTC:第一个字体的偏移
|
||||
}
|
||||
uint numTables = RU16(d, sfntOff + 4);
|
||||
uint cmapOff = 0;
|
||||
for (uint i = 0; i < numTables; i++)
|
||||
{
|
||||
uint rec = sfntOff + 12 + i * 16;
|
||||
if (Tag(d, rec) == "cmap")
|
||||
{
|
||||
cmapOff = RU32(d, rec + 8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cmapOff == 0) return;
|
||||
|
||||
uint numSub = RU16(d, cmapOff + 2);
|
||||
uint best = 0;
|
||||
bool gotFull = false;
|
||||
for (uint i = 0; i < numSub; i++)
|
||||
{
|
||||
uint rec = cmapOff + 4 + i * 8;
|
||||
ushort platform = RU16(d, rec);
|
||||
ushort enc = RU16(d, rec + 2);
|
||||
uint off = cmapOff + RU32(d, rec + 4);
|
||||
// Windows: platformID=3;enc=10 为全 Unicode 平面,enc=1 为 BMP
|
||||
if (platform == 3 && (enc == 10 || enc == 1))
|
||||
{
|
||||
if (enc == 10 && !gotFull) { best = off; gotFull = true; }
|
||||
else if (best == 0) { best = off; }
|
||||
}
|
||||
}
|
||||
if (best == 0)
|
||||
{
|
||||
// 退而求其次:任意子表
|
||||
if (numSub > 0) best = cmapOff + RU32(d, cmapOff + 8);
|
||||
}
|
||||
if (best == 0) return;
|
||||
|
||||
ushort fmt = RU16(d, best);
|
||||
if (fmt == 4) ParseFormat4(d, best);
|
||||
else if (fmt == 12) ParseFormat12(d, best);
|
||||
else if (fmt == 0) ParseFormat0(d, best);
|
||||
|
||||
ranges.Sort((a, b) => a[0].CompareTo(b[0]));
|
||||
Merge();
|
||||
}
|
||||
|
||||
private void ParseFormat4(byte[] d, uint o)
|
||||
{
|
||||
int segCount = RU16(d, o + 6) / 2;
|
||||
uint endOff = o + 14;
|
||||
uint startOff = endOff + (uint)segCount * 2 + 2; // 跳过 endCode 与 reservedPad
|
||||
for (int i = 0; i < segCount; i++)
|
||||
{
|
||||
int s = RU16(d, startOff + (uint)i * 2);
|
||||
int e = RU16(d, endOff + (uint)i * 2);
|
||||
if (s != 0xFFFF && e >= s && s != 0)
|
||||
{
|
||||
ranges.Add(new int[] { s, e });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ParseFormat12(byte[] d, uint o)
|
||||
{
|
||||
uint numGroups = RU32(d, o + 12);
|
||||
uint g = o + 16;
|
||||
for (uint i = 0; i < numGroups; i++)
|
||||
{
|
||||
int s = (int)RU32(d, g + i * 12);
|
||||
int e = (int)RU32(d, g + i * 12 + 4);
|
||||
if (e >= s) ranges.Add(new int[] { s, e });
|
||||
}
|
||||
}
|
||||
|
||||
private void ParseFormat0(byte[] d, uint o)
|
||||
{
|
||||
// 256 字节 glyph index 表,非 0 即有字形
|
||||
int start = -1;
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
bool has = d[o + 6 + i] != 0;
|
||||
if (has && start < 0) start = i;
|
||||
if (!has && start >= 0) { ranges.Add(new int[] { start, i - 1 }); start = -1; }
|
||||
}
|
||||
if (start >= 0) ranges.Add(new int[] { start, 255 });
|
||||
}
|
||||
|
||||
private void Merge()
|
||||
{
|
||||
List<int[]> merged = new List<int[]>();
|
||||
foreach (int[] r in ranges)
|
||||
{
|
||||
if (merged.Count > 0 && r[0] <= merged[merged.Count - 1][1] + 1)
|
||||
{
|
||||
if (r[1] > merged[merged.Count - 1][1]) merged[merged.Count - 1][1] = r[1];
|
||||
}
|
||||
else merged.Add(new int[] { r[0], r[1] });
|
||||
}
|
||||
ranges = merged;
|
||||
}
|
||||
|
||||
public bool HasGlyph(int codepoint)
|
||||
{
|
||||
int lo = 0, hi = ranges.Count - 1;
|
||||
while (lo <= hi)
|
||||
{
|
||||
int mid = (lo + hi) / 2;
|
||||
if (codepoint < ranges[mid][0]) hi = mid - 1;
|
||||
else if (codepoint > ranges[mid][1]) lo = mid + 1;
|
||||
else return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace FontPreview;
|
||||
|
||||
public class FontItem
|
||||
{
|
||||
public string Path;
|
||||
|
||||
public string Name;
|
||||
|
||||
public string DisplayName;
|
||||
|
||||
public string Cat;
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal static class FontManagerEx
|
||||
{
|
||||
internal static bool IsAdmin()
|
||||
{
|
||||
try
|
||||
{
|
||||
using WindowsIdentity ntIdentity = WindowsIdentity.GetCurrent();
|
||||
WindowsPrincipal windowsPrincipal = new WindowsPrincipal(ntIdentity);
|
||||
return windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
internal static string GetFontDisplayName(string fontPath)
|
||||
{
|
||||
return FontNameParser.GetDisplayName(fontPath, null);
|
||||
}
|
||||
|
||||
internal static bool InstallAsShortcut(string fontFullPath)
|
||||
{
|
||||
string lnkPath;
|
||||
string regName;
|
||||
return InstallAsShortcut(fontFullPath, out lnkPath, out regName);
|
||||
}
|
||||
|
||||
internal static bool InstallAsShortcut(string fontFullPath, out string lnkPath, out string regName)
|
||||
{
|
||||
lnkPath = "";
|
||||
regName = "";
|
||||
try
|
||||
{
|
||||
string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.Fonts);
|
||||
string fileName = Path.GetFileName(fontFullPath);
|
||||
lnkPath = Path.Combine(folderPath, fileName + ".lnk");
|
||||
Type typeFromCLSID = Type.GetTypeFromCLSID(new Guid("00021401-0000-0000-C000-000000000046"));
|
||||
if (typeFromCLSID == null)
|
||||
{
|
||||
lnkPath = "";
|
||||
return false;
|
||||
}
|
||||
object obj = Activator.CreateInstance(typeFromCLSID);
|
||||
try
|
||||
{
|
||||
ShellLinkW shellLinkW = (ShellLinkW)obj;
|
||||
shellLinkW.SetPath(fontFullPath);
|
||||
shellLinkW.SetWorkingDirectory(Path.GetDirectoryName(fontFullPath));
|
||||
shellLinkW.SetIconLocation(fontFullPath, 0);
|
||||
PersistFile persistFile = (PersistFile)obj;
|
||||
persistFile.Save(lnkPath, fRemember: true);
|
||||
Marshal.FinalReleaseComObject(persistFile);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FinalReleaseComObject(obj);
|
||||
}
|
||||
if (!File.Exists(lnkPath))
|
||||
{
|
||||
lnkPath = "(.lnk 生成失败)";
|
||||
return false;
|
||||
}
|
||||
try
|
||||
{
|
||||
using RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
|
||||
if (registryKey != null)
|
||||
{
|
||||
string fullPath = Path.GetFullPath(fontFullPath);
|
||||
bool flag = false;
|
||||
string[] valueNames = registryKey.GetValueNames();
|
||||
foreach (string name in valueNames)
|
||||
{
|
||||
object value = registryKey.GetValue(name);
|
||||
if (value is string)
|
||||
{
|
||||
string a = (string)value;
|
||||
if (string.Equals(a, fontFullPath, StringComparison.OrdinalIgnoreCase) || string.Equals(a, fullPath, StringComparison.OrdinalIgnoreCase) || string.Equals(a, fileName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
regName = "";
|
||||
lnkPath = "(已安装,未重复登记)";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
string text = GetFontDisplayName(fontFullPath);
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
text = Path.GetFileNameWithoutExtension(fontFullPath);
|
||||
}
|
||||
regName = text + " (TrueType)";
|
||||
using (RegistryKey registryKey2 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", writable: true))
|
||||
{
|
||||
if (registryKey2 == null)
|
||||
{
|
||||
lnkPath = "(无法打开字体注册表键,需管理员权限)";
|
||||
return false;
|
||||
}
|
||||
registryKey2.SetValue(regName, fontFullPath, RegistryValueKind.String);
|
||||
}
|
||||
try
|
||||
{
|
||||
using RegistryKey registryKey3 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
|
||||
string value2 = ((registryKey3 == null) ? null : (registryKey3.GetValue(regName) as string));
|
||||
if (string.IsNullOrEmpty(value2))
|
||||
{
|
||||
lnkPath = "(注册表项写入后未验证通过)";
|
||||
regName = "";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
regName = "";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lnkPath = "(异常:" + ex.Message + ")";
|
||||
regName = "";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal static class FontNameParser
|
||||
{
|
||||
private struct NameRec
|
||||
{
|
||||
public int PlatformID;
|
||||
|
||||
public int EncodingID;
|
||||
|
||||
public int LanguageID;
|
||||
|
||||
public int NameID;
|
||||
|
||||
public byte[] Data;
|
||||
}
|
||||
|
||||
private const int TTF_DIRREC_LEN = 16;
|
||||
|
||||
internal static string GetDisplayName(string fontPath, string fallback)
|
||||
{
|
||||
try
|
||||
{
|
||||
string text = Parse(fontPath);
|
||||
return string.IsNullOrEmpty(text) ? fallback : text;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
|
||||
private static string Parse(string path)
|
||||
{
|
||||
using FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
byte[] array = new byte[12];
|
||||
if (!ReadFully(fileStream, array, 0, 12))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
long num;
|
||||
if (array[0] == 116 && array[1] == 116 && array[2] == 99 && array[3] == 102)
|
||||
{
|
||||
byte[] array2 = new byte[4];
|
||||
if (!ReadFully(fileStream, array2, 0, 4))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
num = Be32(array2, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
num = 0L;
|
||||
}
|
||||
fileStream.Seek(num + 4, SeekOrigin.Begin);
|
||||
byte[] array3 = new byte[2];
|
||||
if (!ReadFully(fileStream, array3, 0, 2))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int num2 = (array3[0] << 8) | array3[1];
|
||||
fileStream.Seek(num + 12, SeekOrigin.Begin);
|
||||
long num3 = 0L;
|
||||
long num4 = 0L;
|
||||
byte[] array4 = new byte[16];
|
||||
for (int i = 0; i < num2; i++)
|
||||
{
|
||||
if (!ReadFully(fileStream, array4, 0, 16))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (array4[0] == 110 && array4[1] == 97 && array4[2] == 109 && array4[3] == 101)
|
||||
{
|
||||
num3 = Be32(array4, 8);
|
||||
num4 = Be32(array4, 12);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (num3 == 0 || num4 <= 0 || num4 > 4194304)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
byte[] array5 = new byte[num4];
|
||||
fileStream.Seek(num3, SeekOrigin.Begin);
|
||||
if (!ReadFully(fileStream, array5, 0, (int)num4))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<NameRec> list = new List<NameRec>();
|
||||
int num5 = (array5[2] << 8) | array5[3];
|
||||
int num6 = (array5[4] << 8) | array5[5];
|
||||
int num7 = 6;
|
||||
for (int i = 0; i < num5; i++)
|
||||
{
|
||||
if (num7 + 12 > num4)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int platformID = (array5[num7] << 8) | array5[num7 + 1];
|
||||
int encodingID = (array5[num7 + 2] << 8) | array5[num7 + 3];
|
||||
int languageID = (array5[num7 + 4] << 8) | array5[num7 + 5];
|
||||
int nameID = (array5[num7 + 6] << 8) | array5[num7 + 7];
|
||||
int num8 = (array5[num7 + 8] << 8) | array5[num7 + 9];
|
||||
int num9 = (array5[num7 + 10] << 8) | array5[num7 + 11];
|
||||
if (num9 >= 0 && num8 > 0 && num6 + num9 + num8 <= num4)
|
||||
{
|
||||
NameRec item = default(NameRec);
|
||||
item.PlatformID = platformID;
|
||||
item.EncodingID = encodingID;
|
||||
item.LanguageID = languageID;
|
||||
item.NameID = nameID;
|
||||
item.Data = new byte[num8];
|
||||
Array.Copy(array5, num6 + num9, item.Data, 0, num8);
|
||||
list.Add(item);
|
||||
}
|
||||
num7 += 12;
|
||||
}
|
||||
int[] array6 = new int[4] { 1, 4, 6, 16 };
|
||||
int[] array7 = array6;
|
||||
foreach (int nameID2 in array7)
|
||||
{
|
||||
string text = PickBest(list, nameID2);
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string PickBest(List<NameRec> recs, int nameID)
|
||||
{
|
||||
List<NameRec> list = new List<NameRec>();
|
||||
foreach (NameRec rec in recs)
|
||||
{
|
||||
if (rec.NameID == nameID)
|
||||
{
|
||||
list.Add(rec);
|
||||
}
|
||||
}
|
||||
if (list.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
foreach (NameRec item in list)
|
||||
{
|
||||
if (item.PlatformID == 3 && item.LanguageID == 2052)
|
||||
{
|
||||
string text = Decode(item);
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (NameRec item2 in list)
|
||||
{
|
||||
if (item2.PlatformID == 3 && item2.LanguageID == 1033)
|
||||
{
|
||||
string text = Decode(item2);
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (NameRec item3 in list)
|
||||
{
|
||||
if (item3.PlatformID == 3 && item3.LanguageID == 0)
|
||||
{
|
||||
string text = Decode(item3);
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (NameRec item4 in list)
|
||||
{
|
||||
if (item4.PlatformID == 3)
|
||||
{
|
||||
string text = Decode(item4);
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (NameRec item5 in list)
|
||||
{
|
||||
if (item5.PlatformID == 0)
|
||||
{
|
||||
string text = Decode(item5);
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (NameRec item6 in list)
|
||||
{
|
||||
if (item6.PlatformID == 1)
|
||||
{
|
||||
string text = Decode(item6);
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string Decode(NameRec r)
|
||||
{
|
||||
string text;
|
||||
try
|
||||
{
|
||||
text = ((r.PlatformID != 3 && r.PlatformID != 0) ? Encoding.GetEncoding(28591).GetString(r.Data) : Encoding.BigEndianUnicode.GetString(r.Data));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
text = text.Trim('\0', ' ', '\t', '\r', '\n');
|
||||
return string.IsNullOrEmpty(text) ? null : text;
|
||||
}
|
||||
|
||||
private static bool ReadFully(Stream s, byte[] buf, int off, int len)
|
||||
{
|
||||
int num;
|
||||
for (int i = 0; i < len; i += num)
|
||||
{
|
||||
num = s.Read(buf, off + i, len - i);
|
||||
if (num <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static uint Be32(byte[] b, int off)
|
||||
{
|
||||
return (uint)((b[off] << 24) | (b[off + 1] << 16) | (b[off + 2] << 8) | b[off + 3]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal class FontRenameDialog : Form
|
||||
{
|
||||
private List<FontItem> items;
|
||||
|
||||
public bool Renamed;
|
||||
|
||||
private TextBox txtPrefix;
|
||||
|
||||
private TextBox txtSuffix;
|
||||
|
||||
private TextBox txtFind;
|
||||
|
||||
private TextBox txtReplace;
|
||||
|
||||
private CheckBox chkSeq;
|
||||
|
||||
private NumericUpDown numSeq;
|
||||
|
||||
private ListView lv;
|
||||
|
||||
public FontRenameDialog(List<FontItem> list)
|
||||
{
|
||||
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0050: Expected O, but got Unknown
|
||||
items = list;
|
||||
((Control)this).Text = "批量重命名(仅改文件名)";
|
||||
((Control)this).Width = 820;
|
||||
((Control)this).Height = 620;
|
||||
((Form)this).StartPosition = (FormStartPosition)4;
|
||||
((Control)this).Font = new Font("Microsoft YaHei UI", 9f);
|
||||
Build();
|
||||
}
|
||||
|
||||
private void Build()
|
||||
{
|
||||
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0007: Expected O, but got Unknown
|
||||
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_002d: Expected O, but got Unknown
|
||||
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0047: Expected O, but got Unknown
|
||||
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0070: Expected O, but got Unknown
|
||||
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_008d: Expected O, but got Unknown
|
||||
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00b6: Expected O, but got Unknown
|
||||
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00d3: Expected O, but got Unknown
|
||||
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00fc: Expected O, but got Unknown
|
||||
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_019a: Expected O, but got Unknown
|
||||
//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_01c9: Expected O, but got Unknown
|
||||
//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_01f4: Expected O, but got Unknown
|
||||
//IL_0277: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_027e: Expected O, but got Unknown
|
||||
//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_02b9: Expected O, but got Unknown
|
||||
//IL_0336: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0340: Expected O, but got Unknown
|
||||
//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_03e8: Expected O, but got Unknown
|
||||
Label val = new Label();
|
||||
((Control)val).Text = "前缀";
|
||||
((Control)val).SetBounds(12, 14, 40, 22);
|
||||
txtPrefix = new TextBox();
|
||||
((Control)txtPrefix).SetBounds(52, 11, 110, 24);
|
||||
Label val2 = new Label();
|
||||
((Control)val2).Text = "后缀";
|
||||
((Control)val2).SetBounds(170, 14, 40, 22);
|
||||
txtSuffix = new TextBox();
|
||||
((Control)txtSuffix).SetBounds(210, 11, 110, 24);
|
||||
Label val3 = new Label();
|
||||
((Control)val3).Text = "查找";
|
||||
((Control)val3).SetBounds(330, 14, 40, 22);
|
||||
txtFind = new TextBox();
|
||||
((Control)txtFind).SetBounds(370, 11, 100, 24);
|
||||
Label val4 = new Label();
|
||||
((Control)val4).Text = "替换";
|
||||
((Control)val4).SetBounds(480, 14, 40, 22);
|
||||
txtReplace = new TextBox();
|
||||
((Control)txtReplace).SetBounds(520, 11, 100, 24);
|
||||
((Control)this).Controls.Add((Control)(object)val);
|
||||
((Control)this).Controls.Add((Control)(object)txtPrefix);
|
||||
((Control)this).Controls.Add((Control)(object)val2);
|
||||
((Control)this).Controls.Add((Control)(object)txtSuffix);
|
||||
((Control)this).Controls.Add((Control)(object)val3);
|
||||
((Control)this).Controls.Add((Control)(object)txtFind);
|
||||
((Control)this).Controls.Add((Control)(object)val4);
|
||||
((Control)this).Controls.Add((Control)(object)txtReplace);
|
||||
chkSeq = new CheckBox();
|
||||
((Control)chkSeq).Text = "自动编号避免重名";
|
||||
((Control)chkSeq).SetBounds(12, 44, 160, 24);
|
||||
Label val5 = new Label();
|
||||
((Control)val5).Text = "起始";
|
||||
((Control)val5).SetBounds(180, 48, 34, 22);
|
||||
numSeq = new NumericUpDown();
|
||||
numSeq.Minimum = 1m;
|
||||
numSeq.Maximum = 9999m;
|
||||
numSeq.Value = 1m;
|
||||
((Control)numSeq).SetBounds(216, 44, 60, 24);
|
||||
((Control)this).Controls.Add((Control)(object)chkSeq);
|
||||
((Control)this).Controls.Add((Control)(object)val5);
|
||||
((Control)this).Controls.Add((Control)(object)numSeq);
|
||||
Button val6 = new Button();
|
||||
((Control)val6).Text = "生成预览";
|
||||
((Control)val6).SetBounds(300, 42, 96, 28);
|
||||
((Control)val6).Click += delegate
|
||||
{
|
||||
Preview();
|
||||
};
|
||||
Button val7 = new Button();
|
||||
((Control)val7).Text = "执行重命名";
|
||||
((Control)val7).BackColor = Color.FromArgb(196, 82, 43);
|
||||
((Control)val7).ForeColor = Color.White;
|
||||
((ButtonBase)val7).FlatStyle = (FlatStyle)0;
|
||||
((Control)val7).SetBounds(696, 42, 110, 28);
|
||||
((Control)val7).Click += delegate
|
||||
{
|
||||
DoRename();
|
||||
};
|
||||
((Control)this).Controls.Add((Control)(object)val6);
|
||||
((Control)this).Controls.Add((Control)(object)val7);
|
||||
lv = new ListView();
|
||||
lv.View = (View)1;
|
||||
lv.FullRowSelect = true;
|
||||
lv.GridLines = true;
|
||||
lv.Columns.Add("原名", 340);
|
||||
lv.Columns.Add("新名", 340);
|
||||
lv.Columns.Add("状态", 100);
|
||||
((Control)lv).SetBounds(12, 80, 796, 460);
|
||||
((Control)this).Controls.Add((Control)(object)lv);
|
||||
Button val8 = new Button();
|
||||
((Control)val8).Text = "关闭";
|
||||
val8.DialogResult = (DialogResult)2;
|
||||
((Control)val8).SetBounds(696, 550, 110, 30);
|
||||
((Control)this).Controls.Add((Control)(object)val8);
|
||||
((Form)this).CancelButton = (IButtonControl)(object)val8;
|
||||
}
|
||||
|
||||
private void Preview()
|
||||
{
|
||||
lv.BeginUpdate();
|
||||
lv.Items.Clear();
|
||||
int num = (int)numSeq.Value;
|
||||
HashSet<string> hashSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
FontItem fontItem = items[i];
|
||||
string text = Path.GetFileNameWithoutExtension(fontItem.Name);
|
||||
string extension = Path.GetExtension(fontItem.Name);
|
||||
if (((Control)txtFind).Text.Length > 0)
|
||||
{
|
||||
text = text.Replace(((Control)txtFind).Text, ((Control)txtReplace).Text);
|
||||
}
|
||||
string text2 = ((Control)txtPrefix).Text + text + ((Control)txtSuffix).Text + extension;
|
||||
string text3 = "";
|
||||
if (string.Equals(text2, fontItem.Name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
text3 = "无变化";
|
||||
ListViewItem val = lv.Items.Add(fontItem.Name);
|
||||
val.SubItems.Add(text2);
|
||||
val.SubItems.Add(text3);
|
||||
continue;
|
||||
}
|
||||
if (hashSet.Contains(text2))
|
||||
{
|
||||
if (chkSeq.Checked)
|
||||
{
|
||||
do
|
||||
{
|
||||
text2 = ((Control)txtPrefix).Text + text + ((Control)txtSuffix).Text + "_" + num.ToString("000") + extension;
|
||||
num++;
|
||||
}
|
||||
while (hashSet.Contains(text2));
|
||||
hashSet.Add(text2);
|
||||
text3 = "已编号";
|
||||
}
|
||||
else
|
||||
{
|
||||
text3 = "重名(未处理)";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hashSet.Add(text2);
|
||||
}
|
||||
ListViewItem val2 = lv.Items.Add(fontItem.Name);
|
||||
val2.SubItems.Add(text2);
|
||||
val2.SubItems.Add(text3);
|
||||
if (text3 == "重名(未处理)")
|
||||
{
|
||||
val2.ForeColor = Color.Red;
|
||||
}
|
||||
}
|
||||
lv.EndUpdate();
|
||||
}
|
||||
|
||||
private void DoRename()
|
||||
{
|
||||
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_029f: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (lv.Items.Count == 0)
|
||||
{
|
||||
MessageBox.Show((IWin32Window)(object)this, "请先点击「生成预览」", "提示");
|
||||
return;
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
List<string> list = new List<string>();
|
||||
for (int i = 0; i < lv.Items.Count; i++)
|
||||
{
|
||||
string path = items[i].Path;
|
||||
string text = lv.Items[i].SubItems[1].Text;
|
||||
string text2 = lv.Items[i].SubItems[2].Text;
|
||||
if (text2 == "无变化" || text2 == "重名(未处理)")
|
||||
{
|
||||
if (text2 == "重名(未处理)")
|
||||
{
|
||||
num2++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
string fileName = Path.GetFileName(path);
|
||||
if (string.Equals(fileName, text, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
num++;
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
string directoryName = Path.GetDirectoryName(path);
|
||||
string text3 = (string.IsNullOrEmpty(directoryName) ? text : Path.Combine(directoryName, text));
|
||||
if (File.Exists(text3))
|
||||
{
|
||||
num2++;
|
||||
list.Add(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Move(path, text3);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
num2++;
|
||||
list.Add(path);
|
||||
}
|
||||
}
|
||||
if (num > 0)
|
||||
{
|
||||
Renamed = true;
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append("重命名完成:成功 " + num + ",失败 " + num2 + "\r\n");
|
||||
if (list.Count > 0 && list.Count <= 20)
|
||||
{
|
||||
stringBuilder.Append("失败项:\r\n");
|
||||
foreach (string item in list)
|
||||
{
|
||||
stringBuilder.Append(" " + Path.GetFileName(item) + "\r\n");
|
||||
}
|
||||
}
|
||||
if (list.Count > 20)
|
||||
{
|
||||
stringBuilder.Append("(失败项过多,仅显示前 20 条)\r\n");
|
||||
}
|
||||
MessageBox.Show((IWin32Window)(object)this, stringBuilder.ToString(), "批量重命名", (MessageBoxButtons)0, (MessageBoxIcon)64);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 缺字检测对话框:选一款已加载字体,输入测试文本,
|
||||
/// 用 cmap 表判断哪些字符该字体没有字形。
|
||||
/// </summary>
|
||||
public class GlyphCoverageDialog : Form
|
||||
{
|
||||
private List<FontItem> items;
|
||||
private ComboBox cboFont;
|
||||
private TextBox txtTest;
|
||||
private TextBox txtResult;
|
||||
private Label lblStat;
|
||||
|
||||
public GlyphCoverageDialog(List<FontItem> items)
|
||||
{
|
||||
this.items = items;
|
||||
Text = "缺字检测";
|
||||
FormBorderStyle = FormBorderStyle.SizableToolWindow;
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
ClientSize = new Size(560, 460);
|
||||
Font = new Font("Microsoft YaHei UI", 9f);
|
||||
MinimumSize = new Size(480, 400);
|
||||
|
||||
Label l1 = new Label { Text = "字体:", Location = new Point(12, 15), Size = new Size(40, 20) };
|
||||
cboFont = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList, Location = new Point(56, 12), Size = new Size(480, 24) };
|
||||
foreach (FontItem it in items)
|
||||
{
|
||||
cboFont.Items.Add(it.DisplayName + " —— " + it.Name);
|
||||
}
|
||||
if (cboFont.Items.Count > 0) cboFont.SelectedIndex = 0;
|
||||
|
||||
Label l2 = new Label { Text = "测试文字(逐字检查是否缺字):", Location = new Point(12, 48), Size = new Size(300, 20) };
|
||||
txtTest = new TextBox
|
||||
{
|
||||
Multiline = true,
|
||||
ScrollBars = ScrollBars.Vertical,
|
||||
Location = new Point(12, 72),
|
||||
Size = new Size(524, 110),
|
||||
Text = SampleTexts.All[0].Text
|
||||
};
|
||||
|
||||
Button btnGo = new Button { Text = "开始检测", Location = new Point(12, 190), Size = new Size(100, 28) };
|
||||
btnGo.Click += OnGo;
|
||||
|
||||
lblStat = new Label { Text = "选择字体后点击“开始检测”", Location = new Point(122, 195), Size = new Size(414, 20) };
|
||||
|
||||
txtResult = new TextBox
|
||||
{
|
||||
Multiline = true,
|
||||
ReadOnly = true,
|
||||
ScrollBars = ScrollBars.Vertical,
|
||||
Location = new Point(12, 226),
|
||||
Size = new Size(524, 222),
|
||||
BackColor = Color.White,
|
||||
Font = new Font("Microsoft YaHei UI", 10f)
|
||||
};
|
||||
|
||||
Controls.Add(l1); Controls.Add(cboFont);
|
||||
Controls.Add(l2); Controls.Add(txtTest);
|
||||
Controls.Add(btnGo); Controls.Add(lblStat);
|
||||
Controls.Add(txtResult);
|
||||
}
|
||||
|
||||
private void OnGo(object sender, EventArgs e)
|
||||
{
|
||||
if (cboFont.SelectedIndex < 0) { lblStat.Text = "请先选择字体"; return; }
|
||||
FontItem it = items[cboFont.SelectedIndex];
|
||||
FontCmap cmap = FontCmap.Load(it.Path);
|
||||
if (cmap == null)
|
||||
{
|
||||
lblStat.Text = "无法解析该字体(可能不是 TTF/OTF)";
|
||||
txtResult.Text = "";
|
||||
return;
|
||||
}
|
||||
|
||||
string test = txtTest.Text ?? "";
|
||||
HashSet<int> seen = new HashSet<int>();
|
||||
List<string> missing = new List<string>();
|
||||
int total = 0;
|
||||
// 按 UTF-32 码点遍历,正确处理 emoji/代理对,避免孤立高代理项报错
|
||||
for (int i = 0; i < test.Length; i++)
|
||||
{
|
||||
char ch = test[i];
|
||||
if (char.IsWhiteSpace(ch) || char.IsPunctuation(ch)) continue;
|
||||
int cp;
|
||||
string chStr;
|
||||
if (char.IsHighSurrogate(ch) && i + 1 < test.Length && char.IsLowSurrogate(test[i + 1]))
|
||||
{
|
||||
cp = char.ConvertToUtf32(ch, test[i + 1]);
|
||||
chStr = new string(new char[] { ch, test[i + 1] });
|
||||
i++;
|
||||
}
|
||||
else if (char.IsSurrogate(ch))
|
||||
{
|
||||
continue; // 孤立代理项,跳过
|
||||
}
|
||||
else
|
||||
{
|
||||
cp = ch;
|
||||
chStr = ch.ToString();
|
||||
}
|
||||
if (!seen.Add(cp)) continue;
|
||||
total++;
|
||||
if (!cmap.HasGlyph(cp))
|
||||
{
|
||||
missing.Add(chStr);
|
||||
}
|
||||
}
|
||||
|
||||
int cover = total - missing.Count;
|
||||
lblStat.Text = string.Format("共检查 {0} 个不同字符,覆盖 {1},缺字 {2} 个", total, cover, missing.Count);
|
||||
if (missing.Count == 0)
|
||||
{
|
||||
txtResult.Text = "✓ 该字体覆盖测试文本中的全部字符,无缺字。";
|
||||
}
|
||||
else
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("以下字符该字体缺字(无字形):");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(string.Join(" ", missing));
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("建议:换字体或减少这些用字。");
|
||||
txtResult.Text = sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
[Guid("d57c7288-d4ad-4768-be02-9d969532d960")]
|
||||
internal interface IFileOpenDialog
|
||||
{
|
||||
[PreserveSig]
|
||||
int Show(IntPtr hwndOwner);
|
||||
|
||||
[PreserveSig]
|
||||
int SetFileTypes(uint cFileTypes, [In][MarshalAs(UnmanagedType.LPArray)] IntPtr[] rgFilterSpec);
|
||||
|
||||
[PreserveSig]
|
||||
int SetFileTypeIndex(uint iFileType);
|
||||
|
||||
[PreserveSig]
|
||||
int GetFileTypeIndex(out uint piFileType);
|
||||
|
||||
[PreserveSig]
|
||||
int Advise(IntPtr pfde, out uint pdwCookie);
|
||||
|
||||
[PreserveSig]
|
||||
int Unadvise(uint dwCookie);
|
||||
|
||||
[PreserveSig]
|
||||
int SetOptions(uint fos);
|
||||
|
||||
[PreserveSig]
|
||||
int GetOptions(out uint pfos);
|
||||
|
||||
[PreserveSig]
|
||||
int SetDefaultFolder(IShellItem psi);
|
||||
|
||||
[PreserveSig]
|
||||
int SetFolder(IShellItem psi);
|
||||
|
||||
[PreserveSig]
|
||||
int GetFolder(out IShellItem ppsi);
|
||||
|
||||
[PreserveSig]
|
||||
int GetCurrentSelection(out IShellItem ppsi);
|
||||
|
||||
[PreserveSig]
|
||||
int SetFileName([MarshalAs(UnmanagedType.LPWStr)] string pszName);
|
||||
|
||||
[PreserveSig]
|
||||
int GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName);
|
||||
|
||||
[PreserveSig]
|
||||
int SetTitle([MarshalAs(UnmanagedType.LPWStr)] string pszTitle);
|
||||
|
||||
[PreserveSig]
|
||||
int SetOkButtonLabel([MarshalAs(UnmanagedType.LPWStr)] string pszText);
|
||||
|
||||
[PreserveSig]
|
||||
int SetFileNameLabel([MarshalAs(UnmanagedType.LPWStr)] string pszLabel);
|
||||
|
||||
[PreserveSig]
|
||||
int GetResult(out IShellItem ppsi);
|
||||
|
||||
[PreserveSig]
|
||||
int AddPlace(IShellItem psi, int fdap);
|
||||
|
||||
[PreserveSig]
|
||||
int SetDefaultExtension([MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension);
|
||||
|
||||
[PreserveSig]
|
||||
int Close(int hr);
|
||||
|
||||
[PreserveSig]
|
||||
int SetClientGuid(ref Guid guid);
|
||||
|
||||
[PreserveSig]
|
||||
int ClearClientData();
|
||||
|
||||
[PreserveSig]
|
||||
int SetFilter(IntPtr pFilter);
|
||||
|
||||
[PreserveSig]
|
||||
int GetResults(IntPtr ppenum);
|
||||
|
||||
[PreserveSig]
|
||||
int GetSelectedItems(IntPtr ppsai);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
[ComImport]
|
||||
[Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe")]
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
internal interface IShellItem
|
||||
{
|
||||
[PreserveSig]
|
||||
int BindToHandler(IntPtr pbc, Guid bhid, Guid riid, out IntPtr ppv);
|
||||
|
||||
[PreserveSig]
|
||||
int GetParent(out IShellItem ppsi);
|
||||
|
||||
[PreserveSig]
|
||||
int GetDisplayName(int sigdnName, out IntPtr ppszName);
|
||||
|
||||
[PreserveSig]
|
||||
int GetAttributes(int sfgaoMask, out int psfgaoAttribs);
|
||||
|
||||
[PreserveSig]
|
||||
int Compare(IShellItem psi, int hint, out int piOrder);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
// 被提权(runas)拉起的无界面安装子进程:
|
||||
// 主程序以普通权限运行,复制好字体文件后,用 runas 启动自身并带 /install "<目录>" 参数,
|
||||
// 本子进程只负责把该目录里的字体注册为系统字体,完成后弹个结果框即退出,主程序不重启、不受影响。
|
||||
internal static class InstallRunner
|
||||
{
|
||||
internal static void Run(string dir)
|
||||
{
|
||||
if (string.IsNullOrEmpty(dir) || !Directory.Exists(dir))
|
||||
{
|
||||
MessageBox.Show("安装目录不存在:" + dir, AppInfo.AppName + " 安装", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
HashSet<string> exts = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".ttf", ".otf", ".ttc", ".ote" };
|
||||
int added = 0, skipped = 0, failed = 0;
|
||||
List<string> failNames = new List<string>();
|
||||
try
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(dir))
|
||||
{
|
||||
if (!exts.Contains(Path.GetExtension(f))) continue;
|
||||
string lnk, reg;
|
||||
if (!FontManagerEx.InstallAsShortcut(f, out lnk, out reg))
|
||||
{
|
||||
failed++;
|
||||
failNames.Add(Path.GetFileName(f));
|
||||
continue;
|
||||
}
|
||||
if (lnk != null && lnk.StartsWith("(已安装")) skipped++;
|
||||
else added++;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("安装过程异常:" + ex.Message, AppInfo.AppName + " 安装", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
string msg = "系统字体安装完成:\r\n新注册 " + added + " 个,已存在跳过 " + skipped + " 个,失败 " + failed + " 个。";
|
||||
if (failed > 0)
|
||||
{
|
||||
msg += "\r\n\r\n失败项:";
|
||||
foreach (string n in failNames) msg += "\r\n " + n;
|
||||
}
|
||||
msg += "\r\n\r\n若在 Word/PS 等软件中未立即出现,请注销重新登录或重启后查看。";
|
||||
MessageBox.Show(msg, AppInfo.AppName + " 安装", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,277 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal class MoveInstallDialog : Form
|
||||
{
|
||||
private List<FontItem> items;
|
||||
|
||||
public bool Moved;
|
||||
|
||||
private TextBox txtDir;
|
||||
|
||||
private CheckBox chkShortcut;
|
||||
|
||||
private ListBox lst;
|
||||
|
||||
public MoveInstallDialog(List<FontItem> list)
|
||||
{
|
||||
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0050: Expected O, but got Unknown
|
||||
items = list;
|
||||
((Control)this).Text = "移动字体 + 快捷方式安装";
|
||||
((Control)this).Width = 700;
|
||||
((Control)this).Height = 560;
|
||||
((Form)this).StartPosition = (FormStartPosition)4;
|
||||
((Control)this).Font = new Font("Microsoft YaHei UI", 9f);
|
||||
Build();
|
||||
}
|
||||
|
||||
private void Build()
|
||||
{
|
||||
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0007: Expected O, but got Unknown
|
||||
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0063: Expected O, but got Unknown
|
||||
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0100: Expected O, but got Unknown
|
||||
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0129: Expected O, but got Unknown
|
||||
//IL_0143: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0149: Expected O, but got Unknown
|
||||
//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_01b4: Expected O, but got Unknown
|
||||
//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0205: Expected O, but got Unknown
|
||||
//IL_0265: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_026c: Expected O, but got Unknown
|
||||
//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_02c4: Expected O, but got Unknown
|
||||
Label val = new Label();
|
||||
((Control)val).Text = "将把 " + items.Count + " 个字体文件移动到指定目录;可选『以快捷方式安装』:\r\n在系统字体中创建指向新位置的快捷方式(字体不复制进系统盘,需管理员权限)。";
|
||||
((Control)val).SetBounds(12, 10, 664, 46);
|
||||
((Control)val).ForeColor = Color.DimGray;
|
||||
((Control)this).Controls.Add((Control)(object)val);
|
||||
lst = new ListBox();
|
||||
((Control)lst).SetBounds(12, 62, 664, 260);
|
||||
lst.HorizontalScrollbar = true;
|
||||
foreach (FontItem item in items)
|
||||
{
|
||||
lst.Items.Add((object)(item.Name + " <- " + item.Path));
|
||||
}
|
||||
((Control)this).Controls.Add((Control)(object)lst);
|
||||
Label val2 = new Label();
|
||||
((Control)val2).Text = "目标目录:";
|
||||
((Control)val2).SetBounds(12, 330, 64, 26);
|
||||
txtDir = new TextBox();
|
||||
((Control)txtDir).SetBounds(76, 327, 470, 26);
|
||||
Button val3 = new Button();
|
||||
((Control)val3).Text = "浏览…";
|
||||
((Control)val3).SetBounds(552, 326, 124, 28);
|
||||
((Control)val3).Click += delegate
|
||||
{
|
||||
string text = NativeFolderDialog.PickFolder(((Control)this).Handle, "选择目标目录", ((Control)txtDir).Text.Trim());
|
||||
if (text != null)
|
||||
{
|
||||
((Control)txtDir).Text = text;
|
||||
}
|
||||
};
|
||||
((Control)this).Controls.Add((Control)(object)val2);
|
||||
((Control)this).Controls.Add((Control)(object)txtDir);
|
||||
((Control)this).Controls.Add((Control)(object)val3);
|
||||
chkShortcut = new CheckBox();
|
||||
((Control)chkShortcut).Text = "移动后以快捷方式安装到系统字体(需管理员权限,不复制进系统盘)";
|
||||
((Control)chkShortcut).SetBounds(12, 366, 664, 26);
|
||||
chkShortcut.Checked = true;
|
||||
((Control)this).Controls.Add((Control)(object)chkShortcut);
|
||||
Button val4 = new Button();
|
||||
((Control)val4).Text = "执行移动";
|
||||
((Control)val4).BackColor = Color.FromArgb(43, 58, 85);
|
||||
((Control)val4).ForeColor = Color.White;
|
||||
((ButtonBase)val4).FlatStyle = (FlatStyle)0;
|
||||
((Control)val4).SetBounds(12, 408, 130, 36);
|
||||
((Control)val4).Click += delegate
|
||||
{
|
||||
DoMove();
|
||||
};
|
||||
Button val5 = new Button();
|
||||
((Control)val5).Text = "关闭";
|
||||
val5.DialogResult = (DialogResult)2;
|
||||
((Control)val5).SetBounds(576, 408, 100, 36);
|
||||
((Control)this).Controls.Add((Control)(object)val4);
|
||||
((Control)this).Controls.Add((Control)(object)val5);
|
||||
((Form)this).AcceptButton = (IButtonControl)(object)val5;
|
||||
Label val6 = new Label();
|
||||
((Control)val6).Text = "提示:移动会从原目录移除字体文件;移动正在使用的字体可能影响引用它的程序显示。";
|
||||
((Control)val6).SetBounds(12, 456, 664, 30);
|
||||
((Control)val6).ForeColor = Color.FromArgb(191, 90, 60);
|
||||
((Control)this).Controls.Add((Control)(object)val6);
|
||||
}
|
||||
|
||||
private void DoMove()
|
||||
{
|
||||
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00bc: Invalid comparison between Unknown and I4
|
||||
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00ce: Invalid comparison between Unknown and I4
|
||||
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0196: Invalid comparison between Unknown and I4
|
||||
//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
|
||||
string text = ((Control)txtDir).Text.Trim().Trim(new char[1] { '"' });
|
||||
if (text.Length == 0)
|
||||
{
|
||||
MessageBox.Show((IWin32Window)(object)this, "请先选择目标目录", "提示");
|
||||
return;
|
||||
}
|
||||
if (text.Length == 2 && text[1] == ':')
|
||||
{
|
||||
text += "\\";
|
||||
}
|
||||
string path = MainForm.DriveToUnc(text) ?? text;
|
||||
if (chkShortcut.Checked && !FontManagerEx.IsAdmin())
|
||||
{
|
||||
DialogResult val = MessageBox.Show((IWin32Window)(object)this, "『以快捷方式安装』需要管理员权限,当前未以管理员身份运行。\r\n\r\n选择『是』:用管理员身份重启本工具(会自动恢复上次目录,请重启后重新执行本次移动+安装);\r\n选择『否』:仅移动字体,跳过快捷方式安装。", "需要管理员权限", (MessageBoxButtons)3, (MessageBoxIcon)48);
|
||||
if ((int)val == 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ((int)val == 6)
|
||||
{
|
||||
try
|
||||
{
|
||||
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
||||
processStartInfo.FileName = Application.ExecutablePath;
|
||||
processStartInfo.Verb = "runas";
|
||||
Process.Start(processStartInfo);
|
||||
return;
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show((IWin32Window)(object)this, "提权启动失败(已取消,请手动以管理员身份运行本工具重试)。", "提示");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
string text2 = "将把 " + items.Count + " 个字体文件移动到:\r\n " + text + (chkShortcut.Checked ? "\r\n\r\n并在系统字体中创建快捷方式安装(指向移动后的位置)。" : "") + "\r\n\r\n确认执行?";
|
||||
if ((int)MessageBox.Show((IWin32Window)(object)this, text2, "确认操作", (MessageBoxButtons)1, (MessageBoxIcon)32) != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
List<string> list = new List<string>();
|
||||
List<string> list2 = new List<string>();
|
||||
List<string> list3 = new List<string>();
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
try
|
||||
{
|
||||
HashSet<string> hashSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
string text3 = MainForm.DriveToUnc(items[i].Path) ?? items[i].Path;
|
||||
if (!File.Exists(text3))
|
||||
{
|
||||
num2++;
|
||||
list.Add(items[i].Name);
|
||||
continue;
|
||||
}
|
||||
string text4 = items[i].Name;
|
||||
string text5 = Path.Combine(path, text4);
|
||||
if (hashSet.Contains(text4) || File.Exists(text5))
|
||||
{
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(text4);
|
||||
string extension = Path.GetExtension(text4);
|
||||
int num5 = 1;
|
||||
do
|
||||
{
|
||||
text4 = fileNameWithoutExtension + "_" + num5 + extension;
|
||||
text5 = Path.Combine(path, text4);
|
||||
num5++;
|
||||
}
|
||||
while (hashSet.Contains(text4) || File.Exists(text5));
|
||||
}
|
||||
hashSet.Add(text4);
|
||||
try
|
||||
{
|
||||
MoveFileSafe(text3, text5);
|
||||
num++;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
num2++;
|
||||
list.Add(items[i].Name);
|
||||
continue;
|
||||
}
|
||||
if (chkShortcut.Checked)
|
||||
{
|
||||
string fontFullPath = Path.Combine(text, text4);
|
||||
if (FontManagerEx.InstallAsShortcut(fontFullPath, out var lnkPath, out var regName))
|
||||
{
|
||||
num3++;
|
||||
list2.Add(lnkPath + " | " + regName);
|
||||
}
|
||||
else
|
||||
{
|
||||
num2++;
|
||||
list.Add(items[i].Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append("移动完成:成功 " + num + " / " + items.Count);
|
||||
if (num2 > 0)
|
||||
{
|
||||
stringBuilder.Append(",失败 " + num2);
|
||||
}
|
||||
stringBuilder.Append("\r\n");
|
||||
if (chkShortcut.Checked)
|
||||
{
|
||||
stringBuilder.Append("快捷方式安装成功 " + num3 + " 个");
|
||||
if (num3 > 0)
|
||||
{
|
||||
stringBuilder.Append("\r\n\r\n已写入:");
|
||||
foreach (string item in list2)
|
||||
{
|
||||
stringBuilder.Append("\r\n " + item);
|
||||
}
|
||||
stringBuilder.Append("\r\n\r\n说明:快捷方式(.lnk)存放在 C:\\Windows\\Fonts,并在注册表 HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts 登记。");
|
||||
stringBuilder.Append("\r\n若在『字体设置 / 控制面板-字体』或 Word、PS 等软件中未立即出现,请注销后重新登录或重启系统再查看。");
|
||||
}
|
||||
}
|
||||
if (num2 > 0 && list.Count <= 20)
|
||||
{
|
||||
stringBuilder.Append("\r\n\r\n失败项:");
|
||||
foreach (string item2 in list)
|
||||
{
|
||||
stringBuilder.Append("\r\n " + item2);
|
||||
}
|
||||
}
|
||||
if (num > 0)
|
||||
{
|
||||
Moved = true;
|
||||
}
|
||||
MessageBox.Show((IWin32Window)(object)this, stringBuilder.ToString(), "移动结果", (MessageBoxButtons)0, (MessageBoxIcon)64);
|
||||
}
|
||||
|
||||
private static void MoveFileSafe(string src, string dest)
|
||||
{
|
||||
File.Copy(src, dest, overwrite: false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
internal struct NETRESOURCE
|
||||
{
|
||||
public int dwScope;
|
||||
|
||||
public int dwType;
|
||||
|
||||
public int dwDisplayType;
|
||||
|
||||
public int dwUsage;
|
||||
|
||||
public string lpLocalName;
|
||||
|
||||
public string lpRemoteName;
|
||||
|
||||
public string lpComment;
|
||||
|
||||
public string lpProvider;
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal static class NativeFolderDialog
|
||||
{
|
||||
private const uint FOS_PICKFOLDERS = 32u;
|
||||
|
||||
private const int SIGDN_FILESYSPATH = -2147123200;
|
||||
|
||||
[DllImport("shell32.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern int SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IntPtr pbc, ref Guid riid, out IntPtr ppv);
|
||||
|
||||
private static void AddNavPlace(IFileOpenDialog dlg, string clsidPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
IntPtr ppv = IntPtr.Zero;
|
||||
Guid riid = new Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe");
|
||||
if (SHCreateItemFromParsingName(clsidPath, IntPtr.Zero, ref riid, out ppv) == 0 && ppv != IntPtr.Zero)
|
||||
{
|
||||
IShellItem psi = (IShellItem)Marshal.GetObjectForIUnknown(ppv);
|
||||
try
|
||||
{
|
||||
dlg.AddPlace(psi, 1);
|
||||
return;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
internal static string PickFolder(IntPtr owner, string title, string initialPath)
|
||||
{
|
||||
IFileOpenDialog fileOpenDialog = (IFileOpenDialog)new FileOpenDialogRCW();
|
||||
try
|
||||
{
|
||||
fileOpenDialog.SetTitle(title);
|
||||
fileOpenDialog.SetOptions(32u);
|
||||
AddNavPlace(fileOpenDialog, "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}");
|
||||
AddNavPlace(fileOpenDialog, "::{208D2C60-3AEA-1069-A2D8-08002B30309D}");
|
||||
if (!string.IsNullOrEmpty(initialPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
IntPtr ppv = IntPtr.Zero;
|
||||
Guid riid = new Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe");
|
||||
if (SHCreateItemFromParsingName(initialPath, IntPtr.Zero, ref riid, out ppv) == 0 && ppv != IntPtr.Zero)
|
||||
{
|
||||
IShellItem folder = (IShellItem)Marshal.GetObjectForIUnknown(ppv);
|
||||
fileOpenDialog.SetFolder(folder);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
if (fileOpenDialog.Show(owner) != 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
fileOpenDialog.GetResult(out var ppsi);
|
||||
if (ppsi == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ppsi.GetDisplayName(-2147123200, out var ppszName);
|
||||
if (ppszName == IntPtr.Zero)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string result = Marshal.PtrToStringUni(ppszName);
|
||||
Marshal.FreeCoTaskMem(ppszName);
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
Marshal.FinalReleaseComObject(fileOpenDialog);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal static class NetApi
|
||||
{
|
||||
[DllImport("mpr.dll", CharSet = CharSet.Unicode)]
|
||||
internal static extern int WNetAddConnection2(ref NETRESOURCE netResource, string password, string username, int flags);
|
||||
|
||||
[DllImport("mpr.dll", CharSet = CharSet.Unicode)]
|
||||
internal static extern int WNetCancelConnection2(string name, int flags, bool force);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
[ComImport]
|
||||
[Guid("0000010B-0000-0000-C000-000000000046")]
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
internal interface PersistFile
|
||||
{
|
||||
[PreserveSig]
|
||||
int GetClassID(out Guid pClassID);
|
||||
|
||||
[PreserveSig]
|
||||
int IsDirty();
|
||||
|
||||
[PreserveSig]
|
||||
int Load([MarshalAs(UnmanagedType.LPWStr)] string pszFileName, int dwMode);
|
||||
|
||||
[PreserveSig]
|
||||
int Save([MarshalAs(UnmanagedType.LPWStr)] string pszFileName, [MarshalAs(UnmanagedType.Bool)] bool fRemember);
|
||||
|
||||
[PreserveSig]
|
||||
int SaveCompleted([MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
|
||||
|
||||
[PreserveSig]
|
||||
int GetCurFile([MarshalAs(UnmanagedType.LPWStr)] out string ppszFileName);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
private static void Main()
|
||||
{
|
||||
try
|
||||
{
|
||||
// 被 runas 拉起的安装子进程:只做系统字体注册,不显示主界面
|
||||
string[] cmdArgs = Environment.GetCommandLineArgs();
|
||||
if (cmdArgs.Length >= 3 && string.Equals(cmdArgs[1], "/install", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
InstallRunner.Run(cmdArgs[2]);
|
||||
return;
|
||||
}
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run((Form)(object)new MainForm());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("启动失败,详情:\r\n\r\n" + ex.ToString(), AppInfo.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal class RoundPanel : Panel
|
||||
{
|
||||
private bool mouseOver;
|
||||
|
||||
public int Radius { get; set; }
|
||||
|
||||
public Color BorderColor { get; set; }
|
||||
|
||||
public Color HoverBorder { get; set; }
|
||||
|
||||
public RoundPanel()
|
||||
{
|
||||
DoubleBuffered = true;
|
||||
Radius = 10;
|
||||
BorderColor = Color.FromArgb(226, 230, 235);
|
||||
HoverBorder = Color.FromArgb(98, 137, 200);
|
||||
BackColor = Color.White;
|
||||
SetStyle((ControlStyles)139266, true);
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs eventargs)
|
||||
{
|
||||
base.OnResize(eventargs);
|
||||
if (Width > 0 && Height > 0)
|
||||
{
|
||||
GraphicsPath path = GetPath();
|
||||
try
|
||||
{
|
||||
Region = new Region(path);
|
||||
}
|
||||
finally
|
||||
{
|
||||
path?.Dispose();
|
||||
}
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
GraphicsPath path = GetPath();
|
||||
try
|
||||
{
|
||||
Pen val = new Pen(mouseOver ? HoverBorder : BorderColor, 1.5f);
|
||||
try
|
||||
{
|
||||
e.Graphics.DrawPath(val, path);
|
||||
}
|
||||
finally
|
||||
{
|
||||
val?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
path?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseEnter(EventArgs e)
|
||||
{
|
||||
mouseOver = true;
|
||||
Invalidate();
|
||||
base.OnMouseEnter(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
mouseOver = false;
|
||||
Invalidate();
|
||||
base.OnMouseLeave(e);
|
||||
}
|
||||
|
||||
private GraphicsPath GetPath()
|
||||
{
|
||||
int radius = Radius;
|
||||
int num = Width - 1;
|
||||
int num2 = Height - 1;
|
||||
GraphicsPath val = new GraphicsPath();
|
||||
val.AddArc(0, 0, radius * 2, radius * 2, 180f, 90f);
|
||||
val.AddArc(num - radius * 2, 0, radius * 2, radius * 2, 270f, 90f);
|
||||
val.AddArc(num - radius * 2, num2 - radius * 2, radius * 2, radius * 2, 0f, 90f);
|
||||
val.AddArc(0, num2 - radius * 2, radius * 2, radius * 2, 90f, 90f);
|
||||
val.CloseFigure();
|
||||
return val;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 内置预览样例:一键填入常用字、永字八法、中英混排、数字标点等。
|
||||
/// 独立静态类,不改动原有渲染逻辑。
|
||||
/// </summary>
|
||||
public static class SampleTexts
|
||||
{
|
||||
public struct Sample
|
||||
{
|
||||
public string Name;
|
||||
public string Text;
|
||||
public Sample(string name, string text) { Name = name; Text = text; }
|
||||
}
|
||||
|
||||
public static readonly Sample[] All = new Sample[]
|
||||
{
|
||||
new Sample("常用汉字",
|
||||
"的一是不了人我在有他这中大来上国个到说们为子和你地出道也年得就那要下以生会自着去之过家学对可她里后小么心多天而能好都然没日于起还只作当事想成见用文书质等部并如" +
|
||||
"公经工科 林森树 笔画粗细 横平竖直 疏密匀称 端正平稳"),
|
||||
new Sample("永字八法",
|
||||
"永字八法 点如高峰坠石 横如千里阵云 竖如万岁枯藤 撇如陆断犀象 捺如崩浪雷奔 提如百钧弩发 折如劲弩筋节 钩如万钧之弩发"),
|
||||
new Sample("中英混排",
|
||||
"中文与英文混排 The quick brown fox jumps over the lazy dog. 0123456789 字体设计 Typography 排版 Design ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"),
|
||||
new Sample("数字与标点",
|
||||
"0123456789 123,456.78 ¥12,800.00 ()【】《》「」『』,。、;:?!……—·“”‘’~~¥%&*@#"),
|
||||
new Sample("多音字/对比",
|
||||
"行长 银行 长大 重量 重复 重要 效率 率领 朝阳 朝代 音乐 快乐 长处 处理 差别 差不多 和平 附和"),
|
||||
new Sample("常用句",
|
||||
"你好,世界!今天天气真好。字体预览工具可以帮你快速挑选合适的字体。愿你的每一行文字都恰到好处。"),
|
||||
};
|
||||
|
||||
public static List<KeyValuePair<string, string>> GetItems()
|
||||
{
|
||||
List<KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>();
|
||||
foreach (Sample s in All)
|
||||
{
|
||||
list.Add(new KeyValuePair<string, string>(s.Name, s.Text));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
[Guid("000214F9-0000-0000-C000-000000000046")]
|
||||
internal interface ShellLinkW
|
||||
{
|
||||
[PreserveSig]
|
||||
int GetPath([MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, int cch, IntPtr pfd, int fFlags);
|
||||
|
||||
[PreserveSig]
|
||||
int GetIDList(out IntPtr ppidl);
|
||||
|
||||
[PreserveSig]
|
||||
int SetIDList(IntPtr pidl);
|
||||
|
||||
[PreserveSig]
|
||||
int GetDescription([MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, int cch);
|
||||
|
||||
[PreserveSig]
|
||||
int SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
|
||||
|
||||
[PreserveSig]
|
||||
int GetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, int cch);
|
||||
|
||||
[PreserveSig]
|
||||
int SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
|
||||
|
||||
[PreserveSig]
|
||||
int GetArguments([MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs, int cch);
|
||||
|
||||
[PreserveSig]
|
||||
int SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
|
||||
|
||||
[PreserveSig]
|
||||
int GetHotkey(out short pwHotkey);
|
||||
|
||||
[PreserveSig]
|
||||
int SetHotkey(short wHotkey);
|
||||
|
||||
[PreserveSig]
|
||||
int GetShowCmd(out int piShowCmd);
|
||||
|
||||
[PreserveSig]
|
||||
int SetShowCmd(int iShowCmd);
|
||||
|
||||
[PreserveSig]
|
||||
int GetIconLocation([MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath, int cch, out int piIcon);
|
||||
|
||||
[PreserveSig]
|
||||
int SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
|
||||
|
||||
[PreserveSig]
|
||||
int SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, int dwReserved);
|
||||
|
||||
[PreserveSig]
|
||||
int Resolve(IntPtr hwnd, int fFlags);
|
||||
|
||||
[PreserveSig]
|
||||
int SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
|
||||
}
|
||||
@@ -0,0 +1,313 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal class SystemFontExportDialog : Form
|
||||
{
|
||||
private CheckedListBox lst;
|
||||
|
||||
private TextBox txtDir;
|
||||
|
||||
private Label lblSum;
|
||||
|
||||
private List<KeyValuePair<string, string>> fonts = new List<KeyValuePair<string, string>>();
|
||||
|
||||
public SystemFontExportDialog()
|
||||
{
|
||||
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0054: Expected O, but got Unknown
|
||||
((Control)this).Text = "导出系统字体";
|
||||
((Control)this).Width = 680;
|
||||
((Control)this).Height = 560;
|
||||
((Form)this).StartPosition = (FormStartPosition)4;
|
||||
((Control)this).Font = new Font("Microsoft YaHei UI", 9f);
|
||||
Build();
|
||||
LoadFonts();
|
||||
}
|
||||
|
||||
private void Build()
|
||||
{
|
||||
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0007: Expected O, but got Unknown
|
||||
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0049: Expected O, but got Unknown
|
||||
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0087: Expected O, but got Unknown
|
||||
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00a0: Expected O, but got Unknown
|
||||
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00d7: Expected O, but got Unknown
|
||||
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_010e: Expected O, but got Unknown
|
||||
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0170: Expected O, but got Unknown
|
||||
//IL_0191: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_019b: Expected O, but got Unknown
|
||||
//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_01bc: Expected O, but got Unknown
|
||||
//IL_0222: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_022c: Expected O, but got Unknown
|
||||
//IL_0280: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0287: Expected O, but got Unknown
|
||||
//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_02ee: Expected O, but got Unknown
|
||||
Label val = new Label();
|
||||
((Control)val).Text = "勾选需要导出的系统字体(从注册表读取,含字体文件路径),导出的副本不会影响系统原字体。";
|
||||
((Control)val).SetBounds(12, 10, 650, 34);
|
||||
((Control)val).ForeColor = Color.DimGray;
|
||||
((Control)this).Controls.Add((Control)(object)val);
|
||||
lst = new CheckedListBox();
|
||||
((Control)lst).SetBounds(12, 48, 650, 320);
|
||||
lst.CheckOnClick = true;
|
||||
lst.ItemCheck += (ItemCheckEventHandler)delegate
|
||||
{
|
||||
UpdateSum();
|
||||
};
|
||||
((Control)this).Controls.Add((Control)(object)lst);
|
||||
Button val2 = new Button();
|
||||
((Control)val2).Text = "全选";
|
||||
((Control)val2).SetBounds(12, 376, 76, 28);
|
||||
((Control)val2).Click += delegate
|
||||
{
|
||||
for (int j = 0; j < lst.Items.Count; j++)
|
||||
{
|
||||
lst.SetItemChecked(j, true);
|
||||
}
|
||||
UpdateSum();
|
||||
};
|
||||
Button val3 = new Button();
|
||||
((Control)val3).Text = "全不选";
|
||||
((Control)val3).SetBounds(94, 376, 84, 28);
|
||||
((Control)val3).Click += delegate
|
||||
{
|
||||
for (int i = 0; i < lst.Items.Count; i++)
|
||||
{
|
||||
lst.SetItemChecked(i, false);
|
||||
}
|
||||
UpdateSum();
|
||||
};
|
||||
Button val4 = new Button();
|
||||
((Control)val4).Text = "刷新";
|
||||
((Control)val4).SetBounds(184, 376, 76, 28);
|
||||
((Control)val4).Click += delegate
|
||||
{
|
||||
LoadFonts();
|
||||
};
|
||||
((Control)this).Controls.Add((Control)(object)val2);
|
||||
((Control)this).Controls.Add((Control)(object)val3);
|
||||
((Control)this).Controls.Add((Control)(object)val4);
|
||||
Label val5 = new Label();
|
||||
((Control)val5).Text = "导出到:";
|
||||
((Control)val5).SetBounds(12, 414, 56, 26);
|
||||
txtDir = new TextBox();
|
||||
((Control)txtDir).SetBounds(66, 411, 476, 26);
|
||||
Button val6 = new Button();
|
||||
((Control)val6).Text = "浏览…";
|
||||
((Control)val6).SetBounds(548, 410, 100, 28);
|
||||
((Control)val6).Click += delegate
|
||||
{
|
||||
string text = NativeFolderDialog.PickFolder(((Control)this).Handle, "选择导出的目标目录", ((Control)txtDir).Text.Trim());
|
||||
if (text != null)
|
||||
{
|
||||
((Control)txtDir).Text = text;
|
||||
NormalizeDir();
|
||||
}
|
||||
};
|
||||
((Control)this).Controls.Add((Control)(object)val5);
|
||||
((Control)this).Controls.Add((Control)(object)txtDir);
|
||||
((Control)this).Controls.Add((Control)(object)val6);
|
||||
lblSum = new Label();
|
||||
((Control)lblSum).Text = "已选 0 / 0 个字体";
|
||||
((Control)lblSum).SetBounds(12, 448, 400, 20);
|
||||
((Control)lblSum).ForeColor = Color.FromArgb(43, 58, 85);
|
||||
((Control)this).Controls.Add((Control)(object)lblSum);
|
||||
Button val7 = new Button();
|
||||
((Control)val7).Text = "开始导出";
|
||||
((Control)val7).BackColor = Color.FromArgb(43, 58, 85);
|
||||
((Control)val7).ForeColor = Color.White;
|
||||
((ButtonBase)val7).FlatStyle = (FlatStyle)0;
|
||||
((Control)val7).SetBounds(12, 478, 130, 36);
|
||||
((Control)val7).Click += delegate
|
||||
{
|
||||
DoExport();
|
||||
};
|
||||
Button val8 = new Button();
|
||||
((Control)val8).Text = "关闭";
|
||||
val8.DialogResult = (DialogResult)2;
|
||||
((Control)val8).SetBounds(560, 478, 90, 36);
|
||||
((Control)this).Controls.Add((Control)(object)val7);
|
||||
((Control)this).Controls.Add((Control)(object)val8);
|
||||
((Form)this).AcceptButton = (IButtonControl)(object)val8;
|
||||
}
|
||||
|
||||
internal static string NormalizeDir(string s)
|
||||
{
|
||||
if (string.IsNullOrEmpty(s))
|
||||
{
|
||||
return s;
|
||||
}
|
||||
if (s.Length == 2 && s[1] == ':')
|
||||
{
|
||||
s += "\\";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
private void LoadFonts()
|
||||
{
|
||||
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
|
||||
fonts.Clear();
|
||||
try
|
||||
{
|
||||
string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.Fonts);
|
||||
using RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
|
||||
if (registryKey != null)
|
||||
{
|
||||
string[] valueNames = registryKey.GetValueNames();
|
||||
Array.Sort(valueNames, (IComparer<string>?)StringComparer.OrdinalIgnoreCase);
|
||||
string[] array = valueNames;
|
||||
foreach (string text in array)
|
||||
{
|
||||
string text2 = registryKey.GetValue(text) as string;
|
||||
if (string.IsNullOrEmpty(text2))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string extension = Path.GetExtension(text2);
|
||||
if (extension.Equals(".ttf", StringComparison.OrdinalIgnoreCase) || extension.Equals(".otf", StringComparison.OrdinalIgnoreCase) || extension.Equals(".ttc", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
string text3 = (Path.IsPathRooted(text2) ? text2 : Path.Combine(folderPath, text2));
|
||||
if (File.Exists(text3))
|
||||
{
|
||||
fonts.Add(new KeyValuePair<string, string>(text, text3));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show((IWin32Window)(object)this, "读取系统字体失败:" + ex.Message, "提示", (MessageBoxButtons)0, (MessageBoxIcon)48);
|
||||
}
|
||||
lst.Items.Clear();
|
||||
foreach (KeyValuePair<string, string> font in fonts)
|
||||
{
|
||||
lst.Items.Add((object)(font.Key + " —— " + Path.GetFileName(font.Value)), false);
|
||||
}
|
||||
UpdateSum();
|
||||
}
|
||||
|
||||
private void UpdateSum()
|
||||
{
|
||||
int num = 0;
|
||||
for (int i = 0; i < lst.Items.Count; i++)
|
||||
{
|
||||
if (lst.GetItemChecked(i))
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
((Control)lblSum).Text = "已选 " + num + " / " + fonts.Count + " 个字体";
|
||||
}
|
||||
|
||||
private void NormalizeDir()
|
||||
{
|
||||
string text = ((Control)txtDir).Text.Trim().Trim(new char[1] { '"' });
|
||||
if (text.Length == 2 && text[1] == ':')
|
||||
{
|
||||
text += "\\";
|
||||
}
|
||||
((Control)txtDir).Text = text;
|
||||
}
|
||||
|
||||
private void DoExport()
|
||||
{
|
||||
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_031f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
|
||||
string text = ((Control)txtDir).Text.Trim().Trim(new char[1] { '"' });
|
||||
if (text.Length == 0)
|
||||
{
|
||||
MessageBox.Show((IWin32Window)(object)this, "请先选择导出目录", "提示");
|
||||
return;
|
||||
}
|
||||
string text2 = text;
|
||||
if (MainForm.DiagnosePath(text2) != null)
|
||||
{
|
||||
string text3 = MainForm.DriveToUnc(text2);
|
||||
if (text3 == null || !MainForm.TryReconnect(text2) || MainForm.DiagnosePath(text2) != null)
|
||||
{
|
||||
if (text3 == null || MainForm.DiagnosePath(text3) != null)
|
||||
{
|
||||
MessageBox.Show((IWin32Window)(object)this, "目标目录不可访问:" + text, "提示", (MessageBoxButtons)0, (MessageBoxIcon)48);
|
||||
return;
|
||||
}
|
||||
text2 = text3;
|
||||
}
|
||||
}
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
List<string> list = new List<string>();
|
||||
List<string> list2 = new List<string>();
|
||||
for (int i = 0; i < lst.Items.Count; i++)
|
||||
{
|
||||
if (!lst.GetItemChecked(i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
num++;
|
||||
string value = fonts[i].Value;
|
||||
try
|
||||
{
|
||||
string text4 = Path.Combine(text2, Path.GetFileName(value));
|
||||
if (!File.Exists(value))
|
||||
{
|
||||
list.Add(value);
|
||||
continue;
|
||||
}
|
||||
if (File.Exists(text4))
|
||||
{
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(value);
|
||||
string extension = Path.GetExtension(value);
|
||||
int num4 = 1;
|
||||
string text5 = text4;
|
||||
while (File.Exists(text5))
|
||||
{
|
||||
text5 = Path.Combine(text2, fileNameWithoutExtension + "_" + num4 + extension);
|
||||
num4++;
|
||||
}
|
||||
text4 = text5;
|
||||
}
|
||||
File.Copy(value, text4, overwrite: false);
|
||||
num2++;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
list2.Add(value);
|
||||
}
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append("导出完成:成功 " + num2 + " / " + num + " 个\r\n");
|
||||
if (num3 > 0)
|
||||
{
|
||||
stringBuilder.Append("跳过 " + num3 + " 个\r\n");
|
||||
}
|
||||
if (list.Count > 0)
|
||||
{
|
||||
stringBuilder.Append("源文件缺失 " + list.Count + " 个\r\n");
|
||||
}
|
||||
if (list2.Count > 0)
|
||||
{
|
||||
stringBuilder.Append("失败 " + list2.Count + " 个\r\n");
|
||||
}
|
||||
stringBuilder.Append("\r\n目标目录: " + text2);
|
||||
MessageBox.Show((IWin32Window)(object)this, stringBuilder.ToString(), "导出结果", (MessageBoxButtons)0, (MessageBoxIcon)64);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview
|
||||
{
|
||||
/// <summary>
|
||||
/// 集中 UI 主题:颜色常量、字体、控件样式工厂。
|
||||
/// 所有界面颜色/样式统一从这里取,避免散落硬编码和重复写法。
|
||||
/// </summary>
|
||||
internal static class UiTheme
|
||||
{
|
||||
// ---- 颜色 ----
|
||||
public static readonly Color Primary = Color.FromArgb(43, 58, 85); // 主深蓝
|
||||
public static readonly Color Accent = Color.FromArgb(98, 137, 200); // 强调蓝(竖条/hover 边)
|
||||
public static readonly Color AccentText = Color.FromArgb(70, 110, 180); // 字体名标签蓝
|
||||
public static readonly Color CardBg = Color.White;
|
||||
public static readonly Color PreviewBg = Color.FromArgb(245, 246, 248); // 预览图浅灰底
|
||||
public static readonly Color PanelBg = Color.White;
|
||||
public static readonly Color Border = Color.FromArgb(226, 230, 235);
|
||||
public static readonly Color SubText = Color.Gray;
|
||||
|
||||
// ---- 字体 ----
|
||||
public const string UiFontFamily = "Microsoft YaHei UI";
|
||||
public static readonly Font GroupLabel = new Font(UiFontFamily, 9.5f, FontStyle.Bold);
|
||||
public static readonly Font CardTitle = new Font(UiFontFamily, 11.5f, FontStyle.Bold);
|
||||
public static readonly Font StatusText = new Font(UiFontFamily, 8f);
|
||||
public static readonly Font UiBase = new Font(UiFontFamily, 9f);
|
||||
|
||||
// ---- 圆角卡片 ----
|
||||
public const int CardRadius = 10;
|
||||
|
||||
/// <summary>创建一张统一风格的圆角卡片面板。</summary>
|
||||
public static RoundPanel CreateCard(int width, int height)
|
||||
{
|
||||
RoundPanel p = new RoundPanel
|
||||
{
|
||||
Width = width,
|
||||
Height = height,
|
||||
BackColor = CardBg,
|
||||
Radius = CardRadius,
|
||||
BorderColor = Border,
|
||||
HoverBorder = Accent
|
||||
};
|
||||
return p;
|
||||
}
|
||||
|
||||
/// <summary>卡片左侧的强调色竖条。</summary>
|
||||
public static Panel CreateAccentBar(int x, int y)
|
||||
{
|
||||
return new Panel { BackColor = Accent, Location = new Point(x, y), Size = new Size(4, 18) };
|
||||
}
|
||||
|
||||
/// <summary>卡片标题字体名标签。</summary>
|
||||
public static Label CreateCardTitle(string text, int x, int y, int width)
|
||||
{
|
||||
return new Label
|
||||
{
|
||||
Text = text,
|
||||
Location = new Point(x, y),
|
||||
Size = new Size(width, 26),
|
||||
Font = CardTitle,
|
||||
ForeColor = AccentText,
|
||||
AutoEllipsis = true,
|
||||
Cursor = Cursors.Hand,
|
||||
BackColor = Color.Transparent
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>卡片里的预览图 PictureBox(浅灰底、贴左)。</summary>
|
||||
public static PictureBox CreatePreviewBox(int x, int y, int width, int height)
|
||||
{
|
||||
return new PictureBox
|
||||
{
|
||||
Location = new Point(x, y),
|
||||
Size = new Size(width, height),
|
||||
BackColor = PreviewBg,
|
||||
SizeMode = PictureBoxSizeMode.Normal,
|
||||
Cursor = Cursors.Hand
|
||||
};
|
||||
}
|
||||
|
||||
// ---- 按钮 ----
|
||||
/// <summary>主按钮:深蓝填充白字。</summary>
|
||||
public static Button CreatePrimaryButton(string text, int x, int y, int w, int h, EventHandler onClick)
|
||||
{
|
||||
Button b = new Button
|
||||
{
|
||||
Text = text,
|
||||
Location = new Point(x, y),
|
||||
Size = new Size(w, h),
|
||||
BackColor = Primary,
|
||||
ForeColor = Color.White,
|
||||
FlatStyle = FlatStyle.Flat,
|
||||
Cursor = Cursors.Hand
|
||||
};
|
||||
b.FlatAppearance.BorderSize = 0;
|
||||
if (onClick != null) b.Click += onClick;
|
||||
return b;
|
||||
}
|
||||
|
||||
/// <summary>次要按钮:扁平白底。</summary>
|
||||
public static Button CreateSecondaryButton(string text, int x, int y, int w, int h, EventHandler onClick)
|
||||
{
|
||||
Button b = new Button
|
||||
{
|
||||
Text = text,
|
||||
Location = new Point(x, y),
|
||||
Size = new Size(w, h),
|
||||
FlatStyle = FlatStyle.Flat,
|
||||
Cursor = Cursors.Hand
|
||||
};
|
||||
if (onClick != null) b.Click += onClick;
|
||||
return b;
|
||||
}
|
||||
|
||||
/// <summary>左侧分组小标题。</summary>
|
||||
public static Label CreateGroupLabel(string text, int x, int y, int w)
|
||||
{
|
||||
return new Label
|
||||
{
|
||||
Text = text,
|
||||
Location = new Point(x, y),
|
||||
Size = new Size(w, 20),
|
||||
Font = GroupLabel,
|
||||
ForeColor = Primary,
|
||||
BackColor = Color.Transparent
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>主窗体应用主题:白底、统一字体。</summary>
|
||||
public static void ApplyForm(Form f)
|
||||
{
|
||||
f.BackColor = PanelBg;
|
||||
f.Font = UiBase;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Text;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
public class Worker
|
||||
{
|
||||
public class CardData
|
||||
{
|
||||
public Bitmap Bitmap;
|
||||
|
||||
public int Width;
|
||||
|
||||
public string Name;
|
||||
|
||||
public string DisplayName;
|
||||
|
||||
public string Path;
|
||||
|
||||
public bool Failed;
|
||||
}
|
||||
|
||||
public delegate void CompletedHandler(bool cancelled, int done, int failed, int remain, List<CardData> cards);
|
||||
|
||||
private MainForm form;
|
||||
|
||||
private List<FontItem> items;
|
||||
|
||||
private int target;
|
||||
|
||||
private string text;
|
||||
|
||||
private int size;
|
||||
|
||||
private Color fg;
|
||||
|
||||
private Color bg;
|
||||
|
||||
private Dictionary<string, Bitmap> cache;
|
||||
|
||||
private Thread thread;
|
||||
|
||||
private volatile bool stop;
|
||||
|
||||
private List<CardData> results = new List<CardData>();
|
||||
|
||||
public event CompletedHandler Completed;
|
||||
|
||||
public Worker(MainForm f, List<FontItem> items, int target, string text, int size, Color fg, Color bg, Dictionary<string, Bitmap> cache)
|
||||
{
|
||||
form = f;
|
||||
this.items = items;
|
||||
this.target = target;
|
||||
this.text = text;
|
||||
this.size = size;
|
||||
this.fg = fg;
|
||||
this.bg = bg;
|
||||
this.cache = cache;
|
||||
}
|
||||
|
||||
public bool IsRunning()
|
||||
{
|
||||
return thread != null && thread.IsAlive;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
stop = true;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
stop = false;
|
||||
thread = new Thread(Run);
|
||||
thread.IsBackground = true;
|
||||
thread.SetApartmentState(ApartmentState.STA);
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
private void Run()
|
||||
{
|
||||
int total = target;
|
||||
int next = 0;
|
||||
int done = 0;
|
||||
int failed = 0;
|
||||
// 并行渲染:拉满 CPU 线程,批量并行
|
||||
int workers = Math.Max(2, Environment.ProcessorCount);
|
||||
object renderLock = new object();
|
||||
|
||||
ParameterizedThreadStart work = delegate (object _)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (stop) break;
|
||||
int i = Interlocked.Increment(ref next) - 1;
|
||||
if (i >= total) break;
|
||||
FontItem fontItem = items[i];
|
||||
Bitmap value = null;
|
||||
bool failed2 = false;
|
||||
string key = fontItem.Cat + "|" + fontItem.Path;
|
||||
lock (renderLock) { cache.TryGetValue(key, out value); }
|
||||
if (value == null)
|
||||
{
|
||||
value = RenderFont(fontItem.Path, fontItem.Name, text, size, fg, bg, out failed2);
|
||||
if (value != null)
|
||||
{
|
||||
lock (renderLock) { cache[key] = value; }
|
||||
}
|
||||
}
|
||||
CardData cardData = new CardData();
|
||||
cardData.Bitmap = value;
|
||||
cardData.Width = 340;
|
||||
cardData.Name = fontItem.Name;
|
||||
cardData.DisplayName = fontItem.DisplayName;
|
||||
cardData.Path = fontItem.Path;
|
||||
cardData.Failed = failed2;
|
||||
lock (results) { results.Add(cardData); }
|
||||
int d = Interlocked.Increment(ref done);
|
||||
if (value == null) Interlocked.Increment(ref failed);
|
||||
// 进度更新节流:每 10 个或最后一个才唤醒 UI,避免频繁打断
|
||||
if (d % 10 == 0 || d >= total)
|
||||
{
|
||||
int pct = (int)((double)d / (double)total * 100.0);
|
||||
((Control)form).BeginInvoke((Delegate)(Action)delegate
|
||||
{
|
||||
form.SetProgress(pct, d, total);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Thread[] ts = new Thread[workers];
|
||||
for (int w = 0; w < workers; w++)
|
||||
{
|
||||
ts[w] = new Thread(work);
|
||||
ts[w].IsBackground = true;
|
||||
ts[w].Start();
|
||||
}
|
||||
foreach (Thread wt in ts) wt.Join();
|
||||
|
||||
int remain = total - done;
|
||||
List<CardData> snapshot;
|
||||
lock (results) { snapshot = new List<CardData>(results); }
|
||||
((Control)form).Invoke((Delegate)(Action)delegate
|
||||
{
|
||||
if (this.Completed != null)
|
||||
{
|
||||
this.Completed(stop, done, failed, remain, snapshot);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
internal static Bitmap RenderFont(string path, string name, string text, int size, Color fg, Color bg, out bool failed)
|
||||
{
|
||||
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_002c: Expected O, but got Unknown
|
||||
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0074: Expected O, but got Unknown
|
||||
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0090: Expected O, but got Unknown
|
||||
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00ee: Expected O, but got Unknown
|
||||
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_011c: Expected O, but got Unknown
|
||||
failed = false;
|
||||
Bitmap val = null;
|
||||
PrivateFontCollection val2 = null;
|
||||
Font val3 = null;
|
||||
try
|
||||
{
|
||||
// 直接按文件路径加载,避免 AddMemoryFont 在快速连续渲染多字体时按内存地址缓存导致串字体
|
||||
val2 = new PrivateFontCollection();
|
||||
val2.AddFontFile(path);
|
||||
if (((FontCollection)val2).Families.Length == 0)
|
||||
{
|
||||
failed = true;
|
||||
return null;
|
||||
}
|
||||
FontFamily val4 = ((FontCollection)val2).Families[0];
|
||||
val3 = new Font(val4, (float)size, (FontStyle)0, (GraphicsUnit)2);
|
||||
int num = 14;
|
||||
Graphics val5 = Graphics.FromHwnd(IntPtr.Zero);
|
||||
try
|
||||
{
|
||||
StringFormat val6 = new StringFormat((StringFormatFlags)4096);
|
||||
try
|
||||
{
|
||||
val6.Alignment = (StringAlignment)0;
|
||||
val6.LineAlignment = (StringAlignment)1;
|
||||
SizeF sizeF = val5.MeasureString(text, val3, 20000, val6);
|
||||
int num2 = (int)Math.Ceiling(sizeF.Width) + num * 2;
|
||||
int num3 = (int)Math.Ceiling(sizeF.Height) + 14;
|
||||
val = new Bitmap(num2, Math.Max(num3, 30));
|
||||
Graphics val7 = Graphics.FromImage((Image)(object)val);
|
||||
try
|
||||
{
|
||||
val7.SmoothingMode = (SmoothingMode)4;
|
||||
val7.TextRenderingHint = (TextRenderingHint)4;
|
||||
val7.Clear(bg);
|
||||
Brush val8 = (Brush)new SolidBrush(fg);
|
||||
try
|
||||
{
|
||||
val7.DrawString(text, val3, val8, new RectangleF(num, 7f, sizeF.Width, num3 - 14), val6);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val8)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val7)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val6)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val5)?.Dispose();
|
||||
}
|
||||
return val;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
failed = true;
|
||||
if (val != null)
|
||||
{
|
||||
((Image)val).Dispose();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (val3 != null)
|
||||
{
|
||||
val3.Dispose();
|
||||
}
|
||||
if (val2 != null)
|
||||
{
|
||||
((FontCollection)val2).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<AssemblyName>字体预览工具</AssemblyName>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<!-- 与原程序保持一致:net40,确保在未装 .NET 4.8 的机器上也能运行 -->
|
||||
<TargetFramework>net40</TargetFramework>
|
||||
<RootNamespace>FontPreview</RootNamespace>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<!-- AnyCPU:64 位系统跑 64 位,32 位系统跑 32 位 -->
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Version>1.0.0</Version>
|
||||
<Product>字体预览工具</Product>
|
||||
<ApplicationIcon>Assets/app.ico</ApplicationIcon>
|
||||
<!-- 可复现构建:时间戳基于内容,不再是异常值 -->
|
||||
<Deterministic>true</Deterministic>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Assets/app.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 程序集信息:右键 exe → 属性 → 详细信息 即可看到
|
||||
[assembly: AssemblyTitle("字体预览工具")]
|
||||
[assembly: AssemblyDescription("免安装字体预览 / 批量管理 / 标签与分类工具")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("字体预览工具 v1.0.0")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 版本号:与 csproj Version 对齐
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="字体预览工具.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- 保持原行为:普通权限启动,安装系统字体时再按需 runas 提权 -->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 / 11 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 字体预览工具 - 一键构建脚本
|
||||
# 用法: ./build.sh
|
||||
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
export DOTNET_ROOT="${DOTNET_ROOT:-$HOME/.dotnet}"
|
||||
export PATH="$DOTNET_ROOT:$PATH"
|
||||
|
||||
echo "=== 开始构建 字体预览工具 ==="
|
||||
dotnet build --no-incremental -nologo
|
||||
|
||||
echo ""
|
||||
echo "=== 构建完成 ==="
|
||||
ls -lh bin/Debug/net40/字体预览工具.exe
|
||||
echo ""
|
||||
echo "输出目录: $(pwd)/bin/Debug/net40/"
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
|
||||
@@ -0,0 +1,11 @@
|
||||
is_global = true
|
||||
build_property.ApplicationManifest = app.manifest
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.RootNamespace = FontPreview
|
||||
build_property.ProjectDir = /home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
673a0090337bbf3190dc2913d23f8f82a4cda18522e8eaa83760eee285254e25
|
||||
@@ -0,0 +1,7 @@
|
||||
/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/obj/Debug/net40/FontPreview_v26.GeneratedMSBuildEditorConfig.editorconfig
|
||||
/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/obj/Debug/net40/FontPreview_v26.csproj.CoreCompileInputs.cache
|
||||
/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/bin/Debug/net40/字体预览工具.exe.config
|
||||
/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/bin/Debug/net40/字体预览工具.exe
|
||||
/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/bin/Debug/net40/字体预览工具.pdb
|
||||
/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/obj/Debug/net40/字体预览工具.exe
|
||||
/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/obj/Debug/net40/字体预览工具.pdb
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/FontPreview_v26.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/FontPreview_v26.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/FontPreview_v26.csproj",
|
||||
"projectName": "字体预览工具",
|
||||
"projectPath": "/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/FontPreview_v26.csproj",
|
||||
"packagesPath": "/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/",
|
||||
"outputPath": "/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net40"
|
||||
],
|
||||
"sources": {
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net40": {
|
||||
"targetAlias": "net40",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net40": {
|
||||
"targetAlias": "net40",
|
||||
"dependencies": {
|
||||
"Microsoft.NETFramework.ReferenceAssemblies": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[1.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/home/user/Doubao/chats/38442577370078722/tools/dotnet/sdk/8.0.425/RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.2</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.netframework.referenceassemblies.net40/1.0.3/build/Microsoft.NETFramework.ReferenceAssemblies.net40.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.netframework.referenceassemblies.net40/1.0.3/build/Microsoft.NETFramework.ReferenceAssemblies.net40.targets')" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,500 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
".NETFramework,Version=v4.0": {
|
||||
"Microsoft.NETFramework.ReferenceAssemblies/1.0.3": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.NETFramework.ReferenceAssemblies.net40": "1.0.3"
|
||||
}
|
||||
},
|
||||
"Microsoft.NETFramework.ReferenceAssemblies.net40/1.0.3": {
|
||||
"type": "package",
|
||||
"build": {
|
||||
"build/Microsoft.NETFramework.ReferenceAssemblies.net40.targets": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Microsoft.NETFramework.ReferenceAssemblies/1.0.3": {
|
||||
"sha512": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
|
||||
"type": "package",
|
||||
"path": "microsoft.netframework.referenceassemblies/1.0.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"microsoft.netframework.referenceassemblies.1.0.3.nupkg.sha512",
|
||||
"microsoft.netframework.referenceassemblies.nuspec"
|
||||
]
|
||||
},
|
||||
"Microsoft.NETFramework.ReferenceAssemblies.net40/1.0.3": {
|
||||
"sha512": "3ctXnCpHdoYJNH9ATfXKwckkkdHvHc1Xls12QB9kf1tjh3b+VzxtiwpkZN4GxOawakfH6CJAkqhlDKSiz6Ujbg==",
|
||||
"type": "package",
|
||||
"path": "microsoft.netframework.referenceassemblies.net40/1.0.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"build/.NETFramework/v4.0/Accessibility.dll",
|
||||
"build/.NETFramework/v4.0/Accessibility.xml",
|
||||
"build/.NETFramework/v4.0/CustomMarshalers.dll",
|
||||
"build/.NETFramework/v4.0/CustomMarshalers.xml",
|
||||
"build/.NETFramework/v4.0/ISymWrapper.dll",
|
||||
"build/.NETFramework/v4.0/ISymWrapper.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Conversion.v4.0.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Conversion.v4.0.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Engine.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Engine.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Framework.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Framework.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Tasks.v4.0.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Tasks.v4.0.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Utilities.v4.0.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.Utilities.v4.0.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.Build.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.CSharp.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.CSharp.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.JScript.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.JScript.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualBasic.Compatibility.Data.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualBasic.Compatibility.Data.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualBasic.Compatibility.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualBasic.Compatibility.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualBasic.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualBasic.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualC.STLCLR.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualC.STLCLR.xml",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualC.dll",
|
||||
"build/.NETFramework/v4.0/Microsoft.VisualC.xml",
|
||||
"build/.NETFramework/v4.0/PermissionSets/FullTrust.xml",
|
||||
"build/.NETFramework/v4.0/PermissionSets/Internet.xml",
|
||||
"build/.NETFramework/v4.0/PermissionSets/LocalIntranet.xml",
|
||||
"build/.NETFramework/v4.0/PresentationBuildTasks.dll",
|
||||
"build/.NETFramework/v4.0/PresentationBuildTasks.xml",
|
||||
"build/.NETFramework/v4.0/PresentationCore.dll",
|
||||
"build/.NETFramework/v4.0/PresentationCore.xml",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Aero.dll",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Aero.xml",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Classic.dll",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Classic.xml",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Luna.dll",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Luna.xml",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Royale.dll",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.Royale.xml",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.dll",
|
||||
"build/.NETFramework/v4.0/PresentationFramework.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Accessibility.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Accessibility.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/CustomMarshalers.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/CustomMarshalers.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.CSharp.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.CSharp.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.JScript.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.JScript.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualBasic.Compatibility.Data.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualBasic.Compatibility.Data.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualBasic.Compatibility.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualBasic.Compatibility.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualBasic.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualBasic.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualC.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/Microsoft.VisualC.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PermissionSets/FullTrust.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PermissionSets/Internet.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PermissionSets/LocalIntranet.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationCore.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationCore.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Aero.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Aero.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Classic.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Classic.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Luna.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Luna.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Royale.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.Royale.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/PresentationFramework.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/ReachFramework.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/ReachFramework.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/RedistList/FrameworkList.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.Core.Presentation.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.Core.Presentation.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.DurableInstancing.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.DurableInstancing.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.Presentation.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.Presentation.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Activities.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.AddIn.Contract.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.AddIn.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Addin.Contract.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Addin.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ComponentModel.Composition.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ComponentModel.Composition.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ComponentModel.DataAnnotations.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ComponentModel.DataAnnotations.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Configuration.Install.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Configuration.Install.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Configuration.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Configuration.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Core.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Core.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.DataSetExtensions.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.DataSetExtensions.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.Entity.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.Entity.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.Linq.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.Linq.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.Services.Client.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.Services.Client.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.SqlXml.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.SqlXml.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Data.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Deployment.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Deployment.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Device.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Device.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.DirectoryServices.AccountManagement.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.DirectoryServices.AccountManagement.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.DirectoryServices.Protocols.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.DirectoryServices.Protocols.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.DirectoryServices.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.DirectoryServices.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Drawing.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Drawing.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.EnterpriseServices.Thunk.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.EnterpriseServices.Wrapper.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.EnterpriseServices.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.EnterpriseServices.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.IO.Log.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.IO.Log.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.IdentityModel.Selectors.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.IdentityModel.Selectors.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.IdentityModel.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.IdentityModel.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Management.Instrumentation.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Management.Instrumentation.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Management.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Management.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Messaging.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Messaging.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Net.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Net.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Numerics.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Numerics.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Printing.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Printing.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.DurableInstancing.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.DurableInstancing.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.Remoting.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.Remoting.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.Serialization.Formatters.Soap.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.Serialization.Formatters.Soap.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.Serialization.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Runtime.Serialization.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Security.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Security.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Activities.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Activities.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Channels.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Channels.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Discovery.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Discovery.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Routing.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.Routing.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceModel.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceProcess.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.ServiceProcess.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Speech.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Speech.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Transactions.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Transactions.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Web.ApplicationServices.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Web.ApplicationServices.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Web.Services.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Web.Services.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Forms.DataVisualization.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Forms.DataVisualization.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Forms.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Forms.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Input.Manipulations.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Input.Manipulations.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Presentation.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Windows.Presentation.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Xaml.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Xaml.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Xml.Linq.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Xml.Linq.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Xml.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.Xml.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/System.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationClient.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationClient.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationClientsideProviders.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationClientsideProviders.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationProvider.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationProvider.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationTypes.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/UIAutomationTypes.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/WindowsBase.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/WindowsBase.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/WindowsFormsIntegration.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/WindowsFormsIntegration.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/mscorlib.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/mscorlib.xml",
|
||||
"build/.NETFramework/v4.0/Profile/Client/sysglobl.dll",
|
||||
"build/.NETFramework/v4.0/Profile/Client/sysglobl.xml",
|
||||
"build/.NETFramework/v4.0/ReachFramework.dll",
|
||||
"build/.NETFramework/v4.0/ReachFramework.xml",
|
||||
"build/.NETFramework/v4.0/RedistList/FrameworkList.xml",
|
||||
"build/.NETFramework/v4.0/System.Activities.Core.Presentation.dll",
|
||||
"build/.NETFramework/v4.0/System.Activities.Core.Presentation.xml",
|
||||
"build/.NETFramework/v4.0/System.Activities.DurableInstancing.dll",
|
||||
"build/.NETFramework/v4.0/System.Activities.DurableInstancing.xml",
|
||||
"build/.NETFramework/v4.0/System.Activities.Presentation.dll",
|
||||
"build/.NETFramework/v4.0/System.Activities.Presentation.xml",
|
||||
"build/.NETFramework/v4.0/System.Activities.dll",
|
||||
"build/.NETFramework/v4.0/System.Activities.xml",
|
||||
"build/.NETFramework/v4.0/System.AddIn.Contract.dll",
|
||||
"build/.NETFramework/v4.0/System.AddIn.Contract.xml",
|
||||
"build/.NETFramework/v4.0/System.AddIn.dll",
|
||||
"build/.NETFramework/v4.0/System.AddIn.xml",
|
||||
"build/.NETFramework/v4.0/System.ComponentModel.Composition.dll",
|
||||
"build/.NETFramework/v4.0/System.ComponentModel.Composition.xml",
|
||||
"build/.NETFramework/v4.0/System.ComponentModel.DataAnnotations.dll",
|
||||
"build/.NETFramework/v4.0/System.ComponentModel.DataAnnotations.xml",
|
||||
"build/.NETFramework/v4.0/System.Configuration.Install.dll",
|
||||
"build/.NETFramework/v4.0/System.Configuration.Install.xml",
|
||||
"build/.NETFramework/v4.0/System.Configuration.dll",
|
||||
"build/.NETFramework/v4.0/System.Configuration.xml",
|
||||
"build/.NETFramework/v4.0/System.Core.dll",
|
||||
"build/.NETFramework/v4.0/System.Core.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.DataSetExtensions.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.DataSetExtensions.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.Entity.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.Entity.Design.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.Entity.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.Entity.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.Linq.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.Linq.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.OracleClient.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.OracleClient.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.Services.Client.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.Services.Client.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.Services.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.Services.Design.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.Services.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.Services.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.SqlXml.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.SqlXml.xml",
|
||||
"build/.NETFramework/v4.0/System.Data.dll",
|
||||
"build/.NETFramework/v4.0/System.Data.xml",
|
||||
"build/.NETFramework/v4.0/System.Deployment.dll",
|
||||
"build/.NETFramework/v4.0/System.Deployment.xml",
|
||||
"build/.NETFramework/v4.0/System.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Design.xml",
|
||||
"build/.NETFramework/v4.0/System.Device.dll",
|
||||
"build/.NETFramework/v4.0/System.Device.xml",
|
||||
"build/.NETFramework/v4.0/System.DirectoryServices.AccountManagement.dll",
|
||||
"build/.NETFramework/v4.0/System.DirectoryServices.AccountManagement.xml",
|
||||
"build/.NETFramework/v4.0/System.DirectoryServices.Protocols.dll",
|
||||
"build/.NETFramework/v4.0/System.DirectoryServices.Protocols.xml",
|
||||
"build/.NETFramework/v4.0/System.DirectoryServices.dll",
|
||||
"build/.NETFramework/v4.0/System.DirectoryServices.xml",
|
||||
"build/.NETFramework/v4.0/System.Drawing.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Drawing.Design.xml",
|
||||
"build/.NETFramework/v4.0/System.Drawing.dll",
|
||||
"build/.NETFramework/v4.0/System.Drawing.xml",
|
||||
"build/.NETFramework/v4.0/System.EnterpriseServices.Thunk.dll",
|
||||
"build/.NETFramework/v4.0/System.EnterpriseServices.Wrapper.dll",
|
||||
"build/.NETFramework/v4.0/System.EnterpriseServices.dll",
|
||||
"build/.NETFramework/v4.0/System.EnterpriseServices.xml",
|
||||
"build/.NETFramework/v4.0/System.IO.Log.dll",
|
||||
"build/.NETFramework/v4.0/System.IO.Log.xml",
|
||||
"build/.NETFramework/v4.0/System.IdentityModel.Selectors.dll",
|
||||
"build/.NETFramework/v4.0/System.IdentityModel.Selectors.xml",
|
||||
"build/.NETFramework/v4.0/System.IdentityModel.dll",
|
||||
"build/.NETFramework/v4.0/System.IdentityModel.xml",
|
||||
"build/.NETFramework/v4.0/System.Management.Instrumentation.dll",
|
||||
"build/.NETFramework/v4.0/System.Management.Instrumentation.xml",
|
||||
"build/.NETFramework/v4.0/System.Management.dll",
|
||||
"build/.NETFramework/v4.0/System.Management.xml",
|
||||
"build/.NETFramework/v4.0/System.Messaging.dll",
|
||||
"build/.NETFramework/v4.0/System.Messaging.xml",
|
||||
"build/.NETFramework/v4.0/System.Net.dll",
|
||||
"build/.NETFramework/v4.0/System.Net.xml",
|
||||
"build/.NETFramework/v4.0/System.Numerics.dll",
|
||||
"build/.NETFramework/v4.0/System.Numerics.xml",
|
||||
"build/.NETFramework/v4.0/System.Printing.dll",
|
||||
"build/.NETFramework/v4.0/System.Printing.xml",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Caching.dll",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Caching.xml",
|
||||
"build/.NETFramework/v4.0/System.Runtime.DurableInstancing.dll",
|
||||
"build/.NETFramework/v4.0/System.Runtime.DurableInstancing.xml",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Remoting.dll",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Remoting.xml",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Serialization.Formatters.Soap.dll",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Serialization.Formatters.Soap.xml",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Serialization.dll",
|
||||
"build/.NETFramework/v4.0/System.Runtime.Serialization.xml",
|
||||
"build/.NETFramework/v4.0/System.Security.dll",
|
||||
"build/.NETFramework/v4.0/System.Security.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Activation.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Activation.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Activities.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Activities.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Channels.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Channels.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Discovery.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Discovery.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Routing.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Routing.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Web.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.Web.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceModel.xml",
|
||||
"build/.NETFramework/v4.0/System.ServiceProcess.dll",
|
||||
"build/.NETFramework/v4.0/System.ServiceProcess.xml",
|
||||
"build/.NETFramework/v4.0/System.Speech.dll",
|
||||
"build/.NETFramework/v4.0/System.Speech.xml",
|
||||
"build/.NETFramework/v4.0/System.Transactions.dll",
|
||||
"build/.NETFramework/v4.0/System.Transactions.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.Abstractions.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.ApplicationServices.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.ApplicationServices.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.DataVisualization.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.DataVisualization.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.DataVisualization.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.DynamicData.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.DynamicData.Design.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.DynamicData.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.DynamicData.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.Entity.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.Entity.Design.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.Entity.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.Entity.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.Extensions.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.Extensions.Design.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.Extensions.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.Extensions.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.Mobile.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.Mobile.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.RegularExpressions.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.RegularExpressions.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.Routing.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.Services.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.Services.xml",
|
||||
"build/.NETFramework/v4.0/System.Web.dll",
|
||||
"build/.NETFramework/v4.0/System.Web.xml",
|
||||
"build/.NETFramework/v4.0/System.Windows.Forms.DataVisualization.Design.dll",
|
||||
"build/.NETFramework/v4.0/System.Windows.Forms.DataVisualization.dll",
|
||||
"build/.NETFramework/v4.0/System.Windows.Forms.DataVisualization.xml",
|
||||
"build/.NETFramework/v4.0/System.Windows.Forms.dll",
|
||||
"build/.NETFramework/v4.0/System.Windows.Forms.xml",
|
||||
"build/.NETFramework/v4.0/System.Windows.Input.Manipulations.dll",
|
||||
"build/.NETFramework/v4.0/System.Windows.Input.Manipulations.xml",
|
||||
"build/.NETFramework/v4.0/System.Windows.Presentation.dll",
|
||||
"build/.NETFramework/v4.0/System.Windows.Presentation.xml",
|
||||
"build/.NETFramework/v4.0/System.Workflow.Activities.dll",
|
||||
"build/.NETFramework/v4.0/System.Workflow.Activities.xml",
|
||||
"build/.NETFramework/v4.0/System.Workflow.ComponentModel.dll",
|
||||
"build/.NETFramework/v4.0/System.Workflow.ComponentModel.xml",
|
||||
"build/.NETFramework/v4.0/System.Workflow.Runtime.dll",
|
||||
"build/.NETFramework/v4.0/System.Workflow.Runtime.xml",
|
||||
"build/.NETFramework/v4.0/System.WorkflowServices.dll",
|
||||
"build/.NETFramework/v4.0/System.WorkflowServices.xml",
|
||||
"build/.NETFramework/v4.0/System.Xaml.dll",
|
||||
"build/.NETFramework/v4.0/System.Xaml.xml",
|
||||
"build/.NETFramework/v4.0/System.Xml.Linq.dll",
|
||||
"build/.NETFramework/v4.0/System.Xml.Linq.xml",
|
||||
"build/.NETFramework/v4.0/System.Xml.dll",
|
||||
"build/.NETFramework/v4.0/System.Xml.xml",
|
||||
"build/.NETFramework/v4.0/System.dll",
|
||||
"build/.NETFramework/v4.0/System.xml",
|
||||
"build/.NETFramework/v4.0/UIAutomationClient.dll",
|
||||
"build/.NETFramework/v4.0/UIAutomationClient.xml",
|
||||
"build/.NETFramework/v4.0/UIAutomationClientsideProviders.dll",
|
||||
"build/.NETFramework/v4.0/UIAutomationClientsideProviders.xml",
|
||||
"build/.NETFramework/v4.0/UIAutomationProvider.dll",
|
||||
"build/.NETFramework/v4.0/UIAutomationProvider.xml",
|
||||
"build/.NETFramework/v4.0/UIAutomationTypes.dll",
|
||||
"build/.NETFramework/v4.0/UIAutomationTypes.xml",
|
||||
"build/.NETFramework/v4.0/WindowsBase.dll",
|
||||
"build/.NETFramework/v4.0/WindowsBase.xml",
|
||||
"build/.NETFramework/v4.0/WindowsFormsIntegration.dll",
|
||||
"build/.NETFramework/v4.0/WindowsFormsIntegration.xml",
|
||||
"build/.NETFramework/v4.0/XamlBuildTask.dll",
|
||||
"build/.NETFramework/v4.0/XamlBuildTask.xml",
|
||||
"build/.NETFramework/v4.0/mscorlib.dll",
|
||||
"build/.NETFramework/v4.0/mscorlib.xml",
|
||||
"build/.NETFramework/v4.0/sysglobl.dll",
|
||||
"build/.NETFramework/v4.0/sysglobl.xml",
|
||||
"build/Microsoft.NETFramework.ReferenceAssemblies.net40.targets",
|
||||
"microsoft.netframework.referenceassemblies.net40.1.0.3.nupkg.sha512",
|
||||
"microsoft.netframework.referenceassemblies.net40.nuspec"
|
||||
]
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
".NETFramework,Version=v4.0": [
|
||||
"Microsoft.NETFramework.ReferenceAssemblies >= 1.0.3"
|
||||
]
|
||||
},
|
||||
"packageFolders": {
|
||||
"/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/FontPreview_v26.csproj",
|
||||
"projectName": "字体预览工具",
|
||||
"projectPath": "/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/FontPreview_v26.csproj",
|
||||
"packagesPath": "/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/",
|
||||
"outputPath": "/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net40"
|
||||
],
|
||||
"sources": {
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net40": {
|
||||
"targetAlias": "net40",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net40": {
|
||||
"targetAlias": "net40",
|
||||
"dependencies": {
|
||||
"Microsoft.NETFramework.ReferenceAssemblies": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[1.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/home/user/Doubao/chats/38442577370078722/tools/dotnet/sdk/8.0.425/RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "b25/+rOOzn8=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/user/Doubao/chats/38442577370078722/FontPreview_Optimized/FontPreview_v26.csproj",
|
||||
"expectedPackageFiles": [
|
||||
"/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/microsoft.netframework.referenceassemblies/1.0.3/microsoft.netframework.referenceassemblies.1.0.3.nupkg.sha512",
|
||||
"/home/user/Doubao/chats/38442577370078722/tools/dotnet/.nuget/packages/microsoft.netframework.referenceassemblies.net40/1.0.3/microsoft.netframework.referenceassemblies.net40.1.0.3.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
Reference in New Issue
Block a user