Public Member Functions
ICallback Interface Reference

An interface for callback objects which can be used to return information about progress and errors. More...

List of all members.

Public Member Functions

void Error (string KeyOfSender, string ErrorMsg)
 A function to report the information about an error.
void Progress (string KeyOfSender, int Percent, string Message)
 A function to report the information about progress of the task.

Detailed Description

An interface for callback objects which can be used to return information about progress and errors.

Here is an example which demonstrates the usage of Callback.

 public void Test()
 {
     Shapefile sf = new Shapefile();
     sf.GlobalCallback = new Callback();
 }
 class Callback : ICallback
 { 
     public void Error(string KeyOfSender, string ErrorMsg)
     {
         Debug.Print("Error reported: " + ErrorMsg);
     }
     public void Progress(string KeyOfSender, int Percent, string Message)
     {
         Debug.Print(Message + ": " + Percent + "%");
     }
 }
Examples:
CreateBuffer.cs.

Member Function Documentation

void ICallback.Error ( string  KeyOfSender,
string  ErrorMsg 
)

A function to report the information about an error.

Parameters:
KeyOfSenderThe key associated with the object in which error took place.
ErrorMsgThe description of the error.
void ICallback.Progress ( string  KeyOfSender,
int  Percent,
string  Message 
)

A function to report the information about progress of the task.

Parameters:
KeyOfSenderThe key associated with the object in which error took place.
PercentThe percent of completion (from 0 to 100).
MessageThe information about the task being executed.
 All Classes Files Functions Enumerations Properties Events