コード例 #1
0
        private void Button_PreviewMouseLeftButtonUp_2(object sender, MouseButtonEventArgs e)
        {
            int cnt = Convert.ToInt32(Cnt.Content);

            products.CountProduct = cnt;
            products.TotalPrice   = products.NewPrice * cnt;
            productsList.Add(products);
            navbar.UpdateCost(productsList);
        }
コード例 #2
0
        private void Button_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement fe      = e.OriginalSource as FrameworkElement;
            Product          product = fe.DataContext as Product;

            ProductDetail.productsList.Remove(product);
            navbar.UpdateCost(ProductDetail.productsList);
            Window_Loaded(sender, e);
        }