/// <summary> /// 初始化插件内容 /// </summary> /// <param name="plugin"></param> /// <param name="pApplication"></param> private void PluginOnCreate(IPlugin plugin, IApplicationRef pApplication) { if (plugin is ICommandRef) { ICommandRef cmd = plugin as ICommandRef; cmd.OnCreate(pApplication); } else if (plugin is IToolRef) { IToolRef atool = plugin as IToolRef; atool.OnCreate(pApplication); } else if (plugin is IMenuRef) { IMenuRef aMenu = plugin as IMenuRef; aMenu.OnCreate(pApplication); } else if (plugin is IToolBarRef) { IToolBarRef aToolBar = plugin as IToolBarRef; aToolBar.OnCreate(pApplication); } else if (plugin is IDockableWindowRef) { IDockableWindowRef aDockableWindow = plugin as IDockableWindowRef; aDockableWindow.OnCreate(pApplication); } else if (plugin is IControlRef) { IControlRef aControl = plugin as IControlRef; aControl.OnCreate(pApplication); } }