Exemplo n.º 1
0
        public void SetImage( Image image )
        {
            _image = image;

            if( _locusEffect != null )
            {
                _locusEffect.Dispose();
                _locusEffect = null;
            }

            Invalidate();
        }
Exemplo n.º 2
0
        protected override void OnMouseHover( EventArgs e )
        {
            base.OnMouseHover( e );

            if( _image != null )
            {
                if( _locusEffect == null )
                {
                    _locusEffect = new WinFormsUtility.Controls.LocusEffect( new ImageAnimation( _image ), _image.Size );
                }

                _locusEffect.Offset = new Point( ClientRectangle.Width / 2 - _image.Width / 2, ClientRectangle.Height / 2 - _image.Height / 2 );
                _locusEffect.ShowLocusEffect( this );
            }
        }