コード例 #1
0
        private void BTN_Start_Click(object sender, EventArgs e)
        {
            //digit.Connect_port0_write();
            digit.Connect_port0_read(ref ErrorMsg);
            digit.Connect_port1_write();

            BTN_Start.Enabled = false;
            BTN_Stop.Enabled  = true;
            groupBox3.Enabled = true;
        }
コード例 #2
0
ファイル: AutoForm.cs プロジェクト: ParkGY94/Project_Cs
        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];
        }