mirror of
https://github.com/ShiftOS-Rewind/ShiftOS.git
synced 2025-01-22 17:52:15 +00: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">
|
<Compile Include="ShiftOS\Desktop.Designer.cs">
|
||||||
<DependentUpon>Desktop.cs</DependentUpon>
|
<DependentUpon>Desktop.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Terminal\Commands\clear.cs" />
|
<Compile Include="Terminal\Commands\Clear.cs" />
|
||||||
<Compile Include="Terminal\Commands\Hello.cs" />
|
<Compile Include="Terminal\Commands\Hello.cs" />
|
||||||
<Compile Include="Terminal\Commands\Help.cs" />
|
<Compile Include="Terminal\Commands\Help.cs" />
|
||||||
<Compile Include="Terminal\Commands\sftp.cs" />
|
<Compile Include="Terminal\Commands\sftp.cs" />
|
||||||
|
|
|
@ -7,18 +7,16 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace ShiftOS.Main.Terminal.Commands
|
namespace ShiftOS.Main.Terminal.Commands
|
||||||
{
|
{
|
||||||
public class clear : TerminalCommand
|
public class Clear : TerminalCommand
|
||||||
{
|
{
|
||||||
public override string Name { get; } = "clear";
|
public override string Name { get; } = "clear";
|
||||||
public override string Summary { get; } = "Clears all text from the terminal.";
|
public override string Summary { get; } = "Clears all text from the terminal.";
|
||||||
public override string Usage { get; } = "clear";
|
public override string Usage { get; } = "clear";
|
||||||
public override bool Unlocked { get; set; } = false;
|
public override bool Unlocked { get; set; } = false;
|
||||||
public static List<ShiftOS.Apps.Terminal> trm = TerminalBackend.trm;
|
|
||||||
public override void Run(params string[] parameters)
|
public override void Run(params string[] parameters)
|
||||||
{
|
{
|
||||||
ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
|
Clear();
|
||||||
|
|
||||||
trm.Clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,12 +88,12 @@ namespace ShiftOS.Main.Terminal
|
||||||
// Input.Start();
|
// Input.Start();
|
||||||
// return Input;
|
// return Input;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clears all text from the terminal.
|
/// Clears all text from the terminal.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void Clear()
|
public virtual void Clear()
|
||||||
{
|
{
|
||||||
|
|
||||||
ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
|
ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID);
|
||||||
|
|
||||||
trm.Clear();
|
trm.Clear();
|
||||||
|
|
Loading…
Reference in a new issue