Esempio n. 1
0
        public UserViewModel()
        {
            IDAO  dao  = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            IUser user = dao.CreateNewUser();

            _user = user;
        }
Esempio n. 2
0
        public WordViewModel()
        {
            IDAO  dao  = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            IWord word = dao.CreateNewWord();

            _word = word;
        }
        public DictionaryViewModel()
        {
            IDAO        dao        = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            IDictionary dictionary = dao.CreateNewDictionary();

            _dictionary = dictionary;
        }
Esempio n. 4
0
        public StatisticsShowViewModel()
        {
            #if DEBUG
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                return;
            }
            #endif

            _dao = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            _correctPercentage   = "";
            _incorrectPercentage = "";
        }
Esempio n. 5
0
        public WordInsertViewModel()
        {
            #if DEBUG
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                return;
            }
            #endif

            InputNotEmpty = false;
            _dao          = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            NewWord       = new WordViewModel();

            _saveNewWordCommand = new RelayCommand(param => this.SaveWord());
        }
Esempio n. 6
0
        public UserListViewModel()
        {
            #if DEBUG
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                return;
            }
            #endif

            _users = new ObservableCollection <UserViewModel>();
            _dao   = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            GetAllUsers();

            EditedUser = new UserViewModel();

            _saveNewUserCommand = new RelayCommand(param => this.SaveUser());
        }
Esempio n. 7
0
        public DictionaryListViewModel()
        {
            #if DEBUG
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                return;
            }
            #endif

            _wordInsertViewModel = new WordInsertViewModel();

            _dictionaries = new ObservableCollection <DictionaryViewModel>();
            _dao          = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            GetAllDictionaries();
            NewDictionary = new DictionaryViewModel();

            _saveNewDictionaryCommand = new RelayCommand(param => this.SaveDictionary());
        }
Esempio n. 8
0
        public WordShowViewModel()
        {
            #if DEBUG
            if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
            {
                return;
            }
            #endif

            _custom           = false;
            _customPercentage = 0;
            _confirmInfo      = "";
            _currentWordIndex = null;
            _dao                = (IDAO)LateBinding.GetDAOConstructor().Invoke(new object[] { });
            _words              = new List <WordViewModel>();
            _currentWord        = new WordViewModel();
            _startStudyCommand  = new RelayCommand(param => this.StartStudy());
            _confirmWordCommand = new RelayCommand(param => this.ConfirmWord());
        }