Exemplo n.º 1
0
        //! obselete move to native win32 on next release
        private void buttonOpen_Click(object sender, EventArgs e)
        {
            SERVERS     server = (SERVERS)Enum.Parse(typeof(SERVERS), comboBoxServer.GetItemText(comboBoxServer.SelectedIndex));
            SERVER_MODE mode   = (SERVER_MODE)Enum.Parse(typeof(SERVERS), comboBoxMode.GetItemText(comboBoxMode.SelectedIndex));

            //! GL EMU
            if (mode == SERVER_MODE.EMULATOR && server == SERVERS.GLOBAL)
            {
                Common GServer = new Common();
                //! if no device return
                if (string.IsNullOrEmpty(GServer.InitDevices()))
                {
                    return;
                }
                GServer.ConnectDevice();
                GServer.Remount("system");
                GServer.Remount("data");
                GServer.Remount("data/data");
                //! launcer game
                GServer.Lancher("com.tencent.ig");
                GServer.Rename("init.vbox86.rc", "initvbox86.txt");
                GServer.Remove("data/data/com.netease.uu", 20);
                GServer.Remove("data/app-lib/com.tencent.ig-1/libcubehawk.so", 0);
            }
            //! KR EMU
            if (mode == SERVER_MODE.EMULATOR && server == SERVERS.KOREA)
            {
            }
            //! VN EMU
            if (mode == SERVER_MODE.EMULATOR && server == SERVERS.VIETNAM)
            {
            }
            //! GL MOBILE
            if (mode == SERVER_MODE.MOBILE && server == SERVERS.GLOBAL)
            {
            }
            //! KR Mobile
            if (mode == SERVER_MODE.MOBILE && server == SERVERS.KOREA)
            {
            }
            //! VN Mobile
            if (mode == SERVER_MODE.MOBILE && server == SERVERS.VIETNAM)
            {
            }
        }
Exemplo n.º 2
0
        public clsSpeechServer(string[] args)
        {
            SERVER_MODE mode = DEBUG_SERVER_MODE;
            string      gramma_file = "", wave_file = "";

            switch (mode)
            {
            case SERVER_MODE.SRV_SOCKET_DAEMON:
                Program.log("Socket daemon mode");
                engine_init(ENGINE_MODE.ENG_STREAM_INPUT);
                socket_server_init();
                break;

            case SERVER_MODE.SRV_FILE_INPUT:
                Program.log("File input mode");

                if (args.Length == 2)
                {
                    gramma_file = args[0];
                    wave_file   = args[1];

                    gramma_file = Path.GetFullPath(gramma_file);
                    wave_file   = Path.GetFullPath(wave_file);
                }
                else
                {
                    Program.help();
                    Environment.Exit(1);
                }

                engine_init(ENGINE_MODE.ENG_STREAM_INPUT, gramma_file);
                break;

            case SERVER_MODE.SRV_MIC_DEBUG:
            default:
                Program.log("Mic Debug mode");
                engine_init(ENGINE_MODE.ENG_MIC_DEBUG);
                break;
            }

            g_engine.do_recog(wave_file);
        }