diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-11-23 18:25:57 +0000 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-11-23 18:25:57 +0000 |
| commit | 0925e5a05924e9d74acfb07ce39771cd05e07786 (patch) | |
| tree | 900d30fb788480a90c7552987dfa27ebebaaac48 | |
| parent | b1a4d9ea4ef4aa8bed1ca31af2e774a52bef5038 (diff) | |
| download | shiftos-rewind-0925e5a05924e9d74acfb07ce39771cd05e07786.tar.gz shiftos-rewind-0925e5a05924e9d74acfb07ce39771cd05e07786.tar.bz2 shiftos-rewind-0925e5a05924e9d74acfb07ce39771cd05e07786.zip | |
Cleaned up that messy Clear function
| -rw-r--r-- | ShiftOS.Main/ShiftOS.Main.csproj | 2 | ||||
| -rw-r--r-- | ShiftOS.Main/Terminal/Commands/clear.cs | 8 | ||||
| -rw-r--r-- | ShiftOS.Main/Terminal/TerminalCommand.cs | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/ShiftOS.Main/ShiftOS.Main.csproj b/ShiftOS.Main/ShiftOS.Main.csproj index 59351a4..4098fc9 100644 --- a/ShiftOS.Main/ShiftOS.Main.csproj +++ b/ShiftOS.Main/ShiftOS.Main.csproj @@ -99,7 +99,7 @@ <Compile Include="ShiftOS\Desktop.Designer.cs"> <DependentUpon>Desktop.cs</DependentUpon> </Compile> - <Compile Include="Terminal\Commands\clear.cs" /> + <Compile Include="Terminal\Commands\Clear.cs" /> <Compile Include="Terminal\Commands\Hello.cs" /> <Compile Include="Terminal\Commands\Help.cs" /> <Compile Include="Terminal\Commands\sftp.cs" /> diff --git a/ShiftOS.Main/Terminal/Commands/clear.cs b/ShiftOS.Main/Terminal/Commands/clear.cs index cbabf88..c7c7d64 100644 --- a/ShiftOS.Main/Terminal/Commands/clear.cs +++ b/ShiftOS.Main/Terminal/Commands/clear.cs @@ -7,18 +7,16 @@ using System.Threading.Tasks; namespace ShiftOS.Main.Terminal.Commands { - public class clear : TerminalCommand + public class Clear : TerminalCommand { public override string Name { get; } = "clear"; public override string Summary { get; } = "Clears all text from the terminal."; public override string Usage { get; } = "clear"; public override bool Unlocked { get; set; } = false; - public static List<ShiftOS.Apps.Terminal> trm = TerminalBackend.trm; + public override void Run(params string[] parameters) { - ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID); - - trm.Clear(); + Clear(); } } } diff --git a/ShiftOS.Main/Terminal/TerminalCommand.cs b/ShiftOS.Main/Terminal/TerminalCommand.cs index 245f380..1aeb845 100644 --- a/ShiftOS.Main/Terminal/TerminalCommand.cs +++ b/ShiftOS.Main/Terminal/TerminalCommand.cs @@ -88,12 +88,12 @@ namespace ShiftOS.Main.Terminal // Input.Start(); // return Input; //} + /// <summary> /// Clears all text from the terminal. /// </summary> public virtual void Clear() { - ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID); trm.Clear(); |
