Exemplo n.º 1
0
        void frm_Shown(object sender, EventArgs e)
        {
            panel.Height = this.ClientSize.Height;
            panel.Width  = panel.Height + 20;
            panel.Top    = (this.ClientSize.Height - panel.Height) / 2;
            panel.Left   = (this.ClientSize.Width - panel.Width) / 2;
            Point panelCenter = new Point(panel.Width / 2, panel.Height / 2);

            int radius = (this.ClientSize.Height - 20) / 2;

            wheel = new GameWheel(panelCenter, radius, 50, 1000, 25);
            wheel.SetGraphics(panel.CreateGraphics());
            wheel.Draw();
        }
Exemplo n.º 2
0
        void frm_Shown(object sender, EventArgs e)
        {
            panel.Height = this.ClientSize.Height;
            panel.Width  = panel.Height + 60;
            panel.Top    = (this.ClientSize.Height - panel.Height) / 2;
            panel.Left   = (this.ClientSize.Width - panel.Width) / 2;
            Point panelCenter = new Point(panel.Width / 2, panel.Height / 2);

            int radius = (this.ClientSize.Height - 20) / 2;

            string[] values = new String[] { "A1", "B2", "C1", "D2", "E1", "F2", "G1" };
            wheel = new GameWheel(panelCenter, radius, values);

            wheel.SetGraphics(panel.CreateGraphics());
            wheel.Draw();
        }