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; }
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(); }
public CRPage2(CashRegisterSetup shoppingSession) { InitializeComponent(); this._shoppingSession = shoppingSession; InitializePage2(); }