/// <summary> /// Capture logic events /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gameUI_OnGameEvents(object sender, NotificationEvent e) { }
/// <summary> /// What to do when the puzzle is completed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void gameUI_OnGameWin(object sender, NotificationEvent e) { switch(e.Command) { case ("Next"): PuzzleCompletedNext(); return; case ("Cancel"): PuzzleCompletedCancel(); return; case ("Save"): PuzzleCompletedSave(); return; case ("Home"): PuzzleCompletedExit(); return; } throw new NotImplementedException(); }
/// <summary> /// Allow 'friend' classes to send a common notification event /// </summary> /// <param name="e"></param> protected internal void FireNotificationEvent(NotificationEvent e) { if (OnGameEvents != null) { OnGameEvents(this, e); } }