Beispiel #1
0
        /// <summary>
        /// Create appropriate redocker for type of feedback.
        /// </summary>
        /// <param name="feedbackStyle">Feedback style requested.</param>
        /// <param name="ff">Floating form source.</param>
        /// <param name="offset">Screen offset.</param>
        /// <returns>Redocker instance.</returns>
        public static RedockerContent CreateRedocker(DragFeedbackStyle feedbackStyle,
                                                     FloatingForm ff,
                                                     Point offset)
        {
            switch (feedbackStyle)
            {
            case DragFeedbackStyle.Squares:
                return(new RedockerContentAreas(true, ff, offset));

            case DragFeedbackStyle.Diamonds:
                return(new RedockerContentAreas(false, ff, offset));

            case DragFeedbackStyle.Solid:
                return(new RedockerContentSolid(false, ff, offset));

            case DragFeedbackStyle.Outline:
            default:
                return(new RedockerContentOutline(false, ff, offset));
            }
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the RedockerContent class.
        /// </summary>
        /// <param name="feedbackStyle">Feedback style requested.</param>
        /// <param name="callingControl">Calling control instance.</param>
        /// <param name="wc">WindowContent that contains content.</param>
        /// <param name="offset">Screen offset.</param>
        public static RedockerContent CreateRedocker(DragFeedbackStyle feedbackStyle,
                                                     Control callingControl,
                                                     WindowContent wc,
                                                     Point offset)
        {
            switch (feedbackStyle)
            {
            case DragFeedbackStyle.Squares:
                return(new RedockerContentAreas(true, callingControl, wc, offset));

            case DragFeedbackStyle.Diamonds:
                return(new RedockerContentAreas(false, callingControl, wc, offset));

            case DragFeedbackStyle.Solid:
                return(new RedockerContentSolid(false, callingControl, wc, offset));

            case DragFeedbackStyle.Outline:
            default:
                return(new RedockerContentOutline(false, callingControl, wc, offset));
            }
        }