Esempio n. 1
0
        private void FillCboxSelection()
        {
            cboxSelection.Items.Clear();
            cboxSelection.Items.Add("Снять все");
            cboxSelection.Items.Add("Разрешить все");

            List <string> groupList = EntryPointGroup.LoadGroupList(Database);

            foreach (string groupName in groupList)
            {
                cboxSelection.Items.Add(groupName);
            }
        }
Esempio n. 2
0
        private void Save()
        {
            EntryPointGroup.Save(Database, modifiedObjects);
            modifiedObjects.Clear();

            foreach (string group in removedObjects)
            {
                EntryPointGroup.ClearGroup(Database, group);
            }
            removedObjects.Clear();

            OnPropertyChanged("IsModified");
        }
Esempio n. 3
0
        private List <EntryPointGroup> GetGroupList(string groupName)
        {
            if (groupList.ContainsKey(groupName))
            {
                return(groupList[groupName]);
            }

            List <EntryPointGroup> list = EntryPointGroup.LoadGroup(Database, groupName);

            foreach (EntryPointGroup item in list)
            {
                item.PropertyChanged += ObjectModified;
            }
            groupList.Add(groupName, list);

            return(list);
        }
Esempio n. 4
0
        private void CheckGroupPoints(string text)
        {
            List <EntryPointGroup>        groupPoints = EntryPointGroup.LoadGroup(Database, text);
            Dictionary <EntryPoint, bool> pointList   = new Dictionary <EntryPoint, bool>();

            foreach (EntryPointGroup item in groupPoints)
            {
                pointList.Add(item.EntryPoint, item.IsIncluded);
            }

            List <PermitPoint> permitPointList = (List <PermitPoint>)bsPoints.DataSource;

            foreach (PermitPoint item in permitPointList)
            {
                item.IsAllowed = pointList[item.Point];
            }
            dataGridView1.Refresh();
        }
Esempio n. 5
0
 private void LoadGroups()
 {
     bsGroups.DataSource = EntryPointGroup.LoadGroupList(Database);
 }