Exemplo n.º 1
0
        void AddButtons()
        {
            f          = new GroupBox();
            f.Location = new Point(100, 100);
            f.Size     = new Size(40 * field.N, 40 * field.N);
            f.Parent   = this;

            for (int i = 0; i < field.N; ++i)
            {
                for (int j = 0; j < field.N; ++j)
                {
                    ControlButton b = new ControlButton(field, i, j);
                    b.Width           = 37; b.Height = 37;
                    b.Location        = new Point(j * 40, i * 40);
                    b.FlatStyle       = FlatStyle.Flat;
                    b.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.cell));
                    b.ForeColor       = SystemColors.Control;;
                    b.Parent          = f;
                }
            }
            ResizeF(this, new EventArgs());
        }
Exemplo n.º 2
0
        void AddButtons()
        {
            f = new GroupBox();
            f.Location = new Point(100, 100);
            f.Size = new Size(40 * field.N, 40 * field.N);
            f.Parent = this;

            for (int i = 0; i < field.N; ++i)
            {
                for (int j = 0; j < field.N; ++j)
                {
                    ControlButton b = new ControlButton(field, i, j);
                    b.Width = 37; b.Height = 37;
                    b.Location = new Point(j * 40, i * 40);
                    b.FlatStyle = FlatStyle.Flat;
                    b.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.cell));
                    b.ForeColor = SystemColors.Control; ;
                    b.Parent = f;
                }
            }
            ResizeF(this, new EventArgs());
        }