예제 #1
0
        public FieldExtendFrm(List <string> columnNameList, string filedName, ExtendAttributeInfo extendInfo)
        {
            InitializeComponent();
            this.columnNameList           = columnNameList;
            this.lblFieldName.Text        = extendInfo.DependColumn;
            this.lblFieldName.Tag         = extendInfo.DependColumnType;
            this.txtNewAttributeName.Text = filedName;
            this.txtComment.Text          = extendInfo.Comment;
            this.cmbType.SelectedItem     = ExtendInfo.AttributeType;
            this.ExtendInfo = extendInfo;

            this.Text        = "属性扩展窗口 - 编辑";
            this.btnAdd.Text = "保存";

            this.tabControl1.SelectedIndex = extendInfo.FormatType;
            if (extendInfo.FormatType == 0)
            {
                this.txt1.Text = extendInfo.FormatStr;
            }
            else if (extendInfo.FormatType == 1)
            {
                this.txt2.Text = extendInfo.FormatStr;
            }
            else if (extendInfo.FormatType == 2)
            {
                this.txt3.Text = extendInfo.FormatStr.Replace("\n", "\r\n");
            }
        }
예제 #2
0
        public static void ChangeExtendInfo(string attrName, ExtendAttributeInfo extendInfo)
        {
            var item = ExtendList.Find(p => p.NewAttName == attrName);

            if (item != null)
            {
                item = extendInfo;
            }
        }
예제 #3
0
 public static void AddAttribute(ExtendAttributeInfo extendInfo)
 {
     ExtendList.Add(extendInfo);
 }