Example #1
0
        private void SetCharacterProperties(CL_AniDB_Character aniChar, VM_AniDB_Anime anime = null)
        {
            SetGUIProperty(GuiProperty.Actors_Character_Name, aniChar.CharName);
            SetGUIProperty(GuiProperty.Actors_Character_KanjiName, aniChar.CharKanjiName);
            SetGUIProperty(GuiProperty.Actors_Character_Description, aniChar.CharDescription);
            SetGUIProperty(GuiProperty.Actors_Character_CharType, aniChar.CharType);

            string imagePath = GUIGraphicsContext.Skin + @"\Media\MyAnime3\anime3_blankchar.png";

            if (File.Exists(aniChar.GetPosterPath()))
            {
                imagePath = aniChar.GetPosterPath();
            }

            SetGUIProperty(GuiProperty.Actors_Character_Poster, imagePath);

            if (anime != null)
            {
                SetGUIProperty(GuiProperty.Actors_Series_Title, anime.FormattedTitle);
                SetGUIProperty(GuiProperty.Actors_Series_Poster,
                               ImageAllocator.GetAnimeImageAsFileName(anime, GUIFacadeControl.Layout.List));
            }
            else
            {
                ClearGUIProperty(GuiProperty.Actors_Series_Title);
                ClearGUIProperty(GuiProperty.Actors_Series_Poster);
            }
        }
Example #2
0
        private void SetCharacterProperties(AniDB_CharacterVM aniChar)
        {
            clearGUIProperty("Character.Name");
            clearGUIProperty("Character.KanjiName");
            clearGUIProperty("Character.Description");
            clearGUIProperty("Character.CharType");
            clearGUIProperty("Character.Poster");
            clearGUIProperty("Series.Poster");
            clearGUIProperty("Series.Title");

            setGUIProperty("Character.Name", aniChar.CharName);
            setGUIProperty("Character.KanjiName", aniChar.CharKanjiName);
            setGUIProperty("Character.Description", aniChar.CharDescription);
            setGUIProperty("Character.CharType", aniChar.CharType);

            string imagePath = GUIGraphicsContext.Skin + @"\Media\MyAnime3\anime3_blankchar.png";

            if (File.Exists(aniChar.PosterPath))
            {
                imagePath = aniChar.PosterPath;
            }

            setGUIProperty("Character.Poster", imagePath);

            if (aniChar.Anime != null)
            {
                setGUIProperty("Series.Title", aniChar.Anime.FormattedTitle);
                setGUIProperty("Series.Poster", ImageAllocator.GetAnimeImageAsFileName(aniChar.Anime, GUIFacadeControl.Layout.List));
            }
        }