コード例 #1
0
 public NewListPageModalViewModel(INavigationService navigationService, IListStore listStore, IApplicationUserService applicationUserService)
     : base(navigationService)
 {
     _applicationUserService = applicationUserService;
     _listStore = listStore;
     Title      = "New List";
 }
コード例 #2
0
ファイル: RadioButtonList.cs プロジェクト: sami1971/Eto
 void EnsureButtons()
 {
     if (DataStore == null)
     {
         DataStore = CreateDefaultItems();
     }
 }
コード例 #3
0
        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));
        }
コード例 #4
0
ファイル: RadioButtonList.cs プロジェクト: sami1971/Eto
 public override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (DataStore == null)
     {
         DataStore = CreateDefaultItems();
     }
     else
     {
         LayoutButtons();
         SetSelected(selectedButton, true);
     }
 }
コード例 #5
0
        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;
        }
コード例 #6
0
        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
            };
        }
コード例 #7
0
 public TodoListOperator(IListStore store, IDummyData dummyData)
 {
     _store     = store;
     _dummyData = dummyData;
 }
コード例 #8
0
 public FindEntitiesInListBlock(IListStore listStore)
 {
     this.listStore = listStore;
 }