Exemplo n.º 1
0
        public ISelectSeason GetNextSeason(ISelectSeason selectedSeason, ObservableCollection <ISelectSeason> seasonList)
        {
            if (selectedSeason == null)
            {
                selectedSeason = seasonList[0];
            }
            else
            {
                int index = seasonList.IndexOf(selectedSeason);
                selectedSeason = index > 0 ? seasonList[--index] : seasonList.First();
            }

            return(selectedSeason);
        }
Exemplo n.º 2
0
        public ISelectSeason GetPreviousSeason(ISelectSeason selectedSeason, ObservableCollection <ISelectSeason> seasonList)
        {
            if (selectedSeason == null)
            {
                selectedSeason = seasonList[0];
            }
            else
            {
                int index = seasonList.IndexOf(selectedSeason);
                selectedSeason = index < seasonList.Count - 1 ? seasonList[++index] : seasonList.Last();
            }

            return(selectedSeason);
        }
Exemplo n.º 3
0
 public void LoadSeasons(ObservableCollection <ISeasonExpander> seasonExpanders, ISelectSeason selectedSeason, Action <int> setMaxProgress)
 {
     animeJob.LoadSeasons(seasonExpanders, selectedSeason, setMaxProgress);
 }