Ejemplo n.º 1
0
        public void SetProgressValue(int value)
        {
            lock (syncRoot)
            {
                if (current.CurrentValue == value)
                {
                    return;
                }
                current = new DrawingProgress(current.OperationType, current.MaximumValue, Math.Min(value, current.MaximumValue));
            }

            reportCallback.Invoke(current);
        }
Ejemplo n.º 2
0
        public void Complete()
        {
            lock (syncRoot)
            {
                if (current.CurrentValue >= current.MaximumValue)
                {
                    return;
                }
                current = new DrawingProgress(current.OperationType, current.MaximumValue, current.MaximumValue);
            }

            reportCallback.Invoke(current);
        }
Ejemplo n.º 3
0
        public void Report(DrawingProgress progress)
        {
            lock (syncRoot)
            {
                if (progress == current)
                {
                    return;
                }
                current = progress;
            }

            reportCallback.Invoke(progress);
        }