Exemple #1
0
        public void SaveSyncColor()
        {
            GroupModel.GroupStatus groupStatus = status.Access(GroupModel.GroupStatus.NAME) as GroupModel.GroupStatus;

            foreach (Block block in status.blocks)
            {
                if (!string.IsNullOrEmpty(block.color))
                {
                    continue;
                }

                GroupModel.Group group = groupStatus.groups.Find((_item) => {
                    bool found = false;
                    foreach (GroupModel.Section section in _item.sections)
                    {
                        if (block.ns.Equals(section.path))
                        {
                            found = true;
                        }
                    }
                    return(found);
                });

                if (null == group)
                {
                    continue;
                }

                block.color = group.color;
            }
        }
Exemple #2
0
 public void RefreshGroups(GroupModel.GroupStatus _status)
 {
     foreach (GroupModel.Group group in _status.groups)
     {
         addGroup(group);
     }
 }
Exemple #3
0
 public void RefreshSections(GroupModel.GroupStatus _status)
 {
     foreach (GroupModel.Group group in _status.groups)
     {
         foreach (GroupModel.Section section in group.sections)
         {
             addSection(section);
         }
     }
 }
 public void RefreshSections(GroupModel.GroupStatus _status)
 {
     view.RefreshSections(_status);
 }
 public void RefreshGroups(GroupModel.GroupStatus _status)
 {
     view.RefreshGroups(_status);
 }