SidebarLibrary.WinControls.OutlookBar.DrawArrowButtons C# (CSharp) 메소드

DrawArrowButtons() 개인적인 메소드

private DrawArrowButtons ( Graphics g ) : void
g System.Drawing.Graphics
리턴 void
		void DrawArrowButtons(Graphics g)
		{
			// If we don't have any bands just return
			if ( bands.Count == 0 )	return;

			int first, last;
			GetVisibleRange(g, out first, out last);

			Rectangle rc = GetViewPortRect();
			upArrowRect = new Rectangle(0, 0, SystemInformation.VerticalScrollBarWidth,
				SystemInformation.VerticalScrollBarWidth);
			downArrowRect = upArrowRect;
			upArrowRect.Offset(rc.Right - ARROW_BUTTON_MARGIN - SystemInformation.VerticalScrollBarWidth,
				rc.Top + ARROW_BUTTON_MARGIN);
			downArrowRect.Offset(rc.Right - ARROW_BUTTON_MARGIN - SystemInformation.VerticalScrollBarWidth,
				rc.Bottom - ARROW_BUTTON_MARGIN - SystemInformation.VerticalScrollBarWidth);

			// Do we need to show top scroll button
			if ( first > 0 )
			{
				if ( flatArrowButtons )
					DrawFlatArrowButton(g, upArrowRect, true, UpFlatArrowState);
				else
				{
					if ( upArrowPressed )
						ControlPaint.DrawScrollButton(g, upArrowRect, ScrollButton.Up, ButtonState.Pushed);
					else
						ControlPaint.DrawScrollButton(g, upArrowRect, ScrollButton.Up, ButtonState.Normal);
				}
				upArrowVisible = true;
			}
			else
			{
				upArrowVisible = false;
				UpFlatArrowState = DrawState.Normal;
			}

			// Do we need to show bottom scroll button
			if ( last < bands[currentBandIndex].Items.Count -1 )
			{

				if ( flatArrowButtons )
					DrawFlatArrowButton(g, downArrowRect, false, DownFlatArrowState);
				else
				{
					if ( downArrowPressed )
						ControlPaint.DrawScrollButton(g, downArrowRect, ScrollButton.Down, ButtonState.Pushed);
					else
						ControlPaint.DrawScrollButton(g, downArrowRect, ScrollButton.Down, ButtonState.Normal);
				}
				downArrowVisible = true;
			}
			else
			{
				downArrowVisible = false;
				DownFlatArrowState = DrawState.Normal;
			}
		}