- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
public partial class ProductForm : Form
{
private delegate bool ProductManipulation();
private static ProductManipulation pmd;
public ProductForm()
{
InitializeComponent();
this.FormClosing += this.ProductForm_Closing;
ProductsLB.DoubleClick += this.ChangeBtn_Click;
ProductsLB.Click += this.LoadProductKey;
pmd = LoadDataToLB;
pmd();
}
...
private void AddBtn_Click(object sender, EventArgs e)
{
pmd -= LoadDataToLB;
pmd += AddProduct + pmd;
pmd += LoadDataToLB;
pmd();
pmd -= AddProduct;
}
...