Home Budget Software: "Rates" Plug In
User and developer manual
 

::  Credits   ::  About   ::  System Requirements   ::  Download   ::  Installation   ::  Running  ::


 

Credits

This project was submitted by:

Jonathan ICHAI  
 
About The Project

The "Rates" Plug In was created in order to be integrated into the "Home Budget Software".
The purpose of this Plug In is to update the exchange rates of the most used currencies in the world, and to make conversions.
The Plug In automatically updates the exchange rates, retrieving the data from financial websites on the Internet.
If there is no connection, the user is able to update manually the rates.

To the top of page

System requirements

Home computer

To the top of page

Download
 

 To the top of page

  Installation

        1. How to Integrate the Plug In into your project
           1.2. Integrating the Plug In into a "Visual Basic" Project
           1.3.Integrating the Plug In to a Visual C++ Project

        2. The Plug In functions.

To the top of page

How to integrate the Plug In into your project

The Plug is an ActiveX control.

A short definition:
An ActiveX control is a component program object that can be re-used by many application programs. ActiveX controls can  be used for any commonly-needed task by an application program in the latest Windows and Macintosh environments.
Note to java lovers: An ActiveX control is roughly equivalent in concept and implementation to the Java applet.
 In implementation, an ActiveX control is a dynamic link library (DLL) module. An ActiveX control runs in an application program that uses the Component Object Model program interfaces. It is a reuseable component . Windows application development programs such as PowerBuilder and Microsoft Access take advantage of ActiveX controls.
 
To the top of page

 Integrating the Plug In into a "Visual Basic" Project
 
 Nothing is more simple.
First, put the PlugIn directory into C:\
Then, put your mouse on the ToolBox of VB (the tool bar on the left side of the screen) and click the right button.Then choose "Components..." .
 When the components list  appears, click on "Browse" and look for the PlugIn.ocx file of the Plug In. Then, the Plug In ActiveX will appear in the "Components" list.   Now, a new little icon appears in the ToolBox toolbar.
You are now able to integrate the control in your project.

To the top of page

Integrating the Plug In to a Visual C++ Project

The following procedure adds dispatch class and header files for an ActiveX control to a Visual C++ project.

Put the PlugIn directory into C:\
On the Project menu, click Add to Project. A shortcut menu appears.
Click Components and Controls. The Components and Controls Gallery dialog box appears.
Click the component to add to your project. Visual C++ displays a dialog box from which you can select a subset of the component's classes to add to your project.
Click to select the check boxes of the classes you want to add, and click OK.
Visual C++ generates dispatch class and header files for the component and adds them to your project.

To the top of page

4. The Plug In functions.

The "Rates" plug in consists of several functions you can use as an interface between it and your application. (However, you can use the Plug In as a "Plug and Play" form in your application, we will explain that later).
These functions are :
 

Concerning the configuration:

                boolean  SelectMCU (currency as string)

Concerning the update process:

 
                 boolean  GetCurrentRate (currency as string, rate as string)
                 boolean  GetLastDate (currency as string, date as string)
                 boolean  UpdateRate (currency as string, value as string)     (For manual update)
                 boolean Update ()    (In order to update from the Internet)
 

Concerning the conversions:

                 double    ConvertTo (currency as string, sum as string)
                 double    ConvertFrom (currency as string, sum as string)

Once you have integrated the Plug In to your application (as explained in (3) ) you can use it as an object (whose name by default in VB is Rates1).
Then, as an example,  just type Rates1.SelectMCU to use the SelectMCU function.
Here is a complete guide explaining how you must use these functions.
 
