Пример #1
0
        public void create_world_schwer(int x, int y)
        {

            f4 = new Form4();
            f4.MdiParent = this;

            for (int i = 0; i < x; ++i)
            {
                for (int j = 0; j < y; ++j)
                {
                    add_button_schwer(i, j, f4);
                }
            }


            f4.Show();
        }
Пример #2
0
        public void add_button_schwer(int x, int y, Form4 parent)
        {




            int width = 24;
            int height = 24;
            int padding = 1;
            Button test = new Button();






            test.Location = new Point(width * x + padding, height * y + padding);
            test.Height = height;
            test.Width = width;
            test.BackColor = Color.FromArgb(150, 150, 150);
            test.ForeColor = Color.Blue;

            test.Name = "button_" + x + "_" + y;
            test.Font = new Font("Arial", 11, FontStyle.Bold);
            test.Text = "";
            test.Click += test_Click;
            test.MouseDown += right_click;





            parent.Controls.Add(test);
        }
Пример #3
0
        public void closeWindows()
        {

            if (f2 != null)
            {
                f2.Close();
                f2 = null;
            }
            if (f3 != null)
            {
                f3.Close();
                f3 = null;
            }
            if (f4 != null)
            {
                f4.Close();
                f4 = null;
            }
            f = null;
            labelIsSet = false;
            seconds = 0;
            tmr.Enabled = false;
        }