private void tsmiOpenedIE_Click(object sender, EventArgs e) { string svgfilepath = Path.Combine(cProjectManager.dirPathMap, this.sFileName); FormWebNavigation formSVGView = new FormWebNavigation(svgfilepath); formSVGView.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(); }
private void button3_Click(object sender, EventArgs e) { string sLithoName = "中砂岩"; int iWidthPattern = 5; int iHeightPattern = 5; string sBackColor = cPublicMethodBase.getRGB(cbbPatternSandBackColor.BackColor); string filePathSVGMap = Path.Combine(cProjectManager.dirPathMap, sLithoName + ".svg"); cSVGDocPatternSand cLithoPattern = new cSVGDocPatternSand(0, 0); for (int i = 1; i < 5; i++) { string dRect = "M" + (50 * i).ToString() + " " + (50 * i).ToString() + "h50 v20 h-50 z"; XmlElement lithoElement = cLithoPattern.addLithoPatternSand(sLithoName, iWidthPattern, iHeightPattern, sBackColor, 50 * i, 80 * i, 30, 20); cLithoPattern.addgElement2BaseLayer(lithoElement, 0, 0); } cLithoPattern.makeSVGfile(filePathSVGMap); FormWebNavigation formSVGView = new FormWebNavigation(filePathSVGMap); formSVGView.Show(); }
private void btnDraw_Click(object sender, EventArgs e) { bool IsDataOK = true; //数据未校验 //数据校验过程 cProjectData.sErrLineInfor = ""; for (int j = 0; j < dgvDataTable.RowCount - 1; j++) { for (int i = 0; i < dgvDataTable.ColumnCount; i++) { //判读数据是否缺失 if (dgvDataTable.Rows[j].Cells[i].Value == null) { String line = ""; line = "表格第" + (j + 1).ToString() + "行" + "第" + (i + 1).ToString() + "列数据可能缺失或者有错误,请查看。" + "\r\n"; cProjectData.sErrLineInfor += line; IsDataOK = false; } } } if (IsDataOK == true) //数据通过所有的校验过程,整理成所需要的格式 { List <string> ltStrcolors = new List <string>(); ltStrcolors.Add("red"); ltStrcolors.Add("blue"); ltStrcolors.Add("yellow"); ltStrcolors.Add("green"); List <string> ltStrLable = new List <string>(); for (int j = 1; j <= dgvDataTable.ColumnCount - 1; j++) { ltStrLable.Add(dgvDataTable.Columns[j].HeaderText); } int r = 30; string filenameSVGMap = "PieMap.svg"; cSVGPie cPieMap = new cSVGPie(800, 1000, 0, 0); for (int j = 0; j < dgvDataTable.RowCount - 1; j++) { string sJH = ""; List <float> fListData = new List <float>(); for (int i = 0; i < dgvDataTable.ColumnCount; i++) { if (i == 0) { sJH = dgvDataTable.Rows[j].Cells[i].Value.ToString(); } if (i > 0) { fListData.Add(float.Parse(dgvDataTable.Rows[j].Cells[i].Value.ToString())); } } Point pWell = cCordinationTransform.getPointViewByJH(sJH); XmlElement returnXmlElement = cPieMap.gPieChart(fListData, pWell.X, pWell.Y, r, ltStrcolors, ltStrLable, 100, 100); cPieMap.addgElement2BaseLayer(returnXmlElement, 0, 0); cSVGText svgText = new cSVGText(); XmlElement returnJHTextXmlElement = svgText.gElementText(pWell.X, pWell.Y + 20, sJH, 15, "black"); cPieMap.addgElement2BaseLayer(returnJHTextXmlElement, 0, 0); } XmlElement returnElemment; if (this.cbxScaleRulerShowed.Checked == true) { } if (this.cbxCompassShowed.Checked == true) { cPieMap.svgRoot.AppendChild(cPieMap.gCompass(100, 500)); } cPieMap.makeSVGfile(cProjectManager.dirPathMap + filenameSVGMap); FormWebNavigation formSVGView = new FormWebNavigation(cProjectManager.dirPathMap + filenameSVGMap); formSVGView.Show(); } else { cPublicMethodForm.outputErrInfor2Text(cProjectData.sErrLineInfor); } }