private void GenerateData_SaveGenerationInfoButton_Click(object sender, EventArgs e) { using (var dialog = DialogEx.SaveFile("Generation info files (*.wsdgeninfo)|*.wsdgeninfo", ".wsdgeninfo")) { var result = dialog.ShowDialog(this); if (result == DialogResult.OK) { SystemJsonWriter.Write(dialog.FileName, _generationInfo); RefreshUI(true); MessageBox.Show("Generation info saved successfully.", "Success"); } } }