public void LoadSettings() { if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Settings\IDESettings.dat")) { FileStream fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + @"\Settings\IDESettings.dat", FileMode.Open, FileAccess.Read); BinaryFormatter bf = new BinaryFormatter(); SettingsClass loaded = (SettingsClass)bf.Deserialize(fs); setupSettings = loaded.setupSettings; setupSettings.LoadGOSetup(loaded.setupSettings); codeSettings = loaded.codeSettings; codeSettings.LoadEditorSettings(loaded.codeSettings); fs.Close(); } else { SaveSettings(); } }
public SettingsClass() { setupSettings = new GOSetup(); codeSettings = new CodeEditorSettings(); }
public void LoadEditorSettings(CodeEditorSettings settings) { backColor = settings.backColor; foreColor = settings.foreColor; }