void addWaterWellProductPieGraph(cIOMapLayer cSelectProductionData, cSVGDocLayerMapProduction cLayerProductionMap, string filePathWaterProduct) { List <float> fListWaterValueDay = new List <float>(); List <float> fListWaterValueSum = new List <float>(); //ltStrSelectedWaterJH = cSelectProductionData.selectJH2ltStrFromProductFile(filePathWaterProduct); // fListWaterValueDay = cSelectProductionData.selectWellLayerYMValue2fListFromFileByLayerColumIndexAndYMColumIndex //(filePathWaterProduct, 4); // fListWaterValueSum = cSelectProductionData.selectWellLayerYMValue2fListFromFileByLayerColumIndexAndYMColumIndex //(filePathWaterProduct, 5); List <int> iListXviewWaterWell = new List <int>(); List <int> iListYviewWaterWell = new List <int>(); for (int i = 0; i < ltStrSelectedWaterJH.Count; i++) { Point pWellView = cCordinationTransform.getPointViewByJH(ltStrSelectedWaterJH[i]); iListXviewWaterWell.Add(pWellView.X); iListYviewWaterWell.Add(pWellView.Y); } float fPieScale = float.Parse(tbxPieR.Text); int iRectWidth = int.Parse(this.tbxRectWidth.Text); XmlElement returnElemment = cLayerProductionMap.addgWaterWellProductionGraph(ltStrSelectedWaterJH, iListXviewWaterWell, iListYviewWaterWell, fListWaterValueDay, fListWaterValueDay, fPieScale, iRectWidth); cLayerProductionMap.addgElement2BaseLayer(returnElemment, 0, 0); }
private void btnSelectedJH_Click(object sender, EventArgs e) { updateSelectedCondition(); //此处分油井和水井提取不同的数据资料,油井提取 日产油,日产水,累产油,累产水 //此处水井提取不同的数据资料,水井提取日注水,累注水 cIOMapLayer cSelectProductionData = new cIOMapLayer(); if (File.Exists(filePathOilProduct)) { if (File.Exists(cProjectManager.xmlConfigProductMap)) { File.Delete(cProjectManager.xmlConfigProductMap); } cXMLProductMap.generateXmlFile(sSelectedYYYYMM, sSelectedXCM, cProjectManager.xmlConfigProductMap); cXMLProductMap.addOilWells(ltStrSelectedOilJH, cProjectManager.xmlConfigProductMap); cXMLProductMap.addWaterWells(ltStrSelectedWaterJH, cProjectManager.xmlConfigProductMap); for (int i = 0; i < lbxJH.Items.Count; i++) { lbxJH.SetSelected(i, false); if (ltStrSelectedOilJH.Contains(lbxJH.Items[i].ToString()) || ltStrSelectedWaterJH.Contains(lbxJH.Items[i].ToString())) { lbxJH.SetSelected(i, true); } } } else { MessageBox.Show("请先计算油井生产字典表及水井字典表。"); } }
private void btnMap_Click(object sender, EventArgs e) { //此处分油井和水井提取不同的数据资料,油井提取 日产油,日产水,累产油,累产水 //此处水井提取不同的数据资料,水井提取日注水,累注水 cIOMapLayer cSelectProductionData = new cIOMapLayer(); string filenameSVGMap; if (this.tbxMapTitleName.Text == "") { filenameSVGMap = sSelectedYYYYMM + "-ProductionMap.svg"; } else { filenameSVGMap = this.tbxMapTitleName.Text + ".svg"; } cSVGDocLayerMapProduction cLayerProductionMap = new cSVGDocLayerMapProduction(800, 1000, 0, 0); XmlElement returnElemment; if (this.rdbPieMapDay.Checked == true) { //日产 日注 addOilWellPieMap(cSelectProductionData, 13, 14, cLayerProductionMap, filePathOilProduct); addWaterWellPieMap(cSelectProductionData, 4, cLayerProductionMap, filePathWaterProduct); } if (this.rdbPieMapMonth.Checked == true) { //月产 月注 addOilWellPieMap(cSelectProductionData, 5, 6, cLayerProductionMap, filePathOilProduct); addWaterWellPieMap(cSelectProductionData, 5, cLayerProductionMap, filePathWaterProduct); } if (this.rdbPieMapSum.Checked == true) { //累产 累注 addOilWellPieMap(cSelectProductionData, 9, 10, cLayerProductionMap, filePathOilProduct); addWaterWellPieMap(cSelectProductionData, 6, cLayerProductionMap, filePathWaterProduct); } if (this.rdbProductMap.Checked == true) { addOilWellProductPieGraph(cSelectProductionData, cLayerProductionMap, filePathOilProduct); addWaterWellProductPieGraph(cSelectProductionData, cLayerProductionMap, filePathWaterProduct); } if (this.checkScaleRulerShowed.Checked == true) { } if (this.checkCompassShowed.Checked == true) { cLayerProductionMap.svgRoot.AppendChild(cLayerProductionMap.gCompass(100, 400)); } cLayerProductionMap.makeSVGfile(cProjectManager.dirPathMap + filenameSVGMap); FormWebNavigation formSVGView = new FormWebNavigation(cProjectManager.dirPathMap + filenameSVGMap); formSVGView.Show(); }
void addOilWellPieMap(cIOMapLayer cSelectProductionData, int iValue1OilColumnIndex, int iValue2OilColumnIndex, cSVGDocLayerMapProduction cLayerProductionMap, string filePathOilProduct) { List <float> fListOilValue = new List <float>(); List <float> fListWaterValue = new List <float>(); List <int> iListXview = new List <int>(); List <int> iListYview = new List <int>(); for (int i = 0; i < ltStrSelectedOilJH.Count; i++) { Point pWellView = cCordinationTransform.getPointViewByJH(ltStrSelectedOilJH[i]); iListXview.Add(pWellView.X); iListYview.Add(pWellView.Y); } float dfscale = float.Parse(tbxPieR.Text); // XmlElement returnElemment = cLayerProductionMap.addgOilWellProductionPie(ltStrSelectedOilJH, iListXview, iListYview, //fListOilValue, fListWaterValue, dfscale); //cLayerProductionMap.addgElement2BaseLayer(returnElemment, 0, 0); }
void addWaterWellPieMap(cIOMapLayer cSelectProductionData, int iValueWaterColumnIndex, cSVGDocLayerMapProduction cLayerProductionMap, string filePathWaterProduct) { List <float> fListWaterValue = new List <float>(); //fListWaterValue = cSelectProductionData.selectWellLayerYMValue2fListFromFileByLayerColumIndexAndYMColumIndex //(filePathWaterProduct, iValueWaterColumnIndex); List <int> iListXview = new List <int>(); List <int> iListYview = new List <int>(); for (int i = 0; i < ltStrSelectedWaterJH.Count; i++) { Point pWellView = cCordinationTransform.getPointViewByJH(ltStrSelectedWaterJH[i]); iListXview.Add(pWellView.X); iListYview.Add(pWellView.Y); } float dfscale = float.Parse(tbxPieR.Text); //XmlElement returnElemment = cLayerProductionMap.addgWaterWellProductionPie(ltStrSelectedWaterJH,iListXview, // iListYview, fListWaterValue, dfscale); //cLayerProductionMap.addgElement2BaseLayer(returnElemment, 0, 0); }