Пример #1
0
        // Изменение кнопки "Сгенерировать"
        private void Gen_checkBox_CheckedChanged(object sender, EventArgs e)
        {
            if (Gen_checkBox.Checked)
            {
                UserShips = new Ship[Col, Row];
                User_panel.Controls.Clear();
                CreateUserShips();
                VisibleUserShips();
                HandGen_panel.Hide();
            }
            else
            {
                UserShips = new Ship[Col, Row];
                User_panel.Controls.Clear();
                HandGen_panel.Show();

                VisibleClearUserField();
                P4 = 1;
                P3 = 2;
                P2 = 3;
                P1 = 4;
                P1_radioButton.Enabled = true;
                P2_radioButton.Enabled = true;
                P3_radioButton.Enabled = true;
                P4_radioButton.Enabled = true;
                Vect_checkBox.Enabled  = true;
            }
        }
Пример #2
0
        private void Refresh_button_Click(object sender, EventArgs e)
        {
            UserShips = new Ship[Col, Row];
            UserField = new PictureBox[Col, Row];
            User_panel.Controls.Clear();
            HandGen_panel.Show();

            VisibleClearUserField();
            P4 = 1;
            P3 = 2;
            P2 = 3;
            P1 = 4;
            P1_radioButton.Enabled = true;
            P2_radioButton.Enabled = true;
            P3_radioButton.Enabled = true;
            P4_radioButton.Enabled = true;
            Vect_checkBox.Enabled  = true;
        }