Ejemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            InputView nextForm = new InputView();

            this.Controls.Clear();
            this.Hide();
            nextForm.Show();
        }
Ejemplo n.º 2
0
        public static bool IsInputValid(InputView form)
        {
            int parents, childes;
            try
            {
                parents = int.Parse(form.Controls["textBox1"].Text);
                childes = int.Parse(form.Controls["textBox2"].Text);

                if (parents < childes)
                {
                    return false;
                }
                if (parents > 8)
                {
                    return false;
                }

                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }