/// <summary> /// Takes the scraped text and displays it in a quick read format one word at a time at varying speeds. /// </summary> /// <returns></returns> public void SpeedRead() { Grabber grabber = new Grabber(); //1.)Take what is in the output file and display it one word at a time in the richTextBox string[] lines = File.ReadAllLines(@"Z:\code\Miscellaneous Projects\Grabber\Grabber\test.txt"); foreach (string line in lines) { } //string[] lines = textFromFile.Split(new [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); //2.)Varying speeds of how fast each word is shown }
public static bool GetCoverartFromMovie(string fileName, string outputThumbName, Grabber.GrabUtil.ArtworkThumbMode CoverType, bool createIndividualShots, bool keepMainImage, int snapshotPosition) { if (fileName.Contains("VIDEO_TS\\VIDEO_TS.IFO") || !System.IO.File.Exists(fileName)) // Do not try to create thumbnails for DVDs or nonexisting media files return false; bool success = false; string ar = ""; int columns = 2; int rows = 4; double arValue = 0; string Type = "Cover"; var mediainfo = new MediaInfo(); mediainfo.Open(fileName); ar = mediainfo.VideoAspectRatio ?? ""; mediainfo.Close(); try { arValue = Double.Parse(ar, System.Globalization.CultureInfo.InvariantCulture.NumberFormat); } catch (Exception) { } switch (CoverType) { case Grabber.GrabUtil.ArtworkThumbMode.Cover: Type = "Cover"; if (arValue < 1.4) // 4:3 { columns = 2; rows = 4; } else if (arValue < 1.9) // 16:9 { columns = 2; rows = 5; } else if (arValue >= 1.9) // cinemascope { columns = 2; rows = 6; } break; case Grabber.GrabUtil.ArtworkThumbMode.Fanart: Type = "Fanart"; if (arValue < 1.4) // 4:3 { columns = 4; rows = 3; } else if (arValue < 1.9) // 16:9 { columns = 4; rows = 4; } else if (arValue >= 1.9) // cinemascope { columns = 3; rows = 4; } break; case Grabber.GrabUtil.ArtworkThumbMode.MovieThumbs: Type = "Fanart"; columns = 4; rows = 4; break; default: break; } try { success = ThumbCreator.CreateVideoThumbForAmCupdater(fileName, outputThumbName, false, columns, rows, Type, createIndividualShots, keepMainImage, snapshotPosition); } catch (Exception) { //LogMyFilms.Error("Could not create thumbnail for {0}", MovieFile); //LogMyFilms.Error(ex); } return success; }