protected virtual void OnGameTimerTick(GameTimerEventArgs e) { EventHandler <GameTimerEventArgs> handler = gTimerTick; if (handler != null) { handler(this, e); } }
private void GameTimerTick(object sender, EventArgs e) { gTimerCount++; GameTimerEventArgs tEA = new GameTimerEventArgs(); tEA.CounterValue = gTimerCount; OnGameTimerTick(tEA); if (gTimerCount == 9999) { gTimer.Stop(); } }
private void ScoreTimer_gTimerTick(object sender, GameTimerEventArgs e) { GameForm.Controls.Find("TimerTextBox", true)[0].Text = e.CounterValue.ToString("D" + 4); }