Ejemplo n.º 1
0
        private void SaveXml(string filename)
        {
            XDocument xdoc         = new XDocument();
            XElement  node_Root    = new XElement("SimuDatas");
            XElement  node_SDModel = null;

            foreach (SimulateDataChartModel sdcmodel in VChart.SDCModels)
            {
                SimulateDataModel sdmodel = sdcmodel.SDModel;
                node_SDModel = new XElement("SimuDataNode");
                sdmodel.SaveXml(node_SDModel);
                node_Root.Add(node_SDModel);
            }
            xdoc.Add(node_Root);
            xdoc.Save(filename);
        }
Ejemplo n.º 2
0
        private void SaveXml(string filename, int timestart, int timeend)
        {
            XDocument xdoc         = new XDocument();
            XElement  node_Root    = new XElement("SimuDatas");
            XElement  node_SDModel = null;

            foreach (SimulateDataChartModel sdcmodel in VChart.CursorCollection())
            {
                SimulateDataModel sdmodel = sdcmodel.SDModel;
                node_SDModel = new XElement("SimuDataNode");
                sdmodel.SaveXml(node_SDModel, timestart, timeend);
                node_Root.Add(node_SDModel);
            }
            xdoc.Add(node_Root);
            xdoc.Save(filename);
        }