aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/DebugLogAnalyzer/src/Extensions.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-04-02 07:54:52 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-04-02 07:54:52 +0200
commit8c0f9d6b02eac97b7a45780f82f5683771745cf0 (patch)
tree7c638b9ace3bf6b86669eebaa8b4c9638f941f17 /Samples/DebugLogAnalyzer/src/Extensions.cs
parent89a58fbf483a4b08309c640dfd07ddf8a58e8bd1 (diff)
DebugLog, event bindings resolutions, enumSelector bitfields, wip
Diffstat (limited to 'Samples/DebugLogAnalyzer/src/Extensions.cs')
-rw-r--r--Samples/DebugLogAnalyzer/src/Extensions.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Samples/DebugLogAnalyzer/src/Extensions.cs b/Samples/DebugLogAnalyzer/src/Extensions.cs
new file mode 100644
index 00000000..6086384c
--- /dev/null
+++ b/Samples/DebugLogAnalyzer/src/Extensions.cs
@@ -0,0 +1,23 @@
+
+
+using Crow;
+
+namespace DebugLogAnalyzer {
+ public static class Extensions {
+
+ public static CommandGroup GetCommands (this System.IO.DirectoryInfo di) =>
+ new CommandGroup(
+ new Command ("Set as root", ()=> {Program.CurrentProgramInstance.CurrentDir = di.FullName;}));
+ public static CommandGroup GetCommands (this System.IO.FileInfo fi) =>
+ new CommandGroup(
+ new Command ("Delete", (sender0) => {
+ MessageBox.ShowModal (Program.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;
+ (listContainer.Parent as Group).RemoveChild(listContainer);
+ };
+ })
+ );
+
+ }
+} \ No newline at end of file