public void Initialize(SettingsManager settingManager) { this.settingsManager = settingManager; SearchEngineCB.DisplayMember = "Key"; SearchEngineCB.ValueMember = "Value"; SearchEngineCB.DataSource = new BindingSource(settingManager.Engines, null); SearchEngineCB.SelectedValue = settingManager.CurrentEngine; LiteralsBC.Checked = settingManager.GeneralSearch; InternalBrowserCB.Checked = settingManager.InternalBrowser; }
public OptionPage() { settingStoreProvider = new SettingStoreProvider("ErrorSearchOn"); if (settingStoreProvider.Exist("SearchEngine") && settingStoreProvider.Exist("GeneralSearch") && settingStoreProvider.Exist("InternalBrowser")) settingsManager = new SettingsManager((SearchEngineTypes)Enum.Parse(typeof (SearchEngineTypes), settingStoreProvider.Get("SearchEngine")), Convert.ToBoolean(settingStoreProvider.Get("GeneralSearch")), Convert.ToBoolean(settingStoreProvider.Get("InternalBrowser"))); else settingsManager = new SettingsManager(); }