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; }
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); }
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); }
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); }
public void AddGroup(string name, ProgressBarGroup group) { _groups[name.ToUpper()] = group; }
public ProgressLinkedStep(IStep step, ProgressBarGroup group) { _step = step; _group = group; _group.AddStep(this); }