public RentLivingRoomViewModel(string id) { _id = id; #region == コマンド == // 部屋情報の保存・更新 SectionSaveCommand = new RelayCommand(SectionSaveCommand_Execute, SectionSaveCommand_CanExecute); // RL 管理編集 新規部屋の画像追加と削除 //RentLivingEditSectionNewPictureAddCommand = new RelayCommand(RentLivingEditSectionNewPictureAddCommand_Execute, RentLivingEditSectionNewPictureAddCommand_CanExecute); //RentLivingEditSectionNewPictureDeleteCommand = new GenericRelayCommand<object>( // param => RentLivingEditSectionNewPictureDeleteCommand_Execute(param), // param => RentLivingEditSectionNewPictureDeleteCommand_CanExecute()); // RL 管理編集 編集部屋の画像追加と削除 //RentLivingEditSectionEditPictureAddCommand = new RelayCommand(RentLivingEditSectionEditPictureAddCommand_Execute, RentLivingEditSectionEditPictureAddCommand_CanExecute); //RentLivingEditSectionEditPictureDeleteCommand = new GenericRelayCommand<object>( // param => RentLivingEditSectionEditPictureDeleteCommand_Execute(param), // param => RentLivingEditSectionEditPictureDeleteCommand_CanExecute()); // エラー通知画面を閉じる CloseErrorCommand = new RelayCommand(CloseErrorCommand_Execute, CloseErrorCommand_CanExecute); #endregion ErrorOccured += new MyErrorEvent(OnError); }
//public Action CloseAction { get; set; } #endregion public RentLivingBuildingViewModel(string id) { _id = id; #region == コマンド初期化 == // 建物情報の保存・更新 SaveCommand = new RelayCommand(SaveCommand_Execute, SaveCommand_CanExecute); // 画像の追加 PictureAddCommand = new RelayCommand(PictureAddCommand_Execute, PictureAddCommand_CanExecute); // 画像の編集 PictureEditCommand = new RelayCommand(PictureEditCommand_Execute, PictureEditCommand_CanExecute); // 画像の削除 PictureDeleteCommand = new RelayCommand(PictureDeleteCommand_Execute, PictureDeleteCommand_CanExecute); // 画像の編集(Listview) PictureEditListviewCommand = new GenericRelayCommand <object>( param => PictureEditListviewCommand_Execute(param), param => PictureEditListviewCommand_CanExecute()); // 画像の削除(Listview) PictureDeleteListviewCommand = new GenericRelayCommand <object>( param => PictureDeleteListviewCommand_Execute(param), param => PictureDeleteListviewCommand_CanExecute()); // 画像の差替え(Listview) PictureChangeListviewCommand = new GenericRelayCommand <object>( param => PictureChangeListviewCommand_Execute(param), param => PictureChangeListviewCommand_CanExecute()); // PDFの追加 PdfAddCommand = new RelayCommand(PdfAddCommand_Execute, PdfAddCommand_CanExecute); // PDFの編集 PdfEditCommand = new RelayCommand(PdfEditCommand_Execute, PdfEditCommand_CanExecute); // PDFの削除 PdfDeleteCommand = new RelayCommand(PdfDeleteCommand_Execute, PdfDeleteCommand_CanExecute); // PDFの削除 RentLivingEditZumenPdfDeleteCommand = new GenericRelayCommand <object>( param => RentLivingEditZumenPdfDeleteCommand_Execute(param), param => RentLivingEditZumenPdfDeleteCommand_CanExecute()); // PDFの表示 RentLivingEditZumenPdfShowCommand = new GenericRelayCommand <object>( param => RentLivingEditZumenPdfShowCommand_Execute(param), param => RentLivingEditZumenPdfShowCommand_CanExecute()); // PDFの RentLivingEditZumenPdfEnterCommand = new GenericRelayCommand <RentPdf>( param => RentLivingEditZumenPdfEnterCommand_Execute(param), param => RentLivingEditZumenPdfEnterCommand_CanExecute()); // 部屋の追加 SectionNewCommand = new RelayCommand(SectionNewCommand_Execute, SectionNewCommand_CanExecute); // 部屋の編集 SectionEditCommand = new RelayCommand(SectionEditCommand_Execute, SectionEditCommand_CanExecute); // 部屋の複製 SectionDuplicateCommand = new RelayCommand(SectionDuplicateCommand_Execute, SectionDuplicateCommand_CanExecute); // 部屋の削除 SectionDeleteCommand = new RelayCommand(SectionDeleteCommand_Execute, SectionDeleteCommand_CanExecute); // /* * // RL 管理新規 新規部屋の画像追加と削除 * RentLivingNewSectionNewPictureAddCommand = new RelayCommand(RentLivingNewSectionNewPictureAddCommand_Execute, RentLivingNewSectionNewPictureAddCommand_CanExecute); * RentLivingNewSectionNewPictureDeleteCommand = new GenericRelayCommand<object>( * param => RentLivingNewSectionNewPictureDeleteCommand_Execute(param), * param => RentLivingNewSectionNewPictureDeleteCommand_CanExecute()); * // RL 管理新規 編集部屋の画像追加と削除 * RentLivingNewSectionEditPictureAddCommand = new RelayCommand(RentLivingNewSectionEditPictureAddCommand_Execute, RentLivingNewSectionEditPictureAddCommand_CanExecute); * RentLivingNewSectionEditPictureDeleteCommand = new GenericRelayCommand<object>( * param => RentLivingNewSectionEditPictureDeleteCommand_Execute(param), * param => RentLivingNewSectionEditPictureDeleteCommand_CanExecute()); */ #endregion #region == イベントへのサブスクライブ == ErrorOccured += new MyErrorEvent(OnError); #endregion }