private void MenuStripToolsDropDownOpening(object sender, EventArgs e)
{
bool enable = Project.IsLoaded;
this.toolMenuARChiveUtility.Enabled = enable;
this.toolMenuDatabaseManager.Enabled = enable;
this.toolMenuPlugins.Enabled = enable;
this.toolMenuScriptManager.Enabled = enable;
this.toolMenuSkinManager.Enabled = enable;
// Add plugins to dropdown
this.toolMenuPlugins.DropDownItems.Clear();
foreach (RegistryEntry entry in Registry.Entries)
{
var extractAssociatedIcon = Icon.ExtractAssociatedIcon(entry.Plugin.Filename);
if (extractAssociatedIcon == null) continue;
var item = new ToolStripMenuItem(entry.Name)
{
Image = extractAssociatedIcon.ToBitmap(),
ToolTipText = entry.Description,
Tag = entry
};
item.Click += MenuStripPluginsClicked;
this.toolMenuPlugins.DropDownItems.Add(item);
}
}