Beispiel #1
0
 public FromSourceControl(LibFromSourceField[] sourceFields)
     : this()
 {
     foreach (LibFromSourceField item in sourceFields)
     {
         this.listBox1.Items.Add(item);
         FromSourceProperty sourceProperty = new FromSourceProperty(item.ID);
         sourceProperty.Dock = DockStyle.Fill;
         this.splitContainer1.Panel2.Controls.Add(sourceProperty);
         sourceProperty.SetPropertyValue(item, null);
         ModelDesignProject.SetControlVisible(sourceProperty, this.splitContainer1.Panel2.Controls);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 新增按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button1_Click(object sender, EventArgs e)
        {
            LibFromSourceField fromSourceField = new LibFromSourceField();

            fromSourceField.ID = Guid.NewGuid().ToString();
            this.listBox1.Items.Add(fromSourceField);
            FromSourceProperty sourceProperty = new FromSourceProperty(fromSourceField.ID);

            sourceProperty.Dock = DockStyle.Fill;
            this.splitContainer1.Panel2.Controls.Add(sourceProperty);
            sourceProperty.SetPropertyValue(fromSourceField, null);
            ModelDesignProject.SetControlVisible(sourceProperty, this.splitContainer1.Panel2.Controls);
            //SetPanel2ControlsVisible(sourceProperty);
        }