示例#1
0
        private async void btnStart_Click(object sender, EventArgs e)
        {
            CustomerJsonRead <ConfigureMessageModel> configureJson = new CustomerJsonRead <ConfigureMessageModel>();
            var configure = configureJson.GetJsonClass();

            if (configure == null)
            {
                MessageBox.Show("请先配置通讯信息");
                return;
            }

            tcp      = new TCPCommunication(configure.TCPS.TCPCameria.IP, PackageOk);
            tcp.Port = configure.TCPS.TCPCameria.Port;
            await tcp.ConnectAsync();
        }
示例#2
0
        public async void ConnectDevice()
        {
            await tcpClient.ConnectAsync();

            ScanTask.Start();
        }