private static void LoadSlides(string url) { try { string[] lines = File.ReadAllLines(url); for (int i = 0; i < lines.Length; i++) { string[] spec = lines[i].Split(' '); int id = int.Parse(spec[0]); bool isHorizontal = spec[1].Equals("H"); if (isHorizontal) { int pid = int.Parse(spec[2]); slideShow.CreateSlide(id, pid); } else { int pid1 = int.Parse(spec[2]); int pid2 = int.Parse(spec[3]); slideShow.CreateSlide(id, pid1, pid2); } } } catch (Exception ex) { Console.Error.WriteLine(ex); } }