yoy new command

This commit is contained in:
FloppyDiskDrive 2017-11-18 18:32:37 -06:00
parent 9fe87b10de
commit 4c4ff1e06c
4 changed files with 28 additions and 2 deletions

View file

@ -100,6 +100,7 @@
<DependentUpon>Desktop.cs</DependentUpon>
</Compile>
<Compile Include="Terminal\Commands\Hello.cs" />
<Compile Include="Terminal\Commands\Help.cs" />
<Compile Include="Terminal\Commands\TestStory.cs" />
<Compile Include="Terminal\TerminalBackend.cs" />
<Compile Include="Terminal\TerminalCommand.cs" />

View file

@ -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)

View file

@ -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}");
}
}
}
}

View file

@ -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)