CapDemo.GUI.User_Controls.General_Setting.txt_TimeQuestion_TextChanged C# (CSharp) Method

txt_TimeQuestion_TextChanged() private method

private txt_TimeQuestion_TextChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void txt_TimeQuestion_TextChanged(object sender, EventArgs e)
        {
            if (txt_TimeQuestion.Text!="")
            {
                if (Convert.ToInt32(txt_TimeQuestion.Text) == 0 )
                {
                    MessageBox.Show("Vui lòng nhập thời gian hiển thị câu hỏi lớn hơn 0.", "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txt_TimeQuestion.Text = "";
                }
                else
                {
                    if (Convert.ToInt32(txt_TimeQuestion.Text) > 300)
                    {
                        MessageBox.Show("Vui lòng nhập thời gian hiển thị câu hỏi nhỏ hơn hoặc bằng 300.", "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txt_TimeQuestion.Text = "";
                    }
                }
            }
        }