public WireframeListViewModel(IWireframeStore store, IPageService service) { wireframeStore = store; pageService = service; LoadDataCommand = new Command(async() => await LoadData()); AddWireframeCommand = new Command(async() => await AddWireframe()); SelectWireframeCommand = new Command <WireframeViewModel>(async w => await SelectWireframe(w)); SearchWireframesCommand = new Command(() => SearchWireframes()); }
public WireframeDetailViewModel(WireframeViewModel viewModel, IWireframeStore store, IPageService service) { if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } wireframeStore = store; pageService = service; SaveWireframeCommand = new Command(async() => await SaveWireframe()); CapturePictureCommand = new Command(async() => await CapturePicture(viewModel)); SelectPictureCommand = new Command(async() => await SelectPicture()); Wireframe = new Wireframe { WireframeId = viewModel.WireframeId, Title = viewModel.Title, Description = viewModel.Description, Date = viewModel.Date, FileName = viewModel.FileName, FileLocation = viewModel.FileLocation, FileDate = viewModel.FileDate }; }