Esempio n. 1
0
        public async Task <bool> DeleteLastTermAsync()
        {
            var terms = Model.DataManager.Instance.GetTerms(null);
            var term  = terms.ElementAt(terms.Count - 1);

            if (term.IsDeletable)
            {
                await Task.Factory.StartNew(() => Model.DataManager.Instance.DeleteTerm(term));

                TermsChanged?.Invoke(this, null);

                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        public async Task AddTermAsync(Term term)
        {
            await Task.Factory.StartNew(() => Model.DataManager.Instance.AddTerm(term));

            TermsChanged?.Invoke(this, null);
        }