public NewListPageModalViewModel(INavigationService navigationService, IListStore listStore, IApplicationUserService applicationUserService) : base(navigationService) { _applicationUserService = applicationUserService; _listStore = listStore; Title = "New List"; }
void EnsureButtons() { if (DataStore == null) { DataStore = CreateDefaultItems(); } }
public MainPageViewModel(IListStore listStore, IPageService pageService) { Items = new ObservableCollection <Item>(); _listStore = listStore; _pageService = pageService; LoadDataCommand = new Command(async() => await LoadData()); AddItemCommand = new Command(async() => await AddItem()); RemoveItemCommand = new Command <Item>(async c => await Delete(c)); SpeakItemCommand = new Command <Item>(async c => await Speak(c)); }
public override void OnLoad(EventArgs e) { base.OnLoad(e); if (DataStore == null) { DataStore = CreateDefaultItems(); } else { LayoutButtons(); SetSelected(selectedButton, true); } }
public IListStore GetStore() { if (string.IsNullOrEmpty(this.settingsStore.UserName)) { return new NullListStore(); } if (this.settingsStore.UserName != this.username) { this.username = this.settingsStore.UserName; var storeName = string.Format("{0}.list.store", this.username); this.listStore = this.listStoreFactory.Invoke(storeName); } return this.listStore; }
public AddNewItemViewModel(ListViewModel viewModel, IListStore listStore, IPageService pageService) { if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } _pageService = pageService; _listStore = listStore; SaveCommand = new Command(async() => await Save()); Item = new Item { Id = viewModel.Id, Product = viewModel.Product }; }
public TodoListOperator(IListStore store, IDummyData dummyData) { _store = store; _dummyData = dummyData; }
public FindEntitiesInListBlock(IListStore listStore) { this.listStore = listStore; }