Пример #1
0
        protected virtual void OnVisibleChanged(bool oldValue, bool newValue)
        {
            if (VisibleChanged != null)
            {
                VisibleChangedEventArgs e = new VisibleChangedEventArgs(this, oldValue, newValue);
                VisibleChanged(e);
            }

            // create new child Sprites for all Sprite instances on this grid
            Sprites.CreateChildSprites(this);
        }
Пример #2
0
        protected virtual void OnWrappingChanged(bool oldHoriz, bool newHoriz, bool oldVerti, bool newVerti)
        {
            if (WrappingChanged != null)
            {
                GridPointMatrixWrappingChangedEventArgs e =
                    new GridPointMatrixWrappingChangedEventArgs(this, oldHoriz, newHoriz, oldVerti, newVerti);
                WrappingChanged(e);
            }

            // set indexer delegate
            if (newHoriz || newVerti)
            {
                FindIndexedGridPoint = new GetIndexer(GetIndexer_Wrap);
            }
            else
            {
                FindIndexedGridPoint = new GetIndexer(GetIndexer_NoWrap);
            }

            // create new child Sprites for all Sprite instances on this grid
            Sprites.CreateChildSprites(this);
        }