Esempio n. 1
0
        private void Hole_Leave(object sender, EventArgs e)
        {
            DialogResult re;

            if (long.TryParse(Hole.Text, out long mynum))
            {
                if (mynum < 0)
                {
                    re = MessageBox.Show("Error");


                    if (re == DialogResult.OK)
                    {
                        Hole.Clear();
                    }
                    return;
                }
                number = mynum;
            }
            else
            {
                re = MessageBox.Show("Error");


                if (re == DialogResult.OK)
                {
                    Hole.Clear();
                }
            }
        }