private void createTraToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog openExeDialog = new OpenFileDialog(); openExeDialog.Title = "Game EXE for Translation"; openExeDialog.Filter = "AGS EXE File (*.exe)|*.exe"; OpenFileDialog openDialog = new OpenFileDialog(); openDialog.Filter = "TRS Translation File (*.trs)|*.trs"; openDialog.Title = "Open TRS Translation you want to use."; SaveFileDialog saveDialog = new SaveFileDialog(); saveDialog.DefaultExt = "tra"; saveDialog.Filter = "TRA Translation File (*.tra)|*.tra"; saveDialog.Title = "Save TRA Translation as..."; if (openExeDialog.ShowDialog() == DialogResult.OK) { AgsTranslation.Gameinfo info = AgsTranslation.GetGameInfo(openExeDialog.FileName); if (openDialog.ShowDialog() == DialogResult.OK) { if (saveDialog.ShowDialog() == DialogResult.OK) { AgsTranslation.CreateTraFile(info, saveDialog.FileName, AgsTranslation.ParseTrsTranslation(openDialog.FileName)); } } } }
private void getGameInfoToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog openDialog = new OpenFileDialog(); openDialog.Filter = "Game EXE File (*.exe)|*.exe"; if (openDialog.ShowDialog() == DialogResult.OK) { AgsTranslation.Gameinfo gameinfo = new AgsTranslation.Gameinfo(); gameinfo = AgsTranslation.GetGameInfo(openDialog.FileName); MessageBox.Show( "AGS Version: " + gameinfo.Version + "\nGame Title: " + gameinfo.GameTitle + "\nGameUID: " + gameinfo.GameUID, "Game Information"); } }