Ejemplo n.º 1
0
        private void CastListControl_Load(object sender, EventArgs e)
        {
            CastIdColumn.Renderer = new MappedImageRenderer(new Object[] { "check", GridResources.tick16, "newid", GridResources.star16 });

            CastIdColumn.AspectGetter = (row =>
            {
                CastEntry entry = (CastEntry)row;

                if (String.IsNullOrEmpty(entry.CastId) == false)
                {
                    if (entry.CastId.StartsWith(NewId))
                    {
                        return("newid");
                    }

                    return("check");
                }
                else
                {
                    return(null);
                }
            }
                                         );

            CastListView.CanExpandGetter = (castEntry =>
            {
                Episode episode = castEntry as Episode;

                if (episode != null)
                {
                    return(episode.CastList?.Count > 0);
                }

                return(false);
            }
                                            );

            CastListView.ChildrenGetter = (castEntry => ((Episode)castEntry).CastList);

            if (ShowAddEpisodeButton == false)
            {
                AddEpisodeButton.Enabled = false;
            }
        }
Ejemplo n.º 2
0
 public AddedEventArgs(CastEntry newCastEntry)
 {
     NewCastEntry = newCastEntry;
 }