예제 #1
0
        private EExpander CreateExpander(CharacterEpisodes ep)
        {
            EExpander e = new EExpander(ep);

            e.OnAddBefore += AddBefore;
            e.OnRemove    += Remove;
            e.OnAddAfter  += OnAddAfter;
            return(e);;
        }
예제 #2
0
        private void OnAddAfter(EExpander ex)
        {
            CharacterEpisodes nep = new CharacterEpisodes();

            nep.Title = "Episode";
            int index = Character.Info.IndexOf(ex.Episode);

            Character.Info.Insert(index + 1, nep);
            x_episodesHolder.Children.Insert(index + 1, CreateExpander(nep));
        }
예제 #3
0
        private void AddBefore(EExpander ee)
        {
            CharacterEpisodes nep = new CharacterEpisodes();

            nep.Title = "Episode";
            int index = Character.Info.IndexOf(ee.Episode);

            Character.Info.Insert(index, nep);
            x_episodesHolder.Children.Insert(index, CreateExpander(nep));
        }
예제 #4
0
 private void Remove(EExpander ee)
 {
     Character.Info.Remove(ee.Episode);
     x_episodesHolder.Children.Remove(ee);
 }