Example #1
0
        public XmlElement addgWaterWellInjectRect(ItemWellMapPosition itemWellPos, ItemDicLayerDataDynamic itemDicDynamic, float fVscale)
        {
            XmlElement gWellProduct = svgDoc.CreateElement("g");

            gWellProduct.SetAttribute("id", "idWellProductionRect");

            Point PViewWell = cCordinationTransform.transRealPointF2ViewPoint(itemWellPos.dbX, itemWellPos.dbY, xRef, yRef, this.dfscale);

            float fValue = itemDicDynamic.fSCTS > 0 ? float.Parse((itemDicDynamic.fYZS / itemDicDynamic.fSCTS).ToString("0.0")) : 0;

            gWellProduct.AppendChild(gHistogram(PViewWell, fValue, fVscale, "blue"));

            return(gWellProduct);
        }
Example #2
0
        public XmlElement addgOilWellProductionPie(ItemWellMapPosition itemWellPos, ItemDicLayerDataDynamic itemDicDynamic, float fscaleR)
        {
            XmlElement gWellProductionPie = svgDoc.CreateElement("g");

            gWellProductionPie.SetAttribute("id", "idWellProductionPie");

            Point        PViewWell = cCordinationTransform.transRealPointF2ViewPoint(itemWellPos.dbX, itemWellPos.dbY, xRef, yRef, this.dfscale);
            List <float> fListdata = new List <float>();

            fListdata.Add(itemDicDynamic.fSCTS > 0?itemDicDynamic.fYCY / itemDicDynamic.fSCTS:0);
            fListdata.Add(itemDicDynamic.fSCTS > 0 ? itemDicDynamic.fYCS / itemDicDynamic.fSCTS : 0);
            List <string> ltStrColors = new List <string>();

            ltStrColors.Add("red");
            ltStrColors.Add("blue");
            gWellProductionPie.AppendChild(gWellPie(PViewWell, fListdata, ltStrColors, fscaleR));

            return(gWellProductionPie);
        }
Example #3
0
        public static void addWellDynamicDataDic2XML(string filePathLayerCss, string sYM, string sXCM, List <ItemDicLayerDataDynamic> listItemWell)
        {
            XmlDocument xmlLayerMap = new XmlDocument();

            xmlLayerMap.Load(filePathLayerCss);
            XmlNodeList xnList = xmlLayerMap.SelectNodes("/LayerMapConfig/DataDicDynamic");

            //或许Layer标签的节点
            foreach (XmlNode xn in xnList)
            {
                if (xn.Attributes["YM"].Value == sYM && xn.Attributes["XCM"].Value == sXCM)
                {
                    xn.ParentNode.RemoveChild(xn);
                }
            }

            XmlNode      currentNode = xmlLayerMap.SelectSingleNode("/LayerMapConfig");
            XmlNode      nodeLayer   = xmlLayerMap.CreateElement("DataDicDynamic");
            XmlAttribute nodeID      = xmlLayerMap.CreateAttribute("YM");

            nodeID.Value = sYM;
            nodeLayer.Attributes.Append(nodeID);
            XmlAttribute nodeType = xmlLayerMap.CreateAttribute("XCM");

            nodeType.Value = sXCM;
            nodeLayer.Attributes.Append(nodeType);
            XmlElement eleMent;

            eleMent = xmlLayerMap.CreateElement("data");
            foreach (ItemDicLayerDataDynamic item in listItemWell)
            {
                XmlElement itemdata = xmlLayerMap.CreateElement("item");
                itemdata.InnerText = ItemDicLayerDataDynamic.item2string(item);
                eleMent.AppendChild(itemdata);
            }
            nodeLayer.AppendChild(eleMent);

            currentNode.AppendChild(nodeLayer);
            xmlLayerMap.Save(filePathLayerCss);
        }
Example #4
0
        public XmlElement addgWaterWellProductionPie(ItemWellMapPosition itemWellPos, ItemDicLayerDataDynamic itemDicDynamic, float fscaleR)
        {
            XmlElement gWellProductionPie = svgDoc.CreateElement("g");

            gWellProductionPie.SetAttribute("id", "idWellInjectPie");
            Point pViewWell = cCordinationTransform.transRealPointF2ViewPoint(itemWellPos.dbX, itemWellPos.dbY, xRef, yRef, this.dfscale);

            float fValue = itemDicDynamic.fLZS;

            gWellProductionPie.AppendChild(gValueCircle(pViewWell, fValue, fscaleR, "blue"));

            return(gWellProductionPie);
        }