コード例 #1
0
 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);
     }
 }