public static string ImagePathFor(cd.Events.IEvent evt) { string path = "Events/info"; try { path = _resources[evt.GetType()]; } catch (KeyNotFoundException) { // nothing } if (evt.Watched) { path += "-gray"; } return NSBundle.MainBundle.PathForResource (path, "png"); }
public cd.IAnime WithRoot(cd.IRoot root) { Root = root; return this; }
void MoveAnimeTo(cd.Categories cat) { if (Root.SelectedCategory != cat) { cd.Anime.Move (cat, SelectedAnime); animesArrayController.RemoveObject (SelectedAnime); } }
void LoadAnimes(cd.Categories cat) { var animes = cd.Anime.Find<ViewModel.Anime> (cat).Select (a => (ViewModel.Anime)a.WithRoot (Root)); animesArrayController.SetItems (animes); Root.SelectedCategory = cat; }
public Event(cd.Events.IEvent evt) { _event = evt; ImagePath = EventImageLoader.ImagePathFor (evt); }