1、需要拷贝bin目录(一般有runtime的吧)下的所有文件到debug目录下,否则会出现“未能加载由XX导入的过程”:
2、VS设计时,不能通过拖拽的方式放置控件了。
建议:
1)先用一个button,拖拽完后,将button替换一下,设计完成后替换以下代码。
2)在窗体对应的design.cs代码里,直接加代码,如下:
private Gvitech.CityMaker.Controls.AxRenderControl axRenderControl;
this.scenePanel.Controls.Add(this.dockPanel6_Container);
this.scenePanel.DockedAsTabbedDocument = true;
this.scenePanel.ID = new System.Guid("23d1d046-74e8-4410-a199-9cf54cc7ea8f");
this.scenePanel.Name = "scenePanel";
this.scenePanel.OriginalSize = new System.Drawing.Size(200, 200);
this.scenePanel.Text = "场景窗体";
this.scenePanel.Controls.Add(axRenderControl);
this.axRenderControl.BackColor = System.Drawing.Color.White;
this.axRenderControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.axRenderControl.EnableMultiTouch = false;
this.axRenderControl.FullScreen = false;
this.axRenderControl.InteractMode = Gvitech.CityMaker.RenderControl.gviInteractMode.gviInteractNormal;
this.axRenderControl.Location = new System.Drawing.Point(3, 3);
this.axRenderControl.MouseSelectObjectMask = Gvitech.CityMaker.RenderControl.gviMouseSelectObjectMask.gviSelectNone;
this.axRenderControl.MouseSnapMode = Gvitech.CityMaker.RenderControl.gviMouseSnapMode.gviMouseSnapDisable;
this.axRenderControl.Name = "axRenderControl";
this.axRenderControl.Size = new System.Drawing.Size(543, 483);
this.axRenderControl.TabIndex = 1;
this.axRenderControl.UseEarthOrbitManipulator = Gvitech.CityMaker.RenderControl.gviManipulatorMode.gviCityMakerManipulator;
this.axRenderControl = new Gvitech.CityMaker.Controls.AxRenderControl();
3、界面设计时,双击窗体打不开:
将这些代码注释就行。
有点麻烦,有没有更好的方法呢?
欢迎批评指正,转载请注明出处和作者
---------------------------------------------------------------------------
承接CityMaker各类二次开发、数据生产、数据加工处理等服务。
有意者请联系QQ:gispar@qq.com