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

            step.ProgressChanged += step_OnProgressChanged;
            step.Complete        += step_OnComplete;
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#6
0
 public void AddGroup(string name, ProgressBarGroup group)
 {
     _groups[name.ToUpper()] = group;
 }
示例#7
0
 public ProgressLinkedStep(IStep step, ProgressBarGroup group)
 {
     _step  = step;
     _group = group;
     _group.AddStep(this);
 }