예제 #1
0
        /*
         * DrawComboBox
         */

        /// <summary>
        /// </summary>
        /// <param name="g"></param>
        /// <param name="bounds"></param>
        /// <exception cref="ArgumentNullException">
        /// <para>
        ///		<paramref name="g"/> is <see langword="null"/>.
        /// </para>
        /// </exception>
        private void DrawComboBox(Graphics g, Rectangle bounds)
        {
            if (g == null)
            {
                throw new ArgumentNullException("g");
            }

            Debug.Assert(this.ButtonStateTracker != null, "this.ButtonStateTracker != null");
            Debug.Assert(this.Renderer != null, "this.Renderer != null");

            NuGenControlState currentState = this.ButtonStateTracker.GetControlState();

            this.Renderer.DrawComboBoxButton(new NuGenPaintParams(
                                                 this,
                                                 g,
                                                 NuGenControlPaint.DropDownButtonBounds(this.ClientRectangle, this.RightToLeft),
                                                 currentState)
                                             );
            this.Renderer.DrawBorder(new NuGenPaintParams(this, g, this.ClientRectangle, currentState));
        }
예제 #2
0
        /*
         * GetDropDownButtonBounds
         */

        private Rectangle GetDropDownButtonBounds()
        {
            return(NuGenControlPaint.DropDownButtonBounds(this.ClientRectangle, this.RightToLeft));
        }