public void OnCreate(object hook) { if (hook is IMapDocument) { _doc = (IMapDocument)hook; _module = Module.GetModule(_doc); PlugInManager pluginMan = new PlugInManager(); foreach (XmlNode tracerNode in pluginMan.GetPluginNodes(gView.Framework.system.Plugins.Type.INetworkTracer)) { INetworkTracer tracer = pluginMan.CreateInstance(tracerNode) as INetworkTracer; if (tracer == null) { continue; } _combo.Items.Add(new NetworkTracerItem(tracer)); } if (_combo.Items.Count > 0) { _combo.SelectedIndex = 0; } } }
public NetworkTracerItem(INetworkTracer tracer) { _tracer = tracer; }