Ejemplo n.º 1
0
        private void ImportFontButton_Click(object sender, EventArgs e)
        {
            if (InputFormRef.IsPleaseWaitDialog(this))
            {//2重割り込み禁止
                return;
            }

            ToolTranslateROMFont trans = new ToolTranslateROMFont();

            trans.ImportFont(this, this.FontROMTextBox.Text, FontAutoGenelateCheckBox.Checked, UseFontNameTextEdit.Font);
        }
Ejemplo n.º 2
0
        private void SimpleFireButton_Click(object sender, EventArgs e)
        {
            if (InputFormRef.IsPleaseWaitDialog(this))
            {//2重割り込み禁止
                return;
            }

            //翻訳言語
            string from    = U.InnerSplit(Translate_from.Text, "=", 0);
            string to      = U.InnerSplit(Translate_to.Text, "=", 0);
            string fromrom = SimpleTranslateFromROMFilename.Text;
            string torom   = SimpleTranslateToROMFilename.Text;

            ToolTranslateROM trans = new ToolTranslateROM();

            trans.ApplyTranslatePatch(to);

            //翻訳データがある場合は適用する.
            string translateDataFilename = SimpleTranslateToTranslateDataFilename.Text;

            if (File.Exists(translateDataFilename))
            {
                trans.ImportAllText(this, translateDataFilename);
            }

            if (from == to)
            {
                return;
            }

            //それ以外のデータの翻訳
            {
                string writeTextFileName = Path.GetTempFileName();

                trans.ExportallText(this, writeTextFileName, from, to, fromrom, torom, false, false);
                trans.ImportAllText(this, writeTextFileName);

                ToolTranslateROMFont transFont = new ToolTranslateROMFont();
                transFont.ImportFont(this, torom, true, FontAutoGenelateCheckBox.Font);

                File.Delete(writeTextFileName);
            }
            R.ShowOK("完了");
            this.Close();
        }
Ejemplo n.º 3
0
        public void ImportFont(Form self, string FontROMTextBox, bool FontAutoGenelateCheckBox, Font ttf, Undo.UndoData undodata)
        {
            ToolTranslateROMFont transFont = new ToolTranslateROMFont();

            transFont.ImportFont(self, FontROMTextBox, FontAutoGenelateCheckBox, ttf, this.Recycle, undodata);
        }