Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Free currency converter! [Euro & dollar]
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 07-07-2012, 04:14 PM
Yenthe666's Avatar
Apprentice
$5 USD Donor New
 
Join Date: Apr 2011
Posts: 887
Send a message via Skype™ to Yenthe666
St. Patrick's Day 2013
Default Free currency converter! [Euro & dollar]

Hey guys!

I'm studying for my college exam and I just had some fun coding a little currency converter.
I'm not sure if many people would use it, but hey what the heck.
Mods: sorry if its in the wrong forum..

It will calculate from euro to dollar and the other way around.
For current currencys:
http://www.google.nl/webhp?hl=nl#hl=...w=1366&bih=651

Use that currency for the calculation (1 Euro = 1.2273 U.S. dollars) so use 1.2273 in the upper field for currency.

Screenshots:


Code:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace H11Oef3
{
    public partial class FormH11Oef3 : Form
    {
        public FormH11Oef3()
        {
            InitializeComponent();
        }

        private void buttonVerwerk_Click(object sender, EventArgs e)
        {
            //declaratie
            double bedrag, bedragHulp;

            if (!double.TryParse(textBox1.Text, out bedragHulp) == true)
            {
                this.Text = "Please only insert a double!";
                textBox1.Clear();
                textBox1.Text = "Only decimal numbers!";
            }

            if (textBoxEuro.Text == "" && textBoxDollar.Text == "")
            {
                this.Text = "Please fill in a field.";
                textBoxDollar.Text = "Fill in one of these fields.";
                textBoxEuro.Text = "Fill in one of these fields.";
            }
            else
            {
                if (double.TryParse(textBoxEuro.Text, out bedragHulp) == true)
                {
                    this.Text = "From Euro to Dollar.";
                    bedrag = ZetOm(Convert.ToDouble(textBoxEuro.Text), 1);
                    textBoxDollar.Text = "-> " + bedrag;
                }
                else
                {
                    if (double.TryParse(textBoxDollar.Text, out bedragHulp) == true)
                    {
                        this.Text = "From Dollar to Euro";
                        bedrag = ZetOm(Convert.ToDouble(textBoxDollar.Text), 2);
                        textBoxEuro.Text = "-> " + bedrag;
                    }
                    else
                    {
                        this.Text = "Fill in one field please.";
                    }
                }
            }
        }

        private void FormH11Oef3_Load(object sender, EventArgs e)
        {
            label1.Text = "Current currency? " + Environment.NewLine + "Example: 1,185 from € to $ ";
            this.Text = "Currency converter.";
            buttonVerwerk.Text = "Calculate!";
            textBox1.Text = "1,185";
            this.Icon = Properties.Resources.favicon;

        }

        private double ZetOm(double bedrag, int code)
        {
            double resultaat = 0.00;
            double omzetkoers = Convert.ToDouble(textBox1.Text); ; 
           

            if (code == 1)
            {
                resultaat = bedrag * omzetkoers;
            }
            else
            {
                resultaat = bedrag / omzetkoers;
            }

            return resultaat;

        }

        private void textBox1_Click(object sender, EventArgs e)
        {
            textBox1.Clear();
            
        }

        private void textBoxEuro_Click(object sender, EventArgs e)
        {
            textBoxEuro.Clear();
            textBoxDollar.Clear();
        }

        private void textBoxDollar_Click(object sender, EventArgs e)
        {
            textBoxDollar.Clear();
            textBoxEuro.Clear();
        }

    }
}
Antivirus scan:


Download link:
http://www.mediafire.com/?hnqpjm97guu63dq

If a mod needs the programme for verification or something, just PM me.
__________________



Thanks to Exapto for it! ^
Scammers banned: 4.

Last edited by Yenthe666 : 07-07-2012 at 04:22 PM. Reason: antivirus proof
Reply With Quote
  #2  
Old 07-08-2012, 05:47 AM
Davidp123's Avatar
Apprentice
$5 USD Donor New
 
Join Date: Nov 2011
Posts: 828
Default Re: Free currency converter! [Euro & dollar]

Wrong forum.

Try one of these forums next time.
a/

Last edited by Davidp123 : 07-08-2012 at 05:47 AM.
Reply With Quote
  #3  
Old 07-08-2012, 09:10 AM
Onto A New Journey..
 
Join Date: Jan 2009
Location: Orlando, Florida
Posts: 6,645
Send a message via MSN to Punkerpunk13 Send a message via Skype™ to Punkerpunk13
Default Re: Free currency converter! [Euro & dollar]

Even though I highly doubt this will ever get used (free on google), but I'm glad you did it regardless. Nice job. (atleast it's free for yuan to usd)

Last edited by Punkerpunk13 : 07-08-2012 at 09:10 AM.
Reply With Quote
  #4  
Old 07-09-2012, 02:07 PM
Member
 
Join Date: Nov 2011
Posts: 78
Default Re: Free currency converter! [Euro & dollar]

To make it moderately useful, make it find the current exchange rates of euro to usd.
__________________
Reply With Quote
  #5  
Old 07-09-2012, 06:29 PM
Yenthe666's Avatar
Apprentice
$5 USD Donor New
 
Join Date: Apr 2011
Posts: 887
Send a message via Skype™ to Yenthe666
St. Patrick's Day 2013
Default Re: Free currency converter! [Euro & dollar]

Quote:
Originally Posted by matt_sells View Post
To make it moderately useful, make it find the current exchange rates of euro to usd.
I have absolutely no idea about how to do that, they didn't teach it to us either

Thank you Punker!
__________________



Thanks to Exapto for it! ^
Scammers banned: 4.
Reply With Quote
  #6  
Old 07-10-2012, 09:15 AM
Member
 
Join Date: Nov 2011
Posts: 78
Default Re: Free currency converter! [Euro & dollar]

Quote:
Originally Posted by Yenthe666 View Post
I have absolutely no idea about how to do that, they didn't teach it to us either

Thank you Punker!
You could do it many ways, like finding a static url with up to date exchange rates then using regex to parse the page for the info. That's probably the easiest (in my opinion).
__________________
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 08:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1