A Molecular Switch Based on Potential-Induced Changes of Oxidation State