Esempio n. 1
0
        private void BtnExport_Click(object sender, EventArgs e)
        {
            if (multiworker != null && multiworker.IsBusy)
            {
                multiworker.CancelAsync();
            }

            try
            {
                if (File.Exists(TranslationBinFile))
                {
                    GboxTranslator.Enabled = false;
                    RunWithWorker(((o, args) =>
                    {
                        BDat bdat = new BDat();
                        bdat.ExportTranslate(TranslationBinFile, TranslationExportFile, BXML_TYPE.BXML_PLAIN, TranslateIs64);
                        GboxTranslator.Enabled = true;
                    }));
                }
                else
                {
                    MessageBox.Show(".bin not exist please extract first.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 2
0
        private void btnExportTranslate_Click(object sender, EventArgs e)
        {
            string saveFolder   = OutPathBinTranslate + (tIs64 ? @"Translation64.xml" : @"Translation.xml"); //original translation xml
            string usedfilepath = FullBinPathTranslate;                                                      //original bin file

            if (!File.Exists(usedfilepath))
            {
                MessageBox.Show("bin file not found make sure you have unpacked local file and try again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                Directory.CreateDirectory(OutPathBinTranslate);
                // Console.WriteLine("\rMerging translation...");
                RunWithWorker(((o, args) =>
                {
                    //BackgroundWorker backgroundWorker = o as BackgroundWorker;
                    BDat bdat = new BDat();
                    bdat.ExportTranslate(usedfilepath, saveFolder, BXML_TYPE.BXML_PLAIN, tIs64);
                }));
            }
        }
Esempio n. 3
0
        void SourceExport(object sender, EventArgs e)
        {
            BDat bdat = new BDat();

            bdat.ExportTranslate(SourceBinFile, SourceMergeFile, BXML_TYPE.BXML_PLAIN, tIs64);
        }
Esempio n. 4
0
        private void TargetExport(object sender, EventArgs e)
        {
            BDat bdat = new BDat();

            bdat.ExportTranslate(TargetBinFile, TargetMergeFile, BXML_TYPE.BXML_PLAIN, tIs64);
        }