Represents the methods that will handle the processing percentage event of an image filter.
delegate void PercentageHandler();
public delegate void PercentageHandler(int percentage );
Public Delegate Sub PercentageHandler(int percentage ) As void
|
Parameters |
Description |
|
percentage |
An integer that indicates the current percentage of the whole process. |
When associate this event with your event handler, you can know the step of the processing image filter. The event handler is called when the image filter processes at the percetage, unless you remove the delegate.
The following code example demonstrates using this event to update your progress bar. It helps to inform the end-users the status of your application, especially for some filters that might take a while to complete the process.
[C#]
private ProgressBar barProgress; private void ConfigFilter(BaseFilter filter) { filter.PercentageChanged += new PercentageHandler(filter_PercentageChanged); } //this event is triggered when the processing percentage changed. private void filter_PercentageChanged(int percentage) { // in case we are not doing the duplicate update if (percentage != barProgress.Value) barProgress.Value = percentage; }
|
Send comments about this topic.
|
|
Copyright (c) 2006-2007 @ ImageComponent.NET All rights reserved.
|