コード例 #1
0
        void OnCastListControlCastEntryAdded(Object sender
                                             , AddedEventArgs e)
        {
            m_Episode.CastList.Add((CastMember)(e.NewCastEntry));

            CastListControl.CastListView.Roots = m_Episode.CastList;
            CastListControl.CastListView.RebuildAll(true);
        }
コード例 #2
0
        void OnCastListControlCastEntryAdded(Object sender
                                             , AddedEventArgs e)
        {
            m_RootElements.Add(e.NewCastEntry);

            CastListControl.CastListView.Roots = m_RootElements;
            CastListControl.CastListView.RebuildAll(true);
        }
コード例 #3
0
        private void AddEpisodeButton_Click(object sender, EventArgs e)
        {
            Episode episode;

            episode     = new Episode();
            episode.Upc = Upc;
            using (EditEpisodeForm form = new EditEpisodeForm(episode))
            {
                form.ShowDialog();
                if (form.DialogResult == DialogResult.OK)
                {
                    if (CastEntryAdded != null)
                    {
                        AddedEventArgs eventArgs;

                        eventArgs = new AddedEventArgs(episode);
                        CastEntryAdded(this, eventArgs);
                    }
                }
            }
        }
コード例 #4
0
        private void OnAddCastButtonClick(Object sender
                                          , EventArgs e)
        {
            CastMember castMember = new CastMember();

            castMember.Upc            = Upc;
            castMember.DatabaseCastId = -1;

            using (EditCastForm editCastForm = new EditCastForm(castMember))
            {
                editCastForm.ShowDialog();

                if (editCastForm.DialogResult == DialogResult.OK)
                {
                    if (CastEntryAdded != null)
                    {
                        AddedEventArgs eventArgs = new AddedEventArgs(castMember);

                        CastEntryAdded(this, eventArgs);
                    }
                }
            }
        }