Example #1
0
        public void ListMaker(string comment2) // command used for creating lists
        {
            Console.WriteLine("This command is now replaced by the Project Manager command(which is located in the start menu)");
            Console.WriteLine("If you still want to run the ListMaker then we do have an earlier version of it\nType '/command Version'");
            string cRead = Console.ReadLine();

            if (cRead == "/command Version") // If you want to run the old version of this app
            {
                ProcessHandler handler = new ProcessHandler();
                handler.ProcessHandle();
                Thread.Sleep(1000);
                Console.WriteLine("Type Exit");
                Console.Write(">");
                string Read = Console.ReadLine();
                if (Read == "Exit")
                {
                    Console.WriteLine("Exiting");
                    Thread.Sleep(100);
                    viOne v = new viOne();
                    v.vi();
                }
            }
            else if (cRead == "/command Reject" || cRead == "/Exit" || cRead == "exit" || cRead == "Exit" || cRead == "-state=down") // If you want to exit
            {
                Console.WriteLine("Exiting ");
                Thread.Sleep(100);
                viOne v = new viOne();
                v.vi();
            }
            else
            {
                Console.WriteLine("Wrong command");
                ListMaker("Make list");
            }
        }
Example #2
0
        public void TerminalInfo(string comment) // Lists the UFT version and other details
        {
            Console.Clear();
            Console.WriteLine("The UFT component's versions are as follows : \nUFT versiom : 1.2\nUtility version : 1.4\nCommands version : 1.5\nOverall version : 3.9");

            Thread.Sleep(100);
            Console.WriteLine("Type Exit or Stay");
            Console.Write("> ");
            string ReadV = Console.ReadLine();

            if (ReadV == "Exit") // When you run 'Exit'
            {
                viOne v = new viOne();
                v.vi();
            }
            else if (ReadV == "Stay")
            {
                TerminalInfo("Info");
            }
            else // If the command is wrong
            {
                Console.WriteLine("Wrong command");
                Thread.Sleep(100);
                TerminalInfo("Terminal Info");
            }
        }
Example #3
0
        // Command Class
        public void vi()
        {
            Console.ForegroundColor = ConsoleColor.Cyan;   // Sets the colour of text to the colour specified



            Console.Clear();

            Console.WriteLine("Which command do you want to execute?");


            List <commands> cm = ListManager.Manager();

            foreach (var m in cm)
            {
                Console.WriteLine($"{m.command1}\n{m.command2}\n{m.command3}\n{m.command4}");             // Lists the command from 'ListManager.cs'
            }
            Console.Write("> ");
            string commandRead = Console.ReadLine();


            if (commandRead == "Exit")
            {
                Menu commands = new Menu();
                commands.MenuMain();
            }


            else if (commandRead == "UFT Info")            // If the user types the following command
            {
                CommandsAll commands = new CommandsAll();
                commands.TerminalInfo("");
            }

            else if (commandRead == "ListMaker")
            {
                CommandsAll commands = new CommandsAll();
                commands.ListMaker("");
            }
            else if (string.IsNullOrWhiteSpace(commandRead))
            {
                Console.WriteLine("Kindly input value");
                Console.ReadKey();
                vi();
            }

            else if (commandRead == "WritePad")
            {
                CommandsAll v = new CommandsAll();
                v.WriteConsolePad();
            }
            else
            {
                Console.WriteLine("Wrong command");
                Thread.Sleep(100);
                viOne v = new viOne();
                v.vi();
            }
        }
