diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-09-14 08:12:21 +0000 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-09-14 08:12:21 +0000 |
| commit | 5dcfd372592d5d21193d1dc5a58c385b2e8a6a7c (patch) | |
| tree | c68e872ac736aa39f8085395f0b0a77c222dccb8 /Samples/common/src/SampleBaseForEditor.cs | |
| parent | df943f924dafb874f0052e88539c59197b37964f (diff) | |
abstract Command class, ActionCommand and ToggleCommand derived from it
Diffstat (limited to 'Samples/common/src/SampleBaseForEditor.cs')
| -rw-r--r-- | Samples/common/src/SampleBaseForEditor.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Samples/common/src/SampleBaseForEditor.cs b/Samples/common/src/SampleBaseForEditor.cs index 6c6b60b8..47b93103 100644 --- a/Samples/common/src/SampleBaseForEditor.cs +++ b/Samples/common/src/SampleBaseForEditor.cs @@ -129,20 +129,20 @@ namespace Samples public new bool IsDirty => source != origSource; - public Command CMDNew, CMDOpen, CMDSave, CMDSaveAs, CMDQuit, CMDShowLeftPane, + public ActionCommand CMDNew, CMDOpen, CMDSave, CMDSaveAs, CMDQuit, CMDShowLeftPane, CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDHelp, CMDAbout, CMDOptions; public CommandGroup EditorCommands => new CommandGroup (CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDSave, CMDSaveAs); protected virtual void initCommands () { - CMDNew = new Command ("New", new Action (onNewFile), "#Icons.blank-file.svg"); - CMDSave = new Command ("Save", new Action (onSave), "#Icons.save.svg", false); - CMDSaveAs = new Command ("Save As...", new Action (onSaveAs), "#Icons.save.svg"); - CMDQuit = new Command ("Quit", new Action (() => base.Quit ()), "#Icons.exit.svg"); - CMDUndo = new Command ("Undo", new Action (undo),"#Icons.undo.svg", false); - CMDRedo = new Command ("Redo", new Action (redo),"#Icons.redo.svg", false); - CMDCut = new Command ("Cut", new Action (cut), "#Icons.scissors.svg", false); - CMDCopy = new Command ("Copy", new Action (copy), "#Icons.copy-file.svg", false); - CMDPaste= new Command ("Paste", new Action (paste), "#Icons.paste-on-document.svg", false); + CMDNew = new ActionCommand ("New", new Action (onNewFile), "#Icons.blank-file.svg"); + CMDSave = new ActionCommand ("Save", new Action (onSave), "#Icons.save.svg", false); + CMDSaveAs = new ActionCommand ("Save As...", new Action (onSaveAs), "#Icons.save.svg"); + CMDQuit = new ActionCommand ("Quit", new Action (() => base.Quit ()), "#Icons.exit.svg"); + CMDUndo = new ActionCommand ("Undo", new Action (undo),"#Icons.undo.svg", false); + CMDRedo = new ActionCommand ("Redo", new Action (redo),"#Icons.redo.svg", false); + CMDCut = new ActionCommand ("Cut", new Action (cut), "#Icons.scissors.svg", false); + CMDCopy = new ActionCommand ("Copy", new Action (copy), "#Icons.copy-file.svg", false); + CMDPaste= new ActionCommand ("Paste", new Action (paste), "#Icons.paste-on-document.svg", false); } |