Пример #1
0
        public void RemoveWatch(string imdbid)
        {
            WatchSeries delseries = WatchXml.Series.First(x => x.Imdbid == imdbid);

            WatchXml.Series.Remove(delseries);
            WatchXml.SerializeToFile(XmlFile.FullName);
        }
Пример #2
0
        public void AddWatch(Show show)
        {
            int TotalSeasons = show.Seasons.Max(x => x.SeasonNumber);
            int newId        = WatchXml.Series.OrderByDescending(x => x.Id).Select(x => x.Id).FirstOrDefault();

            newId++;
            WatchSeries showS = new WatchSeries(show);

            WatchXml.Series.Add(showS);
            WatchXml.SerializeToFile(XmlFile.FullName);
        }