Ejemplo n.º 1
0
        public void DeserializeSection(XmlNode node)
        {
            foreach (XmlNode childNode in node.ChildNodes)
            {
                switch (childNode.Name)
                {
                case "DigitalLegend":
                    DigitalLegend.Deserialize(childNode);
                    break;
                }
            }
            var section = CreateSection();

            section.Name = Parent.Name;
            section.Deserialize(node);
            Sections.Add(section);
        }
Ejemplo n.º 2
0
        public void Deserialize(XmlNode node)
        {
            foreach (XmlNode childNode in node.ChildNodes)
            {
                switch (childNode.Name)
                {
                case "SelectedQuarter":
                {
                    DateTime temp;
                    if (DateTime.TryParse(childNode.InnerText, out temp))
                    {
                        SelectedQuarter = temp;
                    }
                }
                break;

                case "DigitalLegend":
                    DigitalLegend.Deserialize(childNode);
                    break;

                case "ApplySettingsForAll":
                {
                    bool temp;
                    if (bool.TryParse(childNode.InnerText, out temp))
                    {
                        ApplySettingsForAll = temp;
                    }
                }
                break;

                case "Section":
                    var section = CreateSection();
                    section.Deserialize(childNode);
                    Sections.Add(section);
                    break;
                }
            }
        }