void ParamChanged(object sender, EventArgs e)
{
string name = ((Control)sender).Name;
// ComboBox Account Currency
if (name == "cbxAccountCurrency")
{
accountCurrency = cbxAccountCurrency.Text;
SetAcountExchangeRate();
}
// NumericUpDown Initial Account
if (name == "nudInitialAccount")
{
initialAccount = (int)nudInitialAccount.Value;
}
// ComboBox Leverage
if (name == "cbxLeverage")
{
leverage = int.Parse(cbxLeverage.Text.Substring(2));
}
// NumericUpDown Exchange Rate
if (name == "nudExchangeRate")
{
if (cbxAccountCurrency.Text == "USD")
rateToUSD = (double)nudExchangeRate.Value;
else if (cbxAccountCurrency.Text == "EUR")
rateToEUR = (double)nudExchangeRate.Value;
}
return;
}