Exemplo n.º 1
0
        private void btnStop_Click(object sender, EventArgs e)
        {
            timer1.Stop();
            btnStop.Enabled = false;

            if (worker == null || !worker.Running) {
                Logger.Log(Logger.LEVEL_INFO, "หยุดดำเนินการ");
                worker = null;
            } else {
                Logger.Log(Logger.LEVEL_INFO, "กำลังหยุดดำเนินการ");
                worker.Stop = true;
            }
        }
Exemplo n.º 2
0
 public WorkerEndScope(ImportWorker worker)
 {
     this.worker = worker;
 }
Exemplo n.º 3
0
 public Importer(ImportWorker importWorker, string company)
 {
     this.importWorker = importWorker;
     this.company = company;
 }
Exemplo n.º 4
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (worker == null || !worker.Running)
     {
         worker = new ImportWorker();
         worker.MainForm = this;
         Logger.Log(Logger.LEVEL_INFO, "เริ่มดำเนินการ");
         worker.RunWork();
     }
 }