Class ProgressEventHandlerInfo
Class ProgressEventHandlerInfo
Namn på plats: Aspose.Imaging.ProgressManagement Församling: Aspose.Imaging.dll (25.4.0)
Denna klass representerar information om bildladdning/spara/exportoperationernas framsteg,som kan användas i en extern applikation för att visa omvandlingsprocessen till slutanvändaren
public class ProgressEventHandlerInfo
Inheritance
object ← ProgressEventHandlerInfo
Arvsmedlemmar
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Följande exempel visar hur man skriver ut information om framsteg för last/exportverksamhet.
public void Test3460()
{
string dir = "c:\\aspose.imaging\\net\\issues\\3460";
string fileName = System.IO.Path.Combine(dir, "big.png");
// Example of use of separate operation progress event handlers for load/export operations
using (var image = Aspose.Imaging.Image.Load(fileName, new Aspose.Imaging.LoadOptions { ProgressEventHandler = ProgressCallback }))
{
image.Save(fileName + ".psd",
new Aspose.Imaging.ImageOptions.PsdOptions() { ProgressEventHandler = ExportProgressCallback });
}
}
private void ProgressCallback(Aspose.Imaging.ProgressManagement.ProgressEventHandlerInfo info)
{
System.Console.WriteLine("{0} : {1}/{2}", info.EventType, info.Value, info.MaxValue);
}
private void ExportProgressCallback(Aspose.Imaging.ProgressManagement.ProgressEventHandlerInfo info)
{
System.Console.WriteLine("Export event {0} : {1}/{2}", info.EventType, info.Value, info.MaxValue);
}
// The STDOUT log may look like this:
//Initialization : 1/4
//PreProcessing : 2/4
//Processing : 3/4
//Finalization : 4/4
//Export event Initialization : 1/4
//Export event PreProcessing : 2/4
//Export event Processing : 3/4
//Export event RelativeProgress : 1/1
//RelativeProgress : 1/1
//Export event Finalization : 4/4
Properties
Description
Få beskrivningen av händelsen
public string Description { get; }
Fastighetsvärde
EventType
Få typ av händelse.
public EventType EventType { get; }
Fastighetsvärde
MaxValue
Uppnå den övre gränsen för framsteg.
public int MaxValue { get; }
Fastighetsvärde
Value
Uppnå aktuella framsteg värde.
public int Value { get; }