Esempio n. 1
0
        protected virtual void Activate()
        {
            if (ActiveControl == this)
            {
                return;
            }

            if (ActiveControl != null)
            {
                ActiveControl.Deactivate();
            }

            ActiveControl = this;
        }
Esempio n. 2
0
        protected virtual void OnEnabledChanged()
        {
            if (EnabledChanged != null)
            {
                EnabledChanged.Invoke(this, EventArgs.Empty);
            }

            if (!Enabled && ActiveControl == this)
            {
                ActiveControl.Deactivate();
            }

            if (Controls != null)
            {
                for (int I = 0; I < Controls.Count; I++)
                {
                    Controls[I].OnEnabledChanged();
                }
            }
        }