示例#1
0
        private void InitializeCashRegister()
        {
            if (IsReturnFromPage2)
            {
                btnStorno_Click(btnStorno, null);
                IsReturnFromPage2 = false;
            }
            else
            {
                // Vytvoření objektu nového nákupu
                ShoppingSession = new CashRegisterSetup();
            }

            FocusedTextBox       = tbProductCode;
            btnRemove.Visibility = Visibility.Hidden;
            btnStorno.Visibility = Visibility.Hidden;

            // Inicializace user contolu - číselník
            numpad.EventEnterClick += btnEnter_Click;
            numpad.EventClrClick   += btnClr_Click;
        }
示例#2
0
        private void ResetShoppingCart()
        {
            // Nastavení GUI
            tbQuantity.IsEnabled    = false;
            tbProductCode.IsEnabled = true;
            lblQuantity.Content     = "Množství";
            tbProductCode.Text      = "";
            tbQuantity.Text         = "";
            _quantityFill           = false;
            lbProducts.Items.Clear();
            tbPrice.Text = "";
            tbProductCode.Focus();
            tbProductCode.ClearValue(TextBox.BackgroundProperty);
            tbQuantity.ClearValue(TextBox.BackgroundProperty);

            SetStornoButton();
            btnRemove.Visibility = Visibility.Collapsed;

            // Nová instance nákupního košíku
            ShoppingSession = new CashRegisterSetup();
        }
示例#3
0
 public CRPage2(CashRegisterSetup shoppingSession)
 {
     InitializeComponent();
     this._shoppingSession = shoppingSession;
     InitializePage2();
 }