private void RemoveGroupMethod(object input) { ContentPresenter inputItem = (ContentPresenter)input; GroupItem groupToRemove = (GroupItem)inputItem.Content; _dbManager.RemoveGroup(groupToRemove.GroupName); GroupsContainer.RemoveGroup(groupToRemove); UpdateGroupsView(); }
private void AddGroupMethod(object input) { Guid groupId = Guid.NewGuid(); GroupItem groupItem = new GroupItem(groupId, NewGroupName); _dbManager.AddGroup(groupItem); GroupsContainer.AddGroup(groupItem); UpdateGroupsView(); }
private void AddSampleGroupsMethod(object input) { SampleGroupsProvider provider = new SampleGroupsProvider(); List <string> sampleGrops = provider.GetSampleGroups(); foreach (string sampleGroup in sampleGrops) { Guid groupId = Guid.NewGuid(); GroupItem groupItem = new GroupItem(groupId, sampleGroup); GroupsContainer.AddGroup(groupItem); _dbManager.AddGroup(groupItem); } UpdateGroupsView(); }