Ejemplo n.º 1
0
		public ProfileChangedArgs(ProfileChangeType changeType, string section, string entry, object value) 
		{
			m_changeType = changeType;
			m_section = section;
			m_entry = entry;
			m_value = value;
		}
Ejemplo n.º 2
0
 public ProfileChangedArgs(ProfileChangeType changeType, string section, string entry, object value)
 {
     _changeType = changeType;
     _section    = section;
     _entry      = entry;
     _value      = value;
 }
Ejemplo n.º 3
0
 /// <summary>
 ///   Initializes a new instance of the ProfileChangedArgs class by initializing all of its properties. </summary>
 /// <param name="changeType">
 ///   The type of change made to the profile. </param>
 /// <param name="section">
 ///   The name of the section involved in the change or null. </param>
 /// <param name="entry">
 ///   The name of the entry involved in the change, or if changeType is set to Other, the name of the method/property that was changed. </param>
 /// <param name="value">
 ///   The new value for the entry or method/property, based on the value of changeType. </param>
 /// <seealso cref="ProfileChangeType" />
 public ProfileChangedArgs(ProfileChangeType changeType, string section, string entry, object value)
 {
     ChangeType = changeType;
     Section    = section;
     Entry      = entry;
     Value      = value;
 }
Ejemplo n.º 4
0
 public ProfileChangingArgs(
     ProfileChangeType changeType,
     string section,
     string entry,
     object value)
     : base(changeType, section, entry, value)
 {
 }
Ejemplo n.º 5
0
 public ProfileChangedArgs(
     ProfileChangeType changeType,
     string section,
     string entry,
     object value)
 {
     this.m_changeType = changeType;
     this.m_section    = section;
     this.m_entry      = entry;
     this.m_value      = value;
 }
Ejemplo n.º 6
0
		/// <summary>
		///   Raises either the Changing or Changed event. </summary>
		/// <param name="changing">
		///   If true, the Changing event is raised otherwise it's Changed. </param>
		/// <param name="changeType">
		///   The type of change being made. </param>
		/// <param name="section">
		///   The name of the section that was involved in the change or null if not applicable. </param>
		/// <param name="entry">
		///   The name of the entry that was involved in the change or null if not applicable. 
		///   If changeType is equal to Other, entry is the name of the property involved in the change.</param>
		/// <param name="value">
		///   The value that was changed or null if not applicable. </param>
		/// <returns>
		///   The return value is based on the event raised.  If the Changing event was raised, 
		///   the return value is the opposite of ProfileChangingArgs.Cancel; otherwise it's true.</returns>
		/// <remarks>
		///   This method may be used by derived classes as a convenient alternative to calling 
		///   OnChanging and OnChanged.  For example, a typical call to OnChanging would require
		///   four lines of code, which this method reduces to two. </remarks>
		/// <seealso cref="Changing" />
		/// <seealso cref="Changed" />
		/// <seealso cref="OnChanging" />
		/// <seealso cref="OnChanged" />
		protected bool RaiseChangeEvent(bool changing, ProfileChangeType changeType, string section, string entry, object value)
		{
			if (changing)
			{
				// Don't even bother if there are no handlers.
				if (Changing == null)
					return true;

				ProfileChangingArgs e = new ProfileChangingArgs(changeType, section, entry, value);
				OnChanging(e);
				return !e.Cancel;
			}
			
			// Don't even bother if there are no handlers.
			if (Changed != null)
				OnChanged(new ProfileChangedArgs(changeType, section, entry, value));
			return true;
		}
