public WordsUnitDetailDlg(Window owner, WordsUnitViewModelWPF vm, MUnitWord item, int phraseid)
 {
     InitializeComponent();
     SourceInitialized += (x, y) => this.HideMinimizeAndMaximizeButtons();
     tbWord.Focus();
     Owner               = owner;
     vmDetail            = new WordsUnitDetailViewModel(vm, item, phraseid);
     DataContext         = vmDetail.ItemEdit;
     dgWords.DataContext = vmDetail.vmSingleWord;
 }
Beispiel #2
0
        public void SearchNewWord(string word)
        {
            var item = new MUnitWord
            {
                WORD   = vmSettings.AutoCorrectInput(word),
                SEQNUM = vm.WordItems.Count + 1,
                NOTE   = ""
            };

            vm.WordItems.Add(item);
            dgWords.SelectedItem = vm.WordItems.Last();
        }
 async Task Edit(MUnitWord item) =>
 await Shell.Current.GoToModalAsync(nameof(WordsTextbookDetailPage), new WordsUnitDetailViewModel(vm, item, 0));