private void ReadChartPanels(XmlNode xRoot) { XmlNode xmlChartPanels = xRoot.SelectSingleNode("ChartPanels"); if (xmlChartPanels == null) { return; } foreach (XmlNode node in xmlChartPanels.ChildNodes) { if (node.Name != "ChartPanel") { continue; } ChartPanel.PositionType positionType = (ChartPanel.PositionType)Enum.Parse(typeof(ChartPanel.PositionType), ConvertFromXmlEx("Position", node, string.Empty)); bool isHeatMap = ConvertFromXmlEx("IsHeatMap", node, false); ChartPanel chartPanel; if (isHeatMap) { chartPanel = AddHeatMapPanel(); } else { chartPanel = AddChartPanel(positionType); chartPanel.Background = (Brush)ConvertFromXml("Background", node); chartPanel.Height = ConvertFromXmlEx("Height", node, 0.0); } chartPanel.Visible = ConvertFromXmlEx("Visible", node, true); } }
private void ReadChartPanels(XContainer xRoot) { XElement xmlChartPanels = xRoot.Element("ChartPanels"); if (xmlChartPanels == null) { return; } foreach (XElement node in xmlChartPanels.Elements()) { if (node.Name != "ChartPanel") { continue; } ChartPanel.PositionType positionType = (ChartPanel.PositionType)System.Enum.Parse(typeof(ChartPanel.PositionType), ConvertFromXmlEx("Position", node, string.Empty), true); bool isHeatMap = ConvertFromXmlEx("IsHeatMap", node, false); ChartPanel chartPanel; if (isHeatMap) { chartPanel = AddHeatMapPanel(); } else { chartPanel = AddChartPanel(positionType); chartPanel.Background = (Brush)ConvertFromXml("Background", node); } chartPanel.Visible = ConvertFromXmlEx("Visible", node, true); } }