Exemple #1
0
        public frmProductManageAdd(IRefreshDGV refreshForm)
        {
            InitializeComponent();
            //DataTable dt = ctlProductName.GetProductName();
            //if (dt.Rows.Count > 0)
            //{
            //    foreach (DataRow dr in dt.Rows)
            //    {
            //        this.cmbName.Items.Add(dr[0].ToString());
            //    }
            //}

            this.refreshForm = refreshForm;

            this.operateUnit.registeCallback(new deleRfidOperateCallback(UpdateStatus));
            this.operateUnit.openSerialPort();

            this.dateTimePicker1.Value = DateTime.Now;
            this.FormClosing          += new FormClosingEventHandler(frmProductManage_FormClosing);
            this.Shown += new EventHandler(frmProductManage_Shown);
        }
Exemple #2
0
        public frmProductManageAdd(IRefreshDGV refreshForm)
        {
            InitializeComponent();

            this.btnStop.Top     = this.btnGetPID.Top;
            this.btnStop.Visible = false;

            this.refreshForm = refreshForm;

            this.dateTimePicker1.Value = DateTime.Now;
            this.FormClosing          += new FormClosingEventHandler(frmProductManage_FormClosing);
            this.Shown += new EventHandler(frmProductManage_Shown);

            try
            {
                comport = new SerialPort(staticClass.serialport_name, 9600, Parity.None, 8, StopBits.One);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message, "异常提示!");
            }
        }