public BasicUserAddMoneyPanel(BasicUserAddMoneyPanelVM basicUserAddMoneyPanelVM) { InitializeComponent(); // Set login panel information this.loginPanel = basicUserAddMoneyPanelVM.loginPanel; // Set basic user panel information this.basicUserPanel = basicUserAddMoneyPanelVM.basicUserPanel; // Set basic user information this.basicUser = basicUserAddMoneyPanelVM.basicUser; // Set exchange rates information this.PLN_ExchangeRateValueLabel.Text = CashWithdrawalProperties.exchangeRates.PLN_exchangeRate.ToString( new CultureInfo("en-US")); this.USD_ExchangeRateValueLabel.Text = CashWithdrawalProperties.exchangeRates.USD_exchangeRate.ToString( new CultureInfo("en-US")); this.EUR_ExchangeRateValueLabel.Text = CashWithdrawalProperties.exchangeRates.EUR_exchangeRate.ToString( new CultureInfo("en-US")); this.GBP_ExchangeRateValueLabel.Text = CashWithdrawalProperties.exchangeRates.GBP_exchangeRate.ToString( new CultureInfo("en-US")); // Set currency combobox this.CurrencyComboBox.Items.Add("Polski Złoty"); this.CurrencyComboBox.Items.Add("Dolar Amerykański"); this.CurrencyComboBox.Items.Add("Euro"); this.CurrencyComboBox.Items.Add("Funt Brytyjski"); this.CurrencyComboBox.SelectedIndex = 0; // Set add money value combobox this.AddMoneyValueComboBox.Items.Add("50"); this.AddMoneyValueComboBox.Items.Add("100"); this.AddMoneyValueComboBox.Items.Add("200"); this.AddMoneyValueComboBox.Items.Add("500"); this.AddMoneyValueComboBox.Items.Add("1 000"); this.AddMoneyValueComboBox.SelectedIndex = 0; // Set add money report check box this.AddMoneyReportCheckBox.Checked = false; }
private void AddMoneyButton_Click(object sender, EventArgs e) { // Redirect to add money panel BasicUserAddMoneyPanelVM basicUserAddMoneyPanelVM = new BasicUserAddMoneyPanelVM { loginPanel = loginPanel, basicUserPanel = this, basicUser = basicUser }; BasicUserAddMoneyPanel basicUserAddMoneyPanel = new BasicUserAddMoneyPanel(basicUserAddMoneyPanelVM); basicUserAddMoneyPanel.Show(); this.Hide(); }