Exemplo n.º 1
0
        public static TermViewModel Create(Term term)
        {
            var termViewModel = new TermViewModel();

            termViewModel.Id         = term.Id;
            termViewModel.TermText   = term.TermText;
            termViewModel.Definition = term.Definition;
            termViewModel.Image      = term.Image;
            termViewModel.Favorite   = false;

            return(termViewModel);
        }
Exemplo n.º 2
0
        public void ResetWithTerm(TermViewModel term, MatchButtonType type)
        {
            Term      = term;
            IsVisible = true;
            Reset();
            switch (type)
            {
            case MatchButtonType.Question:
                ButtonText = term.Definition;
                break;

            case MatchButtonType.Answer:
                ButtonText = term.TermText;
                break;

            default:
                break;
            }
        }
Exemplo n.º 3
0
 public MatchButtonViewModel(TermViewModel term) : this()
 {
     Term = term;
 }