YORK, Pa. — Tim Barker has won the role of York County District Attorney to continue his tenure that he has held since Jan.