private void lbProduct_leftbuttonup(object sender, MouseButtonEventArgs e)
        {
            if (this.lbProduct.SelectedItem != null)
            {
                var temp = RectangleClicked;
                if (temp != null)
                {
                    var ex = new ProductClickedEventArgs { Product = (Product)lbProduct.SelectedItem };
                    temp(this, ex);
                }

                lbProduct.Visibility = Visibility.Collapsed; //đóng lại sau khi chọn mặt hàng
                FilterBox.Text = ""; //xoa thong tin tim kiem
            }
        }
        private void FilterBox_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Return)
            {
                var viewModel = this.DataContext as ProductDropdownFilterViewModel;
                if (viewModel.FilteredProducts.View.Cast<object>().Count() == 1) //enter when only one left
                {
                    logger.Trace("Product filter count: {0}", this.lbProduct.Items.Count);

                    var temp = RectangleClicked;
                    if (temp != null)
                    {
                        var ex = new ProductClickedEventArgs { Product = (Product)lbProduct.Items[0]};
                        temp(this, ex);
                    }

                }

            }
        }
Пример #3
0
        private void OnRectangleClicked(object sender, ProductClickedEventArgs e)
        {
            _POSWindowViewModel.TempProduct = e.Product;
            //puKeypadInput.IsOpen = true;

            //Keyboard.Focus(tbKeypadInput.tbAmount);
            AmountInputView am = new AmountInputView();
            am.ShowDialog();
        }
 private void OnRectangleClicked(object sender, ProductClickedEventArgs e)
 {
     Inventory_Product_OrderTransactionCreateViewModel mContext = this.DataContext as Inventory_Product_OrderTransactionCreateViewModel;
      mContext.addProduct(e.Product);
 }