Inheritance: System.EventArgs
示例#1
0
 public void OnLeftButtonDoubleClick(object sender, MouseManagerEventArgs e)
 {
     if (LeftButtonDoubleClick != null)
     {
         LeftButtonDoubleClick(this, e);
     }
 }
 public void OnLeftButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     foreach (var nodeControl in Selector.NodeControls)
     {
         nodeControl.MotionHandler.NodeMotionHandler.OnLeftButtonDragStart(sender, e);
     }
 }
示例#3
0
 public void OnRightButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     if (RightButtonDragReleased != null)
     {
         RightButtonDragReleased(this, e);
     }
 }
示例#4
0
 public void OnRightButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     if (RightButtonDragStart != null)
     {
         RightButtonDragStart(this, e);
     }
 }
示例#5
0
 public void OnRightButtonHeldClick(object sender, MouseManagerEventArgs e)
 {
     if (RightButtonHeldClick != null)
     {
         RightButtonHeldClick(this, e);
     }
 }
示例#6
0
        public void OnMouseMove(object sender, MouseEventArgs e)
        {
            if (ButtonState.IsDrag)
            {
                if (ButtonDragMove != null)
                {
                    ButtonDragMove(sender, e);
                }
            }
            else if (!ButtonState.IsInactive && !ButtonState.IsSingleClick)
            {
                if (ShouldIgnoreMovement(e))
                {
                    return;
                }

                ButtonState.SetDrag();

                _timerDoubleClick.Stop();
                _timerHeldClick.Stop();

                if (ButtonDragStart != null)
                {
                    MouseManagerEventArgs eventArgs = ButtonState.BuildEventArgs();
                    eventArgs.End = eventArgs.Start;

                    ButtonDragStart(this, eventArgs);
                }
            }
        }
 private void MouseManagerOnRightButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     if (IoCContainer.GetInjectionInstance().GetInstance<ArrowCreationManager>().InMotion)
     {
         IoCContainer.GetInjectionInstance().GetInstance<ArrowCreationManager>().SetTo(NodeControl);
     }
 }
 public void OnLeftButtonDragMove(object sender, MouseEventArgs e)
 {
     if (IoCContainer.GetInjectionInstance().GetInstance<ArrowCreationManager>().InMotion)
     {
         MouseManagingControl.ReleaseMouseCapture();
         var args = new MouseManagerEventArgs
         {
             Start = new MouseStateProperties { EventOrigin = sender, PositionInformation = e },
             End = new MouseStateProperties { EventOrigin = sender, PositionInformation = e }
         };
         MotionHandler.OnLeftButtonDragReleased(sender, args);
         return;
     }
     MotionHandler.OnLeftButtonDragMove(sender,e);
     
 }
 private void MouseManagerOnLeftButtonSingleClick(object sender, MouseManagerEventArgs mouseManagerEventArgs)
 {
     switch (State)
     {
         case CollapseState.Collapsed:
             ExpandNodes(new ChildrenControlCollection(NodeControl, false, true));
             break;
         case CollapseState.Expanded:
             CollapseNodes(new ChildrenControlCollection(NodeControl));
             break;
         case CollapseState.SemiCollapsed:
             ExpandNodes(new ChildrenControlCollection(NodeControl, false, true));
             break;
     }
     NodeControl.ParentSurface.Selector.Clear();
     NodeControl.ParentSurface.Selector.AddNode(NodeControl);
 }
示例#10
0
        private void OnHeldClick(object sender, EventArgs e)
        {
            _timerHeldClick.Stop();

            if (ButtonState.IsMouseDown || ButtonState.IsSingleClick)
            {
                if (ButtonHeldClick != null)
                {
                    MouseManagerEventArgs eventArgs = ButtonState.BuildEventArgs();
                    eventArgs.End = eventArgs.Start;

                    ButtonHeldClick(this, eventArgs);
                }
            }

            ButtonState.Reset();
        }
示例#11
0
        public void OnLeftButtonDragReleased(object sender, MouseManagerEventArgs e)
        {
            _isDrag = false;

            UserControl.ViewModelNode.Location = UserControl.Centre;

            TransactionalMouseManagerEventArgs transactionalMouseManagerEventArgs = e as TransactionalMouseManagerEventArgs;

            if (transactionalMouseManagerEventArgs == null)
            {
                UserControl.ViewModelNode.CommitLocation();
            }
            else
            {
                transactionalMouseManagerEventArgs.NodesToBeCommitted.Add(UserControl.ViewModelNode);
            }
        }
