public static void RegisterAllCommands()
        {
            CMDs.Add(new CommandEcho(new string[] { "echo" }));
            CMDs.Add(new CommandReboot(new string[] { "reboot", "rb" }));
            CMDs.Add(new CommandShutdown(new string[] { "shutdown", "sd" }));
            CMDs.Add(new CommandClear(new string[] { "clear", "clr" }));
            CMDs.Add(new CommandPing(new string[] { "ping" }));
            CMDs.Add(new CommandUdp(new string[] { "udp" }));
            CMDs.Add(new CommandVersion(new string[] { "version", "ver" }));
            CMDs.Add(new CommandSystemInfo(new string[] { "systeminfo", "sysinfo" }));
            CMDs.Add(new CommandTime(new string[] { "time", "date" }));
            CMDs.Add(new CommandIPConfig(new string[] { "ipconfig", "ifconfig", "netconf" }));
            CMDs.Add(new CommandLspci(new string[] { "lspci" }));
            CMDs.Add(new CommandEnv(new string[] { "export", "set" }));
            CMDs.Add(new CommandAbout(new string[] { "about" }));
            CMDs.Add(new CommandCrash(new string[] { "crash" }));
            CMDs.Add(new CommandVol(new string[] { "vol" }));
            CMDs.Add(new CommandDir(new string[] { "dir", "ls", "l" }));
            CMDs.Add(new CommandMkdir(new string[] { "mkdir", "md" }));
            CMDs.Add(new CommandRmdir(new string[] { "rmdir", "rmd" }));
            CMDs.Add(new CommandCat(new string[] { "cat" }));
            CMDs.Add(new CommandCD(new string[] { "cd" }));
            CMDs.Add(new CommandChangeVol(new string[] { "chgvol", "cv" }));
            CMDs.Add(new CommandMkfil(new string[] { "touch", "mkfil", "mf" }));
            CMDs.Add(new CommandRmfil(new string[] { "rmfil", "rmf" }));
            CMDs.Add(new CommandKeyboardMap(new string[] { "setkeyboardmap", "setkeyboard" }));

            CMDs.Add(new CommandAction(new string[] { "beep" }, () =>
            {
                Cosmos.System.PCSpeaker.Beep();
            }));
            CMDs.Add(new CommandAction(new string[] { "help" }, () =>
            {
                List_Translation._Help();
            }));
            CMDs.Add(new CommandAction(new string[] { "play" }, () =>
            {
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
            }));
            CMDs.Add(new CommandAction(new string[] { "netrefresh" }, () =>
            {
                foreach (HAL.Drivers.Network.NetworkDevice networkDevice in HAL.Drivers.Network.NetworkDevice.Devices)
                {
                    File.Create(@"0:\System\" + networkDevice.Name + ".conf");
                    Utils.Settings settings = new Utils.Settings(@"0:\System\" + networkDevice.Name + ".conf");
                    settings.Edit("ipaddress", "0.0.0.0");
                    settings.Edit("subnet", "0.0.0.0");
                    settings.Edit("gateway", "0.0.0.0");
                    settings.Edit("dns01", "0.0.0.0");
                    settings.Push();
                }
            }));
        }
Exemple #2
0
        public static void RegisterAllCommands()
        {
            CMDs.Add(new CommandEcho(new string[] { "echo" }));
            CMDs.Add(new CommandReboot(new string[] { "reboot", "rb" }));
            CMDs.Add(new CommandShutdown(new string[] { "shutdown", "sd" }));
            CMDs.Add(new CommandClear(new string[] { "clear", "clr" }));
            CMDs.Add(new CommandPing(new string[] { "ping" }));
            CMDs.Add(new CommandUdp(new string[] { "udp" }));
            CMDs.Add(new CommandDns(new string[] { "dns" }));
            CMDs.Add(new CommandVersion(new string[] { "version", "ver" }));
            CMDs.Add(new CommandSystemInfo(new string[] { "systeminfo", "sysinfo" }));
            CMDs.Add(new CommandTime(new string[] { "time", "date" }));
            CMDs.Add(new CommandIPConfig(new string[] { "ipconfig", "ifconfig", "netconf" }));
            CMDs.Add(new CommandLspci(new string[] { "lspci" }));
            CMDs.Add(new CommandEnv(new string[] { "export", "set" }));
            CMDs.Add(new CommandAbout(new string[] { "about" }));
            CMDs.Add(new CommandCrash(new string[] { "crash" }));
            CMDs.Add(new CommandVol(new string[] { "vol" }));
            CMDs.Add(new CommandDir(new string[] { "dir", "ls", "l" }));
            CMDs.Add(new CommandMkdir(new string[] { "mkdir", "md" }));
            CMDs.Add(new CommandRmdir(new string[] { "rmdir", "rmd" }));
            CMDs.Add(new CommandCat(new string[] { "cat" }));
            CMDs.Add(new CommandCD(new string[] { "cd" }));
            CMDs.Add(new CommandChangeVol(new string[] { "chgvol", "cv" }));
            CMDs.Add(new CommandMkfil(new string[] { "touch", "mkfil", "mf" }));
            CMDs.Add(new CommandRmfil(new string[] { "rmfil", "rmf" }));
            CMDs.Add(new CommandKeyboardMap(new string[] { "setkeyboardmap", "setkeyboard" }));
            CMDs.Add(new CommandHex(new string[] { "hex" }));

            CMDs.Add(new CommandAction(new string[] { "beep" }, () =>
            {
                Cosmos.System.PCSpeaker.Beep();
            }));
            CMDs.Add(new CommandAction(new string[] { "help" }, () =>
            {
                List_Translation._Help();
            }));
            CMDs.Add(new CommandAction(new string[] { "play" }, () =>
            {
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.G5, 432);

                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.A5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.B5, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.C6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.F6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.D6, 432);
                Cosmos.System.PCSpeaker.Beep((uint)Cosmos.System.Notes.E6, 432);
            }));
        }