private void BtnTranslate_Click(object sender, EventArgs e) { if (multiworker != null && multiworker.IsBusy) { multiworker.CancelAsync(); } try { if (File.Exists(TranslationTargetFile)) { GboxTranslator.Enabled = false; RunWithWorker(((o, args) => { //BackgroundWorker backgroundWorker = o as BackgroundWorker; BDat bdat = new BDat(); bdat.Translate(TranslateRepackPath, TranslationTargetFile, TranslateIs64); GboxTranslator.Enabled = true; })); } else { MessageBox.Show("Translation files not exist please select source and merge files first.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void btn_Translate_Click(object sender, EventArgs e) { string local = DatPathTranslate; //extracetd local folder string xml = OutPathBinTranslate + (tIs64 ? @"Translation64.xml" : @"Translation.xml"); //translated xml if (!File.Exists(xml)) { MessageBox.Show("Original translation.xml file not found make sure you have unpacked local file and try again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (!Directory.Exists(local)) { MessageBox.Show("Unpacked local files not found make sure you have unpacked it and try again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { RunWithWorker(((o, args) => { BDat bdat = new BDat(); bdat.Translate(local, xml, tIs64); })); } }
void TranslateFile(object sender, EventArgs e) { BDat bdat = new BDat(); bdat.Translate(TargetlocaldatPath, TargetMergeFile, tIs64); }