ImageGlass.ImageBox.ShouldShowScrollbar C# (CSharp) Method

ShouldShowScrollbar() private method

Determines if a scroll bar should be displayed.
private ShouldShowScrollbar ( ImageBoxScrollBarStyle style, bool visible ) : bool
style ImageBoxScrollBarStyle The user defined style of the scroll bar.
visible bool The visibility state for automatic styles.
return bool
        private bool ShouldShowScrollbar(ImageBoxScrollBarStyle style, bool visible)
        {
            bool result;

            switch (style)
            {
                case ImageBoxScrollBarStyle.Auto:
                    result = visible;
                    break;
                case ImageBoxScrollBarStyle.Show:
                    result = true;
                    break;
                case ImageBoxScrollBarStyle.Hide:
                    result = false;
                    break;
                default:
                    throw new ArgumentOutOfRangeException("style", style, null);
            }

            return result;
        }
ImageBox