1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| protected void Build_CheckBox_Selection()
{
XmlDocument XmlApps = new XmlDocument();
XmlApps.Load(@"C:\Visual Studio\Projects\VS2010\SCCMApplications\SCCMApplications\SCCMApplications\SCCM_Apps.xml");
XmlNodeList _AppName = XmlApps.GetElementsByTagName("AppName");
XmlNodeList _CmdLine = XmlApps.GetElementsByTagName("CmdLine");
Globals.strApps = new string[_AppName.Count, 2];
int j = 1;
for (int i = 0; i < _AppName.Count; i++)
{
Globals.strApps[i, 0] = _AppName[i].InnerText;
Globals.strApps[i, 1] = _CmdLine[i].InnerText;
CheckBox CheckBx = new CheckBox();
CheckBx.Text = _AppName[i].InnerText + "<br>";
CheckBx.ID = "Package" + j.ToString();
SoftCell1.Controls.Add(CheckBx);
j++;
if (i == 3)
{
break;
}
}
} |