예제 #1
0
 protected virtual void BoundsChanged(object sender, PPropertyEventArgs e)
 {
     if (!FMoving)
     {
         Movable.UpdateBounds(((PNode)sender).Bounds);
     }
 }
예제 #2
0
 /// <summary>
 /// Raises the InteractingChanged event by invoking the delegates.
 /// </summary>
 /// <param name="e">An EventArgs that contains the event data.</param>
 /// <remarks>
 /// This event is raised when the interacting state of the canvas changes.
 /// </remarks>
 protected virtual void OnInteractingChanged(PPropertyEventArgs e)
 {
     if (InteractingChanged != null)
     {
         //Invokes the delegates.
         InteractingChanged(this, e);
     }
 }
예제 #3
0
파일: LinkPath.cs 프로젝트: you8/vvvv-sdk
        private void PathChanged(object sender, PPropertyEventArgs e)
        {
            if (!FReactingOnTransform)
            {
                FReactingOnTransform = true;
                for (int i = 0; i < Points.Count; i++)
                {
                    Points[i] = PNode.LocalToGlobal(Points[i]);
                }

                PNode.Matrix = new PMatrix();

                BuildLine();
                FReactingOnTransform = false;
            }
        }
예제 #4
0
        void Surface_BoundsChanged(object sender, PPropertyEventArgs e)
        {
            Mullion next     = NextMullion();
            Mullion previous = PreviousMullion();

            if (next != null)
            {
                if (next.Model.Orientation == Domain.Entities.Orientation.Vertical)
                {
                    if (Model.Width + Model.X != next.Model.X)
                    {
                        Model.Width += next.Model.X - (Model.X + Model.Width);
                    }
                }
                else if (next.Model.Orientation == Domain.Entities.Orientation.Horizontal)
                {
                    if (Model.Height + Model.Y != next.Model.Y)
                    {
                        Model.Height += next.Model.Y - (Model.Y + Model.Height);
                    }
                }
            }
            else if (previous != null)
            {
                Surface parent = (Surface)Parent;
                if (previous.Model.Orientation == Domain.Entities.Orientation.Vertical)
                {
                    if (Model.Width + Model.X != (parent.Model.Width + parent.Model.X))
                    {
                        Model.Width += parent.Model.Width + parent.Model.X - (Model.Width + Model.X);
                    }
                }
                else if (previous.Model.Orientation == Domain.Entities.Orientation.Horizontal)
                {
                    if (Model.Height + Model.Y != (parent.Model.Y + parent.Model.Height))
                    {
                        Model.Height += parent.Model.Height + parent.Model.Y - (Model.Height + Model.Y);
                    }
                }
            }
        }
예제 #5
0
 protected void camera_ViewTransformChanged(object sender, PPropertyEventArgs e)
 {
     gridLayer.Bounds = Canvas.Camera.ViewBounds;
 }
예제 #6
0
 protected void node2_FullBoundsChanged(object sender, PPropertyEventArgs e)
 {
     UpdateLink();
 }
 /// <summary>
 /// Invoked when the full bounds of the root changes.
 /// </summary>
 /// <param name="sender">The source of the property changed event.</param>
 /// <param name="e">A PPropertyEventArgs that contains the event data.</param>
 protected virtual void root_FullBoundsChanged(object sender, PPropertyEventArgs e)
 {
     scrollableControl.UpdateScrollbars();
 }
 /// <summary>
 /// Invoked when the camera's view changes.
 /// </summary>
 /// <param name="sender">The source of the property changed event.</param>
 /// <param name="e">A PPropertyEventArgs that contains the event data.</param>
 protected virtual void camera_ViewTransformChanged(object sender, PPropertyEventArgs e)
 {
     scrollableControl.UpdateScrollbars();
 }
예제 #9
0
파일: LinkPath.cs 프로젝트: you8/vvvv-sdk
 private void PinBoundsChanged(object sender, PPropertyEventArgs e)
 {
     BuildLine();
 }
예제 #10
0
 /// <summary>
 /// When this PLens is dragged around, adjust the camera's view transform so that the
 /// squiggles remain fixed at their original locations.
 /// </summary>
 /// <param name="sender">The source of this TransformChanged event.</param>
 /// <param name="e">A PPropertyEventArgs that contains the event data.</param>
 protected virtual void PLens_TransformChanged(object sender, PPropertyEventArgs e)
 {
     camera.ViewMatrix = InverseMatrix;
 }
예제 #11
0
 private void FrameChildrenChanged(object sender, PPropertyEventArgs e)
 {
     FrameDimensionChanged();
 }
예제 #12
0
 private void CameraVisibleChanged(object sender, PPropertyEventArgs e)
 {
     SetBounds(DefaultX, DefaultY, DefaultWidth, DefaultHeight);
 }
예제 #13
0
        private void SelectionEventHandler_SelectionChanged(object sender, PPropertyEventArgs e)
        {
            FrameSelected   = false;
            MullionSelected = false;
            SashSelected    = false;
            FillingSelected = false;
            IncreaseMiddlePoint.IsEnabled              = false;
            DeacreaseMiddlePoint.IsEnabled             = false;
            SelectedSashType.SelectedItem              = null;
            SelectedSashDirectionComboBox.SelectedItem = null;
            MiddlePointTextBox.IsEnabled                  = false;
            SelectedFillingType.SelectedItem              = null;
            SelectedIProfileType.SelectedItem             = null;
            SelectedIncludeIProfileTypeCheckBox.IsChecked = false;
            if (SelectionEventHandler.SelectedNode is Mullion)
            {
                MullionSelected = true;
                Mullion mullion = SelectionEventHandler.SelectedNode as Mullion;
                VirtualMullion.IsChecked         = mullion.Model.IsVirtual;
                SelectedMullionType.SelectedItem = mullion.Model.MullionType;
                IncreaseMiddlePoint.IsEnabled    = true;
                DeacreaseMiddlePoint.IsEnabled   = true;
                MiddlePointTextBox.IsEnabled     = true;
                MullionMiddlePoint = mullion.Model.MiddlePoint;
                OnPropertyChanged("MullionMiddlePoint");
                mullion.Model.PropertyChanged += Model_PropertyChanged;
            }
            else if (SelectionEventHandler.SelectedNode is Sash)
            {
                SashSelected = true;
                Sash sash = SelectionEventHandler.SelectedNode as Sash;
                SelectedSashType.SelectedItem = sash.Model.SashType;
                SelectedSashDirectionComboBox.SelectedValue = sash.Direction;
                SashFixedCheckBox.IsChecked = sash.Fixed;
            }
            else if (SelectionEventHandler.SelectedNode is Filling)
            {
                FillingSelected = true;
                Filling filling = SelectionEventHandler.SelectedNode as Filling;
                SelectedFillingType.SelectedItem = filling.Model.FillingType;
                if (filling.Model.ProfileType != null)
                {
                    SelectedIncludeIProfileTypeCheckBox.IsChecked = true;
                    SelectedIProfileType.SelectedItem             = filling.Model.ProfileType;
                }
                else
                {
                    SelectedIncludeIProfileTypeCheckBox.IsChecked = false;
                    SelectedIProfileType.SelectedItem             = null;
                }
            }
            else if (SelectionEventHandler.SelectedNode is PVCFrame)
            {
                FrameSelected = true;
            }

            if (e.OldValue is Mullion)
            {
                Mullion oldMullion = (Mullion)e.OldValue;
                oldMullion.Model.PropertyChanged -= Model_PropertyChanged;
            }
        }