Exemplo n.º 1
0
        public override void OnRemoveElements(Document pDocument, ElementIdSet ids)
        {
            var nodes = mProjectBrower.Where(x => ids.Contains((ElementId)x.Tag)).ToList();

            foreach (var node in nodes)
            {
                mProjectBrower.Remove(node);
            }
        }
Exemplo n.º 2
0
        public override void OnAddElements(Document pDocument, ElementIdSet ids)
        {
            foreach (var id in ids)
            {
                var element = DrawableElement.Cast(pDocument.FindElement(id));
                if (element == null)
                {
                    continue;
                }

                var item = new BrowerNodeItem();
                item.DisplayName = String.Format("{0}({1})", element.GetName(), element.GetId().GetInteger());
                item.Tag         = element.GetId();
                mProjectBrower.Add(item);
            }
        }