Click here to Skip to main content
15,886,570 members
Articles / Programming Languages / C#

WebBrowserControl for the .NET Framework 1.1

Rate me:
Please Sign up or sign in to vote.
3.06/5 (11 votes)
15 Apr 2010CPOL2 min read 98.6K   1.6K   21  
An implementation of a web browser control for the .NET Framework 1.1.
namespace Pajocomo.Windows.Forms
{

    /// <summary>
    /// Represents the method that will handle the <see cref="WebBrowserControl.ProgressChanged"/> event of an <see cref="WebBrowserControl"/>.
    /// </summary>
    /// <param name="sender">
    /// The source of the event.
    /// </param>
    /// <param name="e">
    /// A <see cref="ProgressChangedEventArgs"/> that contains the event data.
    /// </param>
    public delegate void ProgressChangedEventHandler(object sender, ProgressChangedEventArgs e);

    /// <summary>
    /// Provides data for the <see cref="WebBrowserControl.ProgressChanged"/>.
    /// </summary>
    public class ProgressChangedEventArgs : System.EventArgs
    {

        #region Private Instance Fields

        private int progress;
        private int progressMax;

        #endregion

        #region Private Instance Constructors

        private ProgressChangedEventArgs() {}

        #endregion

        #region Internal Instance Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="ProgressChangedEventArgs"/> class with the <see cref="Progress"/> and <see cref="ProgressMax"/> properties set to the given values.
        /// </summary>
        /// <param name="progress">
        /// The amount of total progress to show, or -1 when progress is complete.
        /// </param>
        /// <param name="progressMax">
        /// The maximum progress value.
        /// </param>
        internal ProgressChangedEventArgs(int progress, int progressMax) : base()
        {
            this.progress = progress;
            this.progressMax = progressMax;
        }

        #endregion

        #region Public Instance Properties

        /// <summary>
        /// Gets the amount of total progress to show, or -1 when progress is complete.
        /// </summary>
        /// <value>
        /// The amount of total progress to show, or -1 when progress is complete.
        /// </value>
        public int Progress
        {
            get
            {
                return this.progress;
            }
        }

        /// <summary>
        /// Gets the maximum progress value.
        /// </summary>
        /// <value>
        /// The maximum progress value.
        /// </value>
        public int ProgressMax
        {
            get
            {
                return this.progressMax;
            }
        }

        #endregion

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Paulo Morgado
Portugal Portugal

Comments and Discussions