/*
 * Author: Melih Odaba
 * You may distribute this code freely or use it in your applications provided that 
 * you keep the credits of author.
 * You may edit this code, but if you do so please comment your changes clearly and 
 * state that those changes are not affliated with the author.
 * Disclaimer:
 * This code and all of its contents are provided as is. The author is not 
 * responsible for any loss or damage you might encounter due to using this code.
*/

Changes and Additions to version 1.10:
--------------------------------------

- FTPQuit() method has been made public. Now it is possible to close a session without closing the connection. So, a new session can be opened via FTPConnect() after FTPQuit(). ConnectionState.LoggingOff and ConnectionState.LoggedOff enumerators are added.

- FTPClose() now has an overload which allows the user to close the connection directly without closing the session first.

- Every public method now has an async version.

- Every async method has an event that is generated after the method exits. The result of the method (return value or exception info if an error has occured) is in the event arguments of the event.

- File transfer now supports resuming. FileTransferResuming enumerator has been added. New overloads for FTPGetFile and FTPPutFile are added.

- OnFileUploadDataSent and OnFileDownloadDataReceived events are implemeted to monitor file transfer status such as bytes transferred.

- FTPClient class is now a component which can be added to the toolbox of your IDE. You can drag and drop the component from your toolbox to your form and access every event and property from your design view.

- FileData structure has now FileSizeLong property, so that files greater than 2GB now can be displayed and transferred. FileSize property is still filled when FTPFindFirstFile() and FTPFindNextFile() are called.

- Trying to set Server or Port property while a connection is open will now raise an exception. This is required for inner mechanics.

- Trying to set User or to call SetPassword() while a session is open will now raise an exception. This is required for inner mechanics.

Version 1.10 is a major addition over 1.04 and I tried to make 1.10 as backward compatible as possible. Only the last 2 items in the above list may cause a problem with your existing code, yet since it is incorrect use of the class, most of you won't notice the difference. Only the new overloads can use added functionality (such as resume file transfer), and all the older versions behave as in the past.

Changes and Additions to version 1.04:
--------------------------------------

- Passive data connection is now supported. You can use passive connection with FTPGetFile, FTPPutFile and FTPFindFirstFile.

- DataConnectionType enumarator has been added.

- Connection state changed event has been implemented. Delegate for OnConnectionStateChanged event is ConnectionStateChanged.

- ConnectionStateChangedEventArgs class has been implemented. It derives from System.EventArgs class and is passed as a parameter to OnConnectionStateChanged event.

- This text file!

Version 1.04 is backward compatible with 1.03. You can use your existing code written for 1.03 with the new dll. Please note that FTPGetFile, FTPPutFile and FTPFindFirstFile use active data connection as default, as in older versions. If you want to use passive data connection for these methods, call the new overloads of each method.

