Text this: A Flexible Control Strategy for Shore-to-Ship Power System in Terms of Grid-Connected and Off-Grid Switch