Inheritance: SettingsBase
        public void Init(XElement xml)
        {
            if(xml == null)
            {
                Version = new Version(1, 0);
                Logging = new LoggingSettings(WebServerUri);
                Security = new SecuritySettings(WebServerUri);
                Backup = new BackupSettings(WebServerUri);
            }
            else
            {
                WebServerUri = xml.AttributeSafe("WebServerUri");
                Version = new Version(xml.AttributeSafe("Version"));
                Logging = new LoggingSettings(xml.Element(LoggingSettings.SettingName), WebServerUri);
                Security = new SecuritySettings(xml.Element(SecuritySettings.SettingName), WebServerUri);
                Backup = new BackupSettings(xml.Element(BackupSettings.SettingName), WebServerUri);
            }

            Logging.PropertyChanged += SettingChanged;
            Security.PropertyChanged += SettingChanged;
            Backup.PropertyChanged += SettingChanged;

            NotifyOfPropertyChange(() => HasChanges);
        }
示例#2
0
        public void Init(XElement xml)
        {
            if (xml == null)
            {
                Version  = new Version(1, 0);
                Logging  = new LoggingSettings(WebServerUri);
                Security = new SecuritySettings(WebServerUri);
                Backup   = new BackupSettings(WebServerUri);
            }
            else
            {
                WebServerUri = xml.AttributeSafe("WebServerUri");
                Version      = new Version(xml.AttributeSafe("Version"));
                Logging      = new LoggingSettings(xml.Element(LoggingSettings.SettingName), WebServerUri);
                Security     = new SecuritySettings(xml.Element(SecuritySettings.SettingName), WebServerUri);
                Backup       = new BackupSettings(xml.Element(BackupSettings.SettingName), WebServerUri);
            }

            Logging.PropertyChanged  += SettingChanged;
            Security.PropertyChanged += SettingChanged;
            Backup.PropertyChanged   += SettingChanged;

            NotifyOfPropertyChange(() => HasChanges);
        }