Ejemplo n.º 1
0
        public CashMachineForm()
        {
            InitializeComponent();

            _cashMachine    = new Model.CashMachine();
            sumTextBox.Text = _cashMachine.TotalCountOfMoney.ToString();
        }
Ejemplo n.º 2
0
        public CashMachineForm()
        {
            InitializeComponent();

            _cashMachine = new Model.CashMachine();
            sumTextBox.Text = _cashMachine.TotalCountOfMoney.ToString();
        }
Ejemplo n.º 3
0
        public PutCashForm(Model.CashMachine cashMachine)
        {
            InitializeComponent();
            _cashMachine = cashMachine;
            _listOfTextBoxes = new List<TextBox>();

            var i = 0;
            while(i < _cashMachine.ListOfBills.Count)
            {
                var textPoint = new Point(160, 50 + (25 * i));
                var textBox = new TextBox
                {
                    Text = "0",
                    Location = textPoint
                };

                var labelPoint = new Point(15, 50 + (25 * i));
                var label = new Label
                {
                    Text = _cashMachine.ListOfBills[i].Name,
                    Location = labelPoint
                };

                _listOfTextBoxes.Add(textBox);

                Controls.Add(label);
                Controls.Add(textBox);

                ++i;
            }

            Size = new Size(300, 130 + (25 * i));
        }
Ejemplo n.º 4
0
        public PutCashForm(Model.CashMachine cashMachine)
        {
            InitializeComponent();
            _cashMachine     = cashMachine;
            _listOfTextBoxes = new List <TextBox>();

            var i = 0;

            while (i < _cashMachine.ListOfBills.Count)
            {
                var textPoint = new Point(160, 50 + (25 * i));
                var textBox   = new TextBox
                {
                    Text     = "0",
                    Location = textPoint
                };

                var labelPoint = new Point(15, 50 + (25 * i));
                var label      = new Label
                {
                    Text     = _cashMachine.ListOfBills[i].Name,
                    Location = labelPoint
                };

                _listOfTextBoxes.Add(textBox);

                Controls.Add(label);
                Controls.Add(textBox);

                ++i;
            }

            Size = new Size(300, 130 + (25 * i));
        }
Ejemplo n.º 5
0
        public GetCashForm(Model.CashMachine cashMachine)
        {
            InitializeComponent();
            _cashMachine = cashMachine;

            foreach (var bill in _cashMachine.ListOfBills)
            {
                cashComboBox.Items.Add(bill.Name);
            }
            cashComboBox.SelectedIndex = 0;
        }
Ejemplo n.º 6
0
        public GetCashForm(Model.CashMachine cashMachine)
        {
            InitializeComponent();
            _cashMachine = cashMachine;

            foreach (var bill in _cashMachine.ListOfBills)
            {
                cashComboBox.Items.Add(bill.Name);
            }
            cashComboBox.SelectedIndex = 0;
        }