Example #1
0
        public virtual void Initialize(System.Windows.Forms.Control parentControl, System.Drawing.Rectangle rectangle)
        {
            this.SetBounds(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
            this.Parent = parentControl;
            m_propertyControlMap.InitializeControls();
            foreach (Control boundControl in PropertyControlTable.GetControls())
            {
                TextBox boundTextBox = boundControl as TextBox;
                if (null != boundTextBox)
                {
                    boundTextBox.TextChanged += new EventHandler(TextBox_TextChanged);
                    continue;
                }

                CheckBox boundCheckBox = boundControl as CheckBox;
                if (null != boundCheckBox)
                {
                    boundCheckBox.CheckedChanged += new EventHandler(CheckBox_CheckedChanged);
                    continue;
                }
            }

            // Once done, give the derived class the ability to perform some initialization.
            OnInitialize();
        }