//private void CheckMUBApplicatorFinishStatus() //{ // LEDStatusLightingUtil.Instance.MUBApplicatorStatusUpdated += CheckMUBApplicatorFinishStatus_Callback; // LEDStatusLightingUtil.Instance.CheckMUBApplicatorFinishStatus(); //} //private void CheckMUBApplicatorFinishStatus_Callback(object sender, EnumMUBApplicatorStatus status) //{ // LEDStatusLightingUtil.Instance.MUBApplicatorStatusUpdated += CheckMUBApplicatorFinishStatus_Callback; // if (status == EnumMUBApplicatorStatus.Finished) // { // _retryCount = 0; // this._web.RunScript("$('.status-text').css('color','#000').text('Ket thuc roi');"); // this._web.RunScript("$('#ConfirmBtn').html('Confirm to remove the MUB');"); // this._web.RunScript("$('#lblNextAction').text('CheckIfMUBIsRemoved');"); // } // else // { // if (_retryCount == 100) // { // _retryCount = 0; // this._web.RunScript("$('.status-text').css('color','#000').text('Chua ket thuc :(');"); // this._web.RunScript("$('#ConfirmBtn').html('Confirm to remove the MUB');"); // this._web.RunScript("$('#lblNextAction').text('CheckIfMUBIsRemoved');"); // } // else // { // _retryCount++; // Thread.Sleep(200); // CheckMUBApplicatorFinishStatus(); // } // } //} private void InitializeMUBApplicator_Handler(object sender, EnumMUBApplicatorStatus status) { LEDStatusLightingUtil.Instance.MUBApplicatorStatusUpdated -= InitializeMUBApplicator_Handler; if (status == EnumMUBApplicatorStatus.Ready) { // MUB Applicator is ready // Then verify presence of MUB this._web.RunScript("$('#ConfirmBtn').html('Verify presence of MUB.');"); // Set next action to 'CheckIfMUBIsPresent' this._web.RunScript("$('#lblNextAction').text('CheckIfMUBIsPresent');"); CheckIfMUBIsPresent(); } else if (status == EnumMUBApplicatorStatus.NotReady) { this._web.RunScript("$('.status-text').css('color','#000').text('MUB Applicator is not ready.');"); } }
private void StartMUBApplicator_Callback(object sender, EnumMUBApplicatorStatus status) { LEDStatusLightingUtil.Instance.MUBApplicatorStatusUpdated -= StartMUBApplicator_Callback; if (status == EnumMUBApplicatorStatus.Started) { // MUB Applicator is started. Ready to print this._web.RunScript("$('.status-text').css('color','#000').text('Ready to print.');"); this._web.RunScript("$('#ConfirmBtn').html('Start to print MUB/TT Label');"); // Set next action to 'PrintMUBLabel' this._web.RunScript("$('#lblNextAction').text('PrintMUBLabel');"); if (_currentMUBLabelInfo != null) { StartToPrintMUBLabel(_currentMUBLabelInfo); } } else if (status == EnumMUBApplicatorStatus.NotReady) { this._web.RunScript("$('.status-text').css('color','#000').text('MUB Applicator is not ready.');"); } }