/// <summary> /// Shows the selected plugin in the prop grid /// </summary> private void ItemListViewSelectedIndexChanged(Object sender, EventArgs e) { if (this.itemListView.SelectedIndices.Count > 0) { Int32 selectedIndex = this.itemListView.SelectedIndices[0]; if (selectedIndex == 0) { sdkContext = new InstalledSDKContext(null); this.itemPropertyGrid.Enabled = true; this.itemPropertyGrid.SelectedObject = Globals.Settings; this.descLabel.Text = TextHelper.GetString("Info.AppDescription"); this.helpUrl = DistroConfig.DISTRIBUTION_HELP; this.nameLabel.Text = DistroConfig.DISTRIBUTION_NAME; this.nameLabel.Enabled = true; this.ShowInfoControls(false); this.FilterPropertySheet(); } else { IPlugin plugin = (IPlugin)itemListView.SelectedItems[0].Tag; sdkContext = new InstalledSDKContext(plugin as InstalledSDKOwner); this.disableCheckBox.Checked = Globals.Settings.DisabledPlugins.Contains(plugin.Guid); this.itemPropertyGrid.SelectedObject = plugin.Settings; this.itemPropertyGrid.Enabled = plugin.Settings != null; this.descLabel.Text = plugin.Description; this.nameLabel.Text = plugin.Name; this.nameLabel.Enabled = true; this.helpUrl = plugin.Help; this.FilterPropertySheet(); this.ShowInfoControls(true); this.MoveInfoControls(); } } else { this.nameLabel.Enabled = false; this.descLabel.Text = String.Empty; this.nameLabel.Text = TextHelper.GetString("Info.NoItemSelected"); this.itemPropertyGrid.SelectedObject = null; this.itemPropertyGrid.Enabled = false; this.ShowInfoControls(false); } }