private void OnPictureChooserClicked(object sender, EventArgs e) { ThumbnailViewer.UseWebViewer = _useGeckoVersion.Checked; var images = new ArtOfReadingImageCollection(); images.LoadIndex(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "ImageGallery/ArtOfReadingIndexV3_en.txt")); images.RootImagePath = RootImagePath.Text; using (var form = new PictureChooser(images, "duck")) { form.ShowDialog(); Result.Text = "Result: " + form.ChosenPath; } }
public void Setup() { _artCollection = new ArtOfReadingImageCollection(); _artCollection.LoadIndex(IndexPath); }
public static IImageCollection FromStandardLocations(string lang) { string path = TryToGetRootImageCatalogPath(); if (DoNotFindArtOfReading_Test) path = null; if (path == null) return null; var c = new ArtOfReadingImageCollection(); c.RootImagePath = path; c.GetIndexLanguages(); c.SearchLanguage = lang; // Load the index information asynchronously so as not to delay displaying // the parent dialog. Loading the file takes a second or two, but should // be done before the user finishes typing a search string. var thr = new Thread(c.LoadImageIndex); thr.Name = "LoadArtOfReadingIndex"; thr.Start(); return c; }