private void mnuRestore_Click(object sender, EventArgs e) { BioSeqRestore frm = new BioSeqRestore(txtVersions.Text.Trim()); DialogResult rc = frm.ShowDialog(); if (rc == DialogResult.OK) // then the config has the specs { Cursor.Current = Cursors.WaitCursor; WSLProxyResponse WSLResponse = ServiceCallHelper.RestoreDatabase(AppConfigHelper.LoggedOnUser, AppConfigHelper.JsonConfig()); // Parameters are in appsettings. ServiceCallHelper.LoadConfig(AppConfigHelper.LoggedOnUser); // To retrieve StandardOutput and LastError. Cursor.Current = Cursors.Default; if (WSLResponse.ExitCode == 0) { ReloadSampleIDs(); // Reload list without sample ID. MessageBox.Show(AppConfigHelper.StandardOutput + Environment.NewLine + "Restore successfully completed.", "Success", MessageBoxButtons.OK); } else { MessageBox.Show("Restore completed with error code " + WSLResponse.ExitCode.ToString() + "." + Environment.NewLine + Environment.NewLine + AppConfigHelper.StandardOutput + Environment.NewLine + AppConfigHelper.LastError, "Error", MessageBoxButtons.OK); } } }