private void BackupBtn_Click(object sender, RoutedEventArgs e) { log.Debug("TubeRecipePage:BackupBtn_Click"); //save recipe data from PLC to DB or File var saveFileDialog = new Microsoft.Win32.SaveFileDialog() { Filter = "Recipe Data Files (*.rcd)|*.rcd" }; saveFileDialog.Title = "Save a Recipe Data File"; var result = saveFileDialog.ShowDialog(); if (result == true) { bool startBackup = mController.BackupRecipe(saveFileDialog.FileName, mSelectedTube, OnBackupRecipeComplete); if (startBackup) { mProgressDlg.ShowDialog(); } } }