- 新增 LightTheme.xaml 浅色主题资源 - 标题栏添加主题切换按钮(☀️/🌙) - Manager 支持深浅主题互换 - 发布 Manager.exe (292KB) 和 Installer.exe (171KB) - 插件安装包 Better-Seewo.2.0.0.exe (11.6MB)
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using BetterEN5.Services.Conversion;
|
|
|
|
var pptxPath = @"C:\Users\Administrator\Desktop\test_slides.pptx";
|
|
var enbxPath = @"C:\Users\Administrator\Desktop\test_slides.enbx";
|
|
|
|
var engine = new ConversionEngine();
|
|
Console.WriteLine("Converting...");
|
|
var success = engine.Convert(pptxPath, enbxPath);
|
|
|
|
if (success)
|
|
{
|
|
var fi = new FileInfo(enbxPath);
|
|
Console.WriteLine($"Success! Output: {enbxPath} ({fi.Length} bytes)");
|
|
|
|
Console.WriteLine("\nENBX contents:");
|
|
var tmp = Path.GetTempPath() + "enbx_vfy_" + Guid.NewGuid().ToString("N");
|
|
Directory.CreateDirectory(tmp);
|
|
System.IO.Compression.ZipFile.ExtractToDirectory(enbxPath, tmp);
|
|
foreach (var f in Directory.GetFiles(tmp, "*.*", SearchOption.AllDirectories))
|
|
{
|
|
var rel = f.Substring(tmp.Length + 1);
|
|
Console.WriteLine($" {rel} ({new FileInfo(f).Length} bytes)");
|
|
if (rel.EndsWith(".xml"))
|
|
{
|
|
Console.WriteLine($" {File.ReadAllText(f)[..Math.Min(200, File.ReadAllText(f).Length)]}");
|
|
}
|
|
}
|
|
Directory.Delete(tmp, true);
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine("Conversion failed!");
|
|
}
|