Exemple #1
0
        private bool InitDrag(Control c, DragSource source)
        {
            if (!base.BeginDrag(c))
            {
                return(false);
            }

            m_source = source;
            if (Source == DragSource.Content ||
                Source == DragSource.Pane ||
                Source == DragSource.FloatWindow)
            {
                m_dockOutline   = new DockOutline();
                m_dockIndicator = new DockIndicator(this);
                DockIndicator.Show(false);
            }
            else if (Source == DragSource.AutoHideWindowSplitter ||
                     Source == DragSource.DockWindowSplitter ||
                     Source == DragSource.PaneSplitter)
            {
                m_splitterOutline = new SplitterOutline();
            }
            else
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
        private void PaneSplitter_BeginDrag(Point ptSplitter)
        {
            m_splitterLocation = DragControl.Parent.PointToScreen(ptSplitter);
            Point ptMouse = StartMousePosition;

            m_mouseOffset.X = m_splitterLocation.X - ptMouse.X;
            m_mouseOffset.Y = m_splitterLocation.Y - ptMouse.Y;

            Rectangle rect = GetPaneSplitterDragRectangle();

            SplitterOutline.Show(rect);
        }
Exemple #3
0
        protected override void OnEndDrag(bool abort)
        {
            if (Source == DragSource.Content ||
                Source == DragSource.Pane ||
                Source == DragSource.FloatWindow)
            {
                DockOutline.Close();
                DockIndicator.Close();
            }
            else if (Source == DragSource.AutoHideWindowSplitter ||
                     Source == DragSource.DockWindowSplitter ||
                     Source == DragSource.PaneSplitter)
            {
                SplitterOutline.Close();
            }

            if (Source == DragSource.Content)
            {
                Content_OnEndDrag(abort);
            }
            else if (Source == DragSource.Pane)
            {
                Pane_OnEndDrag(abort);
            }
            else if (Source == DragSource.PaneSplitter)
            {
                PaneSplitter_OnEndDrag(abort);
            }
            else if (Source == DragSource.DockWindowSplitter)
            {
                DockWindowSplitter_OnEndDrag(abort);
            }
            else if (Source == DragSource.AutoHideWindowSplitter)
            {
                AutoHideWindowSplitter_OnEndDrag(abort);
            }
            else if (Source == DragSource.FloatWindow)
            {
                FloatWindow_OnEndDrag(abort);
            }
        }
Exemple #4
0
 protected override void OnDragging()
 {
     if (Source == DragSource.Content ||
         Source == DragSource.Pane ||
         Source == DragSource.FloatWindow)
     {
         TestDrop();
     }
     else if (Source == DragSource.PaneSplitter)
     {
         SplitterOutline.Show(GetPaneSplitterDragRectangle());
     }
     else if (Source == DragSource.DockWindowSplitter)
     {
         SplitterOutline.Show(GetWindowSplitterDragRectangle());
     }
     else if (Source == DragSource.AutoHideWindowSplitter)
     {
         SplitterOutline.Show(GetWindowSplitterDragRectangle());
     }
 }
		private bool InitDrag(Control c, DragSource source)
		{
			if (!base.BeginDrag(c))
				return false;

			m_source = source;
			if (Source == DragSource.Content ||
				Source == DragSource.Pane ||
				Source == DragSource.FloatWindow)
			{
				m_dockOutline = new DockOutline();
				m_dockIndicator = new DockIndicator(this);
				DockIndicator.Show(false);
			}
			else if (Source == DragSource.AutoHideWindowSplitter ||
				Source == DragSource.DockWindowSplitter ||
				Source == DragSource.PaneSplitter)
				m_splitterOutline = new SplitterOutline();
			else
				return false;

			return true;
		}