Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     if (_onProgress != null)
     {
         _onProgress(progressInfo, Current, TotalCost);
     }
 }
Ejemplo n.º 3
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     if (_onProgress != null)
     {
         _onProgress(progressInfo, Current, TotalCost);
     }
 }
Ejemplo 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);
            }
        }
Ejemplo n.º 5
0
 public void SendProgress(ExecutionProgressInfo info)
 {
     if (_progress != null)
     {
         _progress.Progress(info);
     }
 }
Ejemplo 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();
 }
Ejemplo 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();
 }
Ejemplo n.º 8
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     Console.WriteLine("Progress in " + progressInfo.ModuleName + "(" + progressInfo.Message + ") is " + Current);
 }
Ejemplo n.º 9
0
 protected abstract void VisualizeProgress(ExecutionProgressInfo progressInfo);
Ejemplo n.º 10
0
 public void Progress(ExecutionProgressInfo progressInfo)
 {
     _currentProgress += progressInfo.ProgressCost;
     VisualizeProgress(progressInfo);
 }
Ejemplo n.º 11
0
 protected void OnProgressHandler(ExecutionProgressInfo obj)
 {
     if (OnProgress != null)
     {
         OnProgress(obj);
     }
 }
Ejemplo 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;
 }
Ejemplo n.º 13
0
 private void OnProgressHandler(ExecutionProgressInfo obj)
 {
     if (OnProgress != null)
     {
         OnProgress(obj);
     }
 }
Ejemplo n.º 14
0
 protected abstract void VisualizeProgress(ExecutionProgressInfo progressInfo);
Ejemplo n.º 15
0
 public void Progress(ExecutionProgressInfo progressInfo)
 {
     _currentProgress += progressInfo.ProgressCost;
     VisualizeProgress(progressInfo);
 }
Ejemplo n.º 16
0
 void reader_OnProgress(ExecutionProgressInfo obj)
 {
     OnProgressHandler(obj);
     QueryCancelEventArgs args = new QueryCancelEventArgs();
     OnQueryCancelHandler(args);
     if (args.Cancel)
     {
         throw new PackageExecutionCancelledException();
     }
 }
Ejemplo n.º 17
0
 public void SendProgress(ExecutionProgressInfo info)
 {
     if (_progress != null)
     {
         _progress.Progress(info);
     }
 }
Ejemplo n.º 18
0
 protected override void VisualizeProgress(ExecutionProgressInfo progressInfo)
 {
     Console.WriteLine("Progress in " + progressInfo.ModuleName + "(" + progressInfo.Message + ") is " + Current);
 }