/// <summary> /// 自动开始游戏按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AutoStartBtn_BtnClick(object sender, EventArgs e) { List <int> res = GetGameListHasProcessGame_PID_ID(); if (res == null) { MessageBox.Show("未找到任何正在运行中的已保存游戏", "提示"); } else { Common.TransMode = 1; Common.GameID = res[1]; SQLiteHelper sqliteH = new SQLiteHelper(Environment.CurrentDirectory + "\\settings\\GameList.sqlite"); List <string> ls = sqliteH.ExecuteReader_OneLine(string.Format("SELECT * FROM gamelist WHERE gameID = '{0}';", res[1]), 8); Common.HookCode = ls[4]; Common.RepeatMethod = ls[7]; Common.srcLang = ls[5]; Common.desLang = ls[6]; List <Process> proList = FindSameNameProcess(res[0]); if (proList.Count == 1) { Common.TextractorHandle = new TextHookHandle(proList[0].Id); } else { Common.TextractorHandle = new TextHookHandle(proList); } Common.TextractorHandle.Init(); bool isFunReSelect = Convert.ToBoolean(ls[3]); if (isFunReSelect == true) { TextractorFunReConfirmForm tfcf = new TextractorFunReConfirmForm(); Common.TextractorHandle.StartHook(); Common.TextractorHandle.SetSettingsOutPutform(tfcf); tfcf.Show(); } else { Common.HookCodePlus = "NoMulti";//提示无重复码。直接进游戏 GameTranslateForm gtf = new GameTranslateForm(); Common.TextractorHandle.StartHook(); Common.TextractorHandle.SetGameTransForm(gtf); GameTranslateBackForm.Show(gtf); } } }
/// <summary> /// 自动开始游戏按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AutoStartBtn_BtnClick(object sender, EventArgs e) { List <int> res = GetGameListHasProcessGame_PID_ID(); if (res == null) { MessageBox.Show("未找到任何正在运行中的已保存游戏", "提示"); } else { Common.TransMode = 1; Common.GameID = res[1]; Common.HookCode = IniFileHelper.ReadItemValue(Environment.CurrentDirectory + "\\GameListInfo.ini", "Game" + Common.GameID, "hookCode"); Common.RepeatMethod = IniFileHelper.ReadItemValue(Environment.CurrentDirectory + "\\GameListInfo.ini", "Game" + Common.GameID, "RepeatMethod"); Common.srcLang = IniFileHelper.ReadItemValue(Environment.CurrentDirectory + "\\GameListInfo.ini", "Game" + Common.GameID, "srcLang"); Common.desLang = IniFileHelper.ReadItemValue(Environment.CurrentDirectory + "\\GameListInfo.ini", "Game" + Common.GameID, "dstLang"); List <Process> proList = FindSameNameProcess(res[0]); if (proList.Count == 1) { Common.TextractorHandle = new TextHookHandle(proList[0].Id); } else { Common.TextractorHandle = new TextHookHandle(proList); } Common.TextractorHandle.Init(); bool isFunReSelect = Convert.ToBoolean(IniFileHelper.ReadItemValue(Environment.CurrentDirectory + "\\GameListInfo.ini", "Game" + Common.GameID, "isHookFunMulti", "False")); if (isFunReSelect == true) { TextractorFunReConfirmForm tfcf = new TextractorFunReConfirmForm(); Common.TextractorHandle.StartHook(); Common.TextractorHandle.SetSettingsOutPutform(tfcf); tfcf.Show(); } else { Common.HookCodePlus = "NoMulti";//提示无重复码。直接进游戏 GameTranslateForm gtf = new GameTranslateForm(); Common.TextractorHandle.StartHook(); Common.TextractorHandle.SetGameTransForm(gtf); GameTranslateBackForm.Show(gtf); } } }