Example #4
0
        public void WriteConsolePad()
        {
            Console.Clear();
            Console.WriteLine("Do you want to start the old version or Normal version('Normal' for normal and '/version old' for old version)");
            Console.Write(">");
            string commandOpen = Console.ReadLine();

            if (commandOpen == "/command Exit")
            {
                viOne v = new viOne();
                v.vi();
            }
            else if (commandOpen == "/version old") // If you want to run the old version
            {
                Console.WriteLine("Opening");
                Thread.Sleep(1000);
                ProcessHandler handler = new ProcessHandler();
                handler.ProcessWritePadUI();
                Console.WriteLine("Exiting");
                Thread.Sleep(1000);
                viOne n = new viOne();
                n.vi();
            }
            else if (commandOpen == "Normal") // If you want to run the normal version
            {
                Console.WriteLine("What writing software do you want to open?");
                Console.WriteLine(">");
                string           readApp   = Console.ReadLine();
                ProcessStartInfo startInfo = new ProcessStartInfo();
                startInfo.Arguments       = $@"/C {readApp}";
                startInfo.UseShellExecute = true;
                Process.Start(startInfo);
                Thread.Sleep(2000);
                Console.WriteLine("Type Exit or Stay");
                Console.Write(">");
                string rcommand = Console.ReadLine();
                if (rcommand == "Exit")
                {
                    viOne v = new viOne();
                    v.vi();
                }
                else if (rcommand == "Stay")
                {
                    WriteConsolePad();
                }
                else
                {
                    Console.WriteLine("Wrong command");
                    Thread.Sleep(100);
                    WriteConsolePad();
                }
            }

            else if (commandOpen == "/version dev")
            {
                Console.WriteLine("In developemnt");
                Console.WriteLine("Writing to the input stream");
                Thread.Sleep(100);
                Console.WriteLine("Opening a edit::access input stream in Falcon::input-edit");
                Thread.Sleep(1000);
                Console.WriteLine("Write ':goto' to start Falcon::Input-edit or type '/Exit' to exit");
                string commandWrite = Console.ReadLine();
                if (commandWrite == ":goto")
                {
                }
                else if (commandWrite == "/Exit")
                {
                    var back = new viOne();
                    back.vi();
                }
            }

            else
            {
                Console.WriteLine(
                    "Wrong command"
                    );
                Thread.Sleep(100);
                WriteConsolePad();
            }
        }
