Solution for Designer error when opening WorldWind.cs in WW1.4.0

When I load the WW project in my Visual C# 2005 Express Edition , I get the following error when I open WorldWind.cs. I can open the code but the designer refuses to open it.

The designer cannot process the code at line : 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_r(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)
at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.XML.CodeDomXmlProcessor.Pars e(XmlReader reader)
at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.XML.CodeDomXmlProcessor.Pars eXml(String xmlStream, CodeStatementCollection statementCollection, String fileName, String methodName)
at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.VSCodeDomParser.OnMethodPopu lateStatements(Object sender, EventArgs e)
at System.CodeDom.CodeMemberMethod.get_Stat ements()
at System.ComponentModel.Design.Serializati on.TypeCodeDomSerializer.Deserialize(IDe signerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serializati on.CodeDomDesignerLoader.PerformLoad(IDe signerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.VSCodeDomDesignerLoader.Perf ormLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serializat ion.CodeDom.VSCodeDomDesignerLoader.Defe rredLoadHandler.Microsoft.VisualStudio.T extManager.Interop.IVsTextBufferDataEven ts.OnLoadCompleted(Int32 fReload)
Is this a limitation of C# 2005 Express Edition and should I try VS 2005 or an equivalant. Any suggestions ?
 
Solution:在WorldWind.cs 文件中加一个函数InitializeWorldWindows();函数体主要由InitializeComponent()中去掉的语句组成,实现加载WorldWindows窗口并显示地球的功能,InitializeWorldWindows()加在构造函数MainApplication()中的InitializeComponent()函数的调用之后;InitializeWorldWindows函数如下:
private void InitializeWorldWindows()
{
//
// splitContainer
//
this.splitContainer.Orientation = getWebBrowserOrientationFromSetting(World.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.worldwindows.isRenderDisabled = false;
this.worldWindow.Location = new System.Drawing.Point(, );
this.worldWindow.Name = "worldWindow";
this.worldWindow.ShowLayerManager = false;
this.worldWindow.Size = new System.Drawing.Size(splitContainer.Panel2.Width, splitContainer.Panel2.Height);
this.worldWindow.TabIndex = ;
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 = ;
}

在worldwind.cs的InitializeComponent()函数中注释掉下面的代码,使用Ctrl+F进行查找然后注释。

this.worldWindow = new WorldWind.WorldWindow();
this.toolBarButtonLatLonLines = new System.Windows.Forms.ToolBarButton();
this.splitContainer.Orientation = getWebBrowserOrientationFromSetting(World.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.worldwindows.isRenderDisabled = false;
this.worldWindow.Location = new System.Drawing.Point(, );
this.worldWindow.Name = "worldWindow";
this.worldWindow.ShowLayerManager = false;
this.worldWindow.Size = new System.Drawing.Size(splitContainer.Panel2.Width, splitContainer.Panel2.Height);
this.worldWindow.TabIndex = ;
this.worldWindow.Text = "worldWindow"; //
// splitContainer1.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.worldWindow);

原文链接:Solution for Designer error when opening WorldWind.cs in WW1.4.0

[转]有关WorldWind1.4的worldwind.cs窗口设计器打开错误的解决方法的更多相关文章

  1. ajax回调中window.open弹出的窗口会被浏览器拦截的解决方法

    存在问题:处理页面ajax请求过程中,异步请求成功后需要新开窗口打开 url,使用的是 window.open() 方法 来实现,最终都被浏览器拦截了.不会跳到对应的页面,如下 原因:浏览器之所以拦截 ...

  2. JavaScript关闭窗口的同时打开新页面的方法

    做网页的时候需要弹出一个小窗口,然后要实现一个功能就是鼠标点击超链接关闭小窗口并打开一个新页面,就如同下图: 这是一个小窗口,点击超链接这个窗口会关闭并且会正常在浏览器打开新页面,首先写js关闭窗口的 ...

  3. Win8 弹出窗口不在最前端的解决方法

    Win8系统的使用者有很多会遇到弹出窗口不在最前端的情况(自动隐藏,点下页面又出来),比如另存为的时候 ,或是登录路由器时弹出的登录框时. 引起这个异常的原因是与系统输入法冲突引起,但又不可能不用第三 ...

  4. XP、win7下Excel 2007多窗口打开Excel的解决方法

    http://blog.x6x8.com/?p=330 Win7下的方法(借鉴了XP的方法): 1.先在桌面先建一个txt文件,将下面的代码复制进去 32位WIN7复制下面一行start “Excel ...

  5. ajax请求成功后新窗口window.open()被拦截的解决方法

    ajax 异步请求成功后需要新开窗口打开 url,使用的是 window.open() 方法,但是该操作并不是用户主动触发的,所以它认为这是不安全的就拦截了(不过如果是 _self 的话就不会有这个限 ...

  6. 孙鑫视频学习:改变窗口过程函数中出现error C2440错误的解决方法

    在Visual Studio 2010中,即使代码是完完全全按照孙鑫视频中的敲,也会在出现error C2440,这是因为开发平台由VC6.0升级至VS2010,需要将原有的项目迁移.VS2010对消 ...

  7. Winform中node.Text重命名时窗口无响应假死的解决方法

    用户控件中有一个树,窗体使用了这个控件,但是重命名时执行node.text="XXXX" 执行了很长时间,大约9s,在此期间winform界面假死,尝试过多线程异步委托的方式来操作 ...

  8. twitter集成第三方登录是窗口一直出现闪退的解决方法

    需要创建自己的token,如下图

  9. C#窗口文件双击打开时出错

    出错原因: 1. 修改了该窗口文件的.Designer.cs文件中:#region Windows 窗体设计器生成的代码这里面的代码,导致运行不正常. 为了传递数据,我在构造函数中增加了传递的值. 需 ...

随机推荐

  1. 异步get请求之代理方法

    #import "ViewController.h" #import "Header.h" @interface ViewController ()<NS ...

  2. mac os x使用Git简易入门教程

    具体如下: 1, 首先要了解什么是Git. 简而言之,Git是一个分布式的代码版本管理工具.类似的常用工具还有SVN,CVS. 概念了解参见:http://baike.baidu.com/subvie ...

  3. Android 之 2048 的游戏逻辑分析

    继续学习了极客学院的实战路径课程,讲到了2048游戏的编写过程,我在这里作个总结分享给大家(结果会附源代码和我改写后的代码): 这里主要包括两个方面:1.2048界面的绘制   2.2048算法逻辑的 ...

  4. 使用Android studio创建的AIDL编译时找不到自定义类的解决办法

    使用AS创建ADIL文件时AS会在main文件夹下给我们生成一个aidl文件夹和一个相同包名的包,通常我们会把所有和ADIL相关的类或文件放在这个包下,但是如果存在自定义的类时,程序编译时无法通过,提 ...

  5. 19 图形用户界面编程 - 《Python 核心编程》

  6. 【Ext.Net学习笔记】02:Ext.Net用法概览、Ext.Net MessageBus用法、Ext.Net布局

    Ext.Net用法概览 Ext.Net还是很强大,如果运用熟练可以极大的提高编程效率.如果你也要学习Ext.Net,原文博主推荐书籍:<Ext.Net Web 应用程序开发教程>,是英文的 ...

  7. 数据结构--栈 codevs 1107 等价表达式

    codevs 1107 等价表达式 2005年NOIP全国联赛提高组  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 钻石 Diamond     题目描述 Descripti ...

  8. codeforces 480A A. Exams(贪心)

    题目链接: A. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input ...

  9. Medial Queries的另一用法:实现IE hack的方法

    所谓Medial Queries就是媒体查询. 随着Responsive设计的流行,Medial Queries可算是越来越让人观注了.他可以让Web前端工程实现不同设备下的样式选择,让站点在不同的设 ...

  10. UVA 12382 Grid of Lamps --贪心+优先队列

    题意:给出每行每列至少有的灯泡数,问最少有的灯泡数. 解法:要使灯泡数尽量小,说明要使交叉点尽量多,这样即抵了行,又抵了列,为最优的.所以可以用行来消去列,也可以用列来消去行,我这里是列来消去行.首先 ...