Ejemplo n.º 1
0
 private void PlayAnimationClose(WindowPoint window)
 {
     if (window.WindowAnimation == this)
     {
         animatorController.CrossFade("Close", 0.0f);
     }
 }
Ejemplo n.º 2
0
        public void Start(WindowPoint p, LabelElementVM label)
        {
            if (this.started)
            {
                throw new InvalidOperationException();
            }

            this.Visibility = Visibility.Visible;
            this.label      = label;
            this.Text       = label.Text;
            this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(this.Visibility)));
            this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(this.Text)));

            this.SetPosition(p.X, p.Y);
            this.started = true;
        }
Ejemplo n.º 3
0
            public void MouseMove(ImagePoint p, WindowPoint wp, MouseButtonState state, ZoomControl zoom)
            {
                WindowPoint diff = this.start - wp;

                if (this.mouseDown && state == MouseButtonState.Released)
                {
                    this.MouseUp(p);
                }
                else if (this.dragging)
                {
                    this.viewModel.DragUpdate(p);
                }
                else if (this.mouseDown && (Math.Abs(diff.X) > 3 || Math.Abs(diff.Y) > 3))
                {
                    this.dragging = true;
                    this.viewModel.DragStart(this.start.ToImage(zoom));
                }
            }
Ejemplo n.º 4
0
 public void MouseDown(WindowPoint p)
 {
     this.mouseDown = true;
     this.start     = p;
 }
Ejemplo n.º 5
0
 public static extern bool GetCursorPos(out WindowPoint lpPoint);
Ejemplo n.º 6
0
 public static extern IntPtr WindowFromPoint(WindowPoint Point);
Ejemplo n.º 7
0
 public static System.Drawing.Point ToDrawingPoint(this WindowPoint p)
 {
     return(new System.Drawing.Point(p.X, p.Y));
 }