Example #1
0
        /// <summary>
        /// 加载数据源
        /// </summary>
        /// <param name="filePath"></param>
        private void Initialization(string filePath)
        {
            var xmldb = new XmlDBManager {
                FileName = filePath
            };

#if EnableLock
            xmldb.Password = XmlPassword.Instance.Password;
#endif
            DBManager.Set(xmldb);
            xmldb.InitializeAsync(OnDataLoadCompleted);
        }
Example #2
0
        /// <summary>
        /// 初始化地图数据
        /// </summary>
        private void InitiaDTData()
        {
            var dtFilePath = Path.Combine(directoryName, "DT_WZBZ.xml");

            if (File.Exists(dtFilePath))
            {
                var xmldtdb = new XmlDBManager {
                    FileName = dtFilePath
                };
#if EnableLock
                xmldtdb.Password = XmlPassword.Instance.Password;
#endif
                DTDBManager.Set(xmldtdb);
                xmldtdb.InitializeAsync(DtEventHandle);
            }
            else
            {
                LogManager.Instance.Error("缺失地图数据!");
            }
        }