diff options
| author | Michael <[email protected]> | 2017-08-05 17:01:15 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-08-05 17:01:15 -0400 |
| commit | f4d11fcdad5fdfc7c25cf3c6f96516b2330dca1c (patch) | |
| tree | 2e925af18ff12ee435b05b69d55077d9abc4b7b2 /ShiftOS.Frontend/Commands.cs | |
| parent | 2352fcc7a1af388def5d7b0c9172f805d707d2c7 (diff) | |
| download | shiftos_thereturn-f4d11fcdad5fdfc7c25cf3c6f96516b2330dca1c.tar.gz shiftos_thereturn-f4d11fcdad5fdfc7c25cf3c6f96516b2330dca1c.tar.bz2 shiftos_thereturn-f4d11fcdad5fdfc7c25cf3c6f96516b2330dca1c.zip | |
file opener and file saver
Diffstat (limited to 'ShiftOS.Frontend/Commands.cs')
| -rw-r--r-- | ShiftOS.Frontend/Commands.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ShiftOS.Frontend/Commands.cs b/ShiftOS.Frontend/Commands.cs index e557ea2..19d229c 100644 --- a/ShiftOS.Frontend/Commands.cs +++ b/ShiftOS.Frontend/Commands.cs @@ -46,6 +46,38 @@ namespace ShiftOS.Frontend { public static class FrontendDebugCommands { + [Command("drop_opener")] + [ShellConstraint("shiftos_debug> ")] + public static void DropOpener(Dictionary<string, object> args) + { + string[] ids = new string[] { "" }; + if (args.ContainsKey("id")) + { + ids = args["id"].ToString().Split(';'); + } + FileSkimmerBackend.GetFile(ids, FileOpenerStyle.Open, (path) => + { + Console.WriteLine(path); + TerminalBackend.PrintPrompt(); + }); + } + + [Command("drop_saver")] + [ShellConstraint("shiftos_debug> ")] + public static void DropSaver(Dictionary<string, object> args) + { + string[] ids = new string[] { "" }; + if (args.ContainsKey("id")) + { + ids = args["id"].ToString().Split(';'); + } + FileSkimmerBackend.GetFile(ids, FileOpenerStyle.Save, (path) => + { + Console.WriteLine(path); + TerminalBackend.PrintPrompt(); + }); + } + /// <summary> /// Debug command to drop a fatal objective/hack failure screen in the form of an emergency alert system-esque screen. /// |
