public bool BrowseForFolder() { if (m_sites.Count == 0) return false; BrowseDialog dlg = new BrowseDialog(); dlg.Filters = m_filter; for(int i = 0; i < m_sites.Count; ++i) { dlg.AddKnownSite(m_sites.GetUrl(i), m_sites.GetDescription(i)); } dlg.Mode = BrowseDialog.DialogMode.OpenLocation; dlg.ShowDialog(); if (dlg.DialogResult != DialogResult.OK) return false; m_fileUrl = dlg.FileUrl; return true; }
private Browser.BrowseDialog CreateBrowseDialog(Browser.BrowseDialog.DialogMode mode, string filter, Repository defaultRepository) { Logger.LogDebug("defaultRepository: " + defaultRepository.DefaultLibraryUrl); Browser.BrowseDialog dlg = new Browser.BrowseDialog(defaultRepository.DefaultLibraryUrl); dlg.Filters = filter; dlg.Mode = mode; // add sites to known sites combo foreach (Repository repository in this.repositories.Values) { foreach (string site in repository.Sites) { dlg.AddKnownSite(site, site); } } return dlg; }