Esempio n. 1
0
        void StartFilling()
        {
            Diagnostics.Log(String.Format("StartFilling ResourceType: {0}", resourceType));

            doWaitCB("Please wait, loading object catalog...");
            listView1.Visible = false;
            listView1.Items.Clear();
            this.listView1.ListViewItemSorter = null;

            FillThread ft = new FillThread(this, resourceType, Add, updateProgressCB, stopFilling, OnFillingComplete);

            FillingComplete += new EventHandler <MainForm.BoolEventArgs>(ObjectChooser_FillingComplete);

            fillThread = new Thread(new ThreadStart(ft.Fill));
            filling    = true;
            fillThread.Start();
        }
Esempio n. 2
0
        void StartFilling()
        {
            Diagnostics.Log(String.Format("StartFilling ResourceType: {0}", resourceType));

            doWaitCB("Please wait, loading object catalog...");
            listView1.Visible = false;
            listView1.Items.Clear();
            this.listView1.ListViewItemSorter = null;

            FillThread ft = new FillThread(this, resourceType, Add, updateProgressCB, stopFilling, OnFillingComplete);
            FillingComplete += new EventHandler<MainForm.BoolEventArgs>(ObjectChooser_FillingComplete);

            fillThread = new Thread(new ThreadStart(ft.Fill));
            filling = true;
            fillThread.Start();
        }
Esempio n. 3
0
 public void StopThread()
 {
     this._fillThread.StopThread(true);
     this._fillThread = null;
 }
Esempio n. 4
0
 public void BeginThread()
 {
     if (this._fillThread == null)
     {
         this._fillThread = new FillThread();
         this._fillThread.Container = this;
         this._fillThread.BeginThread();
     }
 }
Esempio n. 5
0
        void _scanBarcodeForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            this._scanBarcodeForm = null;

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

            this.ScanMode = false;
        }
Esempio n. 6
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();
            }
        }