Initial commit: Better-Seewo EN5 plugin v1.0.1
This commit is contained in:
32
Better-EN5/UI/ExportInkMenuItem.cs
Normal file
32
Better-EN5/UI/ExportInkMenuItem.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user