public MyDocumentViewer(System.Windows.Forms.Integration.WindowsFormsHost host, SelectElementHandler selector) { //创建三维控件 mRenderCtrl = new RenderControl(); host.Child = mRenderCtrl; mRenderCtrl.Load += InitializeRenderControlOnLoad; //用于选择的回调方法 mSelectionCallback = selector; //注册命令 UICommandManager.LoadCommands(Assembly.GetExecutingAssembly()); //注册图元模板 GlobalInstance.RegisterElementSchema(Assembly.GetExecutingAssembly()); }
public void ExecuteCommand(string name) { UICommandManager.ExecuteCommand(name, mContext); }