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

This object handles the downloading of open of more files from the internet. It provides events for handling progress, suspension and restart, and error hanlding routines. More...

Public Member Functions

 ACDownloadManager ()
 Initializes a new instance of the ActionComponents class. More...
 
void ClearQueue ()
 Clears the queue. More...
 
void QueueFile (string url, string downloadDirectory)
 Adds the given download url and directory to the queue of files to download More...
 
void QueueFile (string url, string downloadDirectory, string destinationFilename)
 Adds the given download url and directory to the queue of files to download More...
 
void QueueFile (ACDownloadItem item)
 Adds the given download item to the queue of files to download More...
 
void AbortDownload ()
 Aborts the download. More...
 
void StartDownloading ()
 Start downloading all files currently in the queue More...
 
void SuspendDownload ()
 Suspends the download of any currently active file More...
 
void ResumeDownloading ()
 Resumes the downloading of any suspended file download More...
 
delegate void AllDownloadsCompletedDelegate ()
 Occurs when all downloads completed. 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...
 
delegate void FileDownloadProgressPercentDelegate (float percentage)
 Occurs when file download progress percent is updated. More...
 
delegate void OverallDownloadProgressPercentDelegate (float percentage)
 Occurs when overall download progress percent is updated. More...
 

Properties

bool abortOnError [get, set]
 Gets or sets a value indicating whether this ActionComponents.ACDownloadManager aborts all active downloads on error. More...
 
int filesInQueue [get]
 Gets the number of files in queue. More...
 
string downloadingURL [get]
 Returns the URL of the file currently being downloaded More...
 
string downloadingFilename [get]
 Returns the filename of the URL currently being downloaded More...
 
bool isBusy [get]
 Gets a value indicating whether this ActionComponents is busy. More...
 
bool isSuspended [get]
 Gets a value indicating whether this ActionComponents is suspended. More...
 

Events

AllDownloadsCompletedDelegate AllDownloadsCompleted
 
DownloadErrorDelegate DownloadError
 
DowloadCanceledDelegate DownloadCanceled
 
DownloadFileStartedDelegate DownloadFileStarted
 
DownloadFileCompletedDelegate DownloadFileCompleted
 
FileDownloadProgressPercentDelegate FileDownloadProgressPercent
 
OverallDownloadProgressPercentDelegate OverallDownloadProgressPercent
 

Detailed Description

This object handles the downloading of open of more files from the internet. It provides events for handling progress, suspension and restart, and error hanlding routines.

Constructor & Destructor Documentation

ActionComponents.ACDownloadManager.ACDownloadManager ( )

Initializes a new instance of the ActionComponents class.

Here is the call graph for this function:

Member Function Documentation

void ActionComponents.ACDownloadManager.AbortDownload ( )

Aborts the download.

Here is the call graph for this function:

delegate void ActionComponents.ACDownloadManager.AllDownloadsCompletedDelegate ( )

Occurs when all downloads completed.

Here is the caller graph for this function:

void ActionComponents.ACDownloadManager.ClearQueue ( )

Clears the queue.

Here is the caller graph for this function:

delegate void ActionComponents.ACDownloadManager.DowloadCanceledDelegate ( string  filename)

Occurs when download canceled.

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

Occurs when download error.

Parameters
messageContains the error message that occurred while downloading this file
delegate void ActionComponents.ACDownloadManager.DownloadFileCompletedDelegate ( string  filename)

Occurs when download file completed.

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

Occurs when download file started.

Parameters
filenameThe name of the file that was currently being processed
delegate void ActionComponents.ACDownloadManager.FileDownloadProgressPercentDelegate ( float  percentage)

Occurs when file download progress percent is updated.

Parameters
percentageThe decimal percentage from 0 to 1 that the process has completed
delegate void ActionComponents.ACDownloadManager.OverallDownloadProgressPercentDelegate ( float  percentage)

Occurs when overall download progress percent is updated.

Parameters
percentageThe decimal percentage from 0 to 1 that the process has completed
void ActionComponents.ACDownloadManager.QueueFile ( string  url,
string  downloadDirectory 
)

Adds the given download url and directory to the queue of files to download

Parameters
urlThe URL of the file to download
downloadDirectoryThe directory to download the file to
void ActionComponents.ACDownloadManager.QueueFile ( string  url,
string  downloadDirectory,
string  destinationFilename 
)

Adds the given download url and directory to the queue of files to download

Parameters
urlThe URL of the file to download
downloadDirectoryThe directory to download the file to
destinationFilenameSpecifies a new name for the file when it is downloaded
void ActionComponents.ACDownloadManager.QueueFile ( ACDownloadItem  item)

Adds the given download item to the queue of files to download

Parameters
itemThe download item to add
void ActionComponents.ACDownloadManager.ResumeDownloading ( )

Resumes the downloading of any suspended file download

Here is the call graph for this function:

void ActionComponents.ACDownloadManager.StartDownloading ( )

Start downloading all files currently in the queue

void ActionComponents.ACDownloadManager.SuspendDownload ( )

Suspends the download of any currently active file

Property Documentation

bool ActionComponents.ACDownloadManager.abortOnError
getset

Gets or sets a value indicating whether this ActionComponents.ACDownloadManager aborts all active downloads on error.

true if abort on error; otherwise, false.

string ActionComponents.ACDownloadManager.downloadingFilename
get

Returns the filename of the URL currently being downloaded

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

string ActionComponents.ACDownloadManager.downloadingURL
get

Returns the URL of the file currently being downloaded

The URL of the file being downloaded or empty string ("") if no active download

int ActionComponents.ACDownloadManager.filesInQueue
get

Gets the number of files in queue.

The current file count

bool ActionComponents.ACDownloadManager.isBusy
get

Gets a value indicating whether this ActionComponents is busy.

true if is busy; otherwise, false.

bool ActionComponents.ACDownloadManager.isSuspended
get

Gets a value indicating whether this ActionComponents is suspended.

true if is suspended; otherwise, false.

Event Documentation

AllDownloadsCompletedDelegate ActionComponents.ACDownloadManager.AllDownloadsCompleted
DowloadCanceledDelegate ActionComponents.ACDownloadManager.DownloadCanceled
DownloadErrorDelegate ActionComponents.ACDownloadManager.DownloadError
DownloadFileCompletedDelegate ActionComponents.ACDownloadManager.DownloadFileCompleted
DownloadFileStartedDelegate ActionComponents.ACDownloadManager.DownloadFileStarted
FileDownloadProgressPercentDelegate ActionComponents.ACDownloadManager.FileDownloadProgressPercent
OverallDownloadProgressPercentDelegate ActionComponents.ACDownloadManager.OverallDownloadProgressPercent