コード例 #1
0
 public Connect(Point point) : base(false)
 {
     this.Style = Application.Current.FindResource(typeof(Connect)) as Style;
     pathFigure.Segments.Add(bezierSegment);
     path.Figures.Add(pathFigure);
     Manager             = new Managers(this);
     Manager.translate.X = point.X;
     Manager.translate.Y = point.Y;
     Manager.canScale    = false;
 }
コード例 #2
0
 public NodesCanvas()
 {
     InitializeComponent();
     Manager  = new Managers(this);
     Selector = new Selector(this);
     grid.Children.Add(Selector);
     nodes.CollectionChanged    += NodesChange;
     connects.CollectionChanged += ConnectsChange;
     this.MouseMove             += OnMouseMove;
     this.MouseWheel            += OnMouseWheel;
     this.MouseLeftButtonDown   += OnMouseLeftDown;
     this.MouseRightButtonDown  += OnMouseRightDown;
     this.AllowDrop              = true;
 }
コード例 #3
0
 public Node()
 {
     InitializeComponent();
     AddInputOutput();
     Manager = new Managers(this);
     Manager.scale.Changed      += Zoom;
     this.Output.form.MouseDown += NewConnect;
     this.Input.Drop            += OnDrop;
     PositionChange             += PositionChanges;
     this.MouseDown             += OnMouseDown;
     this.MouseEnter            += OnMouseEnter;
     this.MouseLeave            += OnMouseLeave;
     //this.Transitions.MouseEnter += mouseEnter2;
     this.Border.SizeChanged   += SizeChange;
     Manager.translate.Changed += TransformChange;
     this.Header.TextChanged   += TextBox_TextChanged;
     AddEmptyConnector();
 }
コード例 #4
0
        public Nodess() : base(false)
        {
            this.Style                 = Application.Current.FindResource(typeof(Nodess)) as Style;
            Manager                    = new Managers(this);
            Manager.canScale           = false;
            Manager.translate.Changed += TransformChange;
            LocationChangeEvent       += LocationChange;
            HeaderMouseDownEvent      += HeaderMouseDown;
            HeaderMouseUpEvent        += HeaderMouseUp;
            HeaderMouseMoveEvent      += HeaderMouseMove;
            HeaderMouseEnterEvent     += HeaderMouseEnter;
            HeaderMouseLeaveEvent     += HeaderMouseLeave;
            HeaderWithMouseMoveEvent  += HeaderWithMouseMove;

            InputMouseDownEvent      += InputMouseDown;
            InputMouseUpEvent        += InputMouseUp;
            InputMouseMoveEvent      += InputMouseMove;
            InputMouseEnterEvent     += InputMouseEnter;
            InputMouseLeaveEvent     += InputMouseLeave;
            InputWithMouseMoveEvent  += InputWithMouseMove;
            OutputMouseDownEvent     += OutputMouseDown;
            OutputMouseUpEvent       += OutputMouseUp;
            OutputMouseMoveEvent     += OutputMouseMove;
            OutputMouseEnterEvent    += OutputMouseEnter;
            OutputMouseLeaveEvent    += OutputMouseLeave;
            OutputWithMouseMoveEvent += OutputWithMouseMove;

            BodyMouseDownEvent     += BodyMouseDown;
            BodyMouseUpEvent       += BodyMouseUp;
            BodyMouseMoveEvent     += BodyMouseMove;
            BodyMouseEnterEvent    += BodyMouseEnter;
            BodyMouseLeaveEvent    += BodyMouseLeave;
            BodyWithMouseMoveEvent += BodyWithMouseMove;

            this.MouseDown += mouseDown;
            this.MouseUp   += mouseUp;
            // parent.MouseWheel += _MouseWheel;

            // MouseDown += mouseDown;
            // MouseUp += mouseUp;
            //MouseMove += mouseMove;
        }