mirror of
https://github.com/ShiftOS-Rewind/ShiftOS.git
synced 2025-01-22 03:11:47 -05:00
Cleaned up that messy Clear function
This commit is contained in:
parent
b1a4d9ea4e
commit
0925e5a059
3 changed files with 5 additions and 7 deletions
|
@ -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" />
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue