private void UpdaterTask_Callback(object sender, AsyncTaskResponse e) { var _App = e.AppBotCode != "" ? Values.AppList.Where(a => a.Code == e.AppBotCode).First() : null; switch (e.Message) { case "PROGRESS": _App.ProgressValue++; break; case "UPDATED": if (_App.PendingItems.Count() == 0 && _App.UpdatingItems.Count() == 0) { _App.SetStatus(AppBotStatus.UPDATED); } break; default: if (debugBox != null) { debugBox.AppendText(e.Message); } break; } }
private void UpdaterTask_ErrorCallback(object sender, AsyncTaskResponse e) { var _App = e.AppBotCode != "" ? Values.AppList.Where(a => a.Code == e.AppBotCode).First() : null; if (_App != null) { _App.SetStatus(AppBotStatus.ERROR); } CTWin.MsgError(e.Message); if (debugBox != null) { debugBox.AppendText(e.Message); } }
private void triggerErrorCallback(AsyncTaskResponse response) { // Si el primer callback existe, ejecutarlo con la información dada ErrorCallback.Invoke(this, response); }