public UserSelectionChangeEventArgs(UserSelectionChangeType changeType) { if (changeType != UserSelectionChangeType.SelectionCleared) { throw new ArgumentException(string.Format("Enum value {0} must specify card index info", changeType), "changeType"); } this.changeType = changeType; visibleIndex = -1; }
public UserSelectionChangeEventArgs(UserSelectionChangeType changeType, int cardIndex) { if (changeType == UserSelectionChangeType.SelectionCleared) { throw new ArgumentException("UserSelectionChangeType.SelectionCleared cannot contain card index info", "changeType"); } this.changeType = changeType; visibleIndex = cardIndex; }