コード例 #1
0
        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;
        }
コード例 #2
0
        public BasicUserAccountStatePanel(
            BasicUserAccountStatePanelVM basicUserAccountStatePanelVM)
        {
            InitializeComponent();

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

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

            // Set basic user information
            this.basicUser = basicUserAccountStatePanelVM.basicUser;

            // Set form's text
            this.Text = $"Panel Stanu Konta {basicUser._Name._Value} " +
                        $"{basicUser._Surname._Value}";

            // 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 account state information
            this.AccountStateValueLabel.Text =
                (String.Format("{0:0.00}", basicUser._BankAccount.state._Value)
                 .ToString(new CultureInfo("en-US")));
        }