Пример #1
0
        private void OnOperationCompletedEvent(object state)
        {
            EventHandler <OnOperationCompletedEventArgs> handler = ServiceOnOperationCompletedEvent;
            OnOperationCompletedEventArgs e = state as OnOperationCompletedEventArgs;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        private void EyeshotServiceOnOperationCompleted(object sender, OnOperationCompletedEventArgs e)
        {
            _pendingDownloadCounts += e.ResultsCount;
            AppendToLog(e.Log);

            if (_pendingDownloadCounts > 0 && !_downloadInProgress)
            {
                btnDownload.Enabled = trackDownload.Enabled = btnGetFullLog.Enabled = true;
            }
            else
            {
                btnDownload.Enabled = btnGetFullLog.Enabled = false;
                SetButtonsEnabled(true);
                if (e.Skipped)
                {
                    ProgressBarReset(progressBarOperations);
                }
            }

            if (e.OperationType == OperationsType.GetFullOperationsLog)
            {
                StartDownload();
            }
        }