private void createCategory(object sender, EventArgs e) { string categoryName = this.textBox1.Text; try { CustomCategory cc = new CustomCategory(categoryName); this.incomingForm.AddCategory(cc); this.Close(); } catch (Exception exc) { MessageBox.Show(exc.Message, "Invalid category", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void AddDefaultCategory() { CustomCategory defaultCategory = new CustomCategory("default"); this.AddCategory(defaultCategory); }