Esempio n. 1
0
        public static XElement setTrackNode(string filePathSelectTemplatelate, TypeTrack eTypeTrack, int iTrackWidth)
        {
            string   sTrackID    = cIDmake.idTrack(); //自动分配一个id,时间是唯一
            string   sTrackTitle = eTypeTrack.ToString();
            XElement trackNode   = new XElement("Track", new XAttribute("id", sTrackID));

            trackNode.Add(new XElement("visible", "1"));
            trackNode.Add(new XElement("trackType", eTypeTrack.ToString()));
            trackNode.Add(new XElement("trackTitle", sTrackTitle));
            trackNode.Add(new XElement("trackWidth", iTrackWidth.ToString()));
            trackNode.Add(new XElement("hasRect", "0"));
            trackNode.Add(new XElement("fontColor", "black"));
            trackNode.Add(new XElement("trackHeadRectHeight", "60"));
            trackNode.Add(new XElement("trackHeadFontSize", "18"));
            trackNode.Add(new XElement("fontSize", "16"));  //道内字体
            trackNode.Add(new XElement("writingMode", "lr"));
            trackNode.Add(new XElement("dataSource", "0")); //记录数量从哪里来的 如果是1 表示从数据库来,如果是0 表示单独加载
            if (eTypeTrack == TypeTrack.深度尺)
            {
                trackNode.Add(new XElement("mainScale", "50"));
                trackNode.Add(new XElement("minScale", "10"));
                trackNode.Add(new XElement("iTypeRuler", "0"));
                trackNode.Add(new XElement("unit", "m"));
            }
            if (eTypeTrack == TypeTrack.分层)
            {
                trackNode.Add(new XElement("autoFill", "true"));
            }
            else if (eTypeTrack == TypeTrack.曲线道)
            {
            }
            else if (eTypeTrack == TypeTrack.符号)
            {
                trackNode.Add(new XElement("textFontSize", "10"));     //备用
                trackNode.Add(new XElement("textFontColor", "black")); //备用
            }
            else if (eTypeTrack == TypeTrack.文本道)
            {
                trackNode.Add(new XElement("iAlignMode", ((int)textAlignMode.middleMiddle).ToString()));
                trackNode.Add(new XElement("textFontSize", "10"));     //备用
                trackNode.Add(new XElement("textFontColor", "black")); //备用
            }
            if (eTypeTrack == TypeTrack.测井解释)
            {
            }
            return(trackNode);
        }
Esempio n. 2
0
        /// <summary>
        ///增加道有2部分,一是增加xml文件
        ///treeview根据xml生成????
        /// </summary>
        /// <param name="trackName"></param>
        /// <param name="eTypeTrack"></param>
        void addTrackCss(TypeTrack eTypeTrack)
        {
            int iTrackWidth = 60;

            if (cProjectManager.ltStrTrackTypeIntervalProperty.IndexOf(eTypeTrack.ToString()) >= 0)
            {
                iTrackWidth = 50;
            }
            if (eTypeTrack == TypeTrack.曲线道 || eTypeTrack == TypeTrack.岩性层段)
            {
                iTrackWidth = 120;
            }
            if (this.wellPanelMain.sIDcurrentTrack != "")
            {
                cXmlDocSectionWell.addTrackCss(filePathOper, this.wellPanelMain.sIDcurrentTrack, eTypeTrack, iTrackWidth);
            }
            else
            {
                cXmlDocSectionWell.addTrackCss(filePathOper, eTypeTrack, iTrackWidth);
            }
            updateTV();
            makeNewSVG();
        }
Esempio n. 3
0
        //节点名存ID 通过id xml和 treeview 关联
        public static DialogResult updateTrackData(string sJHSelected, TreeNode selectNode, string filePathOper)
        {
            string       sTrackID      = selectNode.Name;
            XmlNode      selectXmlNode = cXmlBase.selectNodeByID(filePathOper, sTrackID);
            string       typeTrackstr  = selectNode.Tag.ToString();
            DialogResult resultRet     = DialogResult.OK;

            if (selectNode.Level == 1)
            {
                if (selectNode.Tag.ToString() == TypeTrack.深度尺.ToString())
                {
                    FormSettingSectionDepthRuler setRuler = new FormSettingSectionDepthRuler(filePathOper, sTrackID);
                    resultRet = setRuler.ShowDialog();
                }
                else
                {
                    FormDataImportWell formInputDataTableSingleWell = new
                                                                      FormDataImportWell(sJHSelected, typeTrackstr, filePathOper, sTrackID);
                    resultRet = formInputDataTableSingleWell.ShowDialog();
                }
            }

            if (selectNode.Level == 2)
            {
                if (selectNode.Parent.Tag.ToString() == TypeTrack.曲线道.ToString())
                {
                    TypeTrack          typetrack = (TypeTrack)Enum.Parse(typeof(TypeTrack), selectNode.Parent.Tag.ToString());
                    string             sLogName  = selectNode.Tag.ToString();
                    FormSectionDataLog formInputDataTableSingleWell = new
                                                                      FormSectionDataLog(sJHSelected, sLogName, typetrack.ToString(), filePathOper, sTrackID);
                    resultRet = formInputDataTableSingleWell.ShowDialog();
                }
            }//end lever2
            return(resultRet);
        }