The SDK allows you to use CloudBuddy UI components such as Bucket Explorer, Folder Explorer, SaveAs dialog in the way you use your windows File Open dialog from your .NET applications.
Also the CloudBuddy SDK provides UI less access to the CloudBuddy windows services such as upload and download.
You can learn more about this API's by looking at our example below.
1. Download the CloudBuddy SDK from here
2. Create a new Windows Application project in Visual Studio 2005
File -> New -> Project -> Windows Application
3. Unzip the CloudBuddy SDK to local folder
4. Add reference to the below mentioned list of DLLs in your project by right clicking on the project name-> Add Reference
Now you are set to use the CloudBuddy API in your project. If you are not sure as how to use these API's, refer the sample SDK project section below.
Working with the CloudBuddy SDK sample application
//Initializing the Configuration File
CloudBuddy.Initialize("cloudbuddy", AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);//Registering Client with the ClientID and setting the isAllResult
//isAllResult will enable you to receive notifications for all client's
//upload and download
//If CloudBuddy is already installed, you can retrieve the accounts
//configured in CloudBuddy. Otherwise you can build your accountlist
//and set it to this property.
//Retrieve the Config information and assign in the Application level Context Variables
//ClientID
cloudBuddyStore.ContextInfo.ClientID = CBAppConfig.Instance.ClientID;
//ISALLResults from Config file. isAllResult will enable you to receive notifications for all
//client's upload and download.
cloudBuddyStore.ContextInfo.ISALLResults = CBAppConfig.Instance.ISALLResults;
//Whether the pagination is needed or not
cloudBuddyStore.ContextInfo.ISPaginationNeeded = true;
//No.of Records to be displayed in ListView
cloudBuddyStore.ContextInfo.ListViewCount = CBAppConfig.Instance.ListViewCount;
//Whether the account details need to be displayed or not
cloudBuddyStore.ContextInfo.ISAccountDetailsVisibility = true;
// Checks whether the filter is applied or not.
cloudBuddyStore.ContextInfo.ISFilterApplied = false;
//What are the filters need to be applied. More than one filter should be separated
//by “|”. File Extension only allowed in filters
//Single Filter eg. *.txt,*.doc
//Multiple Filter eg. *.txt|*.doc|*.ppt
//*.* is not allowed for filter condition
cloudBuddyStore.ContextInfo.Filter = null;
//Whether the metadata need to be retrieved during retrievel of files
cloudBuddyStore.ContextInfo.ISRetrieveMetaData = false;
//To Show the FileView in Bucket Explorer
//Get an instance of Bucket Explorer with FileView
//Allow Multiple Selection of Files
//Hiding CloudBuddy Toolbar
//Hiding Treeview Contextmenu
//Hiding ListView Contextmenu
//To Show MailView in Bucket Explorer
//Get an instance of Bucket Explorer with MailView
//Allow Multiple Selection of Files
//Hiding CloudBuddy Toolbar
//Hiding Treeview Contextmenu
//Hiding ListView Contextmenu
bucketExplorer.ISListViewContextMenuVisible = false;
The following list gives you an overview of some properties of BucketExplorer, CBSaveDialog and ShareWizard.
If you would like to share files using Template, then the following steps need to be done:(if CloudBuddy is not installed on your machine)
The above sample XML file contains a Photo album template.
4. Then in your application give the template path in the App.Config as follows![]()
under <appSettings> tag.
5. While using Template method in share option, Cloudbuddy service needs to run which is mandatory.
If CloudBuddy is already installed, the above settings will be taken care of by the CloudBuddy application itself.
Screen 1: CBAPISamples form contains options for viewing Bucket Explorer, Folder Explorer, SaveAsDialog, Upload File and Download File of CloudBuddy.
Screen 2: Shows BucketExplorer
Screen 3: Displays the selected bucket name, folder name and the list of files selected in the corresponding folder of the current account.
Screen 4a and 4b: Displays the Folder Explorer and its corresponding information selected. The List of Files listbox displays Not Applicable because with FolderExplorer we can only browse through folders.
Screen 4a
Screen 4b
Screen 5a and 5b: Displays the SaveAsDialog of cloudbuddy and the Destination path of the file name.
Screen 5a
Screen 5b
Screen 6a, 6b, 6c and 6d: Displays the ShareWizard of CloudBuddy
Screen 6a
Screen 6b
Screen 6c
Screen 6d
Screen 7a, 7b: Displays the Upload File option of CloudBuddy
Screen 7a
Screen 7b
Screen 8a, 8b: Displays the Download File option of CloudBuddy
Screen 8a
Screen 8b