Files
Better-Seewo/Better-EN5/UI/BoardMenuExportInk.cs

32 lines
924 B
C#

using Microsoft.Win32;
using Cvte.EasiNote;
using Cvte.Windows.Input;
using BetterEN5.Services;
namespace BetterEN5.UI
{
public class BoardMenuExportInk : BoardEditMenuItem
{
public BoardMenuExportInk()
{
SortHint = 998;
Command = new DelegateCommand(() =>
{
var dialog = new SaveFileDialog
{
Title = "导出墨迹",
Filter = "墨迹文件 (*.ink.json)|*.ink.json|JSON 文件 (*.json)|*.json",
DefaultExt = ".ink.json",
FileName = "课件墨迹.ink.json"
};
if (dialog.ShowDialog() == true)
{
var inkService = new InkService();
_ = inkService.ExportInkAsync(dialog.FileName);
}
});
Predicate = _ => true;
}
}
}