void makeNewShowDepth() { List <string> ltStrSelectedXCM = getSelectListLayer(); if (ltStrSelectedXCM.Count > 0) { int _up = Convert.ToInt16(this.nUDtopDepthUp.Value); int _down = Convert.ToInt16(this.nUDbottomDepthDown.Value); //重新给显示的顶底赋值 foreach (ItemWellSection item in listWellsSection) { string sJH = item.sJH; //有可能上下层有缺失。。。所以这块的技巧是找出深度序列,取最大最小值 cIOinputLayerDepth fileLayerDepth = new cIOinputLayerDepth(); List <float> fListDS1Return = fileLayerDepth.selectDepthListFromLayerDepthByJHAndXCMList(sJH, ltStrSelectedXCM); if (fListDS1Return.Count > 0) //返回值为空 说明所选层段整个缺失! { item.fShowedDepthTop = fListDS1Return.Min() - _up; item.fShowedDepthBase = fListDS1Return.Max() + _down; cXmlBase.setSelectedNodeChildNodeValue(filePathSectionCss, sJH, "fShowTop", item.fShowedDepthTop.ToString("0")); cXmlBase.setSelectedNodeChildNodeValue(filePathSectionCss, sJH, "fShowBot", item.fShowedDepthBase.ToString("0")); } } //end foreach } //end if }
public static void makeNewShowDepth(string pathSectionCss, List <ItemWellSection> listWellsSection) { List <string> ltStrSelectedXCM = cProjectData.ltStrProjectXCM; int _up = 10; int _down = 10; if (ltStrSelectedXCM.Count > 0) { //重新给显示的顶底赋值 foreach (ItemWellSection item in listWellsSection) { string sJH = item.sJH; //有可能上下层有缺失。。。所以这块的技巧是找出深度序列,取最大最小值 cIOinputLayerDepth fileLayerDepth = new cIOinputLayerDepth(); List <float> fListDS1Return = fileLayerDepth.selectDepthListFromLayerDepthByJHAndXCMList(sJH, ltStrSelectedXCM); if (fListDS1Return.Count > 0) //返回值为空 说明所选层段整个缺失! { item.fShowedDepthTop = fListDS1Return.Min() - _up; item.fShowedDepthBase = fListDS1Return.Max() + _down; cXmlBase.setSelectedNodeChildNodeValue(pathSectionCss, sJH, "fShowTop", item.fShowedDepthTop.ToString("0")); cXmlBase.setSelectedNodeChildNodeValue(pathSectionCss, sJH, "fShowBot", item.fShowedDepthBase.ToString("0")); } } //end foreach } //end if }
private void setDepthIntervalShowedBYLayer() { updateSelectedListJH(); List <string> ltStrSelectedXCM = new List <string>(); string sTopXCM = this.cbbTopXCM.SelectedItem.ToString(); int iTopIndex = cProjectData.ltStrProjectXCM.IndexOf(sTopXCM); string sBottomXCM = this.cbbBottomXCM.SelectedItem.ToString(); int iBottomIndex = cProjectData.ltStrProjectXCM.IndexOf(sBottomXCM); if (iBottomIndex - iTopIndex >= 0) { ltStrSelectedXCM = cProjectData.ltStrProjectXCM.GetRange(iTopIndex, iBottomIndex - iTopIndex + 1); initializeTreeViewWellCollection(); int _up = Convert.ToInt16(this.nUDtopDepthUp.Value); int _down = Convert.ToInt16(this.nUDbottomDepthDown.Value); for (int i = 0; i < ltStrSelectedJH.Count; i++) { ItemWellSection _wellSection = new ItemWellSection(ltStrSelectedJH[i], 0, 0); //有可能上下层有缺失。。。所以这块的技巧是找出深度序列,取最大最小值 cIOinputLayerDepth fileLayerDepth = new cIOinputLayerDepth(); List <float> fListDS1Return = fileLayerDepth.selectDepthListFromLayerDepthByJHAndXCMList(ltStrSelectedJH[i], ltStrSelectedXCM); if (fListDS1Return.Count > 0) //返回值为空 说明所选层段整个缺失! { _wellSection.fShowedDepthTop = fListDS1Return.Min() - _up; _wellSection.fShowedDepthBase = fListDS1Return.Max() + _down; } listWellsSection.Add(_wellSection); } cXmlDocSectionGeo.generateSectionCssXML(cProjectManager.xmlSectionCSS); generateSectionDataDirectory(); } else { MessageBox.Show("上层应该比下层选择高,请重新选择。"); } }