示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            D1TextBoxProperty per = (this.propertyGrid1.SelectedObject as D1TextBoxProperty);

            m_return = per;
            Console.WriteLine(per.Name + per.LabelName);
            Close();
        }
示例#2
0
        private void FrmPropertyDesign_Load(object sender, EventArgs e)
        {
            Console.WriteLine(m_control.GetType());
            D1TextBoxProperty per = new D1TextBoxProperty()
            {
                Name      = m_control.Name,
                LabelName = (m_control as D1Lib.D1TextBox).LabelName
            };

            this.propertyGrid1.SelectedObject = per;
        }
示例#3
0
        private void Fields_Edit_Click(object sender, EventArgs e)
        {
            Control           ctl = this.propertyGrid1.SelectedObjects[0] as Control;
            FrmPropertyDesign frmPropertyDesign = new FrmPropertyDesign();

            frmPropertyDesign.m_control = ctl;
            frmPropertyDesign.ShowDialog();
            D1TextBoxProperty pro = (frmPropertyDesign.m_return as D1TextBoxProperty);

            if (pro == null)
            {
                return;
            }
            if (ctl.Name != pro.Name && ControlMap.ContainsKey(pro.Name))
            {
                MessageBox.Show("字段名重复,请检查!");
                return;
            }



            Console.WriteLine(pro.Name + pro.LabelName);
            this.propertyGrid1.Refresh();
        }