In this work, two structurally novel isomeric diarylethene chemosensors based on a styrene-linked pyrido[2,3-b]pyrazine unit were synthesized by using Heck coupling reaction. Interestingly, the two reported chemosensors exhibited quick colorimetric sequential responses towards Hg2+ and then Sn2+. Furthermore, the fluorescence intensity of the diarylethene-mercury dyad 1O′ was significantly quenched due to the formation of a new complex 1O-Hg2+. 1O-Hg2+ could be used as a new platform for rapid detection of Sn2+, which involved a conspicuous fluorescence enhancement in the detection progress. Based on the fact that the fluorescence of luminogen 1O could be effectively adjusted by the stimulations of light and metal ions, an integrated combinational logic circuit was constructed with 365 nm UV light, Hg2+ and Sn2+ as input signals and the fluorescence intensity at 560 nm as output signals.