/// <summary> /// Places the number on the screen. /// </summary> /// <param name="e">Contains the number being moved</param> private void MoveCurrentNumber(LoadNumberEventArgs e) { Number n = e.EventNumber; n.Display.Left = n.Column * (pnlGame.Width / Game.ColMax); n.Display.Top = n.Row * (pnlGame.Height / Game.RowMax); }
/// <summary> /// Empty load /// </summary> /// <param name="e"></param> private void EmptyLoad(LoadNumberEventArgs e) { /* * Why do I do this? * Because I believe that firing an event that has no handlers should not cause an exception. * Nothing should happen. * It's not unusual that you do something that no one cares about. */ }
/// <summary> /// Loads the number onto the screen. /// </summary> /// <param name="e">Contains the number being loaded</param> private void LoadNextNumber(LoadNumberEventArgs e) { Label loadedNum = new Label(); Number n = e.EventNumber; n.OnRemove += RemoveNumber; n.Display.Top = 0; n.Display.Parent = pnlGame; n.Display.Left = n.Column * (pnlGame.Width / Game.ColMax); lblNextNumber.Text = game.NextNumber.ToString(); }