Beispiel #1
0
        private void _tgMsgs_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left || !_dragStartDetector.MouseMove(e))
            {
                return;
            }
            if (_tgMsgs.SelectedNodes.Count > 0)
            {
                var nodes = new TreeNodeBag(_tgMsgs.SelectedNodes);

                try
                {
                    _tgMsgs.DoDragDrop(nodes, DragDropEffects.Copy | DragDropEffects.Link);
                }
                catch (Exception ex)
                {
                    Debug.Print(ex.ToString());
                }         //try
            }             //if

            _dragStartDetector.Reset();
        }
Beispiel #2
0
		private void _tgMsgs_MouseMove(object sender, MouseEventArgs e)
		{
			if (e.Button != MouseButtons.Left || !_dragStartDetector.MouseMove(e))
				return;
			if (_tgMsgs.SelectedNodes.Count > 0)
			{
				var nodes = new TreeNodeBag(_tgMsgs.SelectedNodes);

				try
				{
					_tgMsgs.DoDragDrop(nodes, DragDropEffects.Copy | DragDropEffects.Link);
				}
				catch (Exception ex)
				{
					Debug.Print(ex.ToString());
				} //try
			} //if

			_dragStartDetector.Reset();
		}