Beispiel #1
0
 private void cmbBuildingFrequency_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (!isLoading)
     {
         XMLNodeStore building = FindBuilding(clbBuildings.Items[clbBuildings.SelectedIndex].ToString());
         if (building.GetData("name").Length > 0)
         {
             if (building.GetData("frequency_original").Length == 0)
             {
                 building.SetData("frequency_original", building.GetData("frequency"));
             }
             building.SetData("frequency", cmbBuildingFrequency.Text);
             clbBuildings_SelectedIndexChanged(sender, e);
         }
     }
 }
Beispiel #2
0
        public static List <XMLNodeStore> CreateNodeStores(string xmlFileName, string nodeName)
        {
            List <XMLNodeStore> allData = new List <XMLNodeStore>();
            XmlDocument         xmlDoc  = new XmlDocument();

            xmlDoc.Load(xmlFileName);
            foreach (XmlNode xmlNode in xmlDoc.GetElementsByTagName(nodeName))
            {
                XMLNodeStore currentData = new XMLNodeStore();
                foreach (XmlElement xmlElement in xmlNode)
                {
                    currentData.SetData(xmlElement.Name, xmlElement.InnerText);
                }
                currentData.SetData("xml_file", Path.GetFileNameWithoutExtension(xmlFileName));
                allData.Add(currentData);
            }
            return(allData);
        }
Beispiel #3
0
 private void chkUnique_CheckedChanged(object sender, EventArgs e)
 {
     if (!isLoading)
     {
         XMLNodeStore building = FindBuilding(clbBuildings.Items[clbBuildings.SelectedIndex].ToString());
         if (building.GetData("name").Length > 0)
         {
             if (building.GetData("unique").Length == 0)
             {
                 building.SetData("unique", "no");
             }
             if (building.GetData("unique_original").Length == 0)
             {
                 building.SetData("unique_original", building.GetData("unique"));
             }
             building.SetData("unique", chkUnique.Checked ? "yes" : "no");
             clbBuildings_SelectedIndexChanged(sender, e);
         }
     }
 }