int IComparable <EpisodeData> .CompareTo(EpisodeData other) { if (other == null) { return(1); } var compare = SortName.CompareTo(other.SortName); if (compare == 0) { compare = SeasonNumber.PadLeft(2, '0').CompareTo(other.SeasonNumber.PadLeft(2, '0')); } if (compare == 0) { compare = EpisodeNumber.CompareTo(other.EpisodeNumber); } if (compare == 0) { compare = AddInfo.CompareTo(other.AddInfo); } return(compare); }
public int CompareTo(AnimeGroupVM obj) { switch (SortMethod) { case AnimeGroupSortMethod.SortName: return(SortName.CompareTo(obj.SortName)); case AnimeGroupSortMethod.IsFave: return(IsFave.CompareTo(obj.IsFave)); default: return(SortName.CompareTo(obj.SortName)); } }
public int CompareTo(AnimeSeriesVM obj) { switch (SortType) { case SortMethod.SortName: return(SortName.CompareTo(obj.SortName)); case SortMethod.AirDate: if (AniDB_Anime.AirDate.HasValue && obj.AniDB_Anime.AirDate.HasValue) { return(AniDB_Anime.AirDate.Value.CompareTo(obj.AniDB_Anime.AirDate.Value)); } else { return(0); } default: return(SortName.CompareTo(obj.SortName)); } }
public int CompareTo(Contract_AnimeGroup obj) { return(SortName.CompareTo(obj.SortName)); }
public int CompareTo(AnimeGroupVM obj) { return(SortName.CompareTo(obj.SortName)); }