private void FieldModified(object sender, FieldModType modType)
 {
     InvokeAction(() =>
     {
         switch (_field.State)
         {
         case FieldState.AllMinesMarked:
         case FieldState.AllCellsRevealed:
             Invoke(new Action(EndGame));
             break;
         }
     });
 }
        // Обработчик события изменения клеток поля.
        private void OnFieldModified(object sender, FieldModType modType)
        {
            switch (modType)
            {
            case FieldModType.Initialized:
                break;

            case FieldModType.CellRevealed:
                PlayCellRevealedSound();
                break;

            case FieldModType.CellMarked:
                PlayCellMarkedSound();
                break;

            case FieldModType.MinesExploded:
                PlayMinesExplodedSound();
                break;

            default:
                throw new NotSupportedException();
            }
        }
 // Обработчик события изменения клеток поля.
 private void OnFieldModified(object sender, FieldModType modType)
 {
     ShowField();
 }