Ejemplo n.º 1
0
        private void OpenProperty(Object sender, EventArgs e)
        {
            this.colUserControl = base.Component as Thermometer;
            var parentControl = (Thermometer)Control;
            var propertyForm  = new ThermometerPorperty(parentControl);

            propertyForm.ShowDialog();
            //只改变BackColor进行Designer.cs的强制更新
            GetPropertyByName("BackColor").SetValue(colUserControl, parentControl.BackColor);
        }
 public ThermometerPorperty(Thermometer _ctrl)
 {
     InitializeComponent();
     _beforeCtrl  = ControlFactory.CloneCtrl(_ctrl);
     _changedCtrl = _ctrl;
 }