public void ShowDialog(FamiStudioForm parentForm) { if (dialog.ShowDialog(parentForm) == DialogResult.OK) { dialog.Hide(); Export(parentForm, false); lastExportCrc = lastExportFilename != null?ComputeProjectCrc(project) : 0; } }
public void ShowDialog(FamiStudioForm parentForm) { if (dialog.ShowDialog(parentForm) == DialogResult.OK) { dialog.Hide(); var dlgLog = new LogProgressDialog(parentForm); using (var scopedLog = new ScopedLogOutput(dlgLog, LogSeverity.Info)) { var selectedFormat = (ExportFormat)dialog.SelectedIndex; switch (selectedFormat) { case ExportFormat.WavMp3: ExportWavMp3(); break; case ExportFormat.Video: ExportVideo(); break; case ExportFormat.Nsf: ExportNsf(); break; case ExportFormat.Rom: ExportRom(); break; case ExportFormat.Text: ExportText(); break; case ExportFormat.FamiTracker: ExportFamiTracker(); break; case ExportFormat.FamiTone2Music: ExportFamiTone2Music(false); break; case ExportFormat.FamiStudioMusic: ExportFamiTone2Music(true); break; case ExportFormat.FamiTone2Sfx: ExportFamiTone2Sfx(false); break; case ExportFormat.FamiStudioSfx: ExportFamiTone2Sfx(true); break; } if (dlgLog.HasMessages) { Log.LogMessage(LogSeverity.Info, "Done!"); Log.ReportProgress(1.0f); } dlgLog.StayModalUntilClosed(); } } }