Example #5
0
        public void MainStart() // Main Method
        {
            var componentInteractor = new ComponentInteractor();
            var signalverify        = new SignalVerifier();

            Console.Title = "FalconXOS(UFT)";             // Sets the title

            Console.ForegroundColor = ConsoleColor.White; // Sets the colour to the specified colour
            Console.Clear();                              // Clears the console


            Console.WriteLine("You can see the available commands by running '--help'"); // Run this command if you want to see the all the available commands
            Console.Write(">");
            string readFirstInput = Console.ReadLine();                                  // Waits for input

            if (readFirstInput == "--help")                                              // If the command is '--help'
            {
                Console.ForegroundColor = ConsoleColor.White;
                Console.WriteLine("Description                       Command\n\n");
                Console.WriteLine("Starts UFT                   start(forward : -uft, End : n)");
                Console.WriteLine("Exits the UFT                /command(forward : Exit(End))");
                Console.WriteLine("Go to 'note'                 /state(Forward : note(End))");
                Console.WriteLine("Skip to debug                /skip(Forward : -debug(End))");
                Console.WriteLine("Skip to 'shortcut'           /skip(Forward : shortcut(End))");
                Console.WriteLine("Skip to submenu              /skip(Forward : submenu(End))");
                Console.WriteLine("Start Terminal(Powershell)   /start(Forward : terminal(End))");
                Console.WriteLine("Access the changelog         --access(Forward : ch(End))");

                Console.Write(">");



                Boolean devstatus    = false;
                string  commandStart = Console.ReadLine();
                if (commandStart == "--devmode" || commandStart == "-sh=developer" || commandStart == "-sh=dev")
                {
                    devstatus = true;
                }

                if (commandStart == "start -uft n" || commandStart == "/start") // This commands goes to the menu
                {
                    viOne v = new viOne();
                    v.Start();
                }
                else if (commandStart == "/command Exit" || commandStart == "exit" || commandStart == "/Exit") // This exits the UFT
                {
                    var start = new startfi.startfi();
                    start.NonAddStart();
                }
                else if (commandStart == "/state note") // This goes to the class 'Note'
                {
                    Console.WriteLine("Starting class Note");
                    Thread.Sleep(100);
                    CommandsAll commandsAll = new CommandsAll();
                    commandsAll.Note();
                }
                else if (commandStart == "/skip -debug") // Goes to debug
                {
                    DebugManager manager = new DebugManager();
                    manager.Debug();
                }
                else if (commandStart == "/skip shortcut") // Goes to shortcut
                {
                    Shortcut shortcut = new Shortcut();
                    shortcut.ShortcutPage();
                }
                else if (commandStart == "/skip submenu") // Goes to submenu(viOne.cs)
                {
                    viOne v = new viOne();
                    v.vi();
                }
                else if (commandStart == "/start terminal") // Starts powershell
                {
                    close closeterminal = new close();
                    closeterminal.closeCommand();
                }
                else if (commandStart == "--access ch" || commandStart == "-sh=oldch")
                {
                    componentInteractor.MainInteractor("Access Changelog!", "/", 0);
                    MainStart();
                }
                else if (commandStart == "--runch" || commandStart == "-sh=ch")

                {
                    componentInteractor.MainInteractor("Dev Changelog!", "/", 0);
                    MainStart();
                }
                else if (commandStart == "--internal version" || commandStart == "--i v")
                {
                    var signalreceiver = new SignalReceiver();
                    componentInteractor.MainInteractor("Give version!", "/", 0);
                    MainStart();
                }
                else if (commandStart == "/clear" || commandStart == "--clear" || commandStart == "--sh=clear")
                {
                    Console.Clear();
                    MainStart();
                }
                else if (commandStart == "-d info")
                {
                    var signalreceiver = new SignalReceiver();
                    componentInteractor.MainInteractor("Request debug info!", "/", 0); // For now error-handling is manual, as you have to add the errornum for the error. In the next release, the error-handling should be automatic
                    MainStart();
                }
                else if (commandStart == "--devconsole")
                {
                    var devconsole = new dev.DevConsole();
                    devconsole.MainConsole();
                }

                else // When the wrong command is executed
                {
                    var gray = new Errortunnel();
                    gray.CheckInfo("/", 20, "None");

                    MainStart();
                }
            }
            else if (readFirstInput == "--howTo") // This command explains how to read '--help' commands
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("start(forward : -uft, End : n)");
                Console.WriteLine("In this the first command is : start, the 'forward' means the next attribute and 'End' means the last attribute of the command");
                Console.WriteLine("Note : sometimes in the 'forward' attribute there will be '(End)'. \nThis means that the 'forward' attribute is also the last attribute");
                Console.WriteLine("Type '/Exit' to close");
                Console.Write(">");
                string gRead = Console.ReadLine();
                if (gRead == "/Exit") // This command is used to exit this command
                {
                    MainStart();
                }
                else  // If the command is wrong
                {
                    var gray = new Errortunnel();
                    gray.CheckInfo("/", 20, "None");

                    MainStart();
                }
            }
            else if (readFirstInput == "start -uft n" || readFirstInput == "/start" || readFirstInput == "/Start" || readFirstInput == "/Menu") // When the listed command is executed
            {
                viOne v = new viOne();
                v.Start();
            }
            else if (readFirstInput == "/command Exit" || readFirstInput == "/Exit")
            {
                var start = new startfi.startfi();
                start.NonAddStart();
            }
            else if (readFirstInput == "/state note")
            {
                Console.WriteLine("Starting FalconXOS Note");

                Thread.Sleep(100);
                CommandsAll commandsAll = new CommandsAll();
                commandsAll.Note();
            }
            else if (readFirstInput == "/skip -debug")
            {
                DebugManager manager = new DebugManager();
                manager.Debug();
            }
            else if (readFirstInput == "/skip shortcut")
            {
                Shortcut shortcut = new Shortcut();
                shortcut.ShortcutPage();
            }
            else if (readFirstInput == "/skip submenu")
            {
                viOne v = new viOne();
                v.vi();
            }
            else if (readFirstInput == "start /terminal")
            {
                close closeterminal = new close();
                closeterminal.closeCommand();
            }
            else if (readFirstInput == "--access ch" || readFirstInput == "-sh=oldch")
            {
                componentInteractor.MainInteractor("Access Changelog!", "/", 0);
                MainStart();
            }
            else if (readFirstInput == "--runch" || readFirstInput == "-sh=ch")

            {
                componentInteractor.MainInteractor("Dev Changelog!", "/", 0);
                MainStart();
            }

            else if (readFirstInput == "--internal version" || readFirstInput == "--i v" || readFirstInput == "version")

            {
                componentInteractor.MainInteractor("Give version!", "/", 0);
                MainStart();
            }
            else if (readFirstInput == "/clear" || readFirstInput == "--clear" || readFirstInput == "--sh=clear")
            {
                Console.Clear();
                MainStart();
            }
            else if (readFirstInput == "-d info")
            {
                var signalreceiver = new SignalReceiver();
                signalreceiver.sendsignal("Request debug info!", "/", 0);
                Thread.Sleep(2000);
                Console.WriteLine("\nDo you want to exit?");
                string read = Console.ReadLine();
                if (read == "/exit" || read == "Exit" || read == "exit")
                {
                    MainStart();
                }
                else
                {
                    var errorinteractor = new ErrorInteractor();
                    errorinteractor.VerifyError("/", 20, "None");

                    MainStart();
                }
            }
            else if (readFirstInput == "--devconsole")
            {
                var devconsole = new dev.DevConsole();
                devconsole.MainConsole();
            }

            else
            {
                var gray = new Errortunnel();
                gray.CheckInfo("/", 20, "None");

                MainStart();
            }
        }
Example #6
0
        public void MenuMain() // FalconXOS's Menu
        {
            var componentinteractor = new ComponentInteractor();
            var sendsignal          = new SignalVerifier();


            Console.Clear();                             // Clears the console
            Console.ForegroundColor = ConsoleColor.Cyan; // Sets the foregrounColor



            Console.WriteLine("Apps and other commands(type Apps for running this command)");
            Console.WriteLine("Shortcuts");
            Console.WriteLine("Debug.cs");
            Console.WriteLine("Debug.js");

            Console.WriteLine("QuickRun('run')");
            Console.WriteLine("Terminal(default)");

            Console.WriteLine("Project Manager");
            Console.WriteLine("Developer Console(--devconsole)");
            Console.WriteLine("Exit");
            Console.Write(">");
            string y = Console.ReadLine();

            if (y == "Apps") // When executimg the 'Apps' command
            {
                viOne b = new viOne();
                b.vi();
            }
            else if (y == "Shortcuts") // When executing the 'Shortcuts' command
            {
                Shortcut s = new Shortcut();
                s.ShortcutPage();
            }
            else if (y == "Terminal") // When executing the 'Terminal' command
            {
                TerminalKernel l = new TerminalKernel();
                l.TerminalHandler();
                Thread.Sleep(100);
                Console.WriteLine("Type Exit");
                Console.Write(">");
                string v = Console.ReadLine();
                if (v == "Exit")
                {
                    MenuMain();
                }
                else
                {
                    var gray = new Errortunnel();
                    gray.CheckInfo("/", 20, "None");
                    MenuMain();
                }
            }
            else if (y == "Exit" || y == "exit" || y == "/Exit" || y == "/exit") // When executing the 'Exit' command
            {
                componentinteractor.MainInteractor("Exit!", "/", 0);
            }
            else if (y == "Project Manager")
            {
                Utility m = new Utility();


                m.VirtualUtility();
            }
            else if (y == "/close menu")
            {
                Main k = new Main();
                k.MainStart();
            }
            else if (y == "Debug.cs")
            {
                var debug = new DebugManager();

                debug.Debug();
            }
            else if (y == "Debug.js")
            {
                var d = new DebugManager();
                d.JsDebug();
            }
            else if (y == "--help")
            {
                Console.WriteLine("Description                       Command\n\n");
                Console.WriteLine("Goes back to the Main Menu     /close(forward : menu(End))");
            }
            else if (y == "run")
            {
                var run = new QuickRun();
                run.QuickRunMethod();
            }
            else if (y == "--access ch" || y == "-=sh=oldch")

            {
                componentinteractor.MainInteractor("Access Changelog!", "/", 0);
                MenuMain();
            }
            else if (y == "--dev")
            {
                componentinteractor.MainInteractor("Dev Changelog!", "/", 0);
                MenuMain();
            }
            else if (y == "--internal version" || y == "--i v")
            {
                var signalreceiver = new SignalReceiver();
                componentinteractor.MainInteractor("Give version!", "/", 0);
                MenuMain();
            }
            else if (y == "/clear" || y == "--clear" || y == "--sh=clear")
            {
                Console.Clear();
                MenuMain();
            }
            else if (y == "-d info")
            {
                componentinteractor.MainInteractor("Request debug info!", "/", 0);
                MenuMain();
            }
            else if (y == "--devconsole")
            {
                var s = new dev.DevConsole();
                s.MainConsole();
            }
            else                                     // When the wrong command is executed
            {
                var gray = new Errortunnel();
                gray.CheckInfo("/", 20, "None");

                MenuMain();
            }
        }