 9a7d1d27c7
			
		
	
	9a7d1d27c7
	
	
	
		
			
			- UIControl 프로젝트 구조 변경 (CapCleaningControl → Sub/UIControl) - arAjinextek 라이브러리 통합 및 구조 개선 - 새로운 arAjinextek_Union 프로젝트 추가 - 솔루션 파일에 README.md 추가 - QR 모드에서 WMS RCV 태그 인식 기능 강화 - 데이터베이스 스키마 업데이트 및 관련 클래스 수정 - 프린터 및 바코드 장치 연동 로직 개선 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			127 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			127 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Drawing;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| 
 | |
| namespace UIControl
 | |
| {
 | |
|     public static class Common
 | |
|     {
 | |
|         public static void Draw_Arrow(Graphics g, RectangleF rect, eDirection dir, int arrowindex, int animstep, Color basecolor,Font f )
 | |
|         {
 | |
|             //컨베어 RUN 표시기 표시
 | |
|             var paddingX = rect.Height * 0.15f;  //상하단에 이만큼의 여백을 준다
 | |
|             var paddingY = rect.Height * 0.15f;
 | |
|             var sigHeight = rect.Height - (paddingX * 2.0f);
 | |
|             var sigWidth = rect.Width / animstep;
 | |
| 
 | |
|             if (dir == eDirection.BottomToTop || dir == eDirection.TopToBottom)
 | |
|             {
 | |
|                 paddingX = rect.Width * 0.15f;
 | |
|                 paddingY = rect.Height / 10.0f;
 | |
|                 sigWidth = rect.Width - (paddingX * 2.0f);
 | |
|                 sigHeight = rect.Height / 4.5f;
 | |
|             }
 | |
|             List<PointF> pts = new List<PointF>();
 | |
| 
 | |
|             //사각영역을 표시해준다.
 | |
|             //if (dir == eDirection.LeftToRight || dir == eDirection.RightToLeft)
 | |
|             //{
 | |
|             //    var rect2width = rect.Width / animstep;
 | |
|             //    for (int i = 0; i < animstep; i++)
 | |
|             //    {
 | |
|             //        var rect2 = new RectangleF(rect.X + i * rect2width, rect.Y, rect2width, rect.Height);
 | |
|             //        g.DrawRectangle(new Pen(Color.FromArgb(100, Color.Gray)), rect2.Left, rect2.Top, rect2.Width, rect2.Height);
 | |
|             //        g.DrawString(i.ToString(), this.Font, Brushes.White, rect2.Left, rect2.Top);
 | |
|             //    }
 | |
|             //}
 | |
|             //else
 | |
|             //{
 | |
|             //    var rect2width = rect.Height / animstep;
 | |
|             //    for (int i = 0; i < animstep; i++)
 | |
|             //    {
 | |
|             //        var rect2 = new RectangleF(rect.X, rect.Y + i * rect2width, rect.Width, rect2width);
 | |
|             //        g.DrawRectangle(new Pen(Color.FromArgb(100, Color.Gray)), rect2.Left, rect2.Top, rect2.Width, rect2.Height);
 | |
|             //        g.DrawString(i.ToString(), this.Font, Brushes.White, rect2.Left, rect2.Top);
 | |
|             //    }
 | |
|             //}
 | |
| 
 | |
| 
 | |
| 
 | |
|             var bX = rect.X + paddingX;
 | |
|             var bY = rect.Y + paddingY;
 | |
| 
 | |
|             if (dir == eDirection.LeftToRight)
 | |
|             {
 | |
|                 var gridSize = rect.Width / animstep;
 | |
|                 pts.Add(new PointF(rect.X + paddingX + (arrowindex * sigWidth), rect.Y + paddingX));
 | |
|                 pts.Add(new PointF(rect.X + paddingX + (arrowindex * sigWidth) + sigWidth, rect.Y + paddingX));
 | |
|                 pts.Add(new PointF(rect.X + paddingX + (arrowindex * sigWidth) + sigWidth * 2.0f, rect.Y + paddingX + sigHeight / 2.0f));
 | |
|                 pts.Add(new PointF(rect.X + paddingX + (arrowindex * sigWidth) + sigWidth, rect.Y + paddingX + sigHeight));
 | |
|                 pts.Add(new PointF(rect.X + paddingX + (arrowindex * sigWidth), rect.Y + paddingX + sigHeight));
 | |
|                 pts.Add(new PointF(rect.X + paddingX + (arrowindex * sigWidth) + sigWidth, rect.Y + paddingX + sigHeight / 2.0f));
 | |
|             }
 | |
|             else if (dir == eDirection.RightToLeft)
 | |
|             {
 | |
|                 var gridSize = rect.Width / animstep;
 | |
|                 paddingY = rect.Height * 0.1f;  //상,하 여백을 10%크기로 한다
 | |
|                 sigHeight = rect.Height - paddingY * 2.0f;
 | |
| 
 | |
|                 bX = rect.X + ((animstep - 1) - arrowindex) * gridSize;
 | |
|                 bY = rect.Y + paddingY;
 | |
| 
 | |
|                 pts.Add(new PointF(bX, bY));
 | |
|                 pts.Add(new PointF(bX - gridSize, bY + sigHeight / 2.0f));
 | |
|                 pts.Add(new PointF(bX, bY + sigHeight));
 | |
|                 pts.Add(new PointF(bX + gridSize, bY + sigHeight));
 | |
|                 pts.Add(new PointF(bX, bY + sigHeight / 2.0f));
 | |
|                 pts.Add(new PointF(bX + gridSize, bY));
 | |
|             }
 | |
|             else if (dir == eDirection.TopToBottom)
 | |
|             {
 | |
|                 var gridSize = rect.Height / animstep;
 | |
|                 paddingX = rect.Width * 0.2f;  //상,하 여백을 10%크기로 한다
 | |
|                 sigWidth = rect.Width - paddingX * 2.0f;
 | |
| 
 | |
|                 bX = rect.X + paddingX;
 | |
|                 bY = rect.Y + (arrowindex + 1) * gridSize;
 | |
| 
 | |
| 
 | |
|                 pts.Add(new PointF(bX, bY));
 | |
|                 pts.Add(new PointF(bX + (sigWidth / 2.0f), bY + gridSize));
 | |
|                 pts.Add(new PointF(bX + sigWidth, bY));
 | |
|                 pts.Add(new PointF(bX + sigWidth, bY - gridSize));
 | |
|                 pts.Add(new PointF(bX + (sigWidth / 2.0f), bY));
 | |
|                 pts.Add(new PointF(bX, bY - gridSize));
 | |
| 
 | |
|             }
 | |
|             else if (dir == eDirection.BottomToTop)
 | |
|             {
 | |
|                 var gridSize = rect.Height / animstep;
 | |
|                 paddingX = rect.Width * 0.2f;  //상,하 여백을 10%크기로 한다
 | |
|                 sigWidth = rect.Width - paddingX * 2.0f;
 | |
| 
 | |
|                 bX = rect.X + paddingX;
 | |
|                 bY = rect.Y + ((animstep - 1) - arrowindex) * gridSize;
 | |
| 
 | |
| 
 | |
|                 pts.Add(new PointF(bX, bY));
 | |
|                 pts.Add(new PointF(bX + (sigWidth / 2.0f), bY - gridSize));
 | |
|                 pts.Add(new PointF(bX + sigWidth, bY));
 | |
|                 pts.Add(new PointF(bX + sigWidth, bY + gridSize));
 | |
|                 pts.Add(new PointF(bX + (sigWidth / 2.0f), bY));
 | |
|                 pts.Add(new PointF(bX, bY + gridSize));
 | |
|             }
 | |
|             if (pts.Count > 0)
 | |
|             {
 | |
|                 g.FillPolygon(new SolidBrush(Color.FromArgb(10, basecolor)), pts.ToArray());
 | |
|                 g.DrawPolygon(new Pen(Color.FromArgb(100, basecolor)), pts.ToArray());
 | |
|             }
 | |
| 
 | |
|             //g.DrawString(arrowindex.ToString(), f, Brushes.Yellow, rect.Left, rect.Top - 20);
 | |
|         }
 | |
| 
 | |
|     }
 | |
| }
 |