private void LoadForm()
        {
            PropertyInfo[] props = Relation.GetType().GetProperties();
            int            top   = 45;
            int            left  = 3;
            int            id    = 1;

            foreach (PropertyInfo pi in props)
            {
                System.Reflection.PropertyAttributes attrs = pi.Attributes;
                string name = pi.Name;
                Label  lbl  = new Label();
                lbl.Location = new System.Drawing.Point(3, top);
                lbl.Size     = new System.Drawing.Size(70, 20);
                lbl.Name     = "lbl_" + name + "_" + id;
                lbl.Text     = name;

                TextBox tb = new TextBox();
                tb.Location = new System.Drawing.Point(80, top);
                tb.Name     = "txt_" + name + "_" + id;
                tb.Size     = new System.Drawing.Size(200, 20);
                tb.TabIndex = 0;
                tb.Text     = pi.GetValue(Relation, null).ToString();

                this.Controls.Add(lbl);
                this.Controls.Add(tb);
                top += 25;
                id  += 1;
            }



            //tb.Text = Relation.LogicalName;
            //foreach (string enu in Enum.GetNames(typeof(CodeGenerator.BL.Modeler.RelationType.TypeUsage)))
            //{
            //    cboRelationType.Items.Add(enu);
            //}
            //cboRelationType.SelectedIndex = cboRelationType.FindString(Relation.Type.Usage.ToString());
        }
Beispiel #2
0
 public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers)
 {
     throw null;
 }
Beispiel #3
0
 public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Type returnType, System.Type[] parameterTypes)
 {
     throw null;
 }