Commit 43f833b1 authored by JoyJ's avatar JoyJ

add a confirm for undo

parent f96a1338
Pipeline #1024 passed with stage
in 51 seconds
......@@ -34,7 +34,7 @@ public AddCommand(CardEdit cardedit)
this.dataform = cardedit.dataform;
}
public bool Excute(params object[] args)
public bool Execute(params object[] args)
{
if (!this.dataform.CheckOpen())
{
......@@ -95,7 +95,7 @@ public ModCommand(CardEdit cardedit)
this.dataform = cardedit.dataform;
}
public bool Excute(params object[] args)
public bool Execute(params object[] args)
{
if (!this.dataform.CheckOpen())
{
......@@ -211,7 +211,7 @@ public DelCommand(CardEdit cardedit)
this.dataform = cardedit.dataform;
}
public bool Excute(params object[] args)
public bool Execute(params object[] args)
{
if (!this.dataform.CheckOpen())
{
......@@ -362,7 +362,7 @@ public CopyCommand(CardEdit cardedit)
this.dataform = cardedit.dataform;
}
public bool Excute(params object[] args)
public bool Execute(params object[] args)
{
if (!this.dataform.CheckOpen())
{
......
......@@ -6,7 +6,7 @@ namespace DataEditorX.Core
public delegate void StatusBool(bool val);
public interface ICommand : ICloneable
{
bool Excute(params object[] args);
bool Execute(params object[] args);
}
public interface IBackableCommand : ICommand
{
......@@ -46,7 +46,7 @@ private void CommandManager_ReverseUndoStateChanged(bool val)
#region ICommandManager 成员
public void ExcuteCommand(ICommand command, params object[] args)
{
if (!command.Excute(args))
if (!command.Execute(args))
{
return;
}
......@@ -88,7 +88,7 @@ public void ReverseUndo()
return;
}
command.Excute();
command.Execute();
this.undoStack.Push((ICommand)command.Clone());
UndoStateChanged(this.undoStack.Count > 0);
......
......@@ -964,6 +964,10 @@ void Btn_delClick(object sender, EventArgs e)
//撤销
void Btn_undoClick(object sender, EventArgs e)
{
if (!MyMsg.Question(LMSG.UndoConfirm))
{
return;
}
if (this.cardedit != null)
{
this.cmdManager.Undo();
......
......@@ -95,6 +95,7 @@ public enum LMSG : uint
exportMseImagesErr = 0x4b,
syntaxCheckPassed = 0x4c,
IfOpenLotsOfFile = 0x4d,
UndoConfirm = 0x4e,
COUNT,
}
}
★更新历史
3.0.0.6
你现在可以在选项菜单中调整函数提示的字体及其大小了。
现在当滚动到文本末尾时,仍然可以继续向下滚动。
【撤销】按钮现在需要确认后才进行。
3.0.0.5
修正连接标记无法修改的bug
3.0.0.4
......
......@@ -174,4 +174,4 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x4b 从MSE存档导出图片失败。
0x4c 测试完成,没有发现语法错误。
0x4d 一次性打开大量文件将导致卡顿,是否继续?
0x4e 下载完成,即将重新启动程序以完成更新。
\ No newline at end of file
0x4e 确定要进行撤销吗?所有未保存的内容都将丢失。
\ No newline at end of file
#
#
CodeEditForm.mainMenu.menuitem_file File(&F)
CodeEditForm.mainMenu.menuitem_open Open
CodeEditForm.mainMenu.menuitem_save Save
......@@ -169,4 +169,4 @@ MainForm.mainMenu.menuitem_closeall Close All
0x4b Failed to export MSE-set to images fail.
0x4c No syntax error found.
0x4d It is not recommended to open lots of file at a time. Continue?
0x4e Download completed; the application will be restarted.
\ No newline at end of file
0x4e Are you sure to undo? All unsaved contents will be lost.
\ No newline at end of file
[DataEditorX]3.0.0.5[DataEditorX]
[URL]https://cdn01.moecube.com/DataEditorX/releases/DataEditorX-3.0.0.4.zip[URL]
[DataEditorX]3.0.0.6[DataEditorX]
[URL]https://cdn01.moecube.com/DataEditorX/releases/DataEditorX-3.0.0.6.zip[URL]
★运行环境(Environment)
本程序基于.Net framework 4.6开发
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment