A Quasi-periodic Fast-propagating Magnetosonic Wave Associated with the Eruption of a Magnetic Flux Rope