Ejemplo n.º 1
0
        private void Save()
        {
            SettingsStorage clone;
            bool            saveLayout;

            lock (Storage.SyncRoot)
            {
                if (!_needToSave)
                {
                    return;
                }

                saveLayout = _isLayoutChanged;

                _needToSave      = false;
                _isLayoutChanged = false;

                clone = new SettingsStorage();
                clone.AddRange(Storage);
            }

            if (saveLayout || !clone.ContainsKey("MainWindow"))
            {
                clone.SetValue("MainWindow", SaveLayout());
            }

            try
            {
                CultureInfo.InvariantCulture.DoInCulture(() => new XmlSerializer <SettingsStorage>().Serialize(clone, _configFile));
            }
            catch (Exception ex)
            {
                this.AddErrorLog(ex);
            }
        }
Ejemplo n.º 2
0
 public override void Save(SettingsStorage storage)
 {
     if (_strategy != null)
     {
         ChartPanel.Save(storage);
     }
     else
     {
         storage.AddRange(_settingsStorage);
     }
 }
Ejemplo n.º 3
0
		public override void Save(SettingsStorage storage)
		{
			if (_strategy != null)
				ChartPanel.Save(storage);
			else
				storage.AddRange(_settingsStorage);
		}