public bool DeleteFrame(FrameEntry EntryToDelete)
        {
            // Early return out if its invalid
            if (EntryToDelete == null)
            {
                return(false);
            }

            // Remove Parent reference
            FrameObjectBase BaseObject = (EntryToDelete as FrameObjectBase);

            if (BaseObject != null)
            {
                FrameObjectBase ParentObject = BaseObject.Parent;
                if (ParentObject != null)
                {
                    bool bDeleted = ParentObject.Children.Remove(BaseObject);
                    Debug.Assert(bDeleted, "Failed to delete an object which should be in the child array.");

                    BaseObject.Parent = null;
                }
            }

            return(FrameObjects.Remove(EntryToDelete.RefID));
        }
Beispiel #2
0
            public override bool TryGetMember(GetMemberBinder binder, out object result)
            {
                if (FrameObjects.ContainsKey(binder.Name))
                {
                    result = FrameObjects[binder.Name];
                    return(true);
                }

                return(base.TryGetMember(binder, out result));
            }