示例#1
0
        public BasicUserTakeOutMoneyPanel(
            BasicUserTakeOutMoneyPanelVM basicUserTakeOutMoneyPanelVM)
        {
            InitializeComponent();

            // Set login panel information
            this.loginPanel = basicUserTakeOutMoneyPanelVM.loginPanel;

            // Set basic user panel information
            this.basicUserPanel = basicUserTakeOutMoneyPanelVM.basicUserPanel;

            // Set basic user information
            this.basicUser = basicUserTakeOutMoneyPanelVM.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.TakeOutMoneyValueComboBox.Items.Add("50");
            this.TakeOutMoneyValueComboBox.Items.Add("100");
            this.TakeOutMoneyValueComboBox.Items.Add("200");
            this.TakeOutMoneyValueComboBox.Items.Add("500");
            this.TakeOutMoneyValueComboBox.Items.Add("1 000");

            this.TakeOutMoneyValueComboBox.SelectedIndex = 0;
        }
示例#2
0
        private void TakeOutMoneyButton_Click(object sender, EventArgs e)
        {
            // Redirect to take out money panel
            BasicUserTakeOutMoneyPanelVM basicUserTakeOutMoneyPanelVM =
                new BasicUserTakeOutMoneyPanelVM
            {
                loginPanel     = this.loginPanel,
                basicUserPanel = this,
                basicUser      = this.basicUser
            };

            BasicUserTakeOutMoneyPanel basicUserTakeOutMoneyPanel =
                new BasicUserTakeOutMoneyPanel(basicUserTakeOutMoneyPanelVM);

            basicUserTakeOutMoneyPanel.Show();
            this.Hide();
        }