Example #1
0
        private void readDesignConcreteColumn(XmlNode xml)
        {
            if (xml != null && xml.ChildNodes.Count > 0)
            {
                foreach (XmlNode child in xml.ChildNodes)
                {
                    if ("Data".Equals(child.Name))
                    {
                        int rCase = int.Parse(Deserializer.readAttribute(child, "Case"));
                        int i     = int.Parse(Deserializer.readAttribute(child, "id"));
                        results.ActiveCase = results.ResultsCases[rCase];
                        ConcreteColumnDesign res = results.DesignConcreteColumn[i];

                        res.DesignData = Deserializer.readAttribute(child, "data").Split(comma);
                        res.ErrMsg     = Deserializer.readAttribute(child, "error", res.ErrMsg);
                        res.Status     = Deserializer.readAttribute(child, "status", res.Status);
                        res.WarnMsg    = Deserializer.readAttribute(child, "warning", res.WarnMsg);

                        res.PMMRatio  = Deserializer.readAttribute(child, "pmmratio");
                        res.PMMArea   = float.Parse(Deserializer.readAttribute(child, "pmmarea"));
                        res.VMajRebar = float.Parse(Deserializer.readAttribute(child, "vmajrebar"));
                        res.VMinRebar = float.Parse(Deserializer.readAttribute(child, "vminrebar"));
                    }
                }
            }
        }
Example #2
0
 private void writeDesignConcreteColumn(XmlWriter xml)
 {
     xml.WriteStartElement("T-Design_Concrete_Column");
     for (int i = 0; i < results.DesignConcreteColumn.Length; i++)
     {
         ConcreteColumnDesign res = results.DesignConcreteColumn[i];
         if (res.DesignData != null)
         {
             xml.WriteStartElement("Data");
             xml.WriteAttributeString("Case", results.ActiveCase.Id.ToString());
             xml.WriteAttributeString("id", i.ToString());
             xml.WriteAttributeString("data", string.Join(",", res.DesignData));
             xml.WriteAttributeString("error", res.ErrMsg);
             xml.WriteAttributeString("pmmratio", res.PMMRatio.ToString());
             xml.WriteAttributeString("pmmarea", res.PMMArea.ToString());
             xml.WriteAttributeString("vmajrebar", res.VMajRebar.ToString());
             xml.WriteAttributeString("vminrebar", res.VMinRebar.ToString());
             xml.WriteAttributeString("status", res.Status);
             xml.WriteAttributeString("warning", res.WarnMsg);
             xml.WriteEndElement();
         }
     }
     xml.WriteEndElement();
 }