Beispiel #1
0
        public Mapa()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            paintTablero = new GrupoPaint(new PintaEventHandler[] {
                PintarTableroPart1,
                PintarTableroPart2,
                PintarTableroPart3,
                PintarTableroPart4,
                PintarFichas
            }){ Dock = DockStyle.Fill };
            for (int i = 0; i < 4; i++) {
                paintTablero.Controls[i].Dock = DockStyle.None;
                paintTablero.Controls[i].Size = new Size(Width / 2, Height / 2);
            }
            paintTablero.Controls[0].Location = new Point(0, 0);
            paintTablero.Controls[1].Location = new Point(Width / 2, 0);
            paintTablero.Controls[2].Location = new Point(0, Height / 2);
            paintTablero.Controls[3].Location = new Point(Width / 2, Height / 2);
            mapaAPintar = ZinLock.TableroZinLock.MAPAVACIO;
            ResetPosiciones();
            Controls.Add(paintTablero);
            paintTablero.RefreshAll();
            paintTablero.MouseClick += ClickEvent;
            paintTablero.BringToFront();
        }
Beispiel #2
0
        public Mapa()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            paintTablero = new GrupoPaint(new PintaEventHandler[] {
                PintarTableroPart1,
                PintarTableroPart2,
                PintarTableroPart3,
                PintarTableroPart4,
                PintarFichas
            })
            {
                Dock = DockStyle.Fill
            };
            for (int i = 0; i < 4; i++)
            {
                paintTablero.Controls[i].Dock = DockStyle.None;
                paintTablero.Controls[i].Size = new Size(Width / 2, Height / 2);
            }
            paintTablero.Controls[0].Location = new Point(0, 0);
            paintTablero.Controls[1].Location = new Point(Width / 2, 0);
            paintTablero.Controls[2].Location = new Point(0, Height / 2);
            paintTablero.Controls[3].Location = new Point(Width / 2, Height / 2);
            mapaAPintar = ZinLock.TableroZinLock.MAPAVACIO;
            ResetPosiciones();
            Controls.Add(paintTablero);
            paintTablero.RefreshAll();
            paintTablero.MouseClick += ClickEvent;
            paintTablero.BringToFront();
        }