示例#1
0
        /// <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);
            }
        }
        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);
            }
        }
示例#3
0
        private int mTotalWords = 0; // Count of words in the database

        #endregion Fields

        #region Constructors

        public StateManager(PickEngine pickEngine)
        {
            mPickEngine = pickEngine;
        }