Пример #1
0
        private void buttonBack_Click(object sender, EventArgs e)
        {
            var form = new FormArea(vidsporta);

            form.Show();
            this.Hide();
        }
Пример #2
0
        private void buttonOk_Click(object sender, EventArgs e)
        {
            if (!Check())
            {
                MessageBox.Show("Выберите хотя бы один пункт", "Ошибка", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                return;
            }
            List <string> vidsporta = new List <string>();

            foreach (Control c in this.Controls)
            {
                if (c is CheckBox && (c as CheckBox).Checked)
                {
                    vidsporta.Add(c.Text);
                }
            }
            var form = new FormArea(vidsporta);

            form.Show();
            this.Hide();
        }