private EntityAttributeCollection GetSelectedEntityAttributes()
        {
            var checkedEntityAttributes = new EntityAttributeCollection();

            foreach (ListViewItem item in listAttributes.CheckedItems)
            {
                var entity    = item.Group.Name;
                var attribute = item.Name;
                if (!checkedEntityAttributes.ContainsKey(entity))
                {
                    checkedEntityAttributes.Add(entity, new StringCollection());
                }
                checkedEntityAttributes[entity].Add(attribute);
            }

            return(checkedEntityAttributes);
        }
예제 #2
0
 public LocatedWidget(PageItem page)
 {
     Require.NotNull(page, "page");
     Page = page;
     Attributes = new EntityAttributeCollection();
 }
예제 #3
0
 protected WidgetControlBase()
 {
     WidgetAttributes = new EntityAttributeCollection();
 }
        private int GetHashCode(EntityAttributeCollection collection)
        {
            unchecked
            {
                int hash = 17;

                foreach (var kv in collection)
                {
                    hash = (hash * 397) ^ kv.Key.GetHashCode();
                    hash = (hash * 397) ^ kv.Value.GetHashCode();
                }

                return hash;
            }
        }