#region ReadMenu(string FilePath)讀取配置文檔中的資訊
/// <summary>
/// 讀取配置文檔中的資訊
/// </summary>
/// <param name="FilePath">網站設定檔</param>
/// <param name="ArrayLength">數組長度</param>
/// <param name="Obj_Source">對象長度</param>
/// <returns></returns>
private string ReadMenu(string FilePath)
{
if (!File.Exists(FilePath))
{
throw new Exception("檔案不存在");
}
else
{
int i = 0;
string IsChecked = string.Empty;
XmlTextReader Reader = new XmlTextReader(FilePath);
Reader.ReadStartElement("HouseSys");
Reader.ReadStartElement("Show");
while (Reader.Read())
{
//判斷該節點是否有屬性
if (Reader.AttributeCount > 0)
{ //用迴圈判斷完所有節點
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()+" ";
i++;
}
}
}
return WebSystem;
}
}
#endregion