# Region readmenu (string filepath) read information in the configuration document
/// <Summary>
/// Read the information in the configuration document
/// </Summary>
/// <Param name = "filepath"> website configuration file </param>
/// <Param name = "arraylength"> array length </param>
/// <Param name = "obj_source"> Object length </param>
/// <Returns> </returns>
Private string readmenu (string filepath)
{
If (! File. exists (filepath ))
{
Throw new exception ("the file does not exist ");
}
Else
{
Int I = 0;
String ischecked = string. empty;
Xmltextreader reader = new xmltextreader (filepath );
Reader. readstartelement ("housesys ");
Reader. readstartelement ("show ");
While (reader. Read ())
{
// Determine whether the node has attributes
If (reader. attributecount> 0)
{// Judge all nodes cyclically
While (reader. movetonextattribute ())
{
If (I = 0)
{
Ischecked = "checked ";
}
Else
{
Ischecked = "";
}
Websystem + = "<input type = \" Radio \ "name = \" rad_house \ "value = \" "+ reader. Value +
"\" Onclick = \ "getaboutinfo (this); \" "+ ischecked +"/> "+
Reader. readelementstring () + "& nbsp ;";
I ++;
}
}
}
Return websystem;
}
}
# Endregion