protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
        {
            if (_progressBar != null)
            {
                if (_progressBar.InvokeRequired)
                {
                    _progressBar.Invoke(new Action(() =>
                    {
                        if (Current <= _totalCost)
                        {
                            _progressBar.Maximum = _totalCost;
                            _progressBar.Value = Current;
                        }
                    }), null);
                }
                else
                {
                    if (Current <= _totalCost)
                    {
                        _progressBar.Maximum = _totalCost;
                        _progressBar.Value = Current;
                    }
                }
            }

            if (_progressLabel != null)
            {
                _progressLabel.Invoke(new Action(() => { _progressLabel.Text = progressInfo.ModuleName + ": " + progressInfo.Message; }), null);
            }
        }
Esempio n. 2
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     if (_onProgress != null)
     {
         _onProgress(progressInfo, Current, TotalCost);
     }
 }
Esempio n. 3
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     if (_onProgress != null)
     {
         _onProgress(progressInfo, Current, TotalCost);
     }
 }
Esempio n. 4
0
        protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
        {
            if (_progressBar != null)
            {
                if (_progressBar.InvokeRequired)
                {
                    _progressBar.Invoke(new Action(() =>
                    {
                        if (Current <= _totalCost)
                        {
                            _progressBar.Maximum = _totalCost;
                            _progressBar.Value   = Current;
                        }
                    }), null);
                }
                else
                {
                    if (Current <= _totalCost)
                    {
                        _progressBar.Maximum = _totalCost;
                        _progressBar.Value   = Current;
                    }
                }
            }

            if (_progressLabel != null)
            {
                _progressLabel.Invoke(new Action(() => { _progressLabel.Text = progressInfo.ModuleName + ": " + progressInfo.Message; }), null);
            }
        }
Esempio n. 5
0
 public void SendProgress(ExecutionProgressInfo info)
 {
     if (_progress != null)
     {
         _progress.Progress(info);
     }
 }
Esempio n. 6
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     _fileStream = new FileStream(_fileName, FileMode.Create, FileAccess.Write, FileShare.ReadWrite);
     _streamWriter = new StreamWriter(_fileStream);
     _streamWriter.WriteLine(progressInfo.ProgressCost);
     _streamWriter.WriteLine(progressInfo.ModuleName);
     _streamWriter.WriteLine(progressInfo.Message);
     _streamWriter.Close();
 }
Esempio n. 7
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     _fileStream   = new FileStream(_fileName, FileMode.Create, FileAccess.Write, FileShare.ReadWrite);
     _streamWriter = new StreamWriter(_fileStream);
     _streamWriter.WriteLine(progressInfo.ProgressCost);
     _streamWriter.WriteLine(progressInfo.ModuleName);
     _streamWriter.WriteLine(progressInfo.Message);
     _streamWriter.Close();
 }
Esempio n. 8
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     Console.WriteLine("Progress in " + progressInfo.ModuleName + "(" + progressInfo.Message + ") is " + Current);
 }
Esempio n. 9
0
 protected abstract void VisualizeProgress(ExecutionProgressInfo progressInfo);
Esempio n. 10
0
 public void Progress(ExecutionProgressInfo progressInfo)
 {
     _currentProgress += progressInfo.ProgressCost;
     VisualizeProgress(progressInfo);
 }
Esempio n. 11
0
 protected void OnProgressHandler(ExecutionProgressInfo obj)
 {
     if (OnProgress != null)
     {
         OnProgress(obj);
     }
 }
Esempio n. 12
0
 private void OnProgress(ExecutionProgressInfo progressInfo, int current, int totalCost)
 {
     _progressInfo = progressInfo;
     _state.Progress = current * 100 / totalCost;
     _state.ProgressMessage = progressInfo.ModuleName + " : " + progressInfo.Message;
 }
Esempio n. 13
0
 private void OnProgressHandler(ExecutionProgressInfo obj)
 {
     if (OnProgress != null)
     {
         OnProgress(obj);
     }
 }
Esempio n. 14
0
 protected abstract void VisualizeProgress(ExecutionProgressInfo progressInfo);
Esempio n. 15
0
 public void Progress(ExecutionProgressInfo progressInfo)
 {
     _currentProgress += progressInfo.ProgressCost;
     VisualizeProgress(progressInfo);
 }
Esempio n. 16
0
 void reader_OnProgress(ExecutionProgressInfo obj)
 {
     OnProgressHandler(obj);
     QueryCancelEventArgs args = new QueryCancelEventArgs();
     OnQueryCancelHandler(args);
     if (args.Cancel)
     {
         throw new PackageExecutionCancelledException();
     }
 }
Esempio n. 17
0
 public void SendProgress(ExecutionProgressInfo info)
 {
     if (_progress != null)
     {
         _progress.Progress(info);
     }
 }
Esempio n. 18
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     Console.WriteLine("Progress in " + progressInfo.ModuleName + "(" + progressInfo.Message + ") is " + Current);
 }