Exemplo n.º 1
0
 public MagnitismCanvas()
 {
     // suppress movement in the visual studio designer.
     if (Process.GetCurrentProcess().ProcessName != "devenv")
         CompositionTarget.Rendering += UpdateChildren;
     _timeTracker = new ParticleEffectsTimeTracker();
 }
Exemplo n.º 2
0
        protected override void OnAttachChild(UIElement child)
        {
            CompositionTarget.Rendering += OnFrameCallback;

            child.PreviewMouseLeftButtonUp += OnMouseLeftButtonUp;
            child.PreviewMouseMove += OnMouseMove;

            _timeTracker = new ParticleEffectsTimeTracker();
        }
Exemplo n.º 3
0
        protected override void OnDetachChild(UIElement child)
        {
            CompositionTarget.Rendering -= OnFrameCallback;

            child.PreviewMouseLeftButtonUp -= OnMouseLeftButtonUp;
            child.PreviewMouseMove -= OnMouseMove;

            _timeTracker = null;
        }
Exemplo n.º 4
0
        protected override void OnDetachChild(UIElement child)
        {
            CompositionTarget.Rendering -= OnFrameCallback;

            child.PreviewMouseLeftButtonUp -= OnMouseLeftButtonUp;
            child.PreviewMouseMove         -= OnMouseMove;

            _timeTracker = null;
        }
Exemplo n.º 5
0
        protected override void OnAttachChild(UIElement child)
        {
            CompositionTarget.Rendering += OnFrameCallback;

            child.PreviewMouseLeftButtonUp += OnMouseLeftButtonUp;
            child.PreviewMouseMove         += OnMouseMove;

            _timeTracker = new ParticleEffectsTimeTracker();
        }
Exemplo n.º 6
0
 public MagnitismCanvas()
 {
     // suppress movement in the visual studio designer.
     if (Process.GetCurrentProcess().ProcessName != "devenv")
     {
         CompositionTarget.Rendering += UpdateChildren;
     }
     _timeTracker = new ParticleEffectsTimeTracker();
 }
Exemplo n.º 7
0
        private void OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (_timeTracker != null)
            {
                _timeTracker.TimerFired -= OnTimerFired;
                _timeTracker = null;
            }

            CompositionTarget.Rendering += OnFrameCallback;
            _timeTracker = new ParticleEffectsTimeTracker {TimerInterval = _ringDelayInSeconds};
            _timeTracker.TimerFired += OnTimerFired;
            _lowerRing = _upperRing = 0;
            _clickPosition = e.GetPosition(this);
        }
Exemplo n.º 8
0
        private void OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (_timeTracker != null)
            {
                _timeTracker.TimerFired -= OnTimerFired;
                _timeTracker             = null;
            }

            CompositionTarget.Rendering += OnFrameCallback;
            _timeTracker = new ParticleEffectsTimeTracker {
                TimerInterval = _ringDelayInSeconds
            };
            _timeTracker.TimerFired += OnTimerFired;
            _lowerRing     = _upperRing = 0;
            _clickPosition = e.GetPosition(this);
        }