private void Verification_Load(object sender, EventArgs e) { try { //ClearTimer.Interval = 7000; //VerifyTimer.Interval = 7000; btnBack.Focus(); BackgroundTimer.Interval = 1000; CurrentDateTimer.Enabled = true; CurrentDateTimer.Interval = 1000; reader = new Reader.ReaderMethod(); ////Callback //reader.AnalyCallback = AnalyData; //reader.ReceiveCallback = ReceiveData; //reader.SendCallback = SendData; //auto_connect(); ReaderMethodProc(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public InventoryProcessor() { this.reader = new Reader.ReaderMethod(); this.m_curSetting = new ReaderSetting(); this.m_curInventoryBuffer = new InventoryBuffer(); this.m_curOperateTagBuffer = new OperateTagBuffer(); this.m_curOperateTagISO18000Buffer = new OperateTagISO18000Buffer(); }
private Reader.ReaderMethod readerServer;//服务端消息采集 public Client() { InitializeComponent(); //初始化访问读写器实例 readerServer = new Reader.ReaderMethod(); //回调函数 readerServer.ReceiveCallback = ReceiveDataServer; }
public Server() { InitializeComponent(); textBox2.Text = ipAddress.ToString(); //初始化访问读写器实例 readerClient = new Reader.ReaderMethod(); //回调函数把收到的Byte数据传给ReceiveDataClient函数处理 readerClient.ReceiveCallback = ReceiveDataClient; }
private void R2000UartDemo_Load(object sender, EventArgs e) { salidas.Visible = false; lista.Visible = false; // Inicializa el acceso a la instancia del lector reader = new Reader.ReaderMethod(); // función de devolución de llamada reader.AnalyCallback = AnalyData; reader.ReceiveCallback = ReceiveData; reader.SendCallback = SendData; ListarSalidas(dataGridView1); // Establecer la validez del elemento de interfaz SetFormEnable(false); // Inicializa la configuración predeterminada del lector de conexión textBox1.Text = String.Format("{0:G}", DateTime.Now); ListarCategorias(); ListarProveedor(); ListarProductos(dataestudiantes); button6.Enabled = false; button7.Enabled = false; button8.Enabled = false; button1.Enabled = false; button3.Enabled = false; button2.Enabled = true; button9.Enabled = false; button11.Enabled = false; button12.Enabled = false; button13.Enabled = false; button16.Enabled = false; button17.Enabled = false; button18.Enabled = false; button19.Enabled = false; Instances(); }
private void listado_Load(object sender, EventArgs e) { // Inicializa el acceso a la instancia del lector reader = new Reader.ReaderMethod(); // función de devolución de llamada reader.AnalyCallback = AnalyData; reader.ReceiveCallback = ReceiveData; reader.SendCallback = SendData; // Establecer la validez del elemento de interfaz SetFormEnable(false); // Inicializa la configuración predeterminada del lector de conexión cmbComPort.SelectedIndex = 0; cmbBaudrate.SelectedIndex = 1; }
private void RegisterAsset_Load(object sender, EventArgs e) { try { AssetValidUntilDateTime(); CurrentTimer.Enabled = true; CurrentTimer.Interval = 1000; reader = new Reader.ReaderMethod(); ////Callback //reader.AnalyCallback = AnalyData; //reader.ReceiveCallback = ReceiveData; //reader.SendCallback = SendData; //auto_connect(); ReaderMethodProc(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void R2000UartDemo_Load(object sender, EventArgs e) { //初始化访问读写器实例 reader = new Reader.ReaderMethod(); //回调函数 reader.AnalyCallback = AnalyData; reader.ReceiveCallback = ReceiveData; reader.SendCallback = SendData; //设置界面元素有效性 gbRS232.Enabled = false; gbTcpIp.Enabled = false; SetFormEnable(false); rdbRS232.Checked = true; //初始化连接读写器默认配置 cmbComPort.SelectedIndex = 0; cmbBaudrate.SelectedIndex = 1; ipIpServer.IpAddressStr = "192.168.0.178"; txtTcpPort.Text = "4001"; rdbInventoryRealTag_CheckedChanged(sender, e); cmbSession.SelectedIndex = 0; cmbTarget.SelectedIndex = 0; cmbReturnLossFreq.SelectedIndex = 33; if (cbUserDefineFreq.Checked == true) { groupBox21.Enabled = false; groupBox23.Enabled = true; } else { groupBox21.Enabled = true; groupBox23.Enabled = false; }; }
//init inventory params private bool initReader() { //初始化访问读写器实例 reader = new Reader.ReaderMethod(); //回调函数 reader.AnalyCallback = AnalyData; reader.ReceiveCallback = ReceiveData; reader.SendCallback = SendData; //connect to reader string strException = string.Empty; string strComPort = conf.ReaderPort; //int nBaudrate = Convert.ToInt32(cmbBaudrate.Text); int nBaudrate = 115200; int nRet = reader.OpenCom(strComPort, nBaudrate, out strException); if (nRet != 0) { string strLog = "连接读写器失败,失败原因: " + strException; WriteLog(logRichText, strLog, 1); writeLog(strLog); m_readerIsNormal = true; //buttonInv.Enabled = false; return false; } else { string strLog = "连接读写器设备 " + strComPort + "@" + nBaudrate.ToString(); WriteLog(logRichText, strLog, 0); writeLog(strLog); } //output power init //Thread.Sleep(2000); return true; }