Пример #1
0
        public static void Load()
        {
            if (PropertyService.properties == null)
            {
                throw new System.InvalidOperationException("Service is not initialized.");
            }
            if (!System.IO.Directory.Exists(PropertyService.configDirectory))
            {
                System.IO.Directory.CreateDirectory(PropertyService.configDirectory);
            }
            string fileName = System.IO.Path.Combine(FileUtility.LocalUserAppDataPath, PropertyService.propertyFileName);

            PropertyService.LoadPropertiesFromStream(fileName);
            fileName = System.IO.Path.Combine(FileUtility.ApplicationRootPath, PropertyService.propertyFileName);
            PropertyService.LoadPropertiesFromStream(fileName);
        }