Esempio n. 1
0
        private void thread_test2( )
        {
            int count = 500;

            while (count > 0)
            {
                if (!busTcpClient.Write("100", (short)1234).IsSuccess)
                {
                    failed++;
                }
                if (!busTcpClient.ReadInt16("100").IsSuccess)
                {
                    failed++;
                }
                count--;
            }
            thread_end( );
        }
 private void button24_Click(object sender, EventArgs e)
 {
     // bool写入
     try
     {
         DemoUtils.WriteResultRender(busTcpClient.Write(textBox8.Text, bool.Parse(textBox7.Text)), textBox8.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }