public void OkDialog() { string message; if (Source == SpectralLibrarySource.file) { string path = textFilePath.Text; message = ValidateSpectralLibraryPath(path); if (message != null) { MessageDlg.Show(this, message); textFilePath.Focus(); return; } } var librarySpec = Library; if (librarySpec == null) { MessageDlg.Show(this, Resources.ImportIonMobilityFromSpectralLibrary_OkDialog_Please_choose_the_library_you_would_like_to_add_); return; } // Have we got everything we need to populate the caller's grid view? message = _gridViewDriver.ImportFromSpectralLibrary(librarySpec, _existing); if (message == null) { DialogResult = DialogResult.OK; } else { MessageDlg.Show(this, message); } }
public void OkDialog() { string message; if (Source == SpectralLibrarySource.file) { string path = textFilePath.Text; message = ValidateSpectralLibraryPath(path); if (message != null) { MessageDlg.Show(this, message); textFilePath.Focus(); return; } } var librarySpec = Library; if (librarySpec == null) { MessageDlg.Show(this, Resources.ImportIonMobilityFromSpectralLibrary_OkDialog_Please_choose_the_library_you_would_like_to_add_); return; } var table = new ChargeRegressionTable(gridRegression); var chargeRegressionLinesList = table.GetTableChargeRegressionLines(); if (chargeRegressionLinesList == null) // Some error detected in the charged regression lines table { return; } ChargeRegressionsLines = chargeRegressionLinesList.ToDictionary(x => x.Charge, x => x.RegressionLine); // Have we got everything we need to populate the caller's grid view? message = _gridViewDriver.ImportFromSpectralLibrary(librarySpec, ChargeRegressionsLines); if (message == null) { DialogResult = DialogResult.OK; } else { MessageDlg.Show(this, message); } }
public void ImportFromSpectralLibrary() { CheckDisposed(); _gridViewLibraryDriver.ImportFromSpectralLibrary(); }