コード例 #1
0
ファイル: BookFormVM.cs プロジェクト: ssjda-ddi/EDO
        public BookVM EditBookExternalTest(BookVM targetBook)
        {
            if (targetBook == null)
            {
                return(null);
            }
            EditBookWindowVM vm = new EditBookWindowVM(targetBook.Book)
            {
                Parent = this
            };

            vm.Init(null);
            EditBookWindow window  = new EditBookWindow(vm);
            BookVM         newBook = null;

            if (window.ShowDialog() == true)
            {
                newBook = new BookVM(vm.Book)
                {
                    Parent = this
                };
            }
            window.Content = null;
            return(newBook);
        }
コード例 #2
0
ファイル: BookFormVM.cs プロジェクト: ssjda-ddi/EDO
        private BookVM AddOrEditBook(Book book, BookRelation relation)
        {
            EditBookWindowVM vm = new EditBookWindowVM(book)
            {
                Parent = this
            };

            vm.Init(relation);
            EditBookWindow window = new EditBookWindow(vm);

            window.Owner = Application.Current.MainWindow;
            BookVM newBook = null;

            if (window.ShowDialog() == true)
            {
                newBook = new BookVM(vm.Book)
                {
                    Parent = this
                };
            }
            window.Content = null;
            return(newBook);
        }
コード例 #3
0
ファイル: BookFormVM.cs プロジェクト: Easy-DDI-Organizer/EDO
        private BookVM AddOrEditBook(Book book, BookRelation relation)
        {
            EditBookWindowVM vm = new EditBookWindowVM(book) { Parent = this };
            vm.Init(relation);
            EditBookWindow window = new EditBookWindow(vm);
            window.Owner = Application.Current.MainWindow;
            BookVM newBook = null;
            if (window.ShowDialog() == true)
            {
                newBook = new BookVM(vm.Book) { Parent = this };

            }
            window.Content = null;
            return newBook;
        }
コード例 #4
0
ファイル: BookFormVM.cs プロジェクト: Easy-DDI-Organizer/EDO
 public BookVM EditBookExternalTest(BookVM targetBook)
 {
     if (targetBook == null)
     {
         return null;
     }
     EditBookWindowVM vm = new EditBookWindowVM(targetBook.Book) { Parent = this };
     vm.Init(null);
     EditBookWindow window = new EditBookWindow(vm);
     BookVM newBook = null;
     if (window.ShowDialog() == true)
     {
         newBook = new BookVM(vm.Book) { Parent = this };
     }
     window.Content = null;
     return newBook;
 }