第一步 调试worldwind 1.4.0 sourcecode

使用vs2005 打开工程 , 首先发现 一些 小的错误, 应该是因为 使用IDE版本不同的原因。 在缺少‘ 或者 “的地方加上 引号,很快 就把十几个错误改过来了,接着 用设计器 打开 worldwind.cs 会发现 设计器显示错误。无法显示界面。

 

显示错误如下:

 

The designer cannot process the code at line 1070: this.splitContainer.Panel1Collapsed = !World.Settings.BrowserVisible; The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.

at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.XML.CodeDomXmlProcessor.Crea teQuoteExpression(XmlElementData xmlElement)
at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.XML.CodeDomXmlProcessor.XmlE lementData.get_CodeDomElement()
at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.XML.CodeDomXmlProcessor.EndE lement(String prefix, String name, String urn)
.....

就是这个错误,害我弄了好几天,查 baidu google 都找不到答案,最会 在一个worldwind 英文论坛里看见如下 解决方法 :

 

Step one:
IN worldwind.cs file InitializeComponent() function delete some code in as follows list:
(就是说删除下面的代码)
this.worldWindow = new WorldWind.WorldWindow();
this.toolBarButtonLatLonLines = new System.Windows.Forms.ToolBarButton();
this.splitContainer.Orientation = getWebBrowserOrientationFromSetting(Worl d.Settings.BrowserOrientationHorizontal) ;
this.splitContainer.Panel1Collapsed = !World.Settings.BrowserVisible;
//
// worldWindow
//
this.worldWindow.AllowDrop = true;
this.worldWindow.Cache = null;
this.worldWindow.Caption = "";
this.worldWindow.CurrentWorld = null;
this.worldWindow.Dock = System.Windows.Forms.DockStyle.Fill;
this.worldWindow.IsRenderDisabled = false;
this.worldWindow.Location = new System.Drawing.Point(0, 0);
this.worldWindow.Name = "worldWindow";
this.worldWindow.ShowLayerManager = false;
this.worldWindow.Size = new System.Drawing.Size(splitContainer.Panel 2.Width, splitContainer.Panel2.Height);
this.worldWindow.TabIndex = 0;
this.worldWindow.Text = "worldWindow";

//
// splitContainer1.Panel2
//
this.splitContainer.Panel2.Controls.Add( this.worldWindow);


Step Two:
IN WorldWind.cs file add one function InitializeWorldWindows();the InitializeWorldWindows function is as follows:

(添加如下函数)
private void InitializeWorldWindows()
{
//
// splitContainer
//
this.splitContainer.Orientation = getWebBrowserOrientationFromSetting(Worl d.Settings.BrowserOrientationHorizontal) ;
this.splitContainer.Panel1Collapsed = !World.Settings.BrowserVisible;
//
// worldWindow
//
this.worldWindow = new WorldWind.WorldWindow();
this.worldWindow.AllowDrop = true;
this.worldWindow.Cache = null;
this.worldWindow.Caption = "";
this.worldWindow.CurrentWorld = null;
this.worldWindow.Dock = System.Windows.Forms.DockStyle.Fill;
this.worldWindow.IsRenderDisabled = false;
this.worldWindow.Location = new System.Drawing.Point(0, 0);
this.worldWindow.Name = "worldWindow";
this.worldWindow.ShowLayerManager = false;
this.worldWindow.Size = new System.Drawing.Size(splitContainer.Panel 2.Width, splitContainer.Panel2.Height);
this.worldWindow.TabIndex = 0;
this.worldWindow.Text = "worldWindow";
//
// splitContainer1.Panel1
//
this.splitContainer.Panel1.Controls.Add( this.webBrowserPanel);
this.splitContainer.Panel1.Name = "webBrowserPanel";
//
// splitContainer1.Panel2
//
this.splitContainer.Panel2.Controls.Add( this.worldWindow);
this.splitContainer.TabIndex = 0;
}


Step three:
Add InitializeWorldWindows() at MainApplication() function behind InitializeComponent() function.

(在MainApplication() 中,调用InitializeWorldWindows() ;的后面 调用InitializeComponent() )

ok,现在重新生成 worldwind 工程 ,再次 打开 worldwind.cs 就可以看见设计界面了,呵呵~

 

解决方法From :

http://forum.worldwindcentral.com/showthread.php?t=9555

 

我只是转载,希望有同样问题的人,可以看见我的转载~

 

小发现:

 使用google 中文 网站 与 英文网站搜索结果是不一样的! 使用英文搜索,可以找到不一样的结果。呵呵~ 才发现原来自己这么小白。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值