コード例 #1
0
        public PluginsPreferencesPanel()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            columnHeaderName.Text      = Res.Get(StringId.PluginPrefNameCol);
            columnHeaderStatus.Text    = Res.Get(StringId.PluginPrefStatCol);
            labelInstalledPlugins.Text = Res.Get(StringId.PluginPrefInstalled);
            groupBoxPluginDetails.Text = Res.Get(StringId.PluginPrefDetails);
            buttonOptions.Text         = Res.Get(StringId.OptionsButton);
            toolTip.SetToolTip(this.linkLabelPluginName, Res.Get(StringId.PluginPrefTooltip));
            labelPluginDescription.Text   = "";
            radioButtonDisablePlugin.Text = Res.Get(StringId.PluginPrefDisable);
            radioButtonEnablePlugin.Text  = Res.Get(StringId.PluginPrefEnable);
            labelNoPluginSelected.Text    = Res.Get(StringId.PluginPrefNone);
            linkLabelDownloadPlugins.Text = Res.Get(StringId.PluginPrefLink);
            linkLabelDownloadPlugins.UseCompatibleTextRendering = false;
            labelCaption.Text = Res.Get(StringId.PluginPrefCaption);
            PanelName         = Res.Get(StringId.PluginPrefName);

            //marketization
            if (!MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
            {
                linkLabelDownloadPlugins.Visible = false;
            }
            else
            {
                pictureBoxAddPlugin.Image = ResourceHelper.LoadAssemblyResourceBitmap("Images.AddPlugin.png");
            }
            // set our bitmaps
            PanelBitmap = ResourceHelper.LoadAssemblyResourceBitmap("Images.PluginsSmall.png");


            // paramaterize caption with product name
            labelCaption.Text = String.Format(CultureInfo.CurrentCulture, labelCaption.Text, ApplicationEnvironment.ProductName);

            // initialize preferences
            _pluginsPreferences = new PluginsPreferences();
            _pluginsPreferences.PreferencesModified += new EventHandler(_pluginsPreferences_PreferencesModified);

            // signup for events
            listViewInstalledPlugins.SelectedIndexChanged += new EventHandler(listViewInstalledPlugins_SelectedIndexChanged);
            radioButtonEnablePlugin.CheckedChanged        += new EventHandler(radioButtonEnablePlugin_CheckedChanged);
            radioButtonDisablePlugin.CheckedChanged       += new EventHandler(radioButtonEnablePlugin_CheckedChanged);
            linkLabelPluginName.LinkClicked      += new LinkLabelLinkClickedEventHandler(linkLabelPluginName_LinkClicked);
            linkLabelDownloadPlugins.LinkClicked += new LinkLabelLinkClickedEventHandler(linkLabelDownloadPlugins_LinkClicked);

            // update list of plugins
            UpdatePluginList();

            // signup for global plugin-list changed event
            ContentSourceManager.GlobalContentSourceListChanged += new EventHandler(ContentSourceManager_GlobalContentSourceListChanged);
        }
コード例 #2
0
        public PluginsPreferencesPanel()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            columnHeaderName.Text = Res.Get(StringId.PluginPrefNameCol);
            columnHeaderStatus.Text = Res.Get(StringId.PluginPrefStatCol);
            labelInstalledPlugins.Text = Res.Get(StringId.PluginPrefInstalled);
            groupBoxPluginDetails.Text = Res.Get(StringId.PluginPrefDetails);
            buttonOptions.Text = Res.Get(StringId.OptionsButton);
            toolTip.SetToolTip(this.linkLabelPluginName, Res.Get(StringId.PluginPrefTooltip));
            labelPluginDescription.Text = "";
            radioButtonDisablePlugin.Text = Res.Get(StringId.PluginPrefDisable);
            radioButtonEnablePlugin.Text = Res.Get(StringId.PluginPrefEnable);
            labelNoPluginSelected.Text = Res.Get(StringId.PluginPrefNone);
            linkLabelDownloadPlugins.Text = Res.Get(StringId.PluginPrefLink);
            linkLabelDownloadPlugins.UseCompatibleTextRendering = false;
            labelCaption.Text = Res.Get(StringId.PluginPrefCaption);
            PanelName = Res.Get(StringId.PluginPrefName);

            //marketization
            if (!MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
                linkLabelDownloadPlugins.Visible = false;
            else
            {
                pictureBoxAddPlugin.Image = ResourceHelper.LoadAssemblyResourceBitmap("Images.AddPlugin.png");
            }
            // set our bitmaps
            PanelBitmap = ResourceHelper.LoadAssemblyResourceBitmap("Images.PluginsSmall.png");

            // paramaterize caption with product name
            labelCaption.Text = String.Format(CultureInfo.CurrentCulture, labelCaption.Text, ApplicationEnvironment.ProductName);

            // initialize preferences
            _pluginsPreferences = new PluginsPreferences();
            _pluginsPreferences.PreferencesModified += new EventHandler(_pluginsPreferences_PreferencesModified);

            // signup for events
            listViewInstalledPlugins.SelectedIndexChanged += new EventHandler(listViewInstalledPlugins_SelectedIndexChanged);
            radioButtonEnablePlugin.CheckedChanged += new EventHandler(radioButtonEnablePlugin_CheckedChanged);
            radioButtonDisablePlugin.CheckedChanged += new EventHandler(radioButtonEnablePlugin_CheckedChanged);
            linkLabelPluginName.LinkClicked += new LinkLabelLinkClickedEventHandler(linkLabelPluginName_LinkClicked);
            linkLabelDownloadPlugins.LinkClicked += new LinkLabelLinkClickedEventHandler(linkLabelDownloadPlugins_LinkClicked);

            // update list of plugins
            UpdatePluginList();

            // signup for global plugin-list changed event
            ContentSourceManager.GlobalContentSourceListChanged += new EventHandler(ContentSourceManager_GlobalContentSourceListChanged);

        }