Пример #1
0
        private void RemoveGroupMethod(object input)
        {
            ContentPresenter inputItem     = (ContentPresenter)input;
            GroupItem        groupToRemove = (GroupItem)inputItem.Content;

            _dbManager.RemoveGroup(groupToRemove.GroupName);
            GroupsContainer.RemoveGroup(groupToRemove);

            UpdateGroupsView();
        }
Пример #2
0
        private void AddGroupMethod(object input)
        {
            Guid      groupId   = Guid.NewGuid();
            GroupItem groupItem = new GroupItem(groupId, NewGroupName);

            _dbManager.AddGroup(groupItem);
            GroupsContainer.AddGroup(groupItem);

            UpdateGroupsView();
        }
Пример #3
0
        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();
        }