示例#1
0
        public void create_world_mittel(int x, int y)
        {

            f3 = new Form3();
            f3.MdiParent = this;

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


            f3.Show();
        }
示例#2
0
        public void add_button_mittel(int x, int y, Form3 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;
        }