public Currency()
        {
            InitializeComponent();

            HaveComboBox.DataSource = Currency_Exchange_Class.InitialiseComboBox();
            WantComboBox.DataSource = Currency_Exchange_Class.InitialiseComboBox();
        }//end Form1
Exemple #2
0
 public Form1()
 {
     InitializeComponent();
     myCurrencyBox.DataSource                 = Currency_Exchange_Class.InitialiseComboBox();
     convertCurrencyBox.DataSource            = Currency_Exchange_Class.InitialiseComboBox();
     myCurrencyBox.SelectedIndexChanged      += new EventHandler(myCurrencyBox_SelectedIndexChanged);
     convertCurrencyBox.SelectedIndexChanged += new EventHandler(convertCurrencyBox_SelectedIndexChanged);
     DisableControls();
 }//end Form1
Exemple #3
0
        /// <summary>
        /// Initializes the Currency Exchange form.
        /// Adds the Currency Exchange Class data for the combo boxes
        /// Adds the combo boxes event handerlers
        /// </summary>
        public Form1()
        {
            InitializeComponent();

            originalCurrencyComboBox.DataSource = Currency_Exchange_Class.InitialiseComboBox();
            newCurrencyComboBox.DataSource      = Currency_Exchange_Class.InitialiseComboBox();

            originalCurrencyComboBox.SelectedIndexChanged += new EventHandler(CurrencyHaveComboBox_SelectedIndexChanged);
            newCurrencyComboBox.SelectedIndexChanged      += new EventHandler(CurrencyWantComboBox_SelectedIndexChanged);
        }//end Form1
Exemple #4
0
        public Form1()
        {
            InitializeComponent();

            // Inserted according to assignement specifications
            cboCurrencyHave.DataSource = Currency_Exchange_Class.InitialiseComboBox();
            cboCurrencyWant.DataSource = Currency_Exchange_Class.InitialiseComboBox();

            // Inserted according to assignement specifications
            cboCurrencyHave.SelectedIndexChanged += new EventHandler(cboCurrencyHave_SelectedIndexChanged);
            cboCurrencyWant.SelectedIndexChanged += new EventHandler(cboCurrencyWant_SelectedIndexChanged);
        }//end Form1()
 public Form1()
 {
     InitializeComponent();
     comboBoxCurrencyOld.DataSource            = Currency_Exchange_Class.InitialiseComboBox();
     comboBoxCurrencyNew.DataSource            = Currency_Exchange_Class.InitialiseComboBox();
     comboBoxCurrencyOld.SelectedIndexChanged += new EventHandler(comboBoxCurrencyOld_SelectedIndexChanged);
     comboBoxCurrencyNew.SelectedIndexChanged += new EventHandler(comboBoxCurrencyNew_SelectedIndexChanged);
     //For some reason, I need to disable everything at the start after i put the above in
     //because it will just enable the whole form? Not sure if this was intended or if i stuffed something up
     comboBoxCurrencyOld.Enabled  = true;
     comboBoxCurrencyNew.Enabled  = false;
     labelNewCurrency.Visible     = false;
     labelOldCurrency.Visible     = false;
     buttonCalculate.Enabled      = false;
     textBoxCurrentAmount.Enabled = false;
     groupBoxReset.Visible        = false;
 }//end Form1
Exemple #6
0
        }//end Form1

        /// <summary>
        /// Load the form and initialise the comboBoxes
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            // For each combo box, initialise it
            comboBox_CurrencyHave.Items.AddRange(Currency_Exchange_Class.InitialiseComboBox());
            comboBox_CurrencyWant.Items.AddRange(Currency_Exchange_Class.InitialiseComboBox());
        } // End Form1_Load()