如下代码,我想在Initialize()中添加些初始化代码,发现其中没有被调用到,MyControlAction已经绑定了一个baseItem,并能成功运行,不知道DesktopPlugin什么时机被调用,或者有什么条件才会调用Initialize()
public class DesktopPlugin : SuperMap.Desktop.Plugin
{
public DesktopPlugin(PluginInfo pluginInfo)
: base(pluginInfo)
{
Common.Output("run DesktopPlugin! ");
}
public override Boolean Initialize()
{
MessageBox.Show("ddssdddd");
SuperMap.Desktop.Application.ActiveApplication.Workspace.Datasources.Opened += new SuperMap.Data.DatasourceOpenedEventHandler(Datasources_Opened);
return true;
}
public override Boolean ExitInstance()
{
MessageBox.Show("dff");
return true;
}