public override void Initialize() { logger.Debug($"Initializing settings file {SettingsPath} {GetType()}"); cachePath = SettingsPath.Combine(SettingsFileName); logger.Trace("Initializing settings file at {0}", cachePath); LoadFromCache(cachePath); }
public SettingsPathViewModel(SettingsPath path, SettingsPathType type) { if (path == null) { throw new ArgumentNullException("path"); } m_path = path; m_path.PropertyChanged += new PropertyChangedEventHandler(m_path_PropertyChanged); m_type = type; }
public Login() { loginSettings = new LoginSettingsDocument(); LogCont = new LoginController(); SettingsPath = Environment.GetEnvironmentVariable("AppData"); SettingsPath = SettingsPath.Replace("Roaming", "Local") + "\\JiraUtil"; var loaded = loginSettings.Load(SettingsPath, SettingsFile); if (!loaded || loginSettings.SavePassword != CheckState.Checked) { InitializeComponent(); } }
public override void Initialize() { var cachePath = SettingsPath; if (!cachePath.FileExists()) { var oldSettings = SettingsPath.Combine(oldSettingsFileName); if (oldSettings.FileExists()) { oldSettings.Copy(cachePath); } } base.Initialize(); }
protected void saveChangesClickedHandler(object sender, EventArgs ev) { //this could use some validation, but really- someone would have to be very silly to screw this up! settingsRef.DefaultExperiment = tbx_defaultExperimentPath.Text; settingsRef.DefaultExperimentsDirectory = tbx_defaultExperimentDirectory.Text; // get and store the components directories: settingsRef.ComponentPaths.Clear(); foreach (SettingsPath sp in temporaryComponentDirectories) { settingsRef.ComponentPaths.Add(sp); } Gtk.TreeIter iter; componentDirectoryModel.GetIterFirst(out iter); if (iter.Stamp != 0) { do { SettingsPath sp = new SettingsPath(false, componentDirectoryModel.GetValue(iter, 0).ToString()); settingsRef.ComponentPaths.Add(sp); }while(componentDirectoryModel.IterNext(ref iter)); } // get and store the type directories settingsRef.TypePaths.Clear(); foreach (SettingsPath sp in temporaryTypesDirectories) { settingsRef.TypePaths.Add(sp); } typeDirectoryModel.GetIterFirst(out iter); if (iter.Stamp != 0) { do { SettingsPath sp = new SettingsPath(false, typeDirectoryModel.GetValue(iter, 0).ToString()); settingsRef.TypePaths.Add(sp); }while(typeDirectoryModel.IterNext(ref iter)); } TraceLab.Core.Settings.Settings.SaveSettings(this.settingsRef); this.Destroy(); }
public StringSetting(string name, SettingsPath settingsSource, string defaultValue) : base(name, settingsSource, defaultValue) { }
public override void Initialize() { cachePath = SettingsPath.Combine(SettingsFileName); LoadFromCache(cachePath); }
public StringSetting(string aName, SettingsPath settingsSource, string aDefaultValue) : base(aName, settingsSource, aDefaultValue) { }