Class ProgressEventHandlerInfo

Class ProgressEventHandlerInfo

Tên không gian: Aspose.Imaging.ProgressManagement Tổng hợp: Aspose.Imaging.dll (25.4.0)

Loại này đại diện cho thông tin về sự tiến bộ của hoạt động tải hình ảnh / tiết kiệm / xuất khẩu,có thể được sử dụng trong ứng dụng bên ngoài để hiển thị tiến bộ chuyển đổi cho người dùng cuối

public class ProgressEventHandlerInfo

Inheritance

object ProgressEventHandlerInfo

Thành viên thừa kế

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Ví dụ sau đây cho thấy cách in thông tin về các sự kiện tiến bộ cho các hoạt động tải / xuất khẩu.

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

Nhận được mô tả của sự kiện

public string Description { get; }

Giá trị bất động sản

string

EventType

Nhận được loại sự kiện.

public EventType EventType { get; }

Giá trị bất động sản

EventType

MaxValue

Nhận được giới hạn giá trị tiến bộ trên.

public int MaxValue { get; }

Giá trị bất động sản

int

Value

Nhận được giá trị tiến bộ hiện tại.

public int Value { get; }

Giá trị bất động sản

int

 Tiếng Việt