public BasicAttributeNode(tBDA bd)
 {
     Tag = bd;
     bda = bd;
     bda.PropertyChanged += (sender, e) => { update_name(); };;
     update_name();
 }
示例#2
0
        public int AddBasicAttribute(tBDA ba)
        {
            tBDA bda = new tBDA();

            if (ba == null)
            {
                bda.name      = "TEMPLATE_ATTRIBUTE" + tDAType.nattr++;
                bda.bTypeEnum = tBasicTypeEnum.VisString255;
            }
            else
            {
                bda = ba;
            }

            if (bDAField == null)
            {
                bDAField     = new tBDA[1];
                bDAField [0] = bda;
                return(0);
            }
            else
            {
                int index = this.bDAField.Length;
                System.Array.Resize <tBDA> (ref this.bDAField,
                                            this.bDAField.Length + 1);
                this.bDAField [index] = bda;
                return(index);
            }
        }