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/Extensions.cs | |
| parent | df943f924dafb874f0052e88539c59197b37964f (diff) | |
abstract Command class, ActionCommand and ToggleCommand derived from it
Diffstat (limited to 'Samples/common/src/Extensions.cs')
| -rw-r--r-- | Samples/common/src/Extensions.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Samples/common/src/Extensions.cs b/Samples/common/src/Extensions.cs index b4b0a1e5..7647dbc9 100644 --- a/Samples/common/src/Extensions.cs +++ b/Samples/common/src/Extensions.cs @@ -8,11 +8,11 @@ namespace Samples { public static CommandGroup GetCommands (this System.IO.DirectoryInfo di) => new CommandGroup( - new Command ("Set as root", ()=> {SampleBaseForEditor.CurrentProgramInstance.CurrentDir = di.FullName;}) - ); + new ActionCommand ("Set as root", ()=> {SampleBaseForEditor.CurrentProgramInstance.CurrentDir = di.FullName;}) + ); public static CommandGroup GetCommands (this System.IO.FileInfo fi) => new CommandGroup( - new Command ("Delete", (sender0) => { + new ActionCommand ("Delete", (sender0) => { MessageBox.ShowModal (SampleBaseForEditor.CurrentProgramInstance, MessageBox.Type.YesNo, $"Delete {fi.Name}?").Yes += (sender, e) => { System.IO.File.Delete(fi.FullName); Widget listContainer = ((sender0 as Widget).LogicalParent as Widget).DataSource as Widget; |