Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        private void HostConfigurationWindow(IProviderConfigurationEditor initSettings)
        {
            panel1.Controls.Clear();
            _current = initSettings;

            //load empty settings
            _current.LoadConfiguration("");

            initSettings.HostMe(panel1);
        }
Esempio n. 3
0
        private void HostConfigurationWindow(IProviderConfigurationEditor initSettings)
        {
            panel1.Controls.Clear();
            _current = initSettings;

            //load empty settings
            _current.LoadConfiguration("");

            initSettings.HostMe(panel1);
        }
Esempio n. 4
0
        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;
            }
        }