Boolean SS0 = false; // Status of Switch S0 Boolean SS1 = false; // Status of Switch S1 Boolean SS2 = false; // Status of Switch S2 Boolean SS3 = false; // Status of Switch S3
if (SS0 == false) { S0.Image = SON.Image; L0.Image = LON.Image; SS0 = true; } else { S0.Image = SOFF.Image; L0.Image = LOFF.Image; SS0 = false; }