Add code contract to the button message methods.