Example #1
0
        public void InsertDataItem()
        {
            string strTrackType = cXmlDocSectionWell.getTrackTypeByID(this.filePathTemple, sIDcurrentTrack);

            if (strTrackType == TypeTrack.沉积旋回.ToString() || strTrackType == TypeTrack.测井解释.ToString() || strTrackType == TypeTrack.描述.ToString())
            {
                FormSectionAddNewDataItem newItem = new FormSectionAddNewDataItem(this.filePathTemple, sIDcurrentTrack, strTrackType, pDepth.X, pDepth.Y);
                if (newItem.ShowDialog() == DialogResult.OK)
                {
                    userFunctionPointer.DynamicInvoke(0);
                }
            }

            if (strTrackType == TypeTrack.文本道.ToString())
            {
                FormSettingSectionText setText = new FormSettingSectionText(this.filePathTemple, sIDcurrentTrack, strTrackType, pDepth.X, pDepth.Y);
                if (setText.ShowDialog() == DialogResult.OK)
                {
                    userFunctionPointer.DynamicInvoke(0);
                }
            }

            if (strTrackType == TypeTrack.符号.ToString())
            {
                FormSectionAddSymbol newSymbol = new FormSectionAddSymbol(this.filePathTemple, sIDcurrentTrack, pDepth.X, pDepth.Y);
                if (newSymbol.ShowDialog() == DialogResult.OK)
                {
                    userFunctionPointer.DynamicInvoke(0);
                }
            }

            if (strTrackType == TypeTrack.岩性层段.ToString())
            {
                FormSectionAddItemLitho newLitho = new FormSectionAddItemLitho(this.filePathTemple, sIDcurrentTrack, strTrackType, pDepth.X, pDepth.Y);
                if (newLitho.ShowDialog() == DialogResult.OK)
                {
                    userFunctionPointer.DynamicInvoke(0);
                }
            }

            if (strTrackType == TypeTrack.图片道.ToString())
            {
                FormSectionAddImageItem newItemImage = new FormSectionAddImageItem(this.filePathTemple, sIDcurrentTrack, pDepth.X, pDepth.Y);
                if (newItemImage.ShowDialog() == DialogResult.OK)
                {
                    userFunctionPointer.DynamicInvoke(0);
                }
            }
        }
Example #2
0
        private void tsmiNewItemAdd_Click(object sender, EventArgs e)
        {
            TreeNode tnSelect = tvSectionEdit.SelectedNode;

            if (tnSelect != null)
            {
                //输入道id,插入item
                string sTrackID   = tnSelect.Name;
                string sTrackType = tnSelect.Tag.ToString();
                if (tnSelect.Level == 2)
                {
                    sTrackID   = tnSelect.Parent.Name;
                    sTrackType = tnSelect.Parent.Tag.ToString();
                }

                FormSectionAddNewDataItem newItem = new FormSectionAddNewDataItem(this.filePathOper, sTrackID, sTrackType, 0, 100);
                if (newItem.ShowDialog() == DialogResult.OK)
                {
                    updateTV();
                    makeNewSVG();
                }
            }
        }