private void AfterCheck(object sender, TreeViewEventArgs e) { if (e.Node.Tag != null) { _characteristic = (ProductCharacteristic)e.Node.Tag; ProductChecked.Invoke(); } }
private void btnAddToCart_Click(object sender, EventArgs e) { int quantity = Convert.ToInt32(numericUpDownQuantity.Value); if (quantity > 0) { ProductChecked?.Invoke(_item, quantity); } else { MessageBox.Show(Constants.ConstantTexts.CannotAddZeroProducts, Constants.ConstantTexts.Error, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void OnProductChecked(ProductVm product) { ProductChecked?.Invoke(product); }