Class ProgressEventHandlerInfo
Le nom : Aspose.Imaging.ProgressManagement Assemblée: Aspose.Imaging.dll (25.4.0)
Questa classe rappresenta informazioni sul progresso delle operazioni di carico/salvataggio/esportazione dell’immagine,che può essere utilizzato in un’applicazione esterna per mostrare il progresso della conversione verso l’utente finale
public class ProgressEventHandlerInfo
Inheritance
object ← ProgressEventHandlerInfo
I membri ereditari
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
L’exemple ci-dessous montre comment imprimer des informations sur les événements de progrès pour les opérations de chargement/exportation.
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
Riceve la descrizione dell’evento
public string Description { get; }
Valore di proprietà
EventType
Ricevi il tipo di evento.
public EventType EventType { get; }
Valore di proprietà
MaxValue
Riceve il limite di valore superiore di progresso.
public int MaxValue { get; }
Valore di proprietà
Value
Riceve il valore attuale del progresso.
public int Value { get; }