private void loadDictionaryAndPickFirstWord(bool cancelRestore) { mCurrentDictionary.load(true); ApplicationTitle.Text = "Crammer - " + mCurrentDictionary.DictionaryTitle; if (mCurrentDictionary.Empty) clearUIFields(); setRightFont(); mEntryEngine = new PickEngine(mCurrentDictionary, cancelRestore); (Application.Current as App).EntryEngine = mEntryEngine; mCurrentWord = ""; mDoneWords = "0"; mInSystem = "0"; if (!mEntryEngine.restored()) { //mEntryEngine.reset(); advanceWord(true); } else { advanceWord(false); } }
/// <summary> /// Load dictionary and get first entry /// </summary> /// <param name="fileName"></param> private void loadDictionaryAndPickFirstWord(string fileName, bool cancelRestore) { mCurrentDictionary.load(fileName, true); this.Text = string.Format(DICT_PREFIX, mCurrentDictionary.DictionaryTitle); if (mCurrentDictionary.Empty) clearUIFields(); setRightFont(); mEntryEngine = new PickEngine(mCurrentDictionary, cancelRestore); mCurrentWord = ""; mDoneWords = "0"; mInSystem = "0"; if (!mEntryEngine.restored()) { //mEntryEngine.reset(); advanceWord(true); } else { advanceWord(false); } }