예제 #1
0
 private void AddInternal(UITransform transform)
 {
     _transforms.Add(transform);
     lock (transform.SyncRoot)
     {
         transform.SetContainer(this);
         transform.MarkedDirty += Transform_MarkedDirty;
     }
 }
예제 #2
0
        private bool RemoveInternal(UITransform original, UITransform candidate, int i)
        {
            lock (original.SyncRoot)
            {
                if (original.Container == this)
                {
                    original.SetContainer(null);
                }

                original.MarkedDirty -= Transform_MarkedDirty;
            }
            if (candidate.TransformKey == original.TransformKey)
            {
                _transforms.RemoveAt(i);
                return(true);
            }
            return(false);
        }