private void btnAddCategory_Click(object sender, EventArgs e) { using (frmAddCatogory formAddCategory = new frmAddCatogory()) { formAddCategory.ShowDialog(); StartUp(); } }
private void treeViewCategory_DoubleClick(object sender, EventArgs e) { var category = treeViewCategory.SelectedNode.Tag as CategoryModel; if (category != null) { using (frmAddCatogory formEditCategory = new frmAddCatogory() { CategorySelected = category }) { formEditCategory.ShowDialog(); StartUp(); } } }