Ejemplo n.º 1
0
            public void Invoke(IDownloadJob downloadJob, IDownloadCompletedCallbackArgs callbackArgs)
            {
                var clearProgressFlag = false;
                try
                {
                    if (_updateInProgress) return;

                    _updateInProgress = true;
                    clearProgressFlag = true;
                    var wrapper = new UpdateWrapper(downloadJob) { TotalPercent = 100, UpdatePercent = 100, CurrentIndex = downloadJob.Updates.Count};
                    wrapper.AdjustValues(_lastWrapper);
                    _lastWrapper = wrapper;
                    SetTitle(wrapper);
                    SetText(wrapper);
                }
                catch (Exception e)
                {
                    Log.WarnFormat("An issue occurred while An issue occurred while handling a download updates progress completed event: {0}", e);
                }
                finally
                {
                    if (clearProgressFlag) _updateInProgress = false;
                }
            }
Ejemplo n.º 2
0
            public void Invoke(IDownloadJob downloadJob, IDownloadProgressChangedCallbackArgs callbackArgs)
            {
                var clearProgressFlag = false;
                try
                {
                    if (_updateInProgress) return;

                    _updateInProgress = true;
                    clearProgressFlag = true;
                    var wrapper = new UpdateWrapper(downloadJob, callbackArgs);
                    wrapper.AdjustValues(_lastWrapper);
                    _lastWrapper = wrapper;
                    SetTitle(wrapper);
                    SetText(wrapper);
                }
                catch (Exception e)
                {
                    Log.WarnFormat("An issue occurred while handling a download updates progress changed event: {0}", e);
                }
                finally
                {
                    if (clearProgressFlag) _updateInProgress = false;
                }
            }