Beispiel #1
0
        public async Task RetrieveNote(MLangWord item)
        {
            var note = await vmSettings.RetrieveNote(item.WORD);

            item.NOTE = note;
            await langWordDS.UpdateNote(item.ID, item.NOTE);
        }
Beispiel #2
0
        public async Task Create(MLangWord item)
        {
            await langWordDS.Create(item);

            WordItemsAll.Add(item);
            ApplyFilters();
        }
Beispiel #3
0
 public WordsLangDetailViewModel(WordsLangViewModel vm, MLangWord item)
 {
     item.CopyProperties(ItemEdit);
     vmSingleWord  = new SingleWordViewModel(item.WORD, vm.vmSettings);
     ItemEdit.Save = ReactiveCommand.CreateFromTask(async() =>
     {
         ItemEdit.CopyProperties(item);
         item.WORD = vm.vmSettings.AutoCorrectInput(item.WORD);
         if (item.ID == 0)
         {
             await vm.Create(item);
         }
         else
         {
             await vm.Update(item);
         }
     }, ItemEdit.IsValid());
 }
Beispiel #4
0
 public async Task ClearNote(MLangWord item)
 {
     item.NOTE = SettingsViewModel.ZeroNote;
     await langWordDS.UpdateNote(item.ID, item.NOTE);
 }
Beispiel #5
0
 public async Task Delete(MLangWord item) => await langWordDS.Delete(item);
Beispiel #6
0
 public async Task Update(MLangWord item) => await langWordDS.Update(item);