Exemplo n.º 1
0
        private void RemoveGroupMethod(object input)
        {
            ContentPresenter inputItem     = (ContentPresenter)input;
            GroupItem        groupToRemove = (GroupItem)inputItem.Content;

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

            UpdateGroupsView();
        }
Exemplo n.º 2
0
        private void AddGroupMethod(object input)
        {
            Guid      groupId   = Guid.NewGuid();
            GroupItem groupItem = new GroupItem(groupId, NewGroupName);

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

            UpdateGroupsView();
        }
Exemplo n.º 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();
        }