Ejemplo n.º 1
0
        /// <summary>
        /// 文本转换协助
        /// </summary>
        private void TextChgHelp()
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new MethodInvoker(this.TextChgHelp));
            }
            else
            {
                string chgText = string.Empty;

                switch (this.cmbTxtToByte.SelectedIndex)
                {
                // 通常文本转换(Shift-Jis)
                case 0:
                    chgText = this.TextChgHelpCom(Encoding.GetEncoding("Shift-Jis"), this.rdoToPos.Checked);
                    break;

                // 通常文本转换(Utf-8)
                case 1:
                    chgText = this.TextChgHelpCom(Encoding.UTF8, this.rdoToPos.Checked);
                    break;

                // 生化1文件文本转换
                case 2:
                    chgText = Bio1TextEditor.GetDiffData(this.baseKeyWords, false);
                    //chgText = Bio2TextEditor.GetDiffData(this.baseKeyWords);
                    break;

                // 生化1通常文本转换
                case 3:
                    chgText = Bio1TextEditor.GetDiffData(this.baseKeyWords, true);
                    break;

                // 红侠乔伊文本转换
                case 4:
                    chgText = ViewtifulJoeTextEditor.GetDiffData(this.baseKeyWords);
                    break;

                // 通常文本转换(Unicode Big end)
                case 5:
                    chgText = this.TextChgHelpCom(Encoding.BigEndianUnicode, this.rdoToPos.Checked);
                    break;

                // 通常文本转换(Unicode Little end)
                case 6:
                    chgText = this.TextChgHelpCom(Encoding.Unicode, this.rdoToPos.Checked);
                    break;
                }

                this.txtKeyWord.Text = chgText;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 文本编辑菜单事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtEditorMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            this.txtEditorMenu.Visible = false;
            string strFolder = string.Empty;

            switch (e.ClickedItem.Name)
            {
            case "btnTxtSearch":
                Fenxi fenxiForm = new Fenxi();
                fenxiForm.Show(this);
                break;

            case "btnTxtView":
                SingleFileResult reFenxi = new SingleFileResult();
                reFenxi.Show();
                break;

            case "btnBio0Tool":
                //string strFolder = @"E:\My\Hanhua\testFile\Biohazard_0\Cn";
                strFolder = @"D:\game\iso\wii\生化危机0汉化\Wii版";
                //string strFolder = @"D:\game\iso\wii\生化危机0汉化\Ngc版\A\root";
                Bio0TextEditor bio0MoveEditor = new Bio0TextEditor(strFolder);
                bio0MoveEditor.Show();
                break;

            case "btnBio1Tool":
                //string strFolder = @"E:\游戏汉化\NgcBio1\IsoA\root_cn";
                strFolder = @"E:\My\Hanhua\testFile\bio1Text";
                Bio1TextEditor bio1TextEditor = new Bio1TextEditor(strFolder);
                bio1TextEditor.Show();
                break;

            case "btnBio2Tool":
                Bio2TextEditor bio2TextEdit = new Bio2TextEditor();
                bio2TextEdit.Show();
                break;

            case "btnBio3Tool":
                Bio3TextEditor bio3TextEdit = new Bio3TextEditor();
                bio3TextEdit.Show();
                break;

            case "btnBioCvTool":
                BioCvTextEditor bioCvTextEditor = new BioCvTextEditor();
                bioCvTextEditor.Show();
                break;

            case "btnViewtifulTool":
                ViewtifulJoeTextEditor viewtifulTool = new ViewtifulJoeTextEditor();
                viewtifulTool.Show();
                break;

            case "btnTos":
                TalesOfSymphoniaTextEditor tosTool = new TalesOfSymphoniaTextEditor();
                tosTool.Show();
                break;

            case "btnChkCnChar":
                this.baseFile = Util.SetOpenDailog("翻译文件(*.xlsx)|*.xlsx", string.Empty);
                if (string.IsNullOrEmpty(this.baseFile))
                {
                    return;
                }
                this.Do(this.CheckCnCharCount, new object[] { this.Text });
                break;
            }
        }