try
{ senddata.WriteLine("entrybalance," + carbrand);
senddata.Flush(); //tcpClient2.ReceiveTimeout = 1000;
//tcpClient.ReceiveTimeout = 1000; try
{ byte[] Data = new Byte[400];
Int32 bytes = ns.Read(Data, 0, Data.Length);
receiveData = Encoding.Default.GetString(Data, 0, bytes);
MessageBox.Show("2222");
}
catch (InterruptedException ie)
{
//在此调用再次写数据操作
}
double i_balance = Convert.ToDouble(receiveData);
if (i_balance <= 30) { c_i_ReasonType = 2; }
else { c_b_PermitPass = true; c_i_ReasonType = 0; }
c_isConnect = true;
}
catch
{
isConnect = false;//标记网络已经断开
c_b_PermitPass = false;
c_i_ReasonType = 3;
this.SetLabelText18(" "); this.SetpictureBox7(global::EntryClient.Properties.Resources.datacenter_discon);//指示灯灭
if (s_dial.Equals("being"))
{
this.SetLabel5Color(System.Drawing.Color.Yellow);
this.SetLabelText5("连接中...");
}
else
{
this.SetLabel5Color(System.Drawing.Color.Red);
this.SetLabelText5("连接断开");
}
}
在这里面如何设置
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货