Beispiel #1
0
        /// <summary>
        /// 更新本地词库
        /// </summary>
        /// <returns></returns>
        public static void UpdateLocalDict(string updateCmd)
        {
            WordSqlXml sql = new WordSqlXml();

            sql.LoadXml(updateCmd);

            foreach (var item in sql)
            {
                WordSqlXmlAction word = (WordSqlXmlAction)item;
                word.Run();
            }
        }
        /// <summary>
        /// 更新服务器端词库
        /// </summary>
        /// <param name="updateStr"></param>
        private void UpdateServerDict(string updateStr)
        {
            try
            {
                WordSqlXml sql = new WordSqlXml();
                sql.LoadXml(updateStr);

                foreach (var item in sql)
                {
                    WordSqlXmlAction word = (WordSqlXmlAction)item;
                    word.Run();
                }
            }
            catch (Exception ex)
            {
                ExceptionRecord.Record(ex.Message + ex.Source + ex.TargetSite + ex.StackTrace);
            }
        }