예제 #1
0
 private void textBoxIcao_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == Convert.ToChar(Keys.Enter))
     {
         SubmitButton.PerformClick();
     }
 }
예제 #2
0
파일: NameInput.cs 프로젝트: imdonix/chess
 private void PassTextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyValue == 13)
     {
         SubmitButton.PerformClick();
     }
 }
예제 #3
0
        /// <summary>
        /// 完成初始化
        /// </summary>
        protected virtual void PostInitialize()
        {
            if (ProgramConfiguration.Instance.OrderDlgCenterMainform)
            {
                UiUtility.PlaceFormAtCenter(this, show: false);
            }
            else
            {
                StartPosition = FormStartPosition.CenterScreen;
            }
            FormPlacementManager.Instance.Control(this);

            Layer = new MsgLayer();
            Controls.Add(Layer);
            Layer.BringToFront();

            //空格键快速提交
            KeyDown += (s, e) =>
            {
                if (SubmitButton?.Enabled == true && !InQueue)
                {
                    if (e.KeyCode == Keys.Space || e.KeyCode == Keys.Enter)
                    {
                        SubmitButton.PerformClick();
                        e.Handled = true;
                    }
                }
            };

            KeyPreview = true;
        }
예제 #4
0
        public PasswordRecovery()
        {
            InitializeComponent();
            FormBorderStyle = FormBorderStyle.FixedSingle;
            MaximizeBox     = false;

            EmailTextbox.KeyDown += (sender, args) =>
            {
                if (args.KeyCode == Keys.Return)
                {
                    SubmitButton.PerformClick();
                }
            };
        }
예제 #5
0
        public Activation_Stage2(string email, string paymentType)
        {
            InitializeComponent();

            CodeTextbox.KeyDown += (sender, args) =>
            {
                if (args.KeyCode == Keys.Return)
                {
                    SubmitButton.PerformClick();
                }
            };

            m_Email       = email;
            m_PaymentType = paymentType;
        }
예제 #6
0
        public Activation_Stage1(string paymentType)
        {
            InitializeComponent();
            //FormBorderStyle = FormBorderStyle.FixedSingle;
            MaximizeBox = false;

            EmailTextbox.KeyDown += (sender, args) =>
            {
                if (args.KeyCode == Keys.Return)
                {
                    SubmitButton.PerformClick();
                }
            };

            m_paymentType = paymentType;
        }