Aharonov–Bohm Effect, Flat Connections, and Green's Theorem