Beispiel #1
0
        /// <summary>
        /// The replace movie.
        /// </summary>
        /// <param name="movieModel">
        /// The movie model.
        /// </param>
        public static void ReplaceMovie(MovieModel movieModel)
        {
            MovieModel getMovieInDatabase =
                (from m in MovieDatabase where m.MovieUniqueId == movieModel.MovieUniqueId select m).SingleOrDefault();

            int index = MovieDatabase.IndexOf(getMovieInDatabase);

            movieModel.IsBusy    = false;
            MovieDatabase[index] = movieModel;

            if (movieModel.MovieUniqueId == currentMovie.MovieUniqueId)
            {
                SetCurrentMovie(movieModel);
                InvokeCurrentMovieChanged(new EventArgs());
            }
        }