fix: 修复 SmfFillType 缺少 Image 及 EnbxReader XDocument/XElement 类型错误
This commit is contained in:
@@ -267,6 +267,92 @@ namespace BetterSeewo.Manager
|
||||
}
|
||||
}
|
||||
|
||||
private async void BatchPptx_Click(object s, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new Microsoft.Win32.OpenFileDialog
|
||||
{
|
||||
Title = "选择多个 PPT 文件",
|
||||
Filter = "PowerPoint|*.pptx",
|
||||
Multiselect = true
|
||||
};
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
ConvertProgress.Visibility = Visibility.Visible;
|
||||
ConvertStatus.Text = $"正在批量转换 {dialog.FileNames.Length} 个文件...";
|
||||
|
||||
using var folderDialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
folderDialog.Description = "选择输出目录";
|
||||
if (folderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
int total = dialog.FileNames.Length;
|
||||
int done = 0;
|
||||
foreach (var file in dialog.FileNames)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await _conversionService.ConvertPptxToEnbxAsync(file);
|
||||
done++;
|
||||
ConvertProgress.Value = (double)done / total * 100;
|
||||
ConvertStatus.Text = $"({done}/{total}) 完成: {Path.GetFileName(result)}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ConvertStatus.Text = $"失败: {Path.GetFileName(file)} - {ex.Message}";
|
||||
}
|
||||
}
|
||||
ConvertStatus.Text = $"批量转换完成。成功: {done}/{total}";
|
||||
}
|
||||
ConvertProgress.Visibility = Visibility.Collapsed;
|
||||
ConvertProgress.Value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private async void BatchEnbx_Click(object s, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new Microsoft.Win32.OpenFileDialog
|
||||
{
|
||||
Title = "选择多个 ENBX 文件",
|
||||
Filter = "希沃课件|*.enbx",
|
||||
Multiselect = true
|
||||
};
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
ConvertProgress.Visibility = Visibility.Visible;
|
||||
ConvertStatus.Text = $"正在批量转换 {dialog.FileNames.Length} 个文件...";
|
||||
|
||||
using var folderDialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
folderDialog.Description = "选择输出目录";
|
||||
if (folderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
int total = dialog.FileNames.Length;
|
||||
int done = 0;
|
||||
foreach (var file in dialog.FileNames)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await _conversionService.ConvertEnbxToPptxAsync(file);
|
||||
done++;
|
||||
ConvertProgress.Value = (double)done / total * 100;
|
||||
ConvertStatus.Text = $"({done}/{total}) 完成: {Path.GetFileName(result)}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ConvertStatus.Text = $"失败: {Path.GetFileName(file)} - {ex.Message}";
|
||||
}
|
||||
}
|
||||
ConvertStatus.Text = $"批量转换完成。成功: {done}/{total}";
|
||||
}
|
||||
ConvertProgress.Visibility = Visibility.Collapsed;
|
||||
ConvertProgress.Value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private async void FixConvert_Click(object s, RoutedEventArgs e)
|
||||
{
|
||||
await Task.Run(() => _conversionService.FixConversionErrorsAsync());
|
||||
ConvertStatus.Text = "转换缓存已清除";
|
||||
}
|
||||
|
||||
// Touch Fix
|
||||
private async void CheckTouch_Click(object s, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user