private void ConfirmHookBtn_BtnClick(object sender, EventArgs e)
        {
            if (TextractorFunListView.SelectedItems.Count != 0)
            {
                Common.TextractorHandle.SetSettingsOutPutform(null);//先关闭对本窗口的输出

                string[] res = TextHookHandle.DealCode(TextractorFunListView.SelectedItems[0].SubItems[2].Text);

                int sum = 0;
                for (int i = 0; i < TextractorFunListView.Items.Count; i++)
                {
                    if (TextractorFunListView.Items[i].SubItems[2].Text.Contains(res[0]))
                    {
                        sum++;
                    }
                    if (sum >= 2)
                    {
                        SQLiteHelper sqliteH1 = new SQLiteHelper(Environment.CurrentDirectory + "\\settings\\GameList.sqlite");
                        sqliteH1.ExecuteSql(string.Format("UPDATE gamelist SET isHookFunMulti = 'True' WHERE gameID = {0};", Common.GameID));


                        break;
                    }
                }

                //不满足的游戏也应该记录一下
                if (sum <= 1)
                {
                    SQLiteHelper sqliteH1 = new SQLiteHelper(Environment.CurrentDirectory + "\\settings\\GameList.sqlite");
                    sqliteH1.ExecuteSql(string.Format("UPDATE gamelist SET isHookFunMulti = 'False' WHERE gameID = {0};", Common.GameID));
                }



                SQLiteHelper sqliteH = new SQLiteHelper(Environment.CurrentDirectory + "\\settings\\GameList.sqlite");
                sqliteH.ExecuteSql(string.Format("UPDATE gamelist SET hookCode = '{0}' WHERE gameID = {1};", res[0], Common.GameID));

                Common.HookCode     = res[0];
                Common.HookCodePlus = res[1];

                isNormalClose = true;

                TextRepeatRepairForm trrf = new TextRepeatRepairForm();
                Common.TextractorHandle.SetSettingsOutPutform(trrf);
                trrf.Show();

                this.Close();
            }
            else
            {
                MessageBox.Show("请先选择一个Hook方法再进行下一步操作!", "提示");
            }
        }
        private void ConfirmHookBtn_BtnClick(object sender, EventArgs e)
        {
            if (TextractorFunListView.SelectedItems.Count != 0)
            {
                Common.TextractorHandle.SetSettingsOutPutform(null);//先关闭对本窗口的输出

                string[] res = TextHookHandle.DealCode(TextractorFunListView.SelectedItems[0].SubItems[2].Text);

                int sum = 0;
                for (int i = 0; i < TextractorFunListView.Items.Count; i++)
                {
                    if (TextractorFunListView.Items[i].SubItems[2].Text.Contains(res[0]))
                    {
                        sum++;
                    }
                    if (sum >= 2)
                    {
                        IniFileHelper.WriteValue(Environment.CurrentDirectory + "\\GameListInfo.ini",
                                                 "Game" + Common.GameID, "isHookFunMulti", "True");
                        break;
                    }
                }

                //不满足的游戏也应该记录一下
                if (sum <= 1)
                {
                    IniFileHelper.WriteValue(Environment.CurrentDirectory + "\\GameListInfo.ini",
                                             "Game" + Common.GameID, "isHookFunMulti", "False");
                }

                IniFileHelper.WriteValue(Environment.CurrentDirectory + "\\GameListInfo.ini", "Game" + Common.GameID,
                                         "hookCode", res[0]);//保存特殊码,以后可以自动匹配这个游戏,但需要重设Plus部分

                Common.HookCode     = res[0];
                Common.HookCodePlus = res[1];

                isNormalClose = true;

                TextRepeatRepairForm trrf = new TextRepeatRepairForm();
                Common.TextractorHandle.SetSettingsOutPutform(trrf);
                trrf.Show();

                this.Close();
            }
            else
            {
                MessageBox.Show("请先选择一个Hook方法再进行下一步操作!", "提示");
            }
        }
        /// <summary>
        /// 输出事件
        /// </summary>
        /// <param name="sendingProcess"></param>
        /// <param name="outLine"></param>
        void OutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
        {
            //Console.WriteLine(outLine.Data);
            Common.AddTextractorHistory(outLine.Data);

            string[] dealRes = DealTextratorOutput(outLine.Data);

            if (dealRes != null)
            {
                if (dealRes[1] != "Console" && dealRes[1] != "")
                {
                    //Hook入口选择窗口处理
                    if (OutputSettingsform != null && OutputSettingsform is TextractorFunSelectForm)
                    {
                        if (TextractorFun_Index_List.ContainsKey(dealRes[2] + dealRes[4]) == true)
                        {
                            TextractorFunSelectForm frm = (TextractorFunSelectForm)OutputSettingsform;
                            frm.TextractorFunDealItem(TextractorFun_Index_List[dealRes[2] + dealRes[4]], dealRes, true);
                        }
                        else
                        {
                            TextractorFun_Index_List.Add(dealRes[2] + dealRes[4], listViewIndex);
                            TextractorFunSelectForm frm = (TextractorFunSelectForm)OutputSettingsform;
                            frm.TextractorFunDealItem(listViewIndex, dealRes, false);
                            listViewIndex++;
                        }
                    }

                    //文本去重窗口处理
                    if (OutputSettingsform != null && OutputSettingsform is TextRepeatRepairForm)
                    {
                        TextRepeatRepairForm frm = (TextRepeatRepairForm)OutputSettingsform;
                        if (Common.HookCode != "" && dealRes[2] == Common.HookCode && dealRes[4] == Common.HookCodePlus)
                        {
                            frm.TextractorHookContent(dealRes);
                        }
                    }

                    //Hook入口重复确认窗口处理
                    if (OutputSettingsform != null && OutputSettingsform is TextractorFunReConfirmForm)
                    {
                        TextractorFunReConfirmForm frm = (TextractorFunReConfirmForm)OutputSettingsform;
                        if (Common.HookCode != "" && dealRes[2] == Common.HookCode)
                        {
                            if (TextractorFunPlus_Index_List.ContainsKey(dealRes[4]) == true)
                            {
                                frm.TextractorFunDealItem(TextractorFunPlus_Index_List[dealRes[4]], dealRes, true);
                            }
                            else
                            {
                                TextractorFunPlus_Index_List.Add(dealRes[4], listViewIndex_plus);
                                frm.TextractorFunDealItem(listViewIndex_plus, dealRes, false);
                                listViewIndex_plus++;
                            }
                        }
                    }

                    //游戏翻译窗口处理
                    //如果Common.HookCodePlus = "NoMulti"则说明没有多重处理,不用再对比HookCodePlus
                    if (GameTransForm != null)
                    {
                        if (Common.HookCode != "" && dealRes[2] == Common.HookCode && (Common.HookCodePlus == "NoMulti" || dealRes[4] == Common.HookCodePlus))
                        {
                            GameTransForm.TextractorHookContent(dealRes);
                        }
                    }
                }
            }
        }