Beispiel #1
0
        //WS: 2019-10-09 Update UI based on function code.
        private void cmbFunCode_SelectionChangeCommitted(object sender, EventArgs e)
        {
            Commons.GetNextSeqValue(sqlConnection, cmbFunCode.Text, ref iNextSeq);
            textBox1.Text    = iNextSeq.ToString("D5");
            lblTagValue.Text = cmbUnit.Text + "-" + cmbFunCode.Text + "-" + textBox1.Text;

            string strClassName = Commons.MapFunctionCode2ClassName(cmbFunCode.Text);

            Commons.UpdateUIBasedOnFunctionCode(this, strClassName);

            s_current.Refresh();
        }
Beispiel #2
0
        public void Accept(BCOM.Element Element, ref BCOM.Point3d Point, BCOM.View View)
        {
            BCOM.Element oEle = Element;

            ECInstanceList oECInstancelist = Tag.oECAdaptor.ReadInstancesFromElement(oEle, false);

            foreach (ECInstance oEC in oECInstancelist)
            {
                if (oEC.ClassDefinition.Name == "Embankment" || oEC.ClassDefinition.Name == "RetainWall" ||
                    oEC.ClassDefinition.Name == "Pond" || oEC.ClassDefinition.Name == "Road" ||
                    oEC.ClassDefinition.Name == "OpenChannel" || oEC.ClassDefinition.Name == "Dike")
                {
                    Commons.UpdateUIBasedOnFunctionCode(Tag.s_current, oEC.ClassDefinition.Name);
                    Commons.PopulateGeoTagForm(Tag.s_current, oEC);

                    //WS: select the element.
                    AddInMain.ComApp.ActiveModelReference.SelectElement(oEle, true);

                    AddInMain.ComApp.ShowCommand("");
                    AddInMain.ComApp.ShowPrompt("Old Tag Data Retrived.");
                    break;
                }
            }
        }