From 4c4ff1e06cecac8a52ac347e029ac19f1be4e244 Mon Sep 17 00:00:00 2001 From: FloppyDiskDrive Date: Sat, 18 Nov 2017 18:32:37 -0600 Subject: [PATCH] yoy new command --- ShiftOS.Main/ShiftOS.Main.csproj | 1 + ShiftOS.Main/ShiftOS/Desktop.cs | 2 +- ShiftOS.Main/Terminal/Commands/Help.cs | 25 +++++++++++++++++++++ ShiftOS.Main/Terminal/Commands/TestStory.cs | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ShiftOS.Main/Terminal/Commands/Help.cs diff --git a/ShiftOS.Main/ShiftOS.Main.csproj b/ShiftOS.Main/ShiftOS.Main.csproj index b960126..caedf3b 100644 --- a/ShiftOS.Main/ShiftOS.Main.csproj +++ b/ShiftOS.Main/ShiftOS.Main.csproj @@ -100,6 +100,7 @@ Desktop.cs + diff --git a/ShiftOS.Main/ShiftOS/Desktop.cs b/ShiftOS.Main/ShiftOS/Desktop.cs index f8bf7a0..c61dea9 100644 --- a/ShiftOS.Main/ShiftOS/Desktop.cs +++ b/ShiftOS.Main/ShiftOS/Desktop.cs @@ -40,7 +40,7 @@ namespace ShiftOS.Main.ShiftOS private void textPadToolStripMenuItem_Click(object sender, EventArgs e) { var t = new TextPad(); - ShiftWM.Init(t, "Untitled - TextPad", Resources.iconTextPad); + ShiftWM.Init(t, "TextPad", Resources.iconTextPad); } private void fileSkimmerToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/ShiftOS.Main/Terminal/Commands/Help.cs b/ShiftOS.Main/Terminal/Commands/Help.cs new file mode 100644 index 0000000..9a9e415 --- /dev/null +++ b/ShiftOS.Main/Terminal/Commands/Help.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Main.Terminal.Commands +{ + public class Help : TerminalCommand + { + public override string Name { get; } = "help"; + public override string Summary { get; } = "Shows the list of valid commands."; + public override string Usage { get; } = "n/a"; + public override bool Unlocked { get; set; } = false; + + public override void Run(params string[] args) + { + WriteLine("List of valid commands for ShiftOS.\r\n"); + foreach (var t in TerminalBackend.instances) + { + WriteLine($"{t.Name}: {t.Summary}"); + } + } + } +} diff --git a/ShiftOS.Main/Terminal/Commands/TestStory.cs b/ShiftOS.Main/Terminal/Commands/TestStory.cs index 1fd1795..b6f7f9e 100644 --- a/ShiftOS.Main/Terminal/Commands/TestStory.cs +++ b/ShiftOS.Main/Terminal/Commands/TestStory.cs @@ -11,7 +11,7 @@ namespace ShiftOS.Main.Terminal.Commands { public override string Name { get; } = "teststory"; public override string Summary { get; } = "Debug Command - Test the intro"; - public override string Usage { get; } = "n/a"; + public override string Usage { get; } = "teststory"; public override bool Unlocked { get; set; } = false; public override void Run(params string[] parameters)