Пример #1
0
        public override void OnKeyDown(Keys k)
        {
            FireKeyDown(k);

            if (k == CloseKey)
            {
                CloseButton.DoClick();
            }
            else if (k == ConfirmKey)
            {
                ButtonOk.DoClick();
            }
        }
Пример #2
0
        public override void OnKeyDown(Keys k)
        {
            FireKeyDown(k);

            switch (k)
            {
            case Keys.Escape:
                if (CloseButton.Visible)
                {
                    CloseButton.DoClick();
                }
                break;

            case Keys.Enter:
                if (ButtonOk.Visible)
                {
                    ButtonOk.DoClick();
                }
                break;
            }
        }