public CheckBuyForm() { InitializeComponent(); foreach (string a in baket) { comboBox1.Items.Add(a); } addEdit = new AddEditForm(this); }
private void btnedit_Click(object sender, EventArgs e) { if (treeView.SelectedNode != null) { treeView.Focus(); AddEditForm editForm = new AddEditForm(); if (editForm.ShowDialog() == DialogResult.OK) { _wf.Edit(treeView.SelectedNode, editForm.CategoryName); } } }
private void btnaddleaf_Click(object sender, EventArgs e) { if (treeView.SelectedNode != null) { treeView.Focus(); AddEditForm editForm = new AddEditForm(); if (editForm.ShowDialog() == DialogResult.OK) { TreeNode node = _wf.AddNode(treeView.SelectedNode, editForm.CategoryName); treeView.SelectedNode = node; treeView.Focus(); } } }