This commit is contained in:
parent
f7e41712ce
commit
94670b656a
15
Class1.cs
15
Class1.cs
|
@ -5,6 +5,7 @@ using BITKit.CommandPattern;
|
|||
using BITKit.Mod;
|
||||
using System.Linq;
|
||||
using BITFactory.Cutting;
|
||||
using BITKit.UX;
|
||||
|
||||
namespace BITFactory.Cutting.Mod
|
||||
{
|
||||
|
@ -17,11 +18,13 @@ namespace BITFactory.Cutting.Mod
|
|||
public override string Name { get; set; } = "自动保存导出数据";
|
||||
|
||||
[Inject] private ICuttingTool _cuttingTool;
|
||||
|
||||
[Inject] private IUXDialogue _dialogue;
|
||||
|
||||
public override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
_cuttingTool.OnRelease += OnRelease;
|
||||
|
||||
}
|
||||
|
||||
public override void OnDisposed()
|
||||
|
@ -74,6 +77,16 @@ namespace BITFactory.Cutting.Mod
|
|||
File.WriteAllText(path, stringBuilder.ToString());
|
||||
|
||||
BIT4Log.Log<AutoSaveImage>($"导出数据已保存到:{path}");
|
||||
|
||||
_dialogue.Show($"导出数据已保存到\n{path}", $"数据已保存",OpenFile);
|
||||
|
||||
return;
|
||||
void OpenFile()
|
||||
{
|
||||
//打开path的文件
|
||||
System.Diagnostics.Process.Start(path);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue