Exemplo n.º 1
0
 public void AddGroup(string name, ProgressBarGroup group)
 {
     _groups[name] = group;
     foreach (ProgressSetupStep step in _progressSetup)
     {
         step.AddGroup(name, group);
     }
 }
Exemplo n.º 2
0
        public WorkStepProgressUpdater(IWorkStep step, ProgressBarGroup group, StepViewer viewer)
        {
            _step   = step;
            _group  = group;
            _viewer = viewer;

            step.ProgressChanged += step_OnProgressChanged;
            step.Complete        += step_OnComplete;
        }
Exemplo n.º 3
0
        private IStep DecorateStep(IStep step, ProgressBarGroup progressBarGroup, bool setupProgressBar)
        {
            IStep result = step;

            if (setupProgressBar)
            {
                result = DecorateWithProgressSetup(step);
            }
            if (progressBarGroup != null)
            {
                result = new ProgressLinkedStep(result, progressBarGroup);
            }
            return(result);
        }
Exemplo n.º 4
0
        private ProgressBarGroup FindGroup(string groupName)
        {
            ProgressBarGroup group;

            if (!_groups.TryGetValue(groupName, out group))
            {
                // The group doesn't exist - create a new one and add it to the ProgressSetupStep node
                group = new ProgressBarGroup();
                _groups[groupName] = group;
                foreach (ProgressSetupStep step in _progressSetup)
                {
                    step.AddGroup(groupName, group);
                }
            }
            return(group);
        }
Exemplo n.º 5
0
        public object Clone()
        {
            ProgressBarGroup newGroup = new ProgressBarGroup();

            newGroup._progressRangeStart = _progressRangeStart;
            newGroup._progressRangeEnd   = _progressRangeEnd;
            foreach (KeyValuePair <ProgressLinkedStep, int> position in _stepPositions)
            {
                newGroup._stepPositions.Add(position.Key, position.Value);
            }
            if (ProgressChanged != null)
            {
                newGroup.ProgressChanged = (ProgressEventHandler)ProgressChanged.Clone();
            }
            newGroup._numPositions = newGroup._stepPositions.Count;
            return(newGroup);
        }
Exemplo n.º 6
0
 public void AddGroup(string name, ProgressBarGroup group)
 {
     _groups[name.ToUpper()] = group;
 }
Exemplo n.º 7
0
 public ProgressLinkedStep(IStep step, ProgressBarGroup group)
 {
     _step  = step;
     _group = group;
     _group.AddStep(this);
 }