コード例 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets the phonetic text used to tell Toolbox what record to jump to.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private string GetPhoneticJumpWord(RecordCacheEntry recEntry)
        {
            // Because phonetic data may contain converted ambiguous items, we need to make
            // sure the original phonetic data is used for the jump value. Therefore, we'll
            // pull the original phonetic data from a temporary file containing all the
            // original phonetic data for each data source record.
            var tempCache = TempRecordCache.Load();
            var jumpValue = tempCache[recEntry.Id];

            tempCache.Clear();
            return(jumpValue);
        }
コード例 #2
0
        /// ------------------------------------------------------------------------------------
        public RecordCache Read()
        {
            TempRecordCache.Dispose();
            m_recCache = new RecordCache(m_project);
            App.IPASymbolCache.ClearUndefinedCharacterCollection();

            var worker = new BackgroundWorker {
                WorkerReportsProgress = true
            };

            worker.DoWork          += HandleBackgroundProcessStart;
            worker.ProgressChanged += HandleBackgroundProcessProgressChanged;
            worker.RunWorkerAsync();

            while (worker.IsBusy)
            {
                Application.DoEvents();
            }

            return(m_recCache);
        }