コード例 #1
0
        public MainWindow(Controller controller)
        {
            InitializeComponent();
            Pvm         = new PhilosophyViewModel(controller);
            DataContext = Pvm;

            Closing += Pvm.Controller.OnWindowClosing;
        }
コード例 #2
0
        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);
        }