public MainWindow(Controller controller) { InitializeComponent(); Pvm = new PhilosophyViewModel(controller); DataContext = Pvm; Closing += Pvm.Controller.OnWindowClosing; }
public EditControlsViewModel(PhilosophyViewModel philVm) { PhilVM = philVm; RevertCommand = new RelayCommand(OnRevert, CanRevert); EditCommand = new RelayCommand(EditPhilosopher, CanEditPhilosopher); SaveCommand = new RelayCommand(SavePhilosopher, CanSavePhilosopher); SetLogoCommand = new RelayCommand(SetLogo, CanSetLogo); ClearImageCommand = new RelayCommand(ClearImage, CanClearImage); DeleteBookCommand = new RelayCommand(DeleteBook, CanDeleteBook); AddBookCommand = new RelayCommand(AddBook, CanAddBook); SaveBookCommand = new RelayCommand(SaveBook); CancelCommand = new RelayCommand(CancelDialog); }