private void ValidateData(object sender, EventArgs e) { OK.IsEnabled = ((CreateNewIssue && Validation.IsValid(CommentTextBox)) || (!CreateNewIssue && Validation.IsValid(IssueNumberTextBox))) && Validation.IsValid(FileNameTextBox); }