Exemplo n.º 1
0
        private void ResetSpot()
        {
            LightSpot.SetValue(Canvas.LeftProperty, 0.0);
            LightSpot.SetValue(Canvas.TopProperty, 0.0);
            //LightSpot.Width = LightSpot.Height = 100.0;
            LightSpotScaleTransform.ScaleX = 1.0;
            LightSpotScaleTransform.ScaleY = 1.0;

            LightSpot.UpdateLayout();
        }
Exemplo n.º 2
0
        private void MoveSpot(double delta_x, double delta_y)
        {
            if (IsEditMode == false)
            {
                return;
            }

            LightSpotX += delta_x * MoveSpeed;
            LightSpotY += delta_y * MoveSpeed;

            LightSpot.SetValue(Canvas.LeftProperty, LightSpotX);
            LightSpot.SetValue(Canvas.TopProperty, LightSpotY);
        }
Exemplo n.º 3
0
        private void Canvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (IsEditMode == false)
            {
                return;
            }

            var point = e.GetPosition(this.SpotCanvas);

            LightSpotX = point.X;
            LightSpotY = point.Y;

            LightSpot.SetValue(Canvas.LeftProperty, LightSpotX);
            LightSpot.SetValue(Canvas.TopProperty, LightSpotY);
        }