public void ShowBuildLibraryDlg()
        {
            CheckDisposed();

            // Libraries built for full-scan filtering can have important retention time information,
            // and the redundant libraries are more likely to be desirable for showing spectra.
            bool isFullScanEnabled = _parent.DocumentUI.Settings.TransitionSettings.FullScan.IsEnabled;
            using (var dlg = new BuildLibraryDlg(_parent) {LibraryKeepRedundant = isFullScanEnabled})
            {
                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    _libraryManager.BuildLibrary(_parent, dlg.Builder, _parent.LibraryBuildCompleteCallback);

                    Settings.Default.SpectralLibraryList.Add(dlg.Builder.LibrarySpec);
                    _driverLibrary.LoadList();
                }
            }
        }
 private void TestAddPaths(BuildLibraryDlg buildLibraryDlg, string[] paths, bool error)
 {
     RunDlg<AddPathsDlg>(buildLibraryDlg.ShowAddPathsDlg, addPathsDlg =>
         {
             addPathsDlg.FileNames = paths;
             if (error)
             {
                 string errorMsg = addPathsDlg.CheckForError();
                 Assert.AreNotEqual(string.Empty, errorMsg);
             }
             addPathsDlg.CancelDialog();
         });
 }