boolean SelectMCU(currency as string) 

 This function selects the most commonly used currency (Example: if you live in Israel, you will select the New Israeli Shekel". 

Parameters: 

                  Currency:  type :string. (IN) This parameter must contain the name of the currency. 
                                                       In order to use this function correctly, you will have to use the following names for the currencies: 

                                                      U.S Dollar :  "us" 
                                                      Canadian Dollar: "can" 
                                                      Australian Dollar: "aust" 
                                                      Euro: "euro" 
                                                      U.K pound : "uk" 
                                                      Deutschmark:  "dmark" 
                                                      French Franc: "ffranc" 
                                                      Swiss Franc: "sfranc" 
                                                      Yen: "yen" 
 
 
 
Returned Values 

     The function returns True if the selection was done successfully and False if the selection failed. 
 
 
 
 

boolean getCurrentRate(currency As String, rate As String)   

 This function give the exchange rate of a specific currency. 

Parameters: 

                  Currency:  type :string. (IN) This parameter must contain the name of the currency. 
                                                       In order to use this function correctly, you will have to use the following names for the currencies and other rates: 

                                                      U.S Dollar :  "us" 
                                                      Canadian Dollar: "can" 
                                                      Australian Dollar: "aust" 
                                                      Euro: "euro" 
                                                      U.K pound : "uk" 
                                                      Deutschmark:  "dmark" 
                                                      French Franc: "ffranc" 
                                                      Swiss Franc: "sfranc" 
                                                      Yen: "yen" 

                                                      Inflation rate: "inflation" 
                                                      Construction rate: "construction" 
 
                   Rate :         type: string. (OUT) This parameter will receive the rate of the currency. 
 
Returned Values 

     The function returns True if the operation was currently performed and False in case of failure. 
 
 

boolean getLastDate(currency As String, date As String)   

This function returns  the date of the last update of a specific currency. 
 
 
 Parameters: 
 
                   Currency:   type: string. (IN) This parameter must contain the name of the currency. 
                                                          In order to use this function correctly, you will have to use the following names for the currencies: 

                                                      U.S Dollar :  "us" 
                                                      Canadian Dollar: "can" 
                                                      Australian Dollar: "aust" 
                                                      Euro: "euro" 
                                                      U.K pound : "uk" 
                                                      Deutschmark:  "dmark" 
                                                      French Franc: "ffranc" 
                                                      Swiss Franc: "sfranc" 
                                                      Yen: "yen" 
 
                                                      Inflation rate: "inflation" 
                                                      Construction rate: "construction" 

                   Date :        type: string: (OUT) This parameter will receive the date of the last update. 
 
Returned Values 

     The function returns True if the operation was currently performed and False in case of failure. 
 

boolean UpdateRate(currency As String, value As String) 

This function updates a specific currency exchange rate. 

Parameters: 
 
                   Currency:   type: string. (IN) This parameter must contain the name of the currency. 
                                                          In order to use this function correctly, you will have to use the following names for the currencies: 

                                                      U.S Dollar :  "us" 
                                                      Canadian Dollar: "can" 
                                                      Australian Dollar: "aust" 
                                                      Euro: "euro" 
                                                      U.K pound : "uk" 
                                                      Deutschmark:  "dmark" 
                                                      French Franc: "ffranc" 
                                                      Swiss Franc: "sfranc" 
                                                      Yen: "yen" 
 
                                                     Inflation rate: "inflation" 
                                                     Construction rate: "construction" 

                   Value :        type: string: (IN) This parameter must contain the value of new exchange rate. 
 
Returned Values 

     The function returns True if the operation was currently performed and False in case of failure. 
 

double  ConvertTo(currency As String, sum As String) 

This function converts a sum of money from the most commonly used currency to any other currency. 

Parameters: 
 
                   Currency:   type: string. (IN) This parameter must contain the name of the currency. 
                                                          In order to use this function correctly, you will have to use the following names for the currencies: 

                                                      U.S Dollar :  "us" 
                                                      Canadian Dollar: "can" 
                                                      Australian Dollar: "aust" 
                                                      Euro: "euro" 
                                                      U.K pound : "uk" 
                                                      Deutschmark:  "dmark" 
                                                      French Franc: "ffranc" 
                                                      Swiss Franc: "sfranc" 
                                                      Yen: "yen" 
 

                   Sum :        type: string: (IN) This parameter must contain the sum of money you want to convert. 
 
Returned Values 

     The function returns the result of the conversion if it was performed correctly, and "0" in case of failure. 
 

double ConvertFrom(currency As String, sum As String) 

This function converts a sum of money from any other currency to the most commonly used currency. 

Parameters: 
 
                   Currency:   type: string. (IN) This parameter must contain the name of the currency. 
                                                          In order to use this function correctly, you will have to use the following names for the currencies: 

                                                      U.S Dollar :  "us" 
                                                      Canadian Dollar: "can" 
                                                      Australian Dollar: "aust" 
                                                      Euro: "euro" 
                                                      U.K pound : "uk" 
                                                      Deutschmark:  "dmark" 
                                                      French Franc: "ffranc" 
                                                      Swiss Franc: "sfranc" 
                                                      Yen: "yen" 
 

                   Sum :        type: string: (IN) This parameter must contain the sum of money you want to convert. 
 
Returned Values 

     The function returns the result of the conversion if it was performed correctly, and "0" in case of failure. 
 

boolean Update() 

 If the last update is older than one day, this function tries to download the rates from the Internet. 
 

  • If the PC is connected, it dowloads the rates from the web and introduce them into the database.
  • If the PC isn't connected, the still can update the values manually
Parameters: 

                 No parameter. 
Returned Values 

     The function returns True if the rates were correctly updated from the web and False if there is no connection.

 
To the top of page

5. Using the Plug In

You can use the Plug In by 2 ways.
a. Plug-In and Play !
b. Using the functions

a. "Plug-In and Play"

Once you have integrated the Plug-In into your project (using the chapter 3 of this manual), just create a new form and put the ActiveX control in it.
The control is a simple window consisting of 5 tabs.

        1)The first tab is called “Rates”. It shows the most commonly used currency and the rates of the main other currencies. You will be able to update these rates  using the third tab called “update”

 

        2) The second tab is called “conversion”. In this tab, you can convert a sum from your currency to another currency and vice versa.


 
 

        3) The third tab is called “Manual Update”. Here, you can update the most commonly used currency name, the rates of the other currencies, the inflation rate and the construction rate.


 
        4) The fourth tab is called "History". In this tab, you can see the history of the currencies updates. For each currency, a table shows the past rates and the dates of the updates.
 

    5) The last tab is called "Configuration". In this tab, the user configures the system. He first selects the "most commonly used currency" and then selects the website he wants the data to come from. He can also test the connection in order to know if he can update the data from the web.

· First, choose the most commonly used currency using the combo box located in the top.
· Select the currencies rates you are interested in using the check boxes located in front of each currency. After selected, a currency rate must be updated by the user.
· Do the same thing for the inflation/construction rate.
·  If a problem is encountered updating the data, an error message will appear.
 
 

 b. Using the functions

The functions detailed earlier can be used as an interface to access and update data. Indeed, if you want to realize an interface for the rates conversion by yourself, you can use these functions and their return values.
 
To the top of page

Technical Support

In case of problem, or if you have any question, contact the Technical Support by E-mail or by phone:

    sjichai@t2.technion.ac.il

    Phone: 055 326264