Exemple #1
0
        private XmlProtectionHelper XmlHelper; // cjm-aug17

        #endregion        public string PlainPassword { get; set; }
        public XmlConfigurationService(ServiceManagerBase manager, bool allowSave)
        {
            this.manager           = manager;
            _isStarting            = false;
            _isStarted             = false;
            _saveAllowed           = allowSave;
            this.xmlSerializer     = new XmlSerializer(typeof(MyObservableCollection <XmlSection>));
            this.deferredSaveTimer = new Timer(500)
            {
                AutoReset = false
            };
            this.XmlHelper = new XmlProtectionHelper("config"); // cjm-aug17
            this.sections  = new MyObservableCollection <XmlSection>();
        }
Exemple #2
0
        public AccountService(ServiceManagerBase manager)
        {
            this.manager      = manager;
            this.loading      = false;
            _isStarted        = false;
            this.fileFullPath = this.manager.BuildStoragePath("accounts.xml");

            this.deferredSaveTimer = new Timer(1000)
            {
                AutoReset = false
            };
            this.deferredSaveTimer.Elapsed += delegate
            {
                this.manager.Dispatcher.Invoke((System.Threading.ThreadStart) delegate
                {
                    this.ImmediateSave();
                }, null);
            };
            this.xmlSerializer = new XmlSerializer(typeof(List <VATRPAccount>));
            this.XmlHelper     = new XmlProtectionHelper("account"); // cjm-aug17
        }