static void GenerateDebug(string filename) { try { PesFile.PesFile design = new PesFile.PesFile(filename); design.SaveDebugInfo(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
private void saveDebugInfoToolStripMenuItem_Click(object sender, EventArgs e) { if (design != null) { try { string debugFile = design.SaveDebugInfo(); MessageBox.Show(String.Format(translation.GetTranslatedString(Translation.StringID.DEBUG_INFO_SAVED), // "Saved debug info to " + debugFile debugFile)); } catch (Exception ex) { MessageBox.Show(translation.GetTranslatedString(Translation.StringID.ERROR_DEBUG) + // "There was an error while saving debug info:" Environment.NewLine + ex.ToString()); } } else { MessageBox.Show(translation.GetTranslatedString(Translation.StringID.NO_DESIGN)); // "No design loaded." } }