private void ListItem_Click(object sender, EventArgs e)
        {
            Program      app          = Program.GetInstance();
            MovieService movieService = app.GetService <MovieService>("movies");

            // Get the clicked item
            ListViewItem item = container.SelectedItems[0];

            if (item == null)
            {
                GuiHelper.ShowError("Geen item geselecteerd");
                return;
            }

            // Find the movie
            int   id    = (int)item.Tag;
            Movie movie = movieService.GetMovieById(id);

            if (movie == null)
            {
                GuiHelper.ShowError("Kon geen film vinden voor dit item");
                return;
            }

            // Show screen
            MovieDetailUser movieDetailUser = app.GetScreen <MovieDetailUser>("movieDetailUser");

            movieDetailUser.SetMovie(movie);
            app.ShowScreen(movieDetailUser);
        }
        private void cancelButton_Click(object sender, EventArgs e)
        {
            Program         app        = Program.GetInstance();
            MovieDetailUser editScreen = app.GetScreen <MovieDetailUser>("movieDetailUser");

            app.ShowScreen(editScreen);
        }
예제 #3
0
        private void CancelButton_Click(object sender, EventArgs e)
        {
            Program         app             = Program.GetInstance();
            MovieDetailUser movieDetailUser = app.GetScreen <MovieDetailUser>("movieDetailUser");

            movieDetailUser.SetMovie(show.GetMovie());
            app.ShowScreen(movieDetailUser);
        }