private void MenuSectionsListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e) { ListBox lb = (ListBox)sender; MenuCategory category = (MenuCategory)lb.SelectedItem; NewMenuCategoryWindow window = new NewMenuCategoryWindow(category); window.ShowDialog(); }
private void AddCategoryButton_Click(object sender, RoutedEventArgs e) { MenuCategory menuCategory = new MenuCategory(""); NewMenuCategoryWindow window = new NewMenuCategoryWindow(menuCategory); window.ShowDialog(); if (string.IsNullOrEmpty(menuCategory.EnglishName)) { return; } MenuManager.MenuCategories.Add(menuCategory); currentCategory = menuCategory; NotifyPropertyChanged("CategoryItems"); }