Exemplo n.º 1
0
        private void HandlePopulate(object sender, EventArgs e)
        {
            MovieListForm watched = sender as MovieListForm;

            Movie = new MovieInfo();
            Movie = watched.MovieSelected;
        }
Exemplo n.º 2
0
        private void displayListsToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            MovieListForm listForm = new MovieListForm();


            if (listForm != null && displayListsToolStripMenuItem.Checked == true)
            {
            }
            else if (displayListsToolStripMenuItem.Checked == false && watched.Count > 0 || notWatched.Count > 0)
            {
                //below subcribes to the relavent event handlers
                listForm.Load += LoadList;

                //  listForm.Load += listForm.FillListBox;
                AddToListBox += listForm.FillListBox;

                AddToListBox += listForm.FillListNotWatched;
                // AddNotWatched += listForm.FillListNotWatched;
                listForm.PopulateInputForm += HandlePopulate;



                listForm.Show();
                displayListsToolStripMenuItem.Checked = true;
            }
            else
            {
                MessageBox.Show("Please add movies before displaying list");
            }
        }