本文整理汇总了C#中IManager.GetPluginImplementations方法的典型用法代码示例。如果您正苦于以下问题:C# IManager.GetPluginImplementations方法的具体用法?C# IManager.GetPluginImplementations怎么用?C# IManager.GetPluginImplementations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IManager
的用法示例。
在下文中一共展示了IManager.GetPluginImplementations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProjectPanel
public ProjectPanel(IManager manager)
{
InitializeComponent();
m_manager = manager;
m_mainWindow = (MainWindow) manager.MainWindow;
m_manager.PropertyChange += new PropertyChangeEventHandler(Manager_PropertyChange);
manager.ProjectOpened += new ProjectOpenedEventHandler(Manager_ProjectOpened);
m_systemImageList = new SystemImageList();
m_systemImageList.SetImageList(projectView);
m_italicFont = new Font(projectView.Font, FontStyle.Italic);
m_boldFont = new Font(projectView.Font, FontStyle.Bold);
UpdateTree();
foreach (Type docType in m_manager.GetPluginImplementations(typeof(Document)))
{
DocumentClassAttribute docAttr = DocumentClassAttribute.ForType(docType);
if(docAttr != null)
{
ToolStripMenuItem item = new ToolStripMenuItem();
item.Text = "New " + docAttr.Name;
item.Click += new EventHandler(AddNewDocument_Click);
item.Tag = docType;
addToolStripMenuItem.DropDownItems.Insert(0, item);
}
}
}
示例2: SourceControlWindow
public SourceControlWindow(IManager manager)
{
InitializeComponent();
mManager = manager;
if(mManager.Project.VCS != null)
mVCS = (IVersionController) mManager.Project.VCS.Clone();
propertyGrid.SelectedObject = mVCS;
comboBoxVCSType.Items.Add(new VCSInfo(null));
if (mVCS == null)
comboBoxVCSType.SelectedIndex = 0;
foreach (Type type in mManager.GetPluginImplementations(typeof(IVersionController)))
{
VCSInfo info = new VCSInfo(type);
comboBoxVCSType.Items.Add(info);
if (mVCS != null && mVCS.GetType() == type)
comboBoxVCSType.SelectedItem = info;
}
UpdateControls();
}