protected override void ExecItemTAG1() { string s = ItemFindText.Text; if (!Pub.IsNumeric(s)) { s = SystemInfo.REAL603Port.ToString(); } int.TryParse(s, out Port); if (Port > 0xffff) { Port = SystemInfo.REAL603Port; } base.ExecItemTAG1(); //CallBack_First += new CardReadEventHandler(ThreadCallBack_First); threadStop = false; readData = new SFReadData(this.Text + "[" + CurrentTool + "]", true); socket = new TRealSocket(Port, ReadSocketData); isRealing = true; RefreshForm(true); string numCard = 3.ToString() + ","; SystemInfo.realBack = true; if (SystemInfo.Urealback) { try { //dre = (DataTable)bindingSource.DataSource; dre = db.GetDataTable(Pub.GetSQL(DBCode.DB_004004, new string[] { "0" })); backdr = db.GetDataTable(Pub.GetSQL(DBCode.DB_001003, new string[] { "501" })); //sendbackdr = db.GetDataTable(Pub.GetSQL(DBCode.DB_004004, new string[] { "13" })); } catch (Exception E) { Pub.ShowErrorMsg(E); } db.GetServerDate(ref ServerDate); Info.Clear(); ThreadPool.QueueUserWorkItem(new WaitCallback(PortBackCardreal), numCard); msgbGrid.Rows.Clear(); // PortBackCardreal(""); } timer1.Interval = SystemInfo.WanInterval; timer1.Enabled = true; socket.Start(); formCode = "SFMacReal"; }
protected override void ExecItemTAG1() { string s = ItemFindText.Text; if (!Pub.IsNumeric(s)) { s = SystemInfo.REAL603Port.ToString(); } int.TryParse(s, out Port); if (Port > 0xffff) { Port = SystemInfo.REAL603Port; } base.ExecItemTAG1(); readData = new KQReadData(this.Text + "[" + CurrentTool + "]", true); socket = new TRealSocket(Port, ReadSocketData); isRealing = true; RefreshForm(true); timer1.Interval = SystemInfo.WanInterval; timer1.Enabled = true; socket.Start(); }