예제 #1
0
        protected override void Load()
        {
            //获取XML跟元素
            SettingNode root = LoadSettingXML(SettingFolder, SettingFile);

            //读数据库属性
            DBConnectArgs = root.Attributes[DbBaseTableConnectString];


            X readEntities = (out JsonEntityDetial entityDetial, ref SettingNode ro) =>
            {
                entityDetial = new JsonEntityDetial()
                {
                    roots = new List <IJsonTreeNode>()
                };
                //遍历每个Root实体
                foreach (SettingNode n in ro.ChildNodes)
                {
                    entityDetial.roots.Add(BuildTreeNode(n, null));
                }
                //读Root数据库信息
                entityDetial.DbConnectStr = ro.Attributes[DbBaseTableConnectString];
            };

            SettingNode node = root.SelectSingleNode(ExportRootNodeName);

            readEntities(out exportEntities, ref node);
            node = root.SelectSingleNode(ImportRootNodeName);
            readEntities(out importEntities, ref node);

            //读User节点
            node = root.SelectSingleNode(UserNodeName);
            //读User属性
            userRoot = new UserInfo()
            {
                DbConnectStr = node.Attributes[DbBaseTableConnectString],
                TableName    = node.Attributes[UserTableName],
                UserName     = node.Attributes[UserNameAttrition],
                Password     = node.Attributes[PasswordAttrition]
            };
        }
예제 #2
0
        protected override void Load()
        {
            SettingNode root = LoadSettingXML(SettingFile);

            ActiveUser       = root.Attributes[Xml_ActiveUserNodeName];
            exportworkFolder = root.Attributes[Xml_ExportFolder];
            SimpleMode       = Boolean.Parse(root.Attributes[Xml_SimpleMode]);

            SettingNode window = root.SelectSingleNode(Xml_WindowSettingRoot);

            WindowLeft   = Double.Parse(window.Attributes[Xml_WindowLocX]);
            WindowTop    = Double.Parse(window.Attributes[Xml_WindowLocY]);
            WindowWidth  = Double.Parse(window.Attributes[Xml_WindowWidth]);
            WindowHeight = Double.Parse(window.Attributes[Xml_WindowHeight]);
            AppName      = window.Attributes[Xml_APPName];
        }