Пример #1
0
        private void TranslateButton_Click(object sender, EventArgs e)
        {
            string lang = U.SelectValueComboboxText(toLang.Text);

            if (lang == "auto" || lang == "ja" || lang == "")
            {
                R.ShowStopError("翻訳言語を指定してください。\r\njaとautoは選択できません。");
                return;
            }
            string path = SelectSourceCodeDirectory();

            if (path == "")
            {
                return;
            }
            if (InputFormRef.IsPleaseWaitDialog(this))
            {//2重割り込み禁止
                return;
            }

            using (InputFormRef.AutoPleaseWait pleaseWait = new InputFormRef.AutoPleaseWait(this))
            {
                MyTranslateBuild t = new MyTranslateBuild(lang, TranslateCheckBox.Checked);
                t.ScanPatch();
                t.ScanMOD();
                t.ScanData();
                t.ScanCS(path);
            }

            R.ShowWarning("翻訳完了。ツールを再起動してください。");
        }
Пример #2
0
        private void DesignStringReverseButton_Click(object sender, EventArgs e)
        {
            string lang = U.SelectValueComboboxText(toLang2.Text);

            if (lang == "auto" || lang == "ja" || lang == "")
            {
                R.ShowStopError("翻訳言語を指定してください。\r\njaとautoは選択できません。");
                return;
            }

            string path = SelectSourceCodeDirectory();

            if (path == "")
            {
                return;
            }
            if (InputFormRef.IsPleaseWaitDialog(this))
            {//2重割り込み禁止
                return;
            }

            using (InputFormRef.AutoPleaseWait pleaseWait = new InputFormRef.AutoPleaseWait(this))
            {
                MyTranslateBuild t = new MyTranslateBuild(lang);
                t.DesignStringReverse(path);
            }
        }
Пример #3
0
        public static void CommandLineTranslateOnly()
        {
            StackFrame sf   = new StackFrame(1, true);
            string     path = Path.GetDirectoryName(sf.GetFileName());

            Debug.Assert(path != "");

            {//英語
                string           lang = "en";
                MyTranslateBuild t    = new MyTranslateBuild(lang, false);
                t.ScanPatch();
                t.ScanMOD();
                t.ScanData();
                t.ScanCS(path);
            }
            {//中国語
                string           lang = "zh";
                MyTranslateBuild t    = new MyTranslateBuild(lang, false);
                t.ScanPatch();
                t.ScanMOD();
                t.ScanData();
                t.ScanCS(path);
            }
        }