Example #1
0
        private void StartDBList(string IP, string addr)
        {
            if (radioButton1.Checked)
            {
                PLCTextBox = new SenmensPLC();
            }
            else
            {
                PLCTextBox = new LIBnodavePLC();
            }
            ThreadingTest threadingTest = new ThreadingTest(IP, addr, PLCTextBox);

            txt_log.Text += "读取PLC:" + IP + threadingTest.Result;
            threadingTest.MessageEventHandler += UpdateUI;
            threadingTests.Add(threadingTest);
        }
Example #2
0
        private void CreateStart(int length, string Addr, string IP, comm.DataTyte dataTyte, string ThreadCount = null)
        {
            if (!radioButton1.Checked)
            {
                PLCTextBox = new LIBnodavePLC();
            }
            else
            {
                PLCTextBox = new SenmensPLC();
            }
            ThreadingTest threadingTest = new ThreadingTest(length, Addr, IP, dataTyte, PLCTextBox, ThreadCount);

            threadingTest.MessageEventHandler += UpdateUI;
            threadingTest.AsyncStart();
            threadingTests.Add(threadingTest);
        }