Ejemplo n.º 7
0
        /// <summary>
        ///   Raises either the Changing or Changed event. </summary>
        /// <param name="changing">
        ///   If true, the Changing event is raised otherwise it's Changed. </param>
        /// <param name="changeType">
        ///   The type of change being made. </param>
        /// <param name="section">
        ///   The name of the section that was involved in the change or null if not applicable. </param>
        /// <param name="entry">
        ///   The name of the entry that was involved in the change or null if not applicable.
        ///   If changeType is equal to Other, entry is the name of the property involved in the change.</param>
        /// <param name="value">
        ///   The value that was changed or null if not applicable. </param>
        /// <returns>
        ///   The return value is based on the event raised.  If the Changing event was raised,
        ///   the return value is the opposite of ProfileChangingArgs.Cancel; otherwise it's true.</returns>
        /// <remarks>
        ///   This method may be used by derived classes as a convenient alternative to calling
        ///   OnChanging and OnChanged.  For example, a typical call to OnChanging would require
        ///   four lines of code, which this method reduces to two. </remarks>
        /// <seealso cref="Changing" />
        /// <seealso cref="Changed" />
        /// <seealso cref="OnChanging" />
        /// <seealso cref="OnChanged" />
        protected bool RaiseChangeEvent(bool changing, ProfileChangeType changeType, string section, string entry, object value)
        {
            if (changing)
            {
                if (Changing == null)
                {
                    return(true);
                }

                ProfileChangingArgs e = new ProfileChangingArgs(changeType, section, entry, value);
                OnChanging(e);
                return(!e.Cancel);
            }

            if (Changed != null)
            {
                OnChanged(new ProfileChangedArgs(changeType, section, entry, value));
            }
            return(true);
        }
Ejemplo n.º 8
0
 /// <summary>
 ///   Initializes a new instance of the ProfileChangingArgs class by initializing all of its properties. </summary>
 /// <param name="changeType">
 ///   The type of change to be made to the profile. </param>
 /// <param name="section">
 ///   The name of the section involved in the change or null. </param>
 /// <param name="entry">
 ///   The name of the entry involved in the change, or if changeType is set to Other, the name of the method/property that was changed. </param>
 /// <param name="value">
 ///   The new value for the entry or method/property, based on the value of changeType. </param>
 /// <seealso cref="ProfileChangeType" />
 public ProfileChangingArgs(ProfileChangeType changeType, string section, string entry, object value)
     : base(changeType, section, entry, value)
 {
 }
Ejemplo n.º 9
0
        /// <summary>
        ///   Raises either the Changing or Changed event. </summary>
        /// <param name="changing">
        ///   If true, the Changing event is raised otherwise it's Changed. </param>
        /// <param name="changeType">
        ///   The type of change being made. </param>
        /// <param name="section">
        ///   The name of the section that was involved in the change or null if not applicable. </param>
        /// <param name="entry">
        ///   The name of the entry that was involved in the change or null if not applicable. 
        ///   If changeType is equal to Other, entry is the name of the property involved in the change.</param>
        /// <param name="value">
        ///   The value that was changed or null if not applicable. </param>
        /// <returns>
        ///   The return value is based on the event raised.  If the Changing event was raised, 
        ///   the return value is the opposite of ProfileChangingArgs.Cancel; otherwise it's true.</returns>
        /// <remarks>
        ///   This method may be used by derived classes as a convenient alternative to calling 
        ///   OnChanging and OnChanged.  For example, a typical call to OnChanging would require
        ///   four lines of code, which this method reduces to two. </remarks>
        /// <seealso cref="Changing" />
        /// <seealso cref="Changed" />
        /// <seealso cref="OnChanging" />
        /// <seealso cref="OnChanged" />
        protected bool RaiseChangeEvent(bool changing, ProfileChangeType changeType, string section, string entry, object value)
        {
            if (changing)
            {
                // Don't even bother if there are no handlers.
                if (Changing == null)
                    return true;

                ProfileChangingArgs e = new ProfileChangingArgs(changeType, section, entry, value);
                OnChanging(e);
                return !e.Cancel;
            }

            // Don't even bother if there are no handlers.
            if (Changed != null)
                OnChanged(new ProfileChangedArgs(changeType, section, entry, value));
            return true;
        }