private void Submit()
        {
            bool?res = new Dialogbox(0).ShowDialog();

            if (res == true)
            {
                string name = namebox.Text;
                if (DoCaptcha())
                {
                    messagelabel.Content = "Congratulations!!! You submitted your name:\n" + name;
                }
            }
        }
示例#2
0
        private void TrySubmit()
        {
            double val    = rnd.NextDouble();
            double tobeat = depth == 0 ? minimum : minimum / depth;

            if (val > tobeat)
            {
                DialogResult = true;
                Close();
            }
            else
            {
                DialogResult = new Dialogbox(depth + 1).ShowDialog();
                Close();
            }
        }