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