CityMaker 8 二次开发遇到的一些坑

 

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值