示例#1
0
 public void UpdateWithSeasonData(SeasonalAnimeData data)
 {
     GlobalScore = data.Score;
     Airing      = data.AirDay >= 0;
     if (!Auth)
     {
         UpdateButtonsVisibility = Visibility.Collapsed;
         _seasonalState          = true;
     }
     RaisePropertyChanged(() => MyEpisodesBind);
 }
示例#2
0
 //three constructors depending on original init
 public AnimeItemAbstraction(SeasonalAnimeData data, bool anime) : this(null, data.Id)
 {
     _seasonalData   = data;
     Index           = data.Index;
     RepresentsAnime = anime;
     if (!int.TryParse(data.Episodes, out var eps))
     {
         eps = 0;
     }
     AllEpisodes = eps;
 }
示例#3
0
 public void UpdateWithSeasonData(SeasonalAnimeData data, bool updateScore)
 {
     if (updateScore)
     {
         GlobalScore = data.Score;
     }
     Airing = data.AirDay >= 0;
     if (!Auth)
     {
         UpdateButtonsVisibility = false;
         _seasonalState          = true;
     }
     RaisePropertyChanged(() => MyEpisodesBind);
 }
示例#4
0
        public AnimeItemViewModel(SeasonalAnimeData data,
                                  AnimeItemAbstraction parent) : this(data.ImgUrl, data.Id, parent)
            //We are loading an item that is NOT on the list and is seasonal
        {
            _seasonalState = true;

            Title       = data.Title;
            MyScore     = 0;
            MyStatus    = (int)AnimeStatus.AllOrAiring;
            GlobalScore = data.Score;
            int.TryParse(data.Episodes, out _allEpisodes);
            Airing = ParentAbstraction.AirDay >= 0;
            SetAuthStatus(false, true);
            AdjustIncrementButtonsVisibility();
            ShowMoreVisibility = Visibility.Collapsed;
        }