Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
 public cd.IAnime WithRoot(cd.IRoot root)
 {
     Root = root;
     return this;
 }
Exemplo n.º 3
0
 void MoveAnimeTo(cd.Categories cat)
 {
     if (Root.SelectedCategory != cat) {
         cd.Anime.Move (cat, SelectedAnime);
         animesArrayController.RemoveObject (SelectedAnime);
     }
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 public Event(cd.Events.IEvent evt)
 {
     _event = evt;
     ImagePath = EventImageLoader.ImagePathFor (evt);
 }