Ejemplo n.º 1
0
        public static void creatWellGeoFile(string _sJH)
        {
            creatWellGeoHeadFile(_sJH);
            List <ItemDicInjectProfile> listInjectionProfile = new List <ItemDicInjectProfile>();
            List <itemInputProfile>     listInputProfile     = readInputFile(_sJH);

            foreach (string _YM in listInputProfile.Select(p => p.sYM).Distinct())
            {
                List <itemInputProfile> listInputCurrentYM = listInputProfile.FindAll(p => p.sYM == _YM);
                float fZZRL = listInputCurrentYM.Sum(p => p.fZRL);;  //当前年月总注入量
                foreach (itemInputProfile _item in listInputCurrentYM)
                {
                    ItemDicInjectProfile itemOut = new ItemDicInjectProfile();
                    itemOut.sJH        = _item.sJH;
                    itemOut.sYM        = _item.sYM;
                    itemOut.fDS1       = _item.fDS1;
                    itemOut.fDS2       = _item.fDS2;
                    itemOut.fZRL       = _item.fZRL;
                    itemOut.fPercentZR = (_item.fZRL / fZZRL) * 100;
                    itemOut.fXSHD      = _item.fDS2 - _item.fDS1;
                    itemOut.FXSQD      = _item.fZRL / itemOut.fXSHD;
                    itemOut.sXCM       = cIOinputLayerDepth.getXCMByJHAndDepthInterval(_sJH, _item.fDS1, _item.fDS2);
                    listInjectionProfile.Add(itemOut);
                }
            }
            List <string> ltStrLine = new List <string>();

            foreach (ItemDicInjectProfile _item in listInjectionProfile)
            {
                ltStrLine.Add(ItemDicInjectProfile.item2string(_item));
            }
            string filePath = Path.Combine(cProjectManager.dirPathWellDir, _sJH, cProjectManager.fileNameWellProfile);

            cIOGeoEarthText.addDataLines2GeoEarTxt(filePath, ltStrLine);
        }
Ejemplo n.º 2
0
        public static void selectSectionDrawData2File(string sJH, string filePath)
        {
            StreamWriter sw      = new StreamWriter(filePath, false, Encoding.UTF8);
            string       sReturn = "";

            foreach (var item in readInjectionProfile2Struct(sJH))
            {
                sReturn += ItemDicInjectProfile.item2string(item) + "\t";
            }
            sw.Write(sReturn);
            sw.Close();
        }