/// <summary>
 /// An event handler called when the item text has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnItemTextChanged(object sender, ProgressItemEventArgs e)
 {
     // If the object has been disposed, do nothing.
     if (this.IsDisposed) return;
     // Update the item text.
     this.OnUpdateItemText(e.Item);
     // Update the item measurements.
     this.OnUpdateGeometrics();
     // Update the geometrics of the specified item.
     this.OnUpdateItemGeometrics(e.Item, this.GetItemRectangle(this.Items.IndexOf(e.Item)));
     // Refresh the list box item.
     this.Invalidate(e.Item.geometrics.textBounds);
 }
 /// <summary>
 /// An event handler called when the item progress level has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnItemProgressLevelChanged(object sender, ProgressItemEventArgs e)
 {
     // If the object has been disposed, do nothing.
     if (this.IsDisposed) return;
     // If the progress events are suspended.
     if (this.suspendProgressEvents)
     {
         // Set the pending progress level changed event to true.
         this.eventProgressLevelChanged = true;
     }
     else
     {
         // Update the geometrics of the specified item.
         this.OnUpdateItemGeometrics(e.Item, this.GetItemRectangle(this.Items.IndexOf(e.Item)));
         // Refresh the list box item.
         this.Invalidate(e.Item.geometrics.legendBounds);
         this.Invalidate(e.Item.geometrics.progressBounds);
     }
 }
 /// <summary>
 /// An event handler called when the item progress count has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnItemProgressCountChanged(object sender, ProgressItemEventArgs e)
 {
     // If the object has been disposed, do nothing.
     if (this.IsDisposed) return;
     // If the progress events are suspended.
     if (this.suspendProgressEvents)
     {
         // Set the pending progress count changed event to true.
         this.eventProgressCountChanged = true;
     }
     else
     {
         // Update the item progress.
         this.OnUpdateItemProgress(e.Item);
         // Update the item measurements.
         this.OnUpdateGeometrics();
         // Refresh the list box item.
         this.Invalidate(this.GetItemRectangle(this.Items.IndexOf(e.Item)));
     }
 }
 /// <summary>
 /// An event handler called when the item progress default has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnItemProgressDefaultChanged(object sender, ProgressItemEventArgs e)
 {
     // If the object has been disposed, do nothing.
     if (this.IsDisposed) return;
     // If the progress events are suspended.
     if (this.suspendProgressEvents)
     {
         // Set the pending progress default changed event to true.
         this.eventProgressDefaultChanged = true;
     }
     else
     {
         // Refresh the list box item.
         this.Invalidate(this.GetItemRectangle(this.Items.IndexOf(e.Item)));
     }
 }
 /// <summary>
 /// An event handler called when the item enabled state has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnItemEnabledChanged(object sender, ProgressItemEventArgs e)
 {
     // If the object has been disposed, do nothing.
     if (this.IsDisposed) return;
     // Refresh the list box item.
     this.Invalidate(this.GetItemRectangle(this.Items.IndexOf(e.Item)));
 }