protected void OnParentFieldStateChanged(object sender, EventArgs e) { if (ParentFieldState == MinesweeperGameState.GameWon) { Image = SmileyOnWin; } else if (ParentFieldState == MinesweeperGameState.GameLost) { Image = SmileyOnLose; } else if (ParentFieldActive) { Image = SmileyStandard; ParentField.RegisterMouseDownEventHandler(OnForeignObjectMouseDown); ParentField.RegisterMouseUpEventHandler(OnForeignObjectMouseUp); } }