override public void Execute(object parameter) { new GoogleSearch().findInGoogle(main.SelectedWrapper._seriesName + " S" + main.SelectedWrapper._episode.SeasonNumber + "E" + main.SelectedWrapper._episode.EpisodeNumber); //Oznacza epizod jak obejrzany new UpdateDataBase().SetWatched(main.SelectedWrapper._episode._id, true); //Usuwa epizod z listy main.WrapperList.Remove(main.SelectedWrapper); //Dodaje kolejny epizod if (!main.ShowAll) { Wrapper w = new Wrapper(new ReadFromDataBase().GetLastAvaiableEpisode(main.SelectedWrapper._seriesID), main.SelectedWrapper._banner, main.SelectedWrapper._seriesName, main.SelectedWrapper.ShowBanner, main.SelectedWrapper._rating, main.SelectedWrapper._seriesID); if (w._episode != null) { main.WrapperList.Add(w); main._lastAdded = w; } } //Zapisuje usuniety epizod, oznacza, co zostało dodane (zeby móc cofnąć akcję) main._selected = false; main._undo = true; main._undoWrapper = main.SelectedWrapper; main.reloadWrapperList(); }
override public void Execute(object parameter) { new UpdateDataBase().SetWatched(main.SelectedWrapper._episode._id, true); main.WrapperList.Remove(main.SelectedWrapper); ReadFromDataBase RD = new ReadFromDataBase(); if (!main.ShowAll) { Wrapper w = new Wrapper(RD.GetLastAvaiableEpisode(main.SelectedWrapper._seriesID), main.SelectedWrapper._banner, main.SelectedWrapper._seriesName, main.SelectedWrapper.ShowBanner, main.SelectedWrapper._rating, main.SelectedWrapper._seriesID); if (w._episode != null) { main.WrapperList.Add(w); main._lastAdded = w; } } main._selected = false; main._undo = true; main._undoWrapper = main.SelectedWrapper; main.reloadWrapperList(); }
override public void Execute(object parameter) { new UpdateDataBase().SetWatched(main._undoWrapper._episode._id, false); main.WrapperList.Remove(main._lastAdded); main.WrapperList.Add(main._undoWrapper); main._undo = false; main.reloadWrapperList(); }