static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); TetrisController gameController = new TetrisController(); gameController.StartGame(); }
public B10432016(TetrisController controller) { InitializeComponent(); //get畫布 graphics = this.CreateGraphics(); //塗白底 graphics.Clear(Color.White); //double buffer m_CurrentContext = BufferedGraphicsManager.Current; m_Graphics = m_CurrentContext.Allocate(this.CreateGraphics(), this.DisplayRectangle); DrawGameField(); this.controller = controller; }
public B10432017(TetrisController controller) { InitializeComponent(); graphics = this.CreateGraphics(); graphics.Clear(Color.White); my_CurrentContext = BufferedGraphicsManager.Current; my_Graphics = my_CurrentContext.Allocate(this.CreateGraphics(), this.DisplayRectangle); drawBackGround(); this.controller = controller; viewTimer.Enabled = true; viewTimer.Interval = 1000; viewTimer.Tick += new EventHandler(viewTimer_Tick); }
public B10432028(TetrisController controller) { sTimer.Tick += new EventHandler(sTimer_Tick); InitializeComponent(); //建立畫布 graphics = this.CreateGraphics(); //畫布塗白底 graphics.Clear(Color.White); //double buffer m_CurrentContext = BufferedGraphicsManager.Current; m_Graphics = m_CurrentContext.Allocate(this.CreateGraphics(), this.DisplayRectangle); drawBackGround(); this.controller = controller; }
public B10432008(TetrisController controller) { InitializeComponent(); //get畫布 graphics = this.CreateGraphics(); //塗白底 graphics.Clear(Color.WhiteSmoke); //double buffer m_CurrentContext = BufferedGraphicsManager.Current; m_Graphics = m_CurrentContext.Allocate(this.CreateGraphics(), this.DisplayRectangle); drawBackGround(); this.controller = controller; //this.model = model; }