ShiftOS-Rewind/ShiftOS.Main/Terminal/Commands/TestStory.cs

38 lines
1.4 KiB
C#
Raw Normal View History

2017-11-18 12:29:15 -06:00
using System;
using System.Collections.Generic;
using System.Drawing;
2017-11-18 12:29:15 -06:00
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ShiftOS.Main.Terminal.Commands
{
public class TestStory : TerminalCommand
{
public override string Name { get; } = "teststory";
public override string Summary { get; } = "Debug Command - Test the intro";
2017-11-18 18:32:37 -06:00
public override string Usage { get; } = "teststory";
2017-11-18 12:29:15 -06:00
public override bool Unlocked { get; set; } = false;
public override void Run(params string[] parameters)
{
2017-11-18 17:32:11 -06:00
var r = new Random();
WriteLine($"Incoming connection from {r.Next(0, 256)}.{r.Next(0, 256)}.{r.Next(0, 256)}.{r.Next(0, 256)}...");
WriteLine(); //The various Task.Delay functions are to make the Thread.Sleep function work.
Thread.Sleep(r.Next(2000, 4500));
2017-11-18 12:29:15 -06:00
WriteLine("User set alias as \"DevX\".");
Task.Delay(1);
Thread.Sleep(4000);
2017-11-18 12:29:15 -06:00
WriteLine("User <DevX> has connected successfully!");
Task.Delay(1);
Thread.Sleep(3400);
StoryWriteLine("Well, it seems ShiftOS has installed. Congrats.... err... whatever your name is.");
}
private void StoryWriteLine(string value)
{
WriteLine($"[devx@master ~]$ {value}");
2017-11-18 12:29:15 -06:00
}
}
}