예제 #1
0
        public App()
        {
            // Global handler for uncaught exceptions.
            UnhandledException += Application_UnhandledException;

            // Standard XAML initialization
            InitializeComponent();

            // Phone-specific initialization
            InitializePhoneApplication();

            // Language display initialization
            InitializeLanguage();

            // Show graphics profiling information while debugging.
            if (Debugger.IsAttached)
            {
                // Display the current frame rate counters.
                Application.Current.Host.Settings.EnableFrameRateCounter = true;

                PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
            }
            using (DictionaryModel db = new DictionaryModel())
            {
                if (!db.DatabaseExists())
                    throw new Exception("Database not found");
            }
            viewModel = new VocabularyViewModel();

            // Query the local database and load observable collections.
            viewModel.LoadCollectionsFromDatabase();
        }
 public void Reset()
 {
     this.dictionary = new DictionaryModel();
     var wordsForTrain = dictionary.Words.OrderBy(learningIndex).Take(numberOfWordsInSession);
     this.allWordsForTrainSession = wordsForTrain.GetEnumerator();
     this.task = new TrainingTask();
     UpdateTask();
 }
예제 #3
0
 public ResultsViewModel()
 {
     dictionaryDB = new DictionaryModel();
 }
 public AddWordsViewModel()
 {
     dictionaryDB = new DictionaryModel();
 }
 public VocabularyViewModel()
 {
     dictionaryDB = new DictionaryModel();
 }