private void Init() { var config = new FirefoxConfigReader(); init = true; using (var file = new FirefoxConfigFile()) { TextReader reader = file.GetProfileFileReader(); if (reader == null) return; profileName = config.GetProfileName(reader); file.SetConfigFileName(profileName); reader = file.GetConfigFileReader(); if (reader == null) return; config.LoadConfig(reader); } detected = true; }
public override void SetBrowserSettings(BrowserSettings settings) { if (!init) Init(); var config = new FirefoxConfigReader(); using (var file = new FirefoxConfigFile()) { file.SetConfigFileName(profileName); var reader = file.GetConfigFileReader(); if (reader == null) return; config.LoadConfig(reader); reader.Dispose(); config.SetHomePage(settings.HomePage); config.SetProxySettings(settings.Proxy); config.SaveConfig(file.GetConfigFileWriter()); } }
public override void SetBrowserSettings(BrowserSettings settings) { if (!init) { Init(); } var config = new FirefoxConfigReader(); using (var file = new FirefoxConfigFile()) { file.SetConfigFileName(profileName); var reader = file.GetConfigFileReader(); if (reader == null) { return; } config.LoadConfig(reader); reader.Dispose(); config.SetHomePage(settings.HomePage); config.SetProxySettings(settings.Proxy); config.SaveConfig(file.GetConfigFileWriter()); } }
private void Init() { var config = new FirefoxConfigReader(); init = true; using (var file = new FirefoxConfigFile()) { TextReader reader = file.GetProfileFileReader(); if (reader == null) { return; } profileName = config.GetProfileName(reader); file.SetConfigFileName(profileName); reader = file.GetConfigFileReader(); if (reader == null) { return; } config.LoadConfig(reader); } detected = true; }