ActionComponents  04.05.00
Customizable UI and time-saving tools for Android development with Xamarin and Visual Studio.
ActionComponents.ACDownloadItem Class Reference

Holds all information about a given file to be downloaded such as the URL and the destination directory. Events can be raised when the individual file has finished downloading for completed, canceled or on download error. More...

Public Member Functions

 ACDownloadItem ()
 Initializes a new instance of the ActionComponents.ACDownloadItem class. More...
 
 ACDownloadItem (string URL, string downloadDirectory)
 Initializes a new instance of the ActionComponents.ACDownloadItem class and sets the default values More...
 
 ACDownloadItem (string URL, string downloadDirectory, string destinationFilename)
 Initializes a new instance of the ActionComponents.ACDownloadItem class and sets the default values More...
 
delegate void DownloadErrorDelegate (string message)
 Occurs when download error. More...
 
delegate void DowloadCanceledDelegate (string filename)
 Occurs when download canceled. More...
 
delegate void DownloadFileStartedDelegate (string filename)
 Occurs when download file started. More...
 
delegate void DownloadFileCompletedDelegate (string filename)
 Occurs when download file completed. More...
 

Public Attributes

string URL =""
 The URL to download the file from More...
 
string downloadDirectory =""
 The directory to download the file to More...
 
string destinationFilename =""
 OPTIONAL: Specifies a new name for the file when it is downloaded More...
 

Properties

string filename [get]
 Returns the filename of the URL currently being downloaded More...
 

Events

DownloadErrorDelegate DownloadError
 
DowloadCanceledDelegate DownloadCanceled
 
DownloadFileStartedDelegate DownloadFileStarted
 
DownloadFileCompletedDelegate DownloadFileCompleted
 

Detailed Description

Holds all information about a given file to be downloaded such as the URL and the destination directory. Events can be raised when the individual file has finished downloading for completed, canceled or on download error.

Constructor & Destructor Documentation

ActionComponents.ACDownloadItem.ACDownloadItem ( )

Initializes a new instance of the ActionComponents.ACDownloadItem class.

ActionComponents.ACDownloadItem.ACDownloadItem ( string  URL,
string  downloadDirectory 
)

Initializes a new instance of the ActionComponents.ACDownloadItem class and sets the default values

Parameters
URLThe URL of the file to download
downloadDirectoryThe directory that the file will be downloaded to
ActionComponents.ACDownloadItem.ACDownloadItem ( string  URL,
string  downloadDirectory,
string  destinationFilename 
)

Initializes a new instance of the ActionComponents.ACDownloadItem class and sets the default values

Parameters
URLThe URL of the file to download
downloadDirectoryThe directory that the file will be downloaded to
destinationFilenameSpecifies a new name for the file when it is downloaded

Here is the call graph for this function:

Member Function Documentation

delegate void ActionComponents.ACDownloadItem.DowloadCanceledDelegate ( string  filename)

Occurs when download canceled.

Parameters
filenameThe name of the file that was currently being processed
delegate void ActionComponents.ACDownloadItem.DownloadErrorDelegate ( string  message)

Occurs when download error.

Parameters
messageContains the error message that occurred while downloading this file

Here is the caller graph for this function:

delegate void ActionComponents.ACDownloadItem.DownloadFileCompletedDelegate ( string  filename)

Occurs when download file completed.

Parameters
filenameThe name of the file that was currently being processed
delegate void ActionComponents.ACDownloadItem.DownloadFileStartedDelegate ( string  filename)

Occurs when download file started.

Parameters
filenameThe name of the file that was currently being processed

Member Data Documentation

string ActionComponents.ACDownloadItem.destinationFilename =""

OPTIONAL: Specifies a new name for the file when it is downloaded

string ActionComponents.ACDownloadItem.downloadDirectory =""

The directory to download the file to

string ActionComponents.ACDownloadItem.URL =""

The URL to download the file from

Property Documentation

string ActionComponents.ACDownloadItem.filename
get

Returns the filename of the URL currently being downloaded

The filename currently being downloaded or empty string ("") if no active download

Event Documentation

DowloadCanceledDelegate ActionComponents.ACDownloadItem.DownloadCanceled
DownloadErrorDelegate ActionComponents.ACDownloadItem.DownloadError
DownloadFileCompletedDelegate ActionComponents.ACDownloadItem.DownloadFileCompleted
DownloadFileStartedDelegate ActionComponents.ACDownloadItem.DownloadFileStarted