コード例 #1
0
        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());
        }
コード例 #2
0
 public void ExecuteCommand(string name)
 {
     UICommandManager.ExecuteCommand(name, mContext);
 }