private void UpdateData() { while (true) { if (_inserWorkModel.Count == 0) { _idleCommandSendEvent.WaitOne(); } else { WorkModel workModel = _inserWorkModel.Dequeue(); if (_workManager.UpdateWorkNumber(workModel, int.Parse(DefineSeting.LoginStepNo))) { // 如果是最後一站,將未完成的搬到已完成 if (int.Parse(DefineSeting.LoginStepNo) == _workManager.StepList.Count) { if (_workManager.changeToFinish(tbxWorkNumber.Text)) { } } _currentWorkModel.Remove(workModel); setControl(false, workModel); } } } }