Beispiel #1
0
 private void NewCategory()
 {
     CategoryDialog categoryDialog = new CategoryDialog(_manager);
     if (categoryDialog.ShowDialog() != DialogResult.OK || _manager.DB.AddCategory(categoryDialog.CategoryName, categoryDialog.CategoryIcon)<1)
         return;
     RefreshCategories();
     UpdateStatusBar();
 }
Beispiel #2
0
 private void EditCategory(int CategoryID)
 {
     Category category = _manager.DB.GetCategory(CategoryID);
     CategoryDialog categoryDialog = new CategoryDialog(_manager.AppSettings, _manager.Translator, category);
     if (categoryDialog.ShowDialog() == DialogResult.OK && _manager.DB.EditCategory(category.ID, categoryDialog.CategoryName, categoryDialog.CategoryIcon))
         RefreshCategories();
 }