Esempio n. 1
0
        public async Task CreateMovieAsync(Library library)
        {
            Ensure.NotNull(library, "library");
            if (movieEdit == null)
            {
                movieEdit         = new MovieEditWindow(this, changeTracker, library, null);
                movieEdit.Closed += OnMovieEditClosed;
                StartupLocation(movieEdit);
                movieEdit.Show();
            }

            movieEdit.Activate();
        }
Esempio n. 2
0
        public async Task EditMovieAsync(Library library, IKey movieKey)
        {
            Ensure.NotNull(library, "library");
            Ensure.Condition.NotEmptyKey(movieKey);

            if (movieEdit == null)
            {
                movieEdit         = new MovieEditWindow(this, changeTracker, library, library.Movies.FindByKey(movieKey));
                movieEdit.Closed += OnMovieEditClosed;
                StartupLocation(movieEdit);
                movieEdit.Show();
            }

            movieEdit.Activate();
        }
Esempio n. 3
0
 private void OnMovieEditClosed(object sender, EventArgs e)
 {
     movieEdit.Closed -= OnMovieEditClosed;
     movieEdit         = null;
 }