When you use vs2005 to open the project, you first find some minor errors because of different ide versions. When quotation marks are missing or ", a dozen errors are quickly corrected. Then, use the designer to open WorldWind. CS and you will find that the designer displays an error. The interface cannot be displayed.
The error message is as follows:
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 shocould 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)
.....
This is the error. After several days, I cannot find the answer from Baidu or Google. I will see the following solution in a WorldWind English Forum:
Step one:
In WorldWind. CS file initializecomponent () function delete some code in as follows list:
(Delete the following code)
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:
(Add the following function)
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.
(In mainapplication (), initializecomponent () is called after initializeworldwindows ())
OK. Now, re-generate the WorldWind project. Open WorldWind. CS again and you will be able to see the design interface ~
Solution from:
Http://forum.worldwindcentral.com/showthread.php? T = 9555
I just reprinted it. I hope someone with the same problem can see my reprinted content ~
Minor discoveries:
The search results for Google Chinese and English websites are different! You can search for different results in English. Haha ~ I found myself so small.