From 4553fe7f3b52908aeda002423e9fb8f54b584843 Mon Sep 17 00:00:00 2001 From: ChiKyun Kim Date: Wed, 24 Sep 2025 09:00:30 +0900 Subject: [PATCH] to english --- Handler/Sub/UIControl/HMI.cs | 265 ++++++----------------------------- 1 file changed, 39 insertions(+), 226 deletions(-) diff --git a/Handler/Sub/UIControl/HMI.cs b/Handler/Sub/UIControl/HMI.cs index 9efbe0e..d56a98e 100644 --- a/Handler/Sub/UIControl/HMI.cs +++ b/Handler/Sub/UIControl/HMI.cs @@ -73,6 +73,17 @@ namespace UIControl public bool CVRightReady = false; #endregion + RectangleF rect_vision = RectangleF.Empty; + + public string arVision_RID { get; set; } + public string arVision_SID { get; set; } + + RectangleF rect_zlaxis = RectangleF.Empty;// new RectangleF((float)motZLPosX, (float)motZPosY, motZwPx, (float)motZhPx); + + public Boolean arVisionProcessL { get; set; } + public Boolean arVisionProcessC { get; set; } + public Boolean arVisionProcessR { get; set; } + #region "Property" public int arCountV0 { get; set; } @@ -919,13 +930,13 @@ namespace UIControl g.FillRectangle(new SolidBrush(Color.FromArgb(20, 20, 20)), crect); if (arPickerSafeZone) - g.DrawString("홈 검색이 가능합니다", new Font("맑은 고딕", 20, FontStyle.Bold), Brushes.Lime, crect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); + g.DrawString("Home search is possible", new Font("Tahoma", 20, FontStyle.Bold), Brushes.Lime, crect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); else { if (MessageOn) - g.DrawString("피커를 움직여 안전위치로 이동하세요", new Font("맑은 고딕", 12, FontStyle.Bold), Brushes.Red, crect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); + g.DrawString("Move the picker to a safe position", new Font("Tahoma", 12, FontStyle.Bold), Brushes.Red, crect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); else - g.DrawString("피커를 움직여 안전위치로 이동하세요", new Font("맑은 고딕", 12, FontStyle.Bold), Brushes.White, crect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); + g.DrawString("Move the picker to a safe position", new Font("Tahoma", 12, FontStyle.Bold), Brushes.White, crect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); } g.DrawRect(crect, Color.White, 5); @@ -1025,24 +1036,12 @@ namespace UIControl void Scean_Normal(Graphics g) { - - - //Draw_Icon(g); - //전체 영역 테두리 g.DrawRectangle(new Pen(Color.White, 2), rect_main.Left, rect_main.Top, rect_main.Width, rect_main.Height); - //컨베어 그리기 - //Draw_Conveyor(g, rect_conveyor); - - //셔틀표시 - //Draw_BallScrewRail(g, rect_frontShuttle, 50, 5, false, true, this.arMOT_Origin[(int)eAxis.X_F], arMOT_LimDn[(int)eAxis.X_F], arMOT_LimUp[(int)eAxis.X_F]); - //포트표시(셔틀위에 표시됨) Draw_Port(g); //front - Draw_Vision(g); - - + //프린터영역그리기 201228 var printareahei = 50; @@ -1051,37 +1050,24 @@ namespace UIControl var rectpl = new RectangleF(arVar_Port[0].Rect.Right + printbordersize, arVar_Port[0].Rect.Top - 85, printareaw, printareahei); var fColorPrn = arFGPrinter0END ? Color.Lime : (arFGPrinter0RDY ? Color.Gold : Color.Gray); g.DrawRect(rectpl, fColorPrn, printbordersize); - var prnstrbase = "";// "인쇄수량:" + arCountPrint0.ToString("000") + "\n"; - var prnstr = prnstrbase + (arFGPrinter0END ? "인쇄완료" : (arFGPrinter0RDY ? "인쇄중" : "인쇄대기")); + var prnstrbase = "";// "Print Qty:" + arCountPrint0.ToString("000") + "\n"; + var prnstr = prnstrbase + (arFGPrinter0END ? "Print Complete" : (arFGPrinter0RDY ? "Printing" : "Print Ready")); prnstr += "\n" + arCountPrint0.ToString("0000"); - g.DrawString(prnstr, new Font("맑은 고딕", 10, FontStyle.Bold), new SolidBrush(fColorPrn), rectpl, + g.DrawString(prnstr, new Font("Tahoma", 10, FontStyle.Bold), new SolidBrush(fColorPrn), rectpl, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); - //g.DrawString(string.Format("AIR:{0}\nVI:{1}\nVO:{2}", PrintLAIRO, PrintLVACI, PrintLVACO), new Font("Consolas", 11, FontStyle.Bold), - // Brushes.Tomato, rectpl.Left, rectpl.Top); - - rectpl = new RectangleF(arVar_Port[2].Rect.Left - 90 - printbordersize, arVar_Port[2].Rect.Top - 85, printareaw, printareahei); fColorPrn = arFGPrinter1END ? Color.Lime : (arFGPrinter1RDY ? Color.Gold : Color.Gray); g.DrawRect(rectpl, fColorPrn, printbordersize); - prnstrbase = "";// "인쇄수량:" + arCountPrint1.ToString("000") + "\n"; - prnstr = prnstrbase + (arFGPrinter1END ? "인쇄완료" : (arFGPrinter1RDY ? "인쇄중" : "인쇄대기")); + prnstrbase = "";// "Print Qty:" + arCountPrint1.ToString("000") + "\n"; + prnstr = prnstrbase + (arFGPrinter1END ? "Print Complete" : (arFGPrinter1RDY ? "Printing" : "Print Ready")); prnstr += "\n" + arCountPrint1.ToString("0000"); - g.DrawString(prnstr, new Font("맑은 고딕", 10, FontStyle.Bold), new SolidBrush(fColorPrn), rectpl, + g.DrawString(prnstr, new Font("Tahoma", 10, FontStyle.Bold), new SolidBrush(fColorPrn), rectpl, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); - //g.DrawString(string.Format("AIR:{0}\nVI:{1}\nVO:{2}", PrintRAIRO, PrintRVACI, PrintRVACO), new Font("Consolas", 11, FontStyle.Bold), - // Brushes.Tomato, rectpl.Left, rectpl.Top); - - - //Y축 레일표시 - //Draw_BallScrewRail(g, rect_picker, 50, 5, true, LockYP, this.arMOT_Origin[(int)eAxis.Y_P], arMOT_LimDn[(int)eAxis.Y_P], arMOT_LimUp[(int)eAxis.Y_P]); - - - + //모터 Y/Z축 Draw_PickerY(g, rect_picker); - //왼쪽 프린터 Draw_PickerPrinter(g, rect_printl, 2, 3, false, arMotILockPLM, arMotILockPLZ, arPLItemON, PrintLPICK, L_PICK_FW, L_PICK_BW); @@ -1089,14 +1075,11 @@ namespace UIControl Draw_PickerPrinter(g, rect_printr, 4, 5, true, arMotILockPRM, arMotILockPRZ, arPRItemON, PrintRPICK, R_PICK_FW, R_PICK_BW); //정보 표시 (나중에 제거해야함) 별도 인포박스형태를 취해야 함 - Draw_Info(g, rect_conveyor); Draw_Error(g); //메뉴는 최상위에 표시한다 Draw_Menu(g); - //arDebugMode = true; - if (arDebugMode) { @@ -1111,16 +1094,6 @@ namespace UIControl var sb2 = new System.Text.StringBuilder(); if (arVar_Port != null && arVar_Port.Length > 0) { - //sb2.AppendLine(string.Format("입(PICKER)/출(SS:DET1)/겹침(SS:DET1) : {0}/{1}/{2}", - // ar_cnt_in, ar_cnt_out, ar_cnt_outdup)); - - //sb2.AppendLine(string.Format("바코드 입/출:CMD/DUP/READ/ERR/중복수신/할당실패 {0}/{1}:{2}/{3}/{4}/{5}/{6}/{7}", - // ar_cnt_barcodein, ar_cnt_barcodeot, ar_cnt_barcodecmd, ar_cnt_barcodedup, ar_cnt_barcoderead, ar_cnt_barcodereaderr, ar_cnt_barcodereaddup, ar_cnt_barcodeAssignErr)); - - //sb2.AppendLine(string.Format("언로더 입/출:CMD/DUP {0}/{1}:{2}/{3}", - // ar_cnt_plcin, ar_cnt_plcot, ar_cnt_plccmd, ar_cnt_plcdup)); - - sb.AppendLine(string.Format("DIO:{4},BCD:{5},PLC:{6}\n" + "YP_RDY {7},{8},{9},{10}\n" + "YP_CMD {7},{8},{9},{10}\n", @@ -1134,62 +1107,9 @@ namespace UIControl arFG_CMD_YP_FPICKON, arFG_CMD_YP_RPICKON)); } - - var pad = 10; - using (Font f = new Font("맑은 고딕", 9)) - { - var smgsize = g.MeasureString(sb.ToString(), f); - var dbgrect = new RectangleF(rect_main.Left + pad, rect_main.Top + pad, smgsize.Width + pad * 2f, smgsize.Height + pad * 2f); - - //g.FillRectangle(new SolidBrush(Color.FromArgb(252, 0, 0, 0)), dbgrect); - //g.DrawString(sb.ToString(), f, Brushes.SkyBlue, dbgrect, new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center }); - } - } - } - - void Draw_Info(Graphics g, RectangleF rect) - { - - //디자인 모드에서는 표시하지 않는다 200714 - //if (DesignMode == true) return; - - //if (this.arFlag_UnloaderBusy) ShowPopupMessage(g, "언로더 작업 대기 중\nBUSY", Properties.Resources.info); - //if (this.arIsRunning) - //{ - // if (this.arFlag_UnloaderErr == true) ShowPopupMessage(g, "언로더 오류 발생", "STOP된 언로더를 확인하세요", Properties.Resources.error, false); - // else if (this.arFlag_WaitPLC && arUnloaderSeq > 0) - // { - // if (arUnloaderSeq == 1) ShowPopupMessage(g, "언로더 작업 대기 중", "상태확인(#1)", Properties.Resources.info, false); - // else if (arUnloaderSeq == 2) ShowPopupMessage(g, "언로더 작업 대기 중", "BUSY(#2)", Properties.Resources.info, false); - // else if (arUnloaderSeq == 3) ShowPopupMessage(g, "언로더 작업 대기 중", "ITEM CHECK(#3)", Properties.Resources.info, false); - // else if (arUnloaderSeq == 4) ShowPopupMessage(g, "언로더 작업 대기 중", "NO SETTING(#4)", Properties.Resources.info, false); - // else if (arUnloaderSeq == 5) ShowPopupMessage(g, "언로더 작업 대기 중", "SIZE SETTING(#5)", Properties.Resources.info, false); - // else if (arUnloaderSeq == 6) ShowPopupMessage(g, "언로더 작업 대기 중", "No.ZERO CHECK(#6)", Properties.Resources.info, false); - // } - //} - - } - - //void Draw_PickerRail(Graphics g, RectangleF rect) - //{ - // RectangleF rectRailL = new RectangleF(rect.Left, rect.Top, rect.Width / 2.0f + 1, rect.Height); - // RectangleF rectRailR = new RectangleF(rect.Left + rect.Width / 2.0f, rect.Top, rect.Width / 2.0f, rect.Height); - // var brR = new LinearGradientBrush(rect, Color.FromArgb(60, 60, 60), Color.FromArgb(80, 80, 80), LinearGradientMode.Horizontal); - // var brL = new LinearGradientBrush(rect, Color.FromArgb(80, 80, 80), Color.FromArgb(60, 60, 60), LinearGradientMode.Horizontal); - // g.FillRectangle(brL, rectRailL); - // //g.FillRectangle(brR, rectRailR); - // brL.Dispose(); - // brR.Dispose(); - // g.DrawRectangle(Pens.DimGray, rect.Left, rect.Top, rect.Width, rect.Height); - - //} - - RectangleF rect_zlaxis = RectangleF.Empty;// new RectangleF((float)motZLPosX, (float)motZPosY, motZwPx, (float)motZhPx); - //RectangleF rect_zraxis = RectangleF.Empty;//new RectangleF((float)motZRPosX, (float)motZPosY, motZwPx, (float)motZhPx); - void Draw_Screw(Graphics g, Rectangle rect) { //모터표시(X축) @@ -1207,22 +1127,7 @@ namespace UIControl g.DrawLine(p, pt1, pt2); } p.Dispose(); - //e.Graphics.DrawRectangle(Pens.Gray, motr_rect.Left, motr_rect.Top, motr_rect.Width, motr_rect.Height); - //e.Graphics.DrawRectangle(Pens.Gray, motf_rect.Left, motf_rect.Top, motf_rect.Width, motf_rect.Height); - - - //RectangleF rectRailT = new RectangleF(rect.Left, rect.Top, rect.Width, rect.Height / 2.0f + 1); - //RectangleF rectRailB = new RectangleF(rect.Left, rect.Top + rect.Height / 2.0f, rect.Width, rect.Height / 2.0f); - //var brR = new LinearGradientBrush(rect, Color.FromArgb(100, 60, 60, 60), Color.FromArgb(100, 80, 80, 80), LinearGradientMode.Vertical); - //var brL = new LinearGradientBrush(rect, Color.FromArgb(100, 80, 80, 80), Color.FromArgb(100, 60, 60, 60), LinearGradientMode.Vertical); - ////g.FillRectangle(brL, rectRailT); - ////g.FillRectangle(brR, rectRailB); - //brL.Dispose(); - //brR.Dispose(); - g.DrawRectangle(new Pen(Color.FromArgb(50, Color.Gray)), rect.Left, rect.Top, rect.Width, rect.Height); - - } void Draw_BallScrewRail(Graphics g, RectangleF rect, int divCount, int alpha, Boolean downDirection, Boolean MLock, Boolean Org, Boolean LimDn, Boolean LimUp) @@ -1291,11 +1196,11 @@ namespace UIControl //디자인 모드에서는 표시하지 않는다 200714 if (DesignMode == true) return; - if (arConn_DIO && this.arDI_Emergency == true) ShowPopupMessage(g, "EMERGENCY BUTTON", "비상정지 확인\nEMERGENCY or POWER LOSS", Properties.Resources.error, true); - else if (this.arDI_SaftyOk == false) ShowPopupMessage(g, "SAFTY SENSOR", "안전 센서 확인", Properties.Resources.alert, true); - else if (arConn_MOT && this.arMOT_Alm[0] == true) ShowPopupMessage(g, "SERVO ALARM", "Y-PICKER 모터 알람 발생", Properties.Resources.error, true); - else if (arConn_MOT && this.arMOT_Alm[1] == true) ShowPopupMessage(g, "SERVO ALARM", "Z-FRONT 모터 알람 발생", Properties.Resources.error, true); - else if (arConn_MOT && this.arMOT_Alm[2] == true) ShowPopupMessage(g, "SERVO ALARM", "Z-REAR 모터 알람 발생", Properties.Resources.error, true); + if (arConn_DIO && this.arDI_Emergency == true) ShowPopupMessage(g, "EMERGENCY BUTTON", "Check emergency stop\nEMERGENCY or POWER LOSS", Properties.Resources.error, true); + else if (this.arDI_SaftyOk == false) ShowPopupMessage(g, "SAFTY SENSOR", "Check safety sensor", Properties.Resources.alert, true); + else if (arConn_MOT && this.arMOT_Alm[0] == true) ShowPopupMessage(g, "SERVO ALARM", "Y-PICKER motor alarm occurred", Properties.Resources.error, true); + else if (arConn_MOT && this.arMOT_Alm[1] == true) ShowPopupMessage(g, "SERVO ALARM", "Z-FRONT motor alarm occurred", Properties.Resources.error, true); + else if (arConn_MOT && this.arMOT_Alm[2] == true) ShowPopupMessage(g, "SERVO ALARM", "Z-REAR motor alarm occurred", Properties.Resources.error, true); else if (arConn_MOT && this.arMOT_SVOn[0] == false) ShowPopupMessage(g, "SERVO ALARM", "Y-PICKER\nSERVO-OFF", Properties.Resources.alert, true); else if (arConn_MOT && this.arMOT_SVOn[1] == false) ShowPopupMessage(g, "SERVO ALARM", "Z-PICKER\nSERVO-OFF", Properties.Resources.alert, true); @@ -1303,7 +1208,7 @@ namespace UIControl else if (arConn_MOT && this.arMOT_SVOn[3] == false) ShowPopupMessage(g, "SERVO ALARM", "L-PRINT-Z\nSERVO-OFF", Properties.Resources.alert, true); else if (arConn_MOT && this.arMOT_SVOn[4] == false) ShowPopupMessage(g, "SERVO ALARM", "R-PRINT-Y\nSERVO-OFF", Properties.Resources.alert, true); - else if (arConn_DIO && this.arAIRDetect == false) ShowPopupMessage(g, "AIR DETECT", "*전면의 AIR버튼(청색)을 눌러 AIR를 공급하세요\n* AIR 라인을 확인하세요", Properties.Resources.error, true); + else if (arConn_DIO && this.arAIRDetect == false) ShowPopupMessage(g, "AIR DETECT", "*Press the blue AIR button on the front to supply AIR\n* Check the AIR line", Properties.Resources.error, true); else if (arConn_MOT && (this.arMOT_HSet[0] == false || this.arMOT_HSet[1] == false || this.arMOT_HSet[2] == false)) { @@ -1313,33 +1218,22 @@ namespace UIControl if (arVar_Port[1].SaftyErr == true) SaftyMessage += (string.IsNullOrEmpty(SaftyMessage) == false ? "," : string.Empty) + "DOOR:CENTER"; if (arVar_Port[2].SaftyErr == true) SaftyMessage += (string.IsNullOrEmpty(SaftyMessage) == false ? "," : string.Empty) + "DOOR:RIGHT"; - if (arPickerSafeZone == false) SaftyMessage += (string.IsNullOrEmpty(SaftyMessage) == false ? "\n" : string.Empty) + "피커안전위치 : OFF"; - else SaftyMessage += "피커안전위치 : ON"; ; + if (arPickerSafeZone == false) SaftyMessage += (string.IsNullOrEmpty(SaftyMessage) == false ? "\n" : string.Empty) + "Picker safety position: OFF"; + else SaftyMessage += "Picker safety position: ON"; ; - ShowPopupMessage(g, "SYSTEM NOT READY", "초기화가 필요 합니다\n" + SaftyMessage, Properties.Resources.error, true); + ShowPopupMessage(g, "SYSTEM NOT READY", "Initialization required\n" + SaftyMessage, Properties.Resources.error, true); } - else if (arConn_MOT && this.arMOT_HSet[0] == false) ShowPopupMessage(g, "SERVO ALARM", "Y-PICKER 홈 검색 필요", Properties.Resources.alert, true); - else if (arConn_MOT && this.arMOT_HSet[1] == false) ShowPopupMessage(g, "SERVO ALARM", "Z-FRONT 홈 검색 필요", Properties.Resources.alert, true); - else if (arConn_MOT && this.arMOT_HSet[2] == false) ShowPopupMessage(g, "SERVO ALARM", "Z-REAR 홈 검색 필요", Properties.Resources.alert, true); + else if (arConn_MOT && this.arMOT_HSet[0] == false) ShowPopupMessage(g, "SERVO ALARM", "Y-PICKER home search required", Properties.Resources.alert, true); + else if (arConn_MOT && this.arMOT_HSet[1] == false) ShowPopupMessage(g, "SERVO ALARM", "Z-FRONT home search required", Properties.Resources.alert, true); + else if (arConn_MOT && this.arMOT_HSet[2] == false) ShowPopupMessage(g, "SERVO ALARM", "Z-REAR home search required", Properties.Resources.alert, true); else if (arVar_Port[0].OverLoad) ShowPopupMessage(g, "## OVERLOAD ##", "FRONT-LEFT", Properties.Resources.alert, true); else if (arVar_Port[1].OverLoad) ShowPopupMessage(g, "## OVERLOAD ##", "FRONT-RIGHT", Properties.Resources.alert, true); - - //else if (arFlag_UnloaderBusy) ShowPopupMessage(g, "## UNLOADER ##\nBUSY", Properties.Resources.alert); - //else if (arFlag_UnloaderErr) ShowPopupMessage(g, "## UNLOADER ##\nERROR", Properties.Resources.alert); } void Draw_Menu(Graphics g) { - //var buttonOk = new CMenuButton("OK", "1"); - //var buttonNo = new CMenuButton("CANCLE", "0"); - //var newmenu = new CMenu("body str", "title", eMsgIcon.Error, buttonOk, buttonNo) - //{ - // BorderColor = Color.Gray - //}; - //this.menus.Push(newmenu); - if (arMenus == null || arMenus.Length < 1) { this.HasPopupMenu = false; return; } else HasPopupMenu = true; @@ -1434,18 +1328,7 @@ namespace UIControl g.DrawString(item.Text, item.Font, new SolidBrush(item.ForeColor), rectC); } - //외각 테두리 - //g.DrawRectangle(new Pen(Color.FromArgb(20,20,20), 10) { Alignment = PenAlignment.Center }, rect.Left + 1, rect.Top + 1, rect.Width, rect.Height); - g.DrawRectangle(new Pen(Color.FromArgb(180, 180, 180), 10) { Alignment = PenAlignment.Center }, rect.Left, rect.Top, rect.Width, rect.Height); - - - //g.DrawRectangle(Pens.Black, rect.Left, rect.Top, rect.Width, rect.Height); - - //g.DrawRectangle(Pens.Red, rectT); //제목표시줄 - //g.DrawRectangle(Pens.Blue, rectI); //아이콘 - //g.DrawRectangle(Pens.Green, rectB); //버튼영역 - //g.DrawRectangle(Pens.Black, rectC); //본문영역 } void ShowMaskLayer(Graphics g, Color maskColor) @@ -1454,18 +1337,11 @@ namespace UIControl } - public Font MessageBody { get; set; } = new Font("맑은 고딕", 20, FontStyle.Bold); - public Font MessageTitle { get; set; } = new Font("맑은 고딕", 10, FontStyle.Bold); + public Font MessageBody { get; set; } = new Font("Tahoma", 20, FontStyle.Bold); + public Font MessageTitle { get; set; } = new Font("Tahoma", 10, FontStyle.Bold); void ShowPopupMessage(Graphics g, string title, string msg, Image icon, Boolean isError) { - //팝업표시할때마다 배경 마스킹을 한다 - //var maskColor = Color.FromArgb(100, Color.White); - //ShowMaskLayer(g, maskColor); - - //var msgf = new Font("맑은 고딕", 20, FontStyle.Bold); - //var msgt = new Font("맑은 고딕", 10, FontStyle.Bold); - if (isError == false) { //팝업표시할때마다 배경 마스킹을 한다 @@ -1546,9 +1422,6 @@ namespace UIControl if (errstep < 255) errstep += 1; else errstep = 0; } - - //msgf.Dispose(); - //msgt.Dispose(); } void Draw_Port(Graphics g) @@ -1557,7 +1430,7 @@ namespace UIControl var convmode = VAR.BOOL?[eVarBool.Use_Conveyor] ?? false; using (Font fCnt = new Font("consolas", fSizeCnt, FontStyle.Bold)) { - using (Font fMSg = new Font("맑은 고딕", 15, FontStyle.Bold)) + using (Font fMSg = new Font("Tahoma", 15, FontStyle.Bold)) { if (convmode) this.arVar_Port[0].DisplayConv(g, fCnt, fMSg, arMagnet0, arFGVision0RDY, arFGVision0END, arPortLItemOn, arMotILockVS0, arCountV0, CVLeftBusy, CVLeftReady); @@ -1574,65 +1447,8 @@ namespace UIControl } } - void Draw_Vision(Graphics g) - { - - //var NewX0 = arVar_Port[0].Rect.Right; - - //var NewXDist = arVar_Port[1].Rect.Left - arVar_Port[0].Rect.Right; - //var NewYDist = arVar_Port[0].Rect.Height; - - //var NewY = arVar_Port[0].Rect.Top; - //var portw_Px = arVar_Port[0].Rect.Width; - - ////둘사이의 공간으로 처리한다 - //var VisionRectSizePx = (int)Math.Min(NewXDist - 10, NewYDist - 10); - //rect_vision = new RectangleF( - // (float)(NewX0 + (NewXDist - VisionRectSizePx) / 2.0f), - // (float)(NewY + (NewYDist - VisionRectSizePx) / 2.0f), - // (float)VisionRectSizePx, - // (float)VisionRectSizePx); - - //g.DrawEllipse(Pens.Gray, rect_vision); - - ////가운에 영역(10% 작은)에. 감지된 릴 모양을 그려준다 - //var padval = rect_vision.Width * 0.05f; - //var rellrect = new RectangleF( - // rect_vision.Left + padval, - // rect_vision.Top + padval, - // rect_vision.Width - padval * 2, - // rect_vision.Height - padval * 2); - - //if (arVisionProcessC) - //{ - // using (LinearGradientBrush br = new LinearGradientBrush(rellrect, Color.Lime, Color.Green, LinearGradientMode.BackwardDiagonal)) - // g.FillEllipse(br, rellrect); - // g.DrawEllipse(Pens.Lime, rellrect); - //} - //else - //{ - // using (LinearGradientBrush br = new LinearGradientBrush(rellrect, Color.Yellow, Color.Gold, LinearGradientMode.BackwardDiagonal)) - // g.FillEllipse(br, rellrect); - // g.DrawEllipse(Pens.Lime, rellrect); - //} - - ////감지상태를 글자료 표시해준다. - ////비젼데이터가 있다면 그것을 사용해준다 - //var msg = string.IsNullOrEmpty(arVision_RID) ? "REEL ON" : arVision_RID; - //using (var sb = new SolidBrush(Color.FromArgb(120, Color.Black))) - // g.DrawString(msg, this.Font, sb, rellrect, - // new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); - - } - RectangleF rect_vision = RectangleF.Empty; - - public string arVision_RID { get; set; } - public string arVision_SID { get; set; } - - - public Boolean arVisionProcessL { get; set; } - public Boolean arVisionProcessC { get; set; } - public Boolean arVisionProcessR { get; set; } + + private void Tm_Tick(object sender, EventArgs e) { @@ -1647,9 +1463,6 @@ namespace UIControl else this.arVar_Port[i].arrowIndex = 1; } this.Invalidate(); - - // var ts = DateTime.Now - updatetime; - //if (ts.TotalMilliseconds >= tm.Interval) this.Invalidate(); } }