c# - How I send 2 integer arguments using a Timer.tick event handler -
i have constructor timer.tick event,
public playme(int rows, int cols) { this.rows = rows; this.cols = cols; delay = new timer(); delay.enabled = false; delay.interval = 550; delay.tick += delay_tick; restart = new timer(); restart.enabled = false; restart.interval = 550; restart.tick += restart_tick(rows,cols);
how fire both rows , cols arguments inside timer.tick method?
void restart_tick(int rows, int cols) { restart.stop(); if (gameover && lbllose.visible) { clearboard(); createboard(rows,cols); } if (gameover && lblwin.visible) { (int = 0; < 5; i++) { clearboard();
rewrite:
restart.tick += (object s, eventargs a) => restart_tick(s, a, rows, cols);
and method:
void restart_tick(object sender, eventargs e,int rows, int cols)
Comments
Post a Comment