示例#1
0
        void _scanBarcodeForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            this._scanBarcodeForm = null;

            this._fillThread.StopThread(true);
            this._fillThread = null;

            this.ScanMode = false;
        }
示例#2
0
        // 装载方式 扫入册条码
        private void button_load_scanBarcode_Click(object sender, EventArgs e)
        {
            if (this._scanBarcodeForm == null)
            {
                this._scanBarcodeForm = new ScanBarcodeForm();
                MainForm.SetControlFont(this._scanBarcodeForm, this.Font, false);
                this._scanBarcodeForm.BarcodeScaned += new ScanedEventHandler(_scanBarcodeForm_BarcodeScaned);
                this._scanBarcodeForm.FormClosed += new FormClosedEventHandler(_scanBarcodeForm_FormClosed);
                this._scanBarcodeForm.Show(this);
            }
            else
            {
                if (this._scanBarcodeForm.WindowState == FormWindowState.Minimized)
                    this._scanBarcodeForm.WindowState = FormWindowState.Normal;
            }

            this.ScanMode = true;

            if (this._fillThread == null)
            {
                this._fillThread = new FillThread();
                this._fillThread.Container = this;
                this._fillThread.BeginThread();
            }
        }