コード例 #1
0
ファイル: cSectionUIoperate.cs プロジェクト: xuleoBJ/oilFence
        public static DialogResult setNodeProperty(TreeNode selectNode, string filePathOper)
        {
            DialogResult result        = DialogResult.OK;
            string       selectNodeID  = selectNode.Name;
            XmlNode      selectXmlNode = cXmlBase.selectNodeByID(filePathOper, selectNode.Name);

            if (selectNode.Level == 0) //页面设置
            {
                FormSettingShowState wellShowSetting = new FormSettingShowState(filePathOper);
                result = wellShowSetting.ShowDialog();
            }
            if (selectNode.Level == 1) //道内设置
            {
                FormSettingSectionTrack newForm = new FormSettingSectionTrack(filePathOper, selectNode.Name);
                result = newForm.ShowDialog();
            }

            if (selectNode.Level == 2) //道内属性设置
            {
                if (selectNode.Parent.Tag.ToString() == TypeTrack.曲线道.ToString())
                {
                    FormSettingSectionLog setLogCurve = new FormSettingSectionLog(filePathOper, selectNodeID);
                    result = setLogCurve.ShowDialog();
                }
                if (cProjectManager.ltStrTrackTypeIntervalProperty.IndexOf(selectNode.Parent.Tag.ToString()) >= 0)
                {
                    FormSettingSectionDataItemView setJSJL = new FormSettingSectionDataItemView(filePathOper, selectNodeID, selectNode.Parent.Tag.ToString());
                    result = setJSJL.ShowDialog();
                }

                if (selectNode.Parent.Tag.ToString() == TypeTrack.分层.ToString())
                {
                    FormSettingSectionLayer setLayer = new FormSettingSectionLayer(filePathOper, selectNode.Parent.Name, selectNodeID);
                    result = setLayer.ShowDialog();
                }
                if (selectNode.Parent.Tag.ToString() == TypeTrack.文本道.ToString())
                {
                    FormSettingSectionText setText = new FormSettingSectionText(filePathOper, selectNodeID);
                    result = setText.ShowDialog();
                }
            }
            return(result);
        }
コード例 #2
0
ファイル: wellPanel.cs プロジェクト: xuleoBJ/oilFence
        public void setDataItem()
        {
            bool bSeletctDataItemInSelectTrack = cXmlDocSectionWell.isItemINtrackByID(filePathTemple, sIDcurrentTrack, sIDcurrentItem);

            if (bSeletctDataItemInSelectTrack == false)
            {
                MessageBox.Show("操作数据项不在选择图道内。", "提示");
            }
            else
            {
                string strTrackType = cXmlDocSectionWell.getTrackTypeByID(this.filePathTemple, sIDcurrentTrack);
                if (cProjectManager.ltStrTrackTypeIntervalProperty.IndexOf(strTrackType) >= 0)
                {
                    FormSettingSectionDataItemView setDataItem = new FormSettingSectionDataItemView(this.filePathTemple, this.sIDcurrentItem, strTrackType);
                    if (setDataItem.ShowDialog() == DialogResult.OK)
                    {
                        userFunctionPointer.DynamicInvoke(0);
                    }
                }
                else if (strTrackType == TypeTrack.文本道.ToString())
                {
                    FormSettingSectionText setText = new FormSettingSectionText(this.filePathTemple, this.sIDcurrentItem);
                    if (setText.ShowDialog() == DialogResult.OK)
                    {
                        userFunctionPointer.DynamicInvoke(0);
                    }
                }
                else if (strTrackType == TypeTrack.岩性层段.ToString())
                {
                    FormSectionAddItemLitho setLitho = new FormSectionAddItemLitho(this.filePathTemple, sIDcurrentTrack, this.sIDcurrentItem);
                    if (setLitho.ShowDialog() == DialogResult.OK)
                    {
                        userFunctionPointer.DynamicInvoke(0);
                    }
                }
                else if (strTrackType == TypeTrack.图片道.ToString())
                {
                    FormSectionAddImageItem setImage = new FormSectionAddImageItem(this.filePathTemple, sIDcurrentTrack, this.sIDcurrentItem);
                    if (setImage.ShowDialog() == DialogResult.OK)
                    {
                        userFunctionPointer.DynamicInvoke(0);
                    }
                }
                else if (strTrackType == TypeTrack.符号.ToString())
                {
                    FormSectionAddSymbol newSymbol = new FormSectionAddSymbol(this.filePathTemple, sIDcurrentTrack, this.sIDcurrentItem);
                    if (newSymbol.ShowDialog() == DialogResult.OK)
                    {
                        userFunctionPointer.DynamicInvoke(0);
                    }
                }
                if (strTrackType == TypeTrack.分层.ToString())
                {
                    FormSettingSectionLayer setLayer = new FormSettingSectionLayer(filePathTemple, sIDcurrentTrack, this.sIDcurrentItem);
                    if (setLayer.ShowDialog() == DialogResult.OK)
                    {
                        userFunctionPointer.DynamicInvoke(0);
                    }
                }
            }
        }