Exemple #1
0
        private void ShapeMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            captNodeShape = sender as NodeShape;

            if (sender is LegShape)
            {
                gbLegData.DataContext = (sender as LegShape).Leg;
            }
        }
Exemple #2
0
        void RemoveLegShape(NodeShape ns)
        {
            if (ns is LegShape)
            {
                canvas.Children.Remove((ns as LegShape).line);
                canvas.Children.Remove((ns as LegShape).point);
            }

            if (ns is SliderShape)
            {
                canvas.Children.Remove((ns as SliderShape).line);
                canvas.Children.Remove((ns as SliderShape).point);
            }
        }
Exemple #3
0
        void AddShapeToCanves(NodeShape ns)
        {
            shapeList.Add(ns);

            if (ns is LegShape)
            {
                canvas.Children.Add((ns as LegShape).line);
                canvas.Children.Add((ns as LegShape).point);
            }

            if (ns is SliderShape)
            {
                canvas.Children.Add((ns as SliderShape).line);
                canvas.Children.Add((ns as SliderShape).point);
            }

            ns.MouseLeftButtonDown += ShapeMouseLeftButtonDown;
            ns.MouseLeftButtonUp   += ShapeMouseLeftButtonUp;
        }
Exemple #4
0
 private void ShapeMouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     captNodeShape = null;
 }