Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new <see cref="ProgressGraphic"/>.
        /// </summary>
        /// <param name="progressProvider">The provider of progress information for which the <see cref="ProgressGraphic"/> will display updates.</param>
        /// <param name="autoClose">A value indicating whether or not the <see cref="ProgressGraphic"/> should automatically remove and dispose itself when the progress provider reports task completion or cancellation.</param>
        /// <param name="progressBarStyle">The style of progress bar to be displayed.</param>
        public ProgressGraphic(IProgressGraphicProgressProvider progressProvider, bool autoClose, ProgressBarGraphicStyle progressBarStyle)
        {
            _progressProvider = progressProvider;
            _autoClose        = autoClose;
            _progressBarStyle = progressBarStyle;

            base.Graphics.Add(_graphics = new ProgressCompositeGraphic(_progressBarStyle));
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Initializes a new <see cref="ProgressGraphic"/>.
		/// </summary>
		/// <param name="progressProvider">The provider of progress information for which the <see cref="ProgressGraphic"/> will display updates.</param>
		/// <param name="autoClose">A value indicating whether or not the <see cref="ProgressGraphic"/> should automatically remove and dispose itself when the progress provider reports task completion or cancellation.</param>
		/// <param name="progressBarStyle">The style of progress bar to be displayed.</param>
		public ProgressGraphic(IProgressGraphicProgressProvider progressProvider, bool autoClose, ProgressBarGraphicStyle progressBarStyle)
		{
			_progressProvider = progressProvider;
			_autoClose = autoClose;
			_progressBarStyle = progressBarStyle;

			base.Graphics.Add(_graphics = new ProgressCompositeGraphic(_progressBarStyle));
		}
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new <see cref="ProgressGraphic"/>.
        /// </summary>
        /// <param name="progressProvider">The provider of progress information for which the <see cref="ProgressGraphic"/> will display updates.</param>
        /// <param name="autoClose">A value indicating whether or not the <see cref="ProgressGraphic"/> should automatically remove and dispose itself when the progress provider reports task completion or cancellation.</param>
        /// <param name="progressBarStyle">The style of progress bar to be displayed.</param>
        public ProgressGraphic(IProgressProvider progressProvider, bool autoClose = _defaultAutoClose, ProgressBarGraphicStyle progressBarStyle = _defaultStyle)
        {
            _autoClose        = autoClose;
            _progressBarStyle = progressBarStyle;

            _progressProvider = progressProvider;
            _progressProvider.ProgressUpdated += OnProgressUpdated;

            _synchronizationContext = SynchronizationContext.Current;

            Graphics.Add(_graphics = new ProgressCompositeGraphic(_progressBarStyle));
        }
Ejemplo n.º 4
0
		/// <summary>
		/// Initializes a new <see cref="ProgressGraphic"/>.
		/// </summary>
		/// <param name="progressProvider">The provider of progress information for which the <see cref="ProgressGraphic"/> will display updates.</param>
		/// <param name="autoClose">A value indicating whether or not the <see cref="ProgressGraphic"/> should automatically remove and dispose itself when the progress provider reports task completion or cancellation.</param>
		/// <param name="progressBarStyle">The style of progress bar to be displayed.</param>
		public ProgressGraphic(IProgressProvider progressProvider, bool autoClose = _defaultAutoClose, ProgressBarGraphicStyle progressBarStyle = _defaultStyle)
		{
			_autoClose = autoClose;
			_progressBarStyle = progressBarStyle;

			_progressProvider = progressProvider;
			_progressProvider.ProgressUpdated += OnProgressUpdated;

			_synchronizationContext = SynchronizationContext.Current;

			Graphics.Add(_graphics = new ProgressCompositeGraphic(_progressBarStyle));
		}
			/// <summary>
			/// Cloning constructor.
			/// </summary>
			/// <param name="source">The source object from which to clone.</param>
			/// <param name="context">The cloning context object.</param>
			protected ProgressCompositeGraphic(ProgressCompositeGraphic source, ICloningContext context)
			{
				context.CloneFields(source, this);

				_style = source._style;
			}
            /// <summary>
            /// Cloning constructor.
            /// </summary>
            /// <param name="source">The source object from which to clone.</param>
            /// <param name="context">The cloning context object.</param>
            protected ProgressCompositeGraphic(ProgressCompositeGraphic source, ICloningContext context)
            {
                context.CloneFields(source, this);

                _style = source._style;
            }