Exemplo n.º 1
0
        /*
         * OnDragOver
         */

        /// <summary>
        /// Called when a drag-and-drop object is dragged over the control designer view.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Windows.Forms.DragEventArgs"></see> that provides data for the event.</param>
        protected override void OnDragOver(DragEventArgs e)
        {
            NuGenTabPageDesigner designer = this.GetSelectedTabPageDesigner();

            if (designer != null)
            {
                designer.DoDragOver(e);
            }
            else
            {
                base.OnDragOver(e);
            }
        }
Exemplo n.º 2
0
        /*
         * OnGiveFeedback
         */

        /// <summary>
        /// Receives a call when a drag-and-drop operation is in progress to provide visual cues based on the location of the mouse while a drag operation is in progress.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Windows.Forms.GiveFeedbackEventArgs"></see> that provides data for the event.</param>
        protected override void OnGiveFeedback(GiveFeedbackEventArgs e)
        {
            NuGenTabPageDesigner designer = this.GetSelectedTabPageDesigner();

            if (designer != null)
            {
                designer.DoGiveFeedback(e);
            }
            else
            {
                base.OnGiveFeedback(e);
            }
        }
Exemplo n.º 3
0
        /*
         * GetSelectedTabPageDesigner
         */

        /// <summary>
        /// </summary>
        /// <returns></returns>
        protected NuGenTabPageDesigner GetSelectedTabPageDesigner()
        {
            NuGenTabPageDesigner tabPageDesigner = null;
            NuGenTabPage         selectedTabPage = _tabControl.SelectedTab;

            if (selectedTabPage != null)
            {
                IDesignerHost host = (IDesignerHost)this.GetService(typeof(IDesignerHost));

                if (host != null)
                {
                    tabPageDesigner = host.GetDesigner(selectedTabPage) as NuGenTabPageDesigner;
                }
            }

            return(tabPageDesigner);
        }