Пример #1
0
        public FrmRfidCheck_Client()
        {
            InitializeComponent();

            dataTransfer = new SerialPortDataTransfer();
            //comport = StaticSerialPort.getStaticSerialPort();
            comport = new SerialPort(sysConfig.comportName, int.Parse(sysConfig.baudRate), Parity.None, 8, StopBits.One);
            ((SerialPortDataTransfer)dataTransfer).Comport = comport;
            rmu900Helper = new Rmu900RFIDHelper(dataTransfer);
            rmu900Helper.Subscribe(this);
            dataTransfer.AddParser(rmu900Helper);
            this.labelStatus.Text = "";
            //this.Shown += new EventHandler(FrmRfidCheck_Client_Shown);
            //comport.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
            //使得Helper类可以向串口中写入数据
            //_RFIDHelper.evtWriteToSerialPort += new deleVoid_Byte_Func(RFIDHelper_evtWriteToSerialPort);
            // 处理当前操作的状态
            //_RFIDHelper.evtCardState += new deleVoid_RFIDEventType_Object_Func(_RFIDHelper_evtCardState);

            //_timer.Elapsed += new System.Timers.ElapsedEventHandler(_time_Elapsed);

            this.Shown += new EventHandler(FrmRfidCheck_Client_Shown);

            this.FormClosing += new FormClosingEventHandler(FrmRfidCheck_Client_FormClosing);
        }
Пример #2
0
        public frmTiebiao()
        {
            InitializeComponent();
            this.Shown       += new EventHandler(TiebiaoForm_Shown);
            this.FormClosing += new FormClosingEventHandler(frmEditEPC_FormClosing);

            this.cmbProductCategory.Items.Add("产品种类一");
            this.cmbProductCategory.Items.Add("产品种类二");
            this.cmbProductCategory.Items.Add("产品种类三");
            this.cmbProductCategory.Items.Add("产品种类四");
            this.cmbProductCategory.SelectedIndex = 0;
            this.lblTip.Text = string.Empty;

            dataTransfer = new SerialPortDataTransfer();
            try
            {
                comport = new SerialPort(staticClass.serialport_name, 57600, Parity.None, 8, StopBits.One);
                ((SerialPortDataTransfer)dataTransfer).Comport = comport;
            }
            catch (System.Exception ex)
            {
            }
            rmu900Helper = new Rmu900RFIDHelper(dataTransfer);
            rmu900Helper.Subscribe(this);
            dataTransfer.AddParser(rmu900Helper);
        }
Пример #3
0
        public frmEditEPC()
        {
            InitializeComponent();

            dataTransfer = new SerialPortDataTransfer();
            //comport = StaticSerialPort.getStaticSerialPort();
            comport = new SerialPort(sysConfig.comportName, int.Parse(sysConfig.baudRate), Parity.None, 8, StopBits.One);
            ((SerialPortDataTransfer)dataTransfer).Comport = comport;
            rmu900Helper = new Rmu900RFIDHelper(dataTransfer);
            rmu900Helper.Subscribe(this);
            dataTransfer.AddParser(rmu900Helper);
        }
Пример #4
0
        public FrmRfidCheck_Write()
        {
            InitializeComponent();

            dataTransfer = new SerialPortDataTransfer();
            comport      = new SerialPort(sysConfig.comportName, int.Parse(sysConfig.baudRate), Parity.None, 8, StopBits.One);
            ((SerialPortDataTransfer)dataTransfer).Comport = comport;
            rmu900Helper = new Rmu900RFIDHelper(dataTransfer);
            rmu900Helper.Subscribe(this);
            dataTransfer.AddParser(rmu900Helper);

            //this.lblSecretConfirm.Text = "";
            this.button1.Enabled    = false;
            this.txtId.TextChanged += new EventHandler(txtId_TextChanged);
            label7.Text             = "未选中学生";


            toolTip1.SetToolTip(this.button1, "学生信息与rfid标签关联");
            toolTip1.SetToolTip(this.btnPersonManage, "管理学生信息");
            toolTip1.SetToolTip(this.EditTag, "编辑rfid标签");
        }