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. Git学习 --> 个人常用命令add,commit以及push

    Git命令行配置1 安装Github2 安装msysgit3 要配置用户名和油箱  git config --global user.name <用户名> 我的命令就是:git confi ...

  2. iOS网络-03-NSURLSession与NSURLSessionTask

    简介 NSURLSession也能完成网络请求 NSURLConnection在iOS9中不推荐使用,NSURLSession是iOS9中推荐使用的网络请求方式 NSURLSession需要与NSUR ...

  3. 多线程基础(二)pthread的了解

    IOS中多线程的实现方案   了解NSOperation(代码) 所有的方法都是pthread开头的   然后再搞一条线程 pthread_create方法有返回值,作用:判断线程创建是否成功?   ...

  4. 在MAC平台下使用Eclipse出现了中文乱码

    在Preference(偏好设置)中,搜索框中输入content找到Content Types,然后在text中找到并选中Java Source File, 然后在Defalut encoding输入 ...

  5. 【故障处理】CRS-1153错误处理

    [故障处理]CRS-1153错误处理 1  CRS-1153: There was an error setting Oracle Clusterware to rolling patch mode. ...

  6. Elasticsearch Scripts disabled

    Es 2.2版本中,在查询语句中使用script 时,提示如下错误 scripts of type [inline], operation [aggs] and lang [groovy] are d ...

  7. 探索 OpenStack 之(10):深入镜像服务Glance

    本篇博文来探讨下镜像服务Glance. 0.  基本概念 0.1 基本功能 Glance提供REST API来支持以下镜像操作: 查询 注册 上传 获取 删除 访问权限管理 0.2 Glance RE ...

  8. 测试思考[持续更新ing]

    1.如何设计好的测试用例,提高测试覆盖率?提高测试效率? 2.如何展现测试成果? 3.如何编写专业化.优质的测试文档? 4.如何适时借助测试工具,测试一些重复性比较高的测试? 5.如何引入自动化测试? ...

  9. 利用HttpListener创建简单的HTTP服务

    using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; using ...

  10. UVALive 5962 Strongly Connected Chemicals --最大独立集

    题意:给n个阳离子和m个阴离子,并给出相互的吸引关系,求一个最大的点集,使其中的每个阴阳离子相互吸引. 解法:枚举每条边,使该条边存在,然后建立反图,求一个最大匹配,此时的点数减去最大匹配与ans求一 ...