Exemplo n.º 1
0
        public CommandManager()
        {
            Console.WriteLine("Registering commands...");

            #region Command registering
            Register(Echo.Name, Echo.Info, Echo.NeedsParam, () => Echo.Run(y.ToArray()));
            Register(Shutdown.Name, Shutdown.Info, Shutdown.NeedsParam, () => Shutdown.Run());
            Register(ShowCommands.Name, ShowCommands.Info, ShowCommands.NeedsParam, () => ShowCommands.Run());
            Register(Reboot.Name, Reboot.Info, Reboot.NeedsParam, () => Reboot.Run());
            Register(Clear.Name, Clear.Info, Clear.NeedsParam, () => Clear.Run());
            Register(Cd.Name, Cd.Info, Cd.NeedsParam, () => Cd.Run(y.ToArray()[0]));
            Register(Ls.Name, Ls.Info, Ls.NeedsParam, () => Ls.Run());
            Register(Cat.Name, Cat.Info, Cat.NeedsParam, () => Cat.Run(y.ToArray()[0]));
            Register(Edit.Name, Edit.Info, Edit.NeedsParam, () => Edit.Run(y.ToArray()[0]));
            Register(Lspci.Name, Lspci.Info, Lspci.NeedsParam, () => Lspci.Run());
            Register(CTime.Name, CTime.Info, CTime.NeedsParam, () => CTime.Run());
            Register(MD5.Name, MD5.Info, MD5.NeedsParam, () => MD5.Run(y.ToArray()[0]));
            Register(SHA256.Name, SHA256.Info, SHA256.NeedsParam, () => SHA256.Run(y.ToArray()[0]));
            Register(Snake.Name, Snake.Info, Snake.NeedsParam, () => Snake.Run());
            #endregion

            CustomConsole.WriteLineOK("Command Manager initialized");
        }