public StorageMethodsViewModel(BaseStorageStore storageStore, IPageService pageService) { this.storageStore = storageStore; this.pageService = pageService; this.LoadDataCommand = new Command(async() => await LoadData()); this.AddStorageCommand = new Command(async() => await AddStorage()); }
public StorageTypesViewModel(BaseStorageStore storageStore, IPageService pageService) { this.storageStore = storageStore; this.pageService = pageService; this.LoadDataCommand = new Command(async() => await LoadData()); this.AddStorageCommand = new Command(async() => await AddStorage()); this.SelectedStorageCommand = new Command <StorageViewModel>(async c => await SelectStorage(c)); this.DeleteStorageCommand = new Command <StorageViewModel>(async c => await DeleteStorage(c)); }
public StorageTypeDetailViewModel(StorageViewModel viewModel, BaseStorageStore storageStore, IPageService pageService) { if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } this.pageService = pageService; this.storageStore = storageStore; this.SaveCommand = new Command(async() => await Save()); this.DeleteCommand = new Command <StorageViewModel>(async c => await Delete(viewModel)); this.Storage = new Storage { Id = viewModel.Id, StorageName = viewModel.StorageName, Url = viewModel.Url, DateAdded = viewModel.DateAdded, DateModified = viewModel.DateModified }; }