Exemple #1
0
        public Object _execCommandAndGetResult(INakoFuncCallInfo info)
        {
            string s   = info.StackPopAsString();
            string ret = "";

            if (NWEnviroment.isWindows())
            {
                ret = WindowsCommand.execute(s);
            }
            else
            {
                ret = LinuxCommand.execute(s);
            }
            return(ret);
        }
Exemple #2
0
        protected bool IsInstalled()
        {
            try
            {
                Path = WindowsCommand.FindExe(Name);
                return(true);
            }
            catch
            {
                if (ExpectedPath != null && File.Exists(ExpectedPath.FullName))
                {
                    Path = ExpectedPath;
                    return(true);
                }

                Path = null;
                return(false);
            }
        }
        public static byte[] NewClientWindowsCommand()
        {
            var topLeftWindows = new List <ClientWindow>
            {
                new ClientWindow("cli", "title_cli", false, ClientWindow.RED),
                new ClientWindow("user", "title_user"),
                new ClientWindow("ship", "title_ship"),
                new ClientWindow("ship_warp", "ttip_shipWarp_btn"),
                new ClientWindow("chat", "title_chat"),
                new ClientWindow("group", "title_group"),
                new ClientWindow("minimap", "title_map"),
                new ClientWindow("spacemap", "title_spacemap"),
                new ClientWindow("quests", "title_quests"),
                new ClientWindow("refinement", "title_refinement", false),
                new ClientWindow("log", "title_log"),
                new ClientWindow("pet", "title_pet", false),
                new ClientWindow("contacts", "title_contacts", false),
                new ClientWindow("booster", "title_booster", false),
                new ClientWindow("spaceball", "title_spaceball", false),
                new ClientWindow("invasion", "title_invasion", false),
                new ClientWindow("ctb", "title_ctb", false),
                new ClientWindow("tdm", "title_tdm", false),
                new ClientWindow("ranked_hunt", "title_ranked_hunt", false),
                new ClientWindow("highscoregate", "title_highscoregate", false),
                new ClientWindow("scoreevent", "title_scoreevent", false),
                new ClientWindow("infiltration", "title_ifg", false),
                new ClientWindow("word_puzzle", "title_wordpuzzle", false),
                new ClientWindow("sectorcontrol", "title_sectorcontrol_ingame_status", false),
                new ClientWindow("jackpot_status_ui", "title_jackpot_status_ui", false),
                new ClientWindow("curcubitor", "httip_countdownHalloweenNPCs", false),
                new ClientWindow("influence", "httip_influence", false),
                new ClientWindow("traininggrounds", "title_traininggrounds", false),
                new ClientWindow("spaceplague", "title_spaceplague", false)
            };

            var topRightWindows = new List <ClientWindow>
            {
                new ClientWindow("shop", "title_shop", false),
                new ClientWindow("fullscreen", "ttip_fullscreen_btn"),
                new ClientWindow("settings", "title_settings"),
                new ClientWindow("help", "title_help", false),
                new ClientWindow("logout", "title_logout")
            };

            //Foreach window adds it to a list
            var topLeftButtons  = topLeftWindows.Select(window => window.Window).ToList();
            var topRightButtons = topRightWindows.Select(window => window.Window).ToList();

            var slotbars = new List <newcommands.windowModules.commandKn>
            {
                new newcommands.windowModules.commandKn(newcommands.windowModules.commandKn.GAME_FEATURE_BAR, topLeftButtons, "0,0", "0"),
                new newcommands.windowModules.commandKn(newcommands.windowModules.commandKn.GENERIC_FEATURE_BAR, topRightButtons, "100,0", "0")
            };


            var command = new WindowsCommand(slotbars);

            command.write();

            return(command.getBytes());
        }