public void Load(string fileName)
        {
            string fullName = new System.IO.FileInfo(fileName).FullName;
            ConfigurationDocument document = ConfigurationDocument.LoadFrom(fullName);

            CultureName = document.GetValue(GroupKeys.Language, ItemKeys.CultureName);
        }
Beispiel #2
0
        public void Load(string fileName)
        {
            string fullName = new System.IO.FileInfo(fileName).FullName;
            ConfigurationDocument document = ConfigurationDocument.LoadFrom(fullName);

            DataSource     = document.GetValue(GroupKeys.DataBase, ItemKeys.DataSource);
            InitialCatalog = document.GetValue(GroupKeys.DataBase, ItemKeys.InitialCatalog);
            UserID         = document.GetValue(GroupKeys.DataBase, ItemKeys.UserID);
            Password       = document.GetValue(GroupKeys.DataBase, ItemKeys.Password);
        }
        public static LanguageConfiguration LoadFrom(string fileName)
        {
            string fullName = new System.IO.FileInfo(fileName).FullName;
            ConfigurationDocument document      = ConfigurationDocument.LoadFrom(fullName);
            LanguageConfiguration configuration = new LanguageConfiguration()
            {
                CultureName = document.GetValue(GroupKeys.Language, ItemKeys.CultureName)
            };

            return(configuration);
        }
Beispiel #4
0
        public static DatabaseConfiguration LoadFrom(string fileName)
        {
            string fullName = new System.IO.FileInfo(fileName).FullName;
            ConfigurationDocument document      = ConfigurationDocument.LoadFrom(fullName);
            DatabaseConfiguration configuration = new DatabaseConfiguration()
            {
                DataSource     = document.GetValue(GroupKeys.DataBase, ItemKeys.DataSource),
                InitialCatalog = document.GetValue(GroupKeys.DataBase, ItemKeys.InitialCatalog),
                UserID         = document.GetValue(GroupKeys.DataBase, ItemKeys.UserID),
                Password       = document.GetValue(GroupKeys.DataBase, ItemKeys.Password)
            };

            return(configuration);
        }