Bloom.CollectionChoosing.OpenCreateCloneControl.OnBrowseForExistingLibraryClick C# (CSharp) Method

OnBrowseForExistingLibraryClick() private method

private OnBrowseForExistingLibraryClick ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void OnBrowseForExistingLibraryClick(object sender, EventArgs e)
        {
            if (!Directory.Exists(NewCollectionWizard.DefaultParentDirectoryForCollections))
            {
                Directory.CreateDirectory(NewCollectionWizard.DefaultParentDirectoryForCollections);
            }

            using (var dlg = new OpenFileDialog())
            {
                dlg.Title = "Open Collection";

                dlg.Filter = _filterString;
                dlg.InitialDirectory = NewCollectionWizard.DefaultParentDirectoryForCollections;
                dlg.CheckFileExists = true;
                dlg.CheckPathExists = true;
                if (dlg.ShowDialog(this) == DialogResult.Cancel)
                    return;

                SelectCollectionAndClose(dlg.FileName);
            }
        }