private void DigitalTImer_Tick(object sender, EventArgs e) { digit.Connect_port0_read(ref ErrorMsg); digit.Connect_port1_write(); /*if (ErrorMsg != null) * { * DigitalTImer.Enabled = false; * }*/ digit.port1_Output(0, true, ref ErrorMsg); digit.port1_Output(1, true, ref ErrorMsg); digit.port1_Output(2, true, ref ErrorMsg); digit.port1_Output(3, false, ref ErrorMsg); state = digit.port0_Input(ref ErrorMsg); myledbulb1.On = state[0]; myledbulb2.On = state[1]; myledbulb3.On = state[2]; myledbulb4.On = state[3]; myledbulb5.On = state[4]; myledbulb6.On = state[5]; myledbulb7.On = state[6]; myledbulb8.On = state[7]; }
private void DigitTimer_Tick(object sender, EventArgs e) { state = digit.port0_Input(ref ErrorMsg); if (!checkBox12.Checked) { Switch0.On = state[0]; Switch1.On = state[1]; Switch2.On = state[2]; Switch3.On = state[3]; Switch4.On = state[4]; Switch5.On = state[5]; Switch6.On = state[6]; Switch7.On = state[7]; } }