示例#12
0
        public void OnMouseLeave(object sender, MouseEventArgs e)
        {
            if (!ButtonState.IsDrag && !ButtonState.IsInactive && !ButtonState.IsSingleClick)
            {
                ButtonState.SetDrag();

                _timerDoubleClick.Stop();
                _timerHeldClick.Stop();

                if (ButtonDragStart != null)
                {
                    MouseManagerEventArgs eventArgs = ButtonState.BuildEventArgs();
                    eventArgs.End = eventArgs.Start;

                    ButtonDragStart(this, eventArgs);
                }
            }
        }
示例#13
0
        public void OnMouseButtonUp(object sender, MouseButtonEventArgs e)
        {
            e.Handled = true;

            ButtonState.End.PositionInformation = e;
            ButtonState.End.EventOrigin         = sender;

            if (ButtonState.IsMouseDown)
            {
                ButtonState.SetSingleClick();
            }
            else if (ButtonState.IsSingleClick)
            {
                ButtonState.SetDoubleClick();
            }
            else if (ButtonState.IsDrag)
            {
                _timerDoubleClick.Stop();
                _timerHeldClick.Stop();

                if (ButtonDragReleased != null)
                {
                    ButtonDragReleased(this, ButtonState.BuildEventArgs());
                }

                ButtonState.Reset();
            }
            else if (ButtonState.IsInactive)
            {
                _timerDoubleClick.Stop();
                _timerHeldClick.Stop();

                if (ButtonDragReleased != null)
                {
                    MouseManagerEventArgs eventArgs = ButtonState.BuildEventArgs();
                    eventArgs.Start = eventArgs.End;

                    ButtonDragReleased(this, eventArgs);
                }

                ButtonState.Reset();
            }
        }
        public void OnLeftButtonDragReleased(object sender, MouseManagerEventArgs e)
        {
            var nodesToBeCommitted = new List<ViewModel.Node>();

            foreach (var nodeControl in Selector.NodeControls)
            {
                var transactionalMouseManagerEventArgs = new TransactionalMouseManagerEventArgs();
                transactionalMouseManagerEventArgs.InnerMouseManagerEventArgs = e;
                transactionalMouseManagerEventArgs.IsTransactional = true;
                transactionalMouseManagerEventArgs.NodesToBeCommitted = nodesToBeCommitted;

                nodeControl.MotionHandler.NodeMotionHandler.OnLeftButtonDragReleased(sender, transactionalMouseManagerEventArgs);
            }

            /// TODO: The following needs to be removed. This should not be in here.
            /// The reason this is bad is because a UI level component is making commands direct into the controller rather than raising it through events.
            /// The issue here is that due to the current architecture, this MupltipleNodeMotionHandler, although it belongs to only one node, it actually performs
            /// operations for EVERY node on the graph. This is very poor encapsulation.
            IoC.GetInstance<Controller.ISuperGraphNodeBatchOperations>().CommitLocations(nodesToBeCommitted);
        }
 public void Explorer_OnLeftButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     SuperCursor.SetCursorTemplate(this, ((DataTemplate) Application.Current.Resources["HoldHand"]));
     DragStart(e);
 }
 public void OnLeftButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     MouseManagingControl.ReleaseMouseCapture();
     //SuperCursor.SetCursorTemplate(MouseManagingControl, null);
     MotionHandler.OnLeftButtonDragReleased(sender, e);
 }
 public void OnExplorerTextLeftButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     UserControl.NodeText.ReleaseMouseCapture();
     UserControl.ParentSurface.DragRelease();
 }
示例#18
0
 public void OnRightButtonHeldClick(object sender, MouseManagerEventArgs e)
 {
     if (RightButtonHeldClick != null)
     {
         RightButtonHeldClick(this, e);
     }
 }
示例#19
0
 public void OnRightButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     if (RightButtonDragStart != null)
     {
         RightButtonDragStart(this, e);
     }
 }
示例#20
0
 public void OnRightButtonHeldClick(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnRightButtonHeldClick(this, e);
 }
示例#21
0
 public void OnRightButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnRightButtonDragStart(this, e);
 }
 private void Pointer_RightButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     if (IoC.GetInstance<ArrowCreationManager>().InMotion)
     {
         IoC.GetInstance<ArrowCreationManager>().SetTo(null);
     }
     else if (RightDragStarted)
     {
         Pointer_OnRightButtonDragReleased(sender, new MouseManagerEventArgs());
     }
 }
示例#23
0
 public void OnRightButtonHeldClick(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnRightButtonHeldClick(this, e);
 }
示例#24
0
 public void OnRightButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnRightButtonDragReleased(this, e);
 }
示例#25
0
 public void OnRightButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnRightButtonDragStart(this, e);
 }
示例#26
0
 public void OnLeftButtonDoubleClick(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnLeftButtonDoubleClick(this, e);
 }
 public void DragStart(MouseManagerEventArgs e)
 {
     NodeContainer.CaptureMouse();
     _exploreStartLocation = e.Start.PositionInformation.GetPosition(NodeContainer);
 }
 private void Pointer_OnLeftButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     LeftDragStarted = false;
     NodeContainer.ReleaseMouseCapture();
     Selector.MouseManagerOnLeftButtonDragReleased(sender, e);
 }
示例#29
0
 public void OnLeftButtonDoubleClick(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnLeftButtonDoubleClick(this, e);
 }
        private void Pointer_RightButtonSingleClick(object sender, MouseManagerEventArgs e)
        {
            if (IoC.GetInstance<ArrowCreationManager>().InMotion || RightDragStarted)
            {
                return;
            }

            var location = e.End.PositionInformation.GetPosition(this);
            ContextMenuContainer.ShowContextMenu<SuperGraphControlContextMenu>(location);
            ContextMenuContainer.ContextMenu.Location = LastLocation;
        }
示例#31
0
 public void OnRightButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     MouseManager.OnRightButtonDragReleased(this, e);
 }
 private void Pointer_OnLeftButtonSingleClick(object sender, MouseManagerEventArgs mouseManagerEventArgs)
 {
     Focus();
     if (LeftDragStarted)
     {
         Pointer_OnLeftButtonDragReleased(this, new MouseManagerEventArgs());
     }
     else
     {
         Selector.Clear();
     }
 }
示例#33
0
 public void OnLeftButtonDoubleClick(object sender, MouseManagerEventArgs e)
 {
     if (LeftButtonDoubleClick != null)
     {
         LeftButtonDoubleClick(this, e);
     }
 }
 private void Explorer_OnLeftButtonSingleClick(object sender, MouseManagerEventArgs mouseManagerEventArgs)
 {
     Selector.Clear();
     Focus();
 }
示例#35
0
 public void OnRightButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     if (RightButtonDragReleased != null)
     {
         RightButtonDragReleased(this, e);
     }
 }
 private void Pointer_OnRightButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     Focus();
     SuperCursor.SetCursorTemplate(this, ((DataTemplate) Application.Current.Resources["HoldHand"]));
     RightDragStarted = true;
     _exploreStartLocation = e.Start.PositionInformation.GetPosition(NodeContainer);
 }
 public void OnExplorerLeftButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     MouseManagingControl.CaptureMouse();
     UserControl.ParentSurface.DragStart(e);
 }
 private void Pointer_OnRightButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     RightDragStarted = false;
     SuperCursor.SetCursorTemplate(this, null);
 }
示例#39
0
 private void NodeText_LeftButtonSingleClick(object sender, MouseManagerEventArgs e)
 {
     if (!ParentSurface.LeftDragStarted)
     {
         if ((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift)
         {
             ParentSurface.Selector.AddNode(this);
         }
         else
         {
             ParentSurface.Selector.Clear();
             ParentSurface.Selector.AddNode(this);
             SetEditFocus();
         }
     }
 }
 private void Pointer_OnLeftButtonDragStart(object sender, MouseManagerEventArgs e)
 {
     LeftDragStarted = true;
     NodeContainer.CaptureMouse();
     Selector.MouseManagerOnLeftButtonDragStart(sender, e);
 }
        public void OnLeftButtonDragStart(object sender, MouseManagerEventArgs e)
        {
            if (IoCContainer.GetInjectionInstance().GetInstance<ArrowCreationManager>().InMotion)
            {
                return;
            }

            MouseManagingControl.CaptureMouse();
            //SuperCursor.SetCursorTemplate(MouseManagingControl, ((DataTemplate)(Application.Current.Resources["Move"])));
            if (!_selector.HasNode(UserControl))
            {
                _selector.Clear();
                _selector.AddNode(UserControl);
            }


            var nodeToLoop = _selector.NodeControls.ToList();
            foreach (var nodeControl in nodeToLoop)
            {
                if (nodeControl.CollapseState == CollapseState.Collapsed)
                {
                    foreach (var child in nodeControl.GetAllChildNodeControls())
                    {
                        _selector.AddNode(child);
                    }
                }
                else if (nodeControl.CollapseState == CollapseState.SemiCollapsed)
                {
                    var invisivleChildNodes = nodeControl.GetAllChildNodeControls().Where(q => q.IsCollapsed);
                    foreach (var child in invisivleChildNodes)
                    {
                        _selector.AddNode(child);
                    }
                }
            }
            
            
            MotionHandler.OnLeftButtonDragStart(sender, e);
        }
 public void Explorer_OnLeftButtonDragReleased(object sender, MouseManagerEventArgs e)
 {
     SuperCursor.SetCursorTemplate(this, null);
     DragRelease();
 }