コード例 #1
0
ファイル: makeSectionFence.cs プロジェクト: xuleoBJ/oilFence
        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
        }
コード例 #2
0
        public static void addSectionDataLayerDepth(string sJH, string dirSectionData)
        {
            string             filePath          = Path.Combine(dirSectionData, sJH, fileNameSectionLayerDepth);
            cIOinputLayerDepth cSelectLayerDepth = new cIOinputLayerDepth();

            cSelectLayerDepth.selectSectionDrawData2File(sJH, filePath);
        }
コード例 #3
0
        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
        }
コード例 #4
0
ファイル: cIOtemplate.cs プロジェクト: xuleoBJ/oilFence
        /// <summary>
        /// 注意xtmFile
        /// </summary>
        /// <param name="xtlFileName">模板文件名,带扩展名</param>
        /// <param name="goalFilePath">目标文件路径,全路径</param>
        /// <param name="sJH"></param>
        public static void copyTemplate(string xtlFileName, string goalFilePath, string sJH)
        {
            //加载模板
            string xtmPath = Path.Combine(cProjectManager.dirPathTemplate, xtlFileName);

            File.Copy(xtmPath, goalFilePath, true);
            cXmlBase.setNodeInnerText(goalFilePath, cXmlDocSectionWell.fullPathJH, sJH);
            cXmlBase.setNodeInnerText(goalFilePath, cXEWellPage.fullPathMapTitle, sJH);
            //加载曲线数据
            ItemWell curWell = cProjectData.ltProjectWell.FirstOrDefault(p => p.sJH == sJH);

            foreach (XmlElement el_Track in cXmlDocSectionWell.getTrackNodes(goalFilePath))
            {
                trackDataDraw curTrackDraw = new trackDataDraw(el_Track);
                //继续读取曲线,加载数据
                if (curTrackDraw.sTrackType == TypeTrack.分层.ToString())
                {
                    List <itemDrawDataIntervalValue> listDataItem = new List <itemDrawDataIntervalValue>();
                    //判断库中是否有相关数据,如果有数据的话,构建 listDataItem,然后导入
                    cIOinputLayerDepth cSelectLayerDepth = new cIOinputLayerDepth();
                    List <string>      listStrLine       = cSelectLayerDepth.selectSectionDrawData2List(sJH);
                    foreach (string sLine in listStrLine)
                    {
                        string[] splitLine = sLine.Split();
                        if (splitLine.Length >= 3)
                        {
                            itemDrawDataIntervalValue itemPro = new itemDrawDataIntervalValue();
                            itemPro.top       = float.Parse(splitLine[0]);
                            itemPro.bot       = float.Parse(splitLine[1]);
                            itemPro.sProperty = splitLine[2];
                            itemPro.calTVD(curWell);
                            listDataItem.Add(itemPro);
                        }
                    }  //end 第一种类型
                    cXmlDocSectionWell.addDataItemListIntervaProperty(goalFilePath, curTrackDraw.sTrackID, listDataItem);
                }

                if (curTrackDraw.sTrackType == TypeTrack.测井解释.ToString())
                {
                    List <itemDrawDataIntervalValue> listDataItem = new List <itemDrawDataIntervalValue>();
                    //判断库中是否有相关数据,如果有数据的话,构建 listDataItem,然后导入
                    cIOinputJSJL  cSelectJSJL = new cIOinputJSJL();
                    List <string> listStrLine = cSelectJSJL.selectSectionDrawData2List(sJH);
                    foreach (string sLine in listStrLine)
                    {
                        string[] splitLine = sLine.Split();
                        if (splitLine.Length >= 3)
                        {
                            itemDrawDataIntervalValue itemPro = new itemDrawDataIntervalValue();
                            itemPro.top       = float.Parse(splitLine[0]);
                            itemPro.bot       = float.Parse(splitLine[1]);
                            itemPro.sProperty = splitLine[2];
                            itemPro.calTVD(curWell);
                            listDataItem.Add(itemPro);
                        }
                    }  //end 第一种类型
                    cXmlDocSectionWell.addDataItemListIntervaProperty(goalFilePath, curTrackDraw.sTrackID, listDataItem);
                }
            } //end track loop
        }
コード例 #5
0
        public static int addLayerDepth(string sJHSelected, int iIndexTrack, string filePath)
        {
            cIOinputLayerDepth cSelectLayerDepth = new cIOinputLayerDepth();
            string             sContent          = cSelectLayerDepth.selectIntervalDataFromLayerDepthByJHAndDepth(sJHSelected, 0, 10000);

            write2File(iIndexTrack, sContent, filePath, sLayDepthFileMark);
            return(iIndexTrack++);
        }
コード例 #6
0
        private void tsmiFromDB_Click(object sender, EventArgs e)
        {
            if (sJH != "")
            {
                List <string> listStrLine = new List <string>();
                if (trackTypeStr == TypeTrack.分层.ToString())
                {
                    cIOinputLayerDepth cSelectLayerDepth = new cIOinputLayerDepth();
                    listStrLine = cSelectLayerDepth.selectSectionDrawData2List(sJH);
                }

                if (trackTypeStr == TypeTrack.测井解释.ToString())
                {
                    cIOinputJSJL cSelectJSJL = new cIOinputJSJL();
                    listStrLine = cSelectJSJL.selectSectionDrawData2List(sJH);
                }

                cPublicMethodForm.read2DataGridViewByListStrLine(listStrLine, this.dgvDataTable);
            }
        }
コード例 #7
0
        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("上层应该比下层选择高,请重新选择。");
            }
        }
コード例 #8
0
        void makeFlattedByLayer(bool bFlattedTVD)
        {
            string sTopXCM = this.cbbTopXCM.SelectedItem.ToString();

            cXmlBase.setNodeInnerText(filePathSectionGeoCss, cXETrackRuler.xmlFullPathiVisible, "0");
            foreach (ItemWellSection item in listWellsSection)
            {
                string sJH          = item.sJH;
                string filePathOper = dirSectionData + "//" + sJH + ".xml";
                float  fTop         = -999;
                //应该先在文件中按层名查找个性layer深度
                XmlNode xnProperty = cXmlBase.selectNodeByInnerText(filePathOper, "sProperty", sTopXCM);
                if (xnProperty != null)
                {
                    itemDrawDataIntervalValue xn = new itemDrawDataIntervalValue(xnProperty.ParentNode);
                    fTop = xn.top;
                }
                else
                {
                    cIOinputLayerDepth fileLayerDepth = new cIOinputLayerDepth();
                    fTop = fileLayerDepth.selectTopDepthMDByJHAndXCM(sJH, sTopXCM);
                }
                if (fTop > 0)  //返回值-999 说明未找到
                {
                    if (bFlattedTVD == false)
                    {
                        cXmlBase.setSelectedNodeChildNodeValue(filePathSectionGeoCss, sJH, "Yview", (-fTop).ToString());
                    }
                    else
                    {
                        float fTVD = cIOinputWellPath.getTVDByJHAndMD(sJH, fTop); //md->tvd
                        cXmlBase.setSelectedNodeChildNodeValue(filePathSectionGeoCss, sJH, "Yview", (-fTVD).ToString());
                    }
                }
            }
        }