Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        private void tsmiLogData_Click(object sender, EventArgs e)
        {
            TreeNode currentNode = tvSectionEdit.SelectedNode;

            setUpIDByTN(currentNode);

            if (sIDcurrentItem.StartsWith("idLog"))
            {
                string             sJH      = cXmlDocSectionWell.getNodeInnerText(this.filePathOper, cXmlDocSectionWell.fullPathJH);
                string             sLogName = sIDcurrentItem.Remove(sIDcurrentItem.Length - 12).Remove(0, 5);
                FormSectionDataLog formInputDataTableSingleWell = new
                                                                  FormSectionDataLog(sJH, sLogName, TypeTrack.曲线道.ToString(), filePathOper, sIDcurrentItem);
                formInputDataTableSingleWell.ShowDialog();
            }
        }
Exemplo n.º 3
0
        private void tsmiLogDataLoad_Click(object sender, EventArgs e)
        {
            XmlNode selectTrack  = cXmlBase.selectNodeByID(filePathTemple, sIDcurrentTrack);
            string  typeTrackstr = cXmlDocSectionWell.getTrackTypeByID(filePathTemple, sIDcurrentTrack);

            if (typeTrackstr == TypeTrack.曲线道.ToString() && sIDcurrentItem.StartsWith("idLog"))
            {
                string             sJH      = cXmlDocSectionWell.getNodeInnerText(this.filePathTemple, cXmlDocSectionWell.fullPathJH);
                string             sLogName = sIDcurrentItem.Remove(sIDcurrentItem.Length - 12).Remove(0, 5);
                FormSectionDataLog formInputDataTableSingleWell = new
                                                                  FormSectionDataLog(sJH, sLogName, TypeTrack.曲线道.ToString(), filePathTemple, sIDcurrentItem);
                if (formInputDataTableSingleWell.ShowDialog() == DialogResult.OK)
                {
                    userFunctionPointer.DynamicInvoke(0); //0全刷,1只刷树
                }
            }
        }