private void HostConfigurationWindow(IProviderConfigurationEditor initSettings, ActiveProviderInfo api) { //dialog window which will house the user control ProviderSettingsWindow psw = new ProviderSettingsWindow(); Bitmap img = (Bitmap)ProviderManager.GetProviderIcon(api.Instance.GetType()); if (img != null) { psw.Icon = System.Drawing.Icon.FromHandle(img.GetHicon()); img.Dispose(); } //load the usercontrol into the window psw.LoadSettings(initSettings, api.ProviderName); //get current config string //load the configuration info into the user control initSettings.LoadConfiguration(api.ProviderConfig); //show the dialog box psw.ShowDialog(); //if user clicked OK then call save to keep a copy of settings in memory if (initSettings.IsOK) { api.ProviderConfig = initSettings.SaveConfiguration(); //activate apply option ApplyButton.Enabled = true; } }
private void HostConfigurationWindow(IProviderConfigurationEditor initSettings, ActiveProviderInfo api) { //dialog window which will house the user control ProviderSettingsWindow psw = new ProviderSettingsWindow(); Bitmap img = (Bitmap)ProviderManager.GetProviderIcon(api.Instance.GetType()); if (img != null) { psw.Icon = System.Drawing.Icon.FromHandle(img.GetHicon()); img.Dispose(); } //load the usercontrol into the window psw.LoadSettings(initSettings, api.ProviderName); //get current config string //load the configuration info into the user control initSettings.LoadConfiguration(api.ProviderConfig); //show the dialog box psw.ShowDialog(); //if user clicked OK then call save to keep a copy of settings in memory if (initSettings.IsOK) { api.ProviderConfig = initSettings.SaveConfiguration(); //activate apply option ApplyButton.Enabled = true; } }