コード例 #1
0
        public void Add()
        {
            AddorEdit addDialog = new AddorEdit(null);

            if (addDialog.ShowDialog() == true)
            {
                movies.Add(addDialog.Movie);
            }
        }
コード例 #2
0
        public void Edit()
        {
            if (selectedMovie == null)
            {
                MessageBox.Show("Nothing is selected", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            else
            {
                var selectedMovie = this.selectedMovie;
                var editDialog    = new AddorEdit(selectedMovie);

                if (editDialog.ShowDialog() == true)
                {
                }
            }
        }