Initial commit

This commit is contained in:
ChiKyun Kim
2025-07-17 16:11:46 +09:00
parent 4865711adc
commit 4a1b1924ba
743 changed files with 230954 additions and 0 deletions

10
Handler/.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
*.suo
*.user
*.pdb
bin
obj
desktop.ini
.vs
packages
/*.sln
/Sub/Sub.zip

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace UIControl
{
public class CIcon
{
public string Text { get; set; }
public string Tag { get; set; }
public RectangleF Rect { get; set; }
public Boolean Focus { get; set; }
public Boolean Select { get; set; }
public CIcon() : this(string.Empty, RectangleF.Empty) { }
public CIcon(string tag,RectangleF rect)
{
Text = string.Empty;
Tag = tag;
Rect = rect;
}
public float X { get { return Rect.X; } }
public float Y { get { return Rect.Y; } }
public float W { get { return Rect.Width; } }
public float H { get { return Rect.Height; } }
}
}

View File

@@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace UIControl
{
[Serializable]
public class CItem
{
public Boolean Delete { get; set; }
/// <summary>
/// 어떠한 포트에서 픽업 되었는지
/// </summary>
public int iPort { get; set; }
/// <summary>
/// 출력 포트
/// </summary>
public int oPort { get; set; }
/// <summary>
/// 배출여부
/// </summary>
public int ErrorOut { get; set; }
/// <summary>
/// 크기는 어떠한지(7 or 13)
/// </summary>
public string Size { get; set; }
/// <summary>
/// 존번호 0~10
/// </summary>
public int index { get; set; }
/// <summary>
/// 피커에의해서 드랍된 시간
/// </summary>
public DateTime DropTime { get; set; }
/// <summary>
/// 차수별 일련번호
/// </summary>
public UInt16 Seq { get; set; }
public DateTime BarcodeStart { get; set; }
public DateTime BarcodeEnd { get; set; }
public DateTime PlcStartTime { get; set; }
public DateTime PlcEndTime { get; set; }
public DateTime ZoneIntime { get; set; }
/// <summary>
/// 컨베이어에 들어온 시간
/// 피커에서 드랍되면 dropTime 과 동일하며, 외부에서 들어오면 센서가 최초 감지한 시간이 된다
/// </summary>
public DateTime InTime { get; set; }
public DateTime OutTime { get; set; }
public Rectangle Rect { get; set; }
/// <summary>
/// jobhistory에 연결되는 데이터 키
/// </summary>
public string JGUID { get; set; }
/// <summary>
/// 바코드 데이터와 연결되는 키값
/// </summary>
public string Tag { get; set; }
public string RID { get; set; }
public string SID { get; set; }
public string BarcodeRaw { get; set; }
public string BarcodeMsg { get; set; }
public Boolean Processing { get; set; }
public string GUID { get; private set; }
public int Qty { get; set; }
public List<string> UnloaderMsg { get; set; }
/// <summary>
/// 바코드의 완료여부, timeout 혻은 설정 되었을때 적용
/// </summary>
public Boolean BarcodeDone { get; set; }
public Boolean hasBarcode
{
get
{
return !string.IsNullOrEmpty(RID);
}
}
public void AddMessage(string msg)
{
if (this.UnloaderMsg.Contains(msg) == false)
UnloaderMsg.Add(msg);
}
public CItem()
{
Qty = 0;
UnloaderMsg = new List<string>();
ErrorOut = 0;
this.GUID = Guid.NewGuid().ToString();
Tag = string.Empty;
JGUID = string.Empty;
Seq = 0;
SID = string.Empty;
BarcodeRaw = string.Empty;
BarcodeMsg = string.Empty;
RID = string.Empty;
Rect = Rectangle.Empty;
Delete = false;
Processing = false;
DropTime = DateTime.Parse("1982-11-23");
BarcodeStart = DateTime.Parse("1982-11-23");
BarcodeEnd = DateTime.Parse("1982-11-23");
PlcStartTime = DateTime.Parse("1982-11-23");
PlcEndTime = DateTime.Parse("1982-11-23");
InTime = DateTime.Parse("1982-11-23");
OutTime = DateTime.Parse("1982-11-23");
ZoneIntime = DateTime.Parse("1982-11-23");
index = -1;
oPort = -1;
iPort = -1;
Size = string.Empty;
}
public CItem Clone()
{
var item = new CItem();
item.Qty = Qty;
item.Seq = Seq;//0;
item.SID =SID;// string.Empty;
item.BarcodeRaw = BarcodeRaw;//string.Empty;
item.BarcodeMsg = BarcodeMsg;//string.Empty;
item.RID = RID;//string.Empty;
item.Rect = Rect;//Rectangle.Empty;
item.Delete = Delete;//DropTime;//;
item.DropTime =DropTime;// DateTime.Parse("1982-11-23");
item.BarcodeStart =BarcodeStart;// DateTime.Parse("1982-11-23");
item.BarcodeEnd = BarcodeEnd;//DropTime;//.Parse("1982-11-23");
item.PlcStartTime = PlcStartTime;//DateTime.Parse("1982-11-23");
item.PlcEndTime =PlcEndTime;// DateTime.Parse("1982-11-23");
item.InTime = InTime;//DropTime;//.Parse("1982-11-23");
item.OutTime = OutTime;//DateTime.Parse("1982-11-23");
item.ZoneIntime = ZoneIntime;//DateTime.Parse("1982-11-23");
item.index = index;
item.oPort = oPort;
item.iPort = iPort;
item.Size = Size;
return item;
}
}
}

View File

@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace UIControl
{
[Serializable]
public class CMenuButton
{
public eButtonType Shape { get; set; }
public string Text { get; set; }
public string Tag { get; set; }
public Rectangle Rect { get; set; }
public Color BackColor { get; set; }
public Color ForeColor { get; set; }
public Color OverColor { get; set; }
public Color BorderColor { get; set; }
public byte BorderSize { get; set; }
public Font Font { get; set; }
public CMenuButton() : this(string.Empty, string.Empty) { }
public CMenuButton(string text, string tag)
{
Font = null;
BorderColor = Color.Black;
BorderSize = 5;
Shape = eButtonType.Rectangle;
this.Text = text;
this.Tag = tag;
BackColor = Color.White;
OverColor = Color.Gold;
ForeColor = Color.Black;
text = "Button";
}
public string menutag { get; set; }
}
[Serializable]
public class CMenu
{
public string Title { get; set; }
public string Text { get; set; }
public string Tag { get; set; }
public RectangleF Rect { get; set; }
public Boolean Focus { get; set; }
public Boolean Select { get; set; }
public eMsgIcon Icon { get; set; }
public CMenuButton[] buttons { get; set; }
public Font Font { get; set; }
public Color BackColor { get; set; }
public Color ForeColor { get; set; }
public Color BorderColor { get; set; }
/// <summary>
/// 반드시 사용자의 허가를 받아야 넘어갈 수 있는 메뉴
/// </summary>
public Boolean RequireInput { get; set; }
public CMenu() : this("Contents", "Title", "tag", eMsgIcon.Info, null) { }
public CMenu(string text_, string title_, string tag_, eMsgIcon icon_, params CMenuButton[] buttons_)
{
this.Tag = tag_;
this.Title = title_;
this.Text = text_;
this.Icon = icon_;
this.buttons = buttons_;
this.Font = new Font("맑은 고딕", 15, FontStyle.Bold);
BackColor = Color.White;
ForeColor = Color.Black;
BorderColor = Color.Orange;
RequireInput = false;
}
public float X { get { return Rect.X; } }
public float Y { get { return Rect.Y; } }
public float W { get { return Rect.Width; } }
public float H { get { return Rect.Height; } }
}
}

View File

@@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace UIControl
{
public class CPicker
{
/// <summary>
/// 언로드포트 위치(L/R)
/// </summary>
public string PortPos { get; set; }
/// <summary>
/// 프린트 위치(H/L)
/// </summary>
public string PrintPos { get; set; }
/// <summary>
/// 릴이 있는 경우 해당 릴이 어느 포트에서 왔는지의 번호
/// </summary>
public short PortIndex { get; set; }
/// <summary>
/// 현재 작업이 프론트 포트의 작업인가? (portindex 값을 가지고 판단함)
/// </summary>
public Boolean isFrontJob
{
get
{
if (PortIndex <= 1) return true;
else return false;
}
}
public Boolean Overload { get; set; }
/// <summary>
/// VAC센서의 값을 가지고 있음, 현재 릴이 감지되었는가?
/// </summary>
public Boolean isReelDetect
{
get
{
return VacOutput.Where(t => t == true).Count() > 0;
}
}
/// <summary>
/// PICK후 60mm위치에서 미리 확인한 감지 상태값
/// 이값을 가지고 도중에 떨궜을 상황을 감지한다
/// </summary>
public Boolean PreCheckItemOn { get; set; }
public Boolean HasRealItemOn { get; set; }
public Boolean ItemOn { get; set; }
//public Boolean[] VacDetect { get; set; }
public Boolean[] VacOutput { get; set; }
public CPicker()
{
this.Overload = false;
PortPos = "7";
PortIndex = -1;
HasRealItemOn = false;
PreCheckItemOn = false;
}
public void Clear()
{
this.Overload = false;
ItemOn = false;
PortPos = "--";
PortIndex = -1;
//if(VacDetect != null && VacDetect.Length > 0)
//{
// for (int i = 0; i < VacDetect.Length; i++)
// VacDetect[i] = false;
//}
if (VacOutput != null && VacOutput.Length > 0)
{
for (int i = 0; i < VacOutput.Length; i++)
VacOutput[i] = false;
}
}
}
}

View File

@@ -0,0 +1,482 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace UIControl
{
public class CPort
{
public Boolean SaftyErr { get; set; }
//public Boolean Safty2Err { get; set; }
// public Boolean SaftyErr { get { return Safty1Err || Safty2Err; } }
public Boolean MotorRun { get; set; }
public Boolean MotorDir { get; set; }
public int arrowIndex { get; set; }
public Boolean LimitUpper { get; set; }
public Boolean LimitLower { get; set; }
public Boolean OverLoad
{
get
{
return LimitLower && DetectUp;
}
}
public byte AlignOK { get; set; }
public void AlignReset() { AlignOK = 0; errorCount = 0; }
public Boolean Ready { get; set; }
public Boolean DetectUp { get; set; } //상단에 있는 자재 감지 센서
/// <summary>
/// 7인치 13인치의 크기 정보를 표시한다
/// </summary>
public string title { get; set; }
public int reelNo { get; set; }
/// <summary>
/// 차수별 릴 작업 수량이 표시됨
/// </summary>
public int reelCount { get; set; }
public int errorCount { get; set; }
public int CartSize { get; set; }
public System.Drawing.Color bgColor { get; set; }
private Boolean _enable = false;
public Color fgColor { get; set; }
public Color fgColorCount { get; set; }
public Rectangle rect_title { get; set; }
public RectangleF Rect { get; set; }
public Rectangle rect_count { get; set; }
public int AnimationStepPort { get; set; }
/// <summary>
/// 0:notcart , 1:ready, 2:full
/// </summary>
public ushort State { get; set; }
public Boolean Enable
{
get { return _enable; }
set
{
_enable = value;
this.bgColor = value ? Color.Lime : Color.FromArgb(43, 43, 43);
this.fgColor = value ? Color.White : Color.DimGray;
}
}
public CPort()
{
CartSize = 0;
Ready = false;
Enable = false;
rect_title = Rectangle.Empty;
rect_count = Rectangle.Empty;
Rect = RectangleF.Empty;
reelNo = -1;
arrowIndex = 2;
reelCount = 0;
fgColor = Color.Black;
Clear();
AlignOK = 0;
AnimationStepPort = 9;
//Items.Clear();
}
//public void ClearItem()
//{
// Items.Clear();
//}
public void Clear()
{
CartSize = 0;
Enable = true;
SaftyErr = false;
MotorRun = false;
MotorDir = false;
LimitUpper = false;
LimitLower = false;
reelNo = 0;
reelCount = 0;
DetectUp = false;
}
public void Display(Graphics g, Font fCnt, Font fMsg, Boolean Magneton, Boolean VisionRdy, Boolean VisionEnd, Boolean ItemOn, Boolean VisionLock, int VisionCnt)
{
if (Enable == false)
{
g.DrawLine(Pens.DimGray, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);
g.DrawLine(Pens.DimGray, Rect.Right, Rect.Top, Rect.Left, Rect.Bottom);
}
//모터사용시 화살표
eDirection DirL = MotorDir == false ? eDirection.TopToBottom : eDirection.BottomToTop;
if (MotorRun) UIControl.Common.Draw_Arrow(g, Rect, DirL, arrowIndex, AnimationStepPort, Color.Gold, fMsg);
//글자표시 (크기 및 작업 수량)
var sf = new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center,
};
//리밋영역표시(상/하)
var limitSizeH = (int)(Rect.Height * 0.2);
if (OverLoad == true)//과적
{
g.FillRectangle(Brushes.Red, Rect);
g.DrawString("OVER\nLOAD", fMsg, new SolidBrush(fgColor), Rect, sf);
}
else
{
if (errorCount > 5)
{
g.FillRectangle(new SolidBrush(Color.FromArgb(250, Color.Gold)), Rect);
}
else
{
g.FillRectangle(new SolidBrush(Color.FromArgb(150, Color.Black)), Rect);
}
if (errorCount > 0)
{
if (errorCount > 05)
{
g.DrawString(reelCount.ToString() + "\n(ERROR)", fCnt, new SolidBrush(Color.Red), Rect, sf);
}
else g.DrawString(reelCount.ToString() + "\nE:" + errorCount.ToString(), fCnt, new SolidBrush(Color.Red), Rect, sf);
}
else
{
g.DrawString(reelCount.ToString(), fCnt, new SolidBrush(fgColor), Rect, sf);
}
}
//마그넷상태표시
var magheight = 30;
var magrect = new RectangleF(this.Rect.Left, this.Rect.Bottom - magheight, this.Rect.Width, magheight);
if (Magneton)
{
g.DrawString("LOCK(" + CartSize.ToString() + ")", new Font("Consolas", 10, FontStyle.Bold), Brushes.Gold, magrect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
}
else
{
g.FillRectangle(Brushes.DimGray, magrect);
g.DrawString("UNLOCK(" + CartSize.ToString() + ")", new Font("Consolas", 10, FontStyle.Bold), Brushes.Black, magrect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
}
//아이템을 가지고 있다면 처리해준다.
if (ItemOn)
{
magrect = new RectangleF(this.Rect.Left, this.Rect.Top, this.Rect.Width, magheight);
g.FillRectangle(Brushes.Gold, magrect);
g.DrawString("ITEM-ON", new Font("Consolas", 12, FontStyle.Bold), Brushes.Black, magrect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
}
//데두리표시 ( 비활성 회색, 활성 감지 : 라임, 미감지 흰색)
Color borderL = Enable ? (LimitUpper ? Color.Red : (LimitLower ? Color.Blue : (DetectUp ? Color.Lime : Color.White))) : Color.DimGray;
if (OverLoad) borderL = Color.White;
int bordersize = 7;//ortL.enable ? 7 : 1;
//비젼영역추가 201228
using (Font f = new Font("Consolas", 8, FontStyle.Bold))
{
var vrect = new RectangleF(Rect.Right, Rect.Top, 20, Rect.Height);
Color fcolor2 = Color.Gray;
var drawstr = "VISON RDY";
if (VisionEnd) { drawstr = "VISION END"; fcolor2 = Color.Lime; }
else if (VisionRdy) { drawstr = "VISION RUN"; fcolor2 = Color.Gold; };
drawstr += "(" + VisionCnt.ToString() + ")";
if (VisionLock) g.DrawRect(vrect, Color.Blue, 7);
else g.DrawRect(vrect, fcolor2, 7);
g.DrawString(drawstr, f, new SolidBrush(fcolor2), vrect, new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center,
FormatFlags = StringFormatFlags.DirectionVertical
});
vrect = new RectangleF(Rect.Left - 20, Rect.Top, 20, Rect.Height);
fcolor2 = Color.Gray;
drawstr = "PORT RDY(" + this.AlignOK.ToString() + ")";
if (Ready) fcolor2 = Color.Lime;
g.DrawRect(vrect, fcolor2, 7);
g.DrawString(drawstr, f, new SolidBrush(fcolor2), vrect, new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center,
FormatFlags = StringFormatFlags.DirectionVertical
});
}
if (OverLoad == false)
{
var fontsize = 9;
using (Font fnt = new Font("Consolas", fontsize, FontStyle.Bold))
{
//상단 리밋은 상단에
if (LimitUpper)
{
var msgLU = "+ LIMIT";
var fsize = g.MeasureString(msgLU, fnt);
var msgW = fsize.Width * 1.5f;
var msgH = fsize.Height * 1.5f;
if (msgW > this.Rect.Width * 0.70f) msgW = this.Rect.Width * 0.7f;
var RectMsgL = new RectangleF(
Rect.Left + (Rect.Width - msgW) / 2.0f,
Rect.Top - msgH - bordersize / 2.0f + 1,
msgW, msgH);
g.FillRectangle(new SolidBrush(Color.FromArgb(250, Color.Red)), RectMsgL);
// g.DrawRectangle(Pens.Black, RectMsgL);
g.DrawString(msgLU, fnt, Color.White, RectMsgL);
}
//아이템 감지신호는 상단 아래쪽으로
if (Ready)
{
//var msgLU = "READY";
//var fsize = g.MeasureString(msgLU, fnt);
//var msgW = fsize.Width * 1.5f;
//var msgH = fsize.Height * 1.5f;
//if (msgW > this.Rect.Width * 0.70f) msgW = this.Rect.Width * 0.7f;
//var RectMsgL = new RectangleF(
//Rect.Left + (Rect.Width - msgW) / 2.0f,
//Rect.Top + bordersize / 2.0f - 1,
//msgW, msgH);
//g.FillRectangle(new SolidBrush(Color.FromArgb(250, Color.Lime)), RectMsgL);
//// g.DrawRectangle(Pens.Black, RectMsgL);
//g.DrawString(msgLU, fnt, Color.Black, RectMsgL);
}
//하단 리밋은 하단에표시
if (LimitLower)
{
var msgLU = "- LIMIT";
var fsize = g.MeasureString(msgLU, fnt);
var msgW = fsize.Width * 1.5f;
var msgH = fsize.Height * 1.5f;
if (msgW > this.Rect.Width * 0.70f) msgW = this.Rect.Width * 0.7f;
var RectMsgL = new RectangleF(
Rect.Left + (Rect.Width - msgW) / 2.0f,
Rect.Top - msgH - bordersize / 2.0f + 1,
msgW, msgH);
g.FillRectangle(new SolidBrush(Color.FromArgb(250, Color.Blue)), RectMsgL);
//g.DrawString(msgLU, fnt, Brushes.White, RectMsgL, sf);
g.DrawString(msgLU, fnt, Color.White, RectMsgL);
}
//아이템 감지
if (DetectUp)
{
var msgLU = "DETECT";
var fsize = g.MeasureString(msgLU, fnt);
var msgW = fsize.Width * 1.5f;
var msgH = fsize.Height * 1.5f;
if (msgW > this.Rect.Width * 0.70f) msgW = this.Rect.Width * 0.7f;
var RectMsgL = new RectangleF(
Rect.Left + (Rect.Width - msgW) / 2.0f,
Rect.Bottom + 1,
msgW, msgH);
g.FillRectangle(new SolidBrush(Color.FromArgb(250, Color.Lime)), RectMsgL);
//g.DrawRectangle(Pens.Black, RectMsgL);
g.DrawString(msgLU, fnt, Color.Black, RectMsgL);
}
//안전 오류는 중앙에
if (SaftyErr)
{
var msgS = "SAFTY ERROR";
var fsize = g.MeasureString(msgS, fMsg);
var msgW = fsize.Width * 1.5f;
var msgH = fsize.Height * 1.5f;
if (msgW > this.Rect.Width * 0.80f) msgW = this.Rect.Width * 0.8f;
var RectMsgL = new RectangleF(
Rect.Left + (Rect.Width - msgW) / 2.0f,
Rect.Top + (Rect.Height - msgH) / 2.0f,
msgW, msgH);
g.FillRectangle(new SolidBrush(Color.FromArgb(240, Color.Khaki)), RectMsgL);
g.DrawRectangle(Pens.Black, RectMsgL);
g.DrawString(msgS, fMsg, Color.Maroon, RectMsgL);
}
}
}
//테두리가 리밋영역을 감추도록 그린다
g.DrawRectangle(new Pen(borderL, bordersize), Rect.Left, Rect.Top, Rect.Width, Rect.Height);
sf.Dispose();
}
public void DisplayConv(Graphics g, Font fCnt, Font fMsg, Boolean Magneton, Boolean VisionRdy, Boolean VisionEnd, Boolean ItemOn, Boolean VisionLock, int VisionCnt, bool cvbusy, bool cvreadyoff)
{
if (Enable == false)
{
g.DrawLine(Pens.DimGray, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);
g.DrawLine(Pens.DimGray, Rect.Right, Rect.Top, Rect.Left, Rect.Bottom);
}
//모터사용시 화살표
eDirection DirL = MotorDir == false ? eDirection.TopToBottom : eDirection.BottomToTop;
if (MotorRun) UIControl.Common.Draw_Arrow(g, Rect, DirL, arrowIndex, AnimationStepPort, Color.Gold, fMsg);
//글자표시 (크기 및 작업 수량)
var sf = new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center,
};
//리밋영역표시(상/하)
var limitSizeH = (int)(Rect.Height * 0.2);
if (errorCount > 5)
{
g.FillRectangle(new SolidBrush(Color.FromArgb(250, Color.Gold)), Rect);
}
else
{
if (cvbusy)
g.FillRectangle(new SolidBrush(Color.FromArgb(150, Color.Tomato)), Rect);
if (cvreadyoff)
g.FillRectangle(new SolidBrush(Color.FromArgb(150, Color.Red)), Rect);
else
g.FillRectangle(new SolidBrush(Color.FromArgb(150, Color.Black)), Rect);
}
if (reelCount != 0)
{
//버튼형태처럼 보이게한다.
g.FillRectangle(new SolidBrush(Color.FromArgb(100, Color.Gold)), Rect);
g.DrawRectangle(new Pen(Color.WhiteSmoke, 5), Rect.Left, Rect.Top, Rect.Width, Rect.Height);
}
if (errorCount > 0)
{
if (errorCount > 05)
{
g.DrawString(reelCount.ToString() + "\n(ERROR)", fCnt, new SolidBrush(Color.Red), Rect, sf);
}
else g.DrawString(reelCount.ToString() + "\nE:" + errorCount.ToString(), fCnt, new SolidBrush(Color.Red), Rect, sf);
}
else if (reelCount > 0)
{
g.DrawString(reelCount.ToString(), fCnt, new SolidBrush(fgColor), Rect, sf);
}
//마그넷상태표시
var magheight = 30;
var magrect = new RectangleF(this.Rect.Left, this.Rect.Bottom - magheight, this.Rect.Width, magheight);
//if (Magneton)
//{
// g.DrawString("LOCK(" + CartSize.ToString() + ")", new Font("Consolas", 10, FontStyle.Bold), Brushes.Gold, magrect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
//}
//else
//{
// g.FillRectangle(Brushes.DimGray, magrect);
// g.DrawString("UNLOCK(" + CartSize.ToString() + ")", new Font("Consolas", 10, FontStyle.Bold), Brushes.Black, magrect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
//}
//아이템을 가지고 있다면 처리해준다.
if (ItemOn)
{
magrect = new RectangleF(this.Rect.Left, this.Rect.Top, this.Rect.Width, magheight);
g.FillRectangle(Brushes.Gold, magrect);
g.DrawString("ITEM-ON", new Font("Consolas", 12, FontStyle.Bold), Brushes.Black, magrect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
}
//데두리표시 ( 비활성 회색, 활성 감지 : 라임, 미감지 흰색)
Color borderL = Enable ? Color.White : Color.DimGray;
//if (OverLoad) borderL = Color.White;
int bordersize = 7;//ortL.enable ? 7 : 1;
//비젼영역추가 201228
using (Font f = new Font("Consolas", 8, FontStyle.Bold))
{
var vrect = new RectangleF(Rect.Right, Rect.Top, 20, Rect.Height);
Color fcolor2 = Color.Gray;
var drawstr = "VISON RDY";
if (VisionEnd) { drawstr = "VISION END"; fcolor2 = Color.Lime; }
else if (VisionRdy) { drawstr = "VISION RUN"; fcolor2 = Color.Gold; };
drawstr += "(" + VisionCnt.ToString() + ")";
if (VisionLock) g.DrawRect(vrect, Color.Blue, 7);
else g.DrawRect(vrect, fcolor2, 7);
g.DrawString(drawstr, f, new SolidBrush(fcolor2), vrect, new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center,
FormatFlags = StringFormatFlags.DirectionVertical
});
vrect = new RectangleF(Rect.Left - 20, Rect.Top, 20, Rect.Height);
fcolor2 = Color.Gray;
drawstr = "EXT RDY";
if (cvreadyoff) fcolor2 = Color.Red;
else if (Ready) fcolor2 = Color.Lime;
g.DrawRect(vrect, fcolor2, 7);
g.DrawString(drawstr, f, new SolidBrush(fcolor2), vrect, new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center,
FormatFlags = StringFormatFlags.DirectionVertical
});
}
//테두리가 리밋영역을 감추도록 그린다
if (reelCount == 0)
{
g.DrawRectangle(new Pen(borderL, bordersize), Rect.Left, Rect.Top, Rect.Width, Rect.Height);
}
sf.Dispose();
}
}
}

View File

@@ -0,0 +1,126 @@
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);
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UIControl
{
public enum eMsgIcon
{
None,
Info,
Alert,
Error,
Help
}
public enum eButtonType
{
Rectangle = 0,
Circle,
}
public enum eDirection
{
LeftToRight,
RightToLeft,
BottomToTop,
TopToBottom
}
public partial class HMI
{
enum eAxis : byte
{
Y_P = 0,
Z_F,
Z_R,
X_F,
X_R,
}
public enum eScean : byte
{
Nomal = 0,
MotHome,
xmove,
}
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UIControl
{
public partial class HMI
{
public class MessageArgs : EventArgs
{
public string Message { get; set; }
public Boolean isError { get; set; }
public MessageArgs(string m, Boolean err)
{
this.Message = m;
this.isError = err;
}
}
public event EventHandler<MessageArgs> Message;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Windows.Forms;
namespace UIControl
{
public partial class HMI
{
void Draw_PickerPrinter(Graphics g, RectangleF rect,
int motAxisY, int motAxisZ, bool reverse,
Boolean LockY, Boolean LockZ, Boolean ItemOn, Boolean ItemPickOK,
Boolean CylFW, Boolean CylBW)
{
//실제 로봇의 길이를 입력한다 (단위:mm)
var RealLenY = 400;
var RealLenZ = 250;
g.FillRectangle(Brushes.DimGray, rect);
if (LockY) g.DrawRect(rect, Color.Blue, 5);
else g.DrawRect(rect, Color.White);
var PXName = motAxisY == 2 ? arMotPosNameLM : arMotPosNameRM;
g.DrawString(PXName, this.arFont_MotPosName, Brushes.Black, rect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center, FormatFlags = StringFormatFlags.DirectionVertical });
var RPosY = this.arMotorPosition[motAxisY];
var RPosZ = this.arMotorPosition[motAxisZ];
//RPosY = 0;
//RPosZ = 300;
//모터의 실제 위치에 뭉치를 그린다.
var PosY = (float)(rect.Top + (rect.Height - (rect.Height * RPosY / RealLenY)));
//Y뭉치를 그린다
var rectYP = new RectangleF(rect.X - 1, PosY - (rect.Width / 2.0f), rect.Width + 2, rect.Width);
g.FillRectangle(Brushes.Yellow, rectYP);
g.DrawRect(rectYP, Color.Black, 2);
//g.DrawLine(Pens.Red, rect.X - 30, PosY, rect.Right + 130, PosY);
//Z축을 그린다.
RectangleF rectZ = RectangleF.Empty;
var zwidth = 60;
if (reverse) rectZ = new RectangleF(rect.X - zwidth, PosY - 10, zwidth, 20);
else rectZ = new RectangleF(rect.Right, PosY - 10, zwidth, 20);
float PosZ = 0f;
if (reverse) PosZ = (float)(rectZ.Left + rectZ.Width - (rectZ.Width * RPosZ / RealLenZ));
else PosZ = (float)(rectZ.Left + rectZ.Width * RPosZ / RealLenZ);
g.FillRectangle(Brushes.DimGray, rectZ);
if (LockZ) g.DrawRect(rectZ, Color.Blue, 5);
else g.DrawRect(rectZ, Color.White);
//z축 포지션 이름
var ZposName = motAxisZ == 3 ? arMotPosNameLZ : arMotPosNameRZ;
g.DrawString(ZposName, this.arFont_MotPosName, Brushes.Black, rectZ, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
//var CylStr = string.Format("FW:{0},BW:{1}", CylFW, CylBW);
//if (CylFW == true && CylFW != CylBW) CylStr = "FW";
//else if (CylBW == true && CylFW != CylBW) CylStr = "BW";
//g.DrawString(CylStr, this.arFont_MotPosName, Brushes.Red, rectZ.Left, rectZ.Top - 20);
//Z뭉치를 그린다
var rectZP = new RectangleF(PosZ - (rectZ.Height / 2.0f), rectZ.Y - 1, rectZ.Height, rectZ.Height + 2);
if (ItemOn)
{
g.FillRectangle(Brushes.Lime, rectZP);
g.DrawRect(rectZP, Color.Black, 2);
}
else
{
g.FillRectangle(Brushes.SkyBlue, rectZP);
g.DrawRect(rectZP, Color.Black, 2);
}
using (Font f = new Font("Consolas", 10, FontStyle.Bold))
g.DrawString((ItemPickOK ? "O" : "X"), f, Brushes.Black, rectZP, new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center
});
//g.DrawLine(Pens.Blue, PosZ, rectZ.Top - 30, PosZ, rectZ.Bottom + 100);
}
}
}

View File

@@ -0,0 +1,237 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Windows.Forms;
namespace UIControl
{
public partial class HMI
{
void Draw_PickerY(Graphics g, RectangleF rect)
{
//return;
//전체영역의 80% 영역에 Y-로봇의 축을 그린다.
//var motorMax = 400; //전체 가동 길이 400mm
var cx = rect_main.Left + rect_main.Width / 2.0f;
var cy = rect_main.Top + rect_main.Height * 0.2f;// / 2.0f - 200;
//모터길이가 설정되지않았따면 600으로 설정한다
if (this.arMotorLengthY == 0) this.arMotorLengthY = 600;
var motYPosX = rect.Left + (rect.Width * ((arMotorPosition[0] + 1) / (this.arMotorLengthY * 1.0f)));
//g.DrawString(arMotorPositionYP.ToString() + "/" + motYPosX.ToString(), this.Font, Brushes.Red, 100, 100);
//Y축 모터의 현재위치를 표시한다
g.DrawLine(new Pen(Color.SteelBlue, 10), (float)motYPosX, rect.Top, (float)motYPosX, rect.Bottom);
g.DrawLine(new Pen(Color.Black, 1), (float)motYPosX, rect.Top - 5, (float)motYPosX, rect.Bottom + 5);
//Y축 모터의 영역을 표시한다.
// g.DrawRect(rect_picker, Color.White, 3);
if(arPickerSafeZone) g.FillRectangle(Brushes.Lime, rect_picker);
else g.FillRectangle(Brushes.DimGray, rect_picker);
g.DrawString(arMotPosNamePX, arFont_MotPosName, Brushes.Gray, rect_picker, new StringFormat
{
Alignment = StringAlignment.Near,
LineAlignment = StringAlignment.Center
});
if (arMotILockPKX) g.DrawRect(rect_picker, Color.Blue, 5);
else g.DrawRect(rect_picker, Color.FromArgb(50, 50, 50), 3);
//중앙에 Safty Zone 글자 표시함
if(arPickerSafeZone)
{
g.DrawString("PICKER X - SAFETY ZONE", new Font("Consolas",12, FontStyle.Bold), Brushes.Black, rect_picker, new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center
});
}
//Z축 모터의 영역 계산
var motZLPosX = motYPosX;
// var motZRPosX = motYPosX + CvtMMtoPX_W(motZSpaceMM / 2, 0);
var motZPosY = rect.Top - CvtMMtoPX_H(50, 0); //Y축하단에서 50mm 아래에 Z축을 표시한다.
var motZHMm = 300;
var motZhPx = CvtMMtoPX_H(motZHMm, 0); //
var motZwPx = rect.Height;
rect_zlaxis = new RectangleF((float)(motZLPosX - motZwPx / 2.0), (float)motZPosY, motZwPx, (float)motZhPx);
// rect_zraxis = new RectangleF((float)(motZRPosX - motZwPx / 2.0), (float)motZPosY, motZwPx, (float)motZhPx);
//현재위치를 표시하는 영역생성
var zlSize = g.MeasureString("UNKNOWN", this.Font);
var zrSize = g.MeasureString("UNKNOWN", this.Font);
var zSizeW = Math.Max(zlSize.Width, zrSize.Width);
var zSizeH = Math.Max(zlSize.Height, zrSize.Height);
var rect_zlposname = new RectangleF(
rect_zlaxis.Left + (rect_zlaxis.Width - zSizeW) / 2.0f,
rect_zlaxis.Top - zSizeH + 5,
zSizeW,
zSizeH);
g.FillRectangle(Brushes.DimGray, rect_zlaxis);
//테두리
if (arMotILockPKZ == true) g.DrawRect(rect_zlaxis, Color.Blue, 5);
else g.DrawRect(rect_zlaxis, Color.DimGray, 3);
g.FillRectangle(Brushes.DimGray, rect_zlposname);
if (arMotILockPKZ == true) g.DrawRect(rect_zlposname, Color.Blue, 5);
else g.DrawRect(rect_zlposname, Color.DimGray, 3);
//피커Z축위치 표시
g.DrawString(arMotPosNamePZ, arFont_MotPosName, Brushes.Gray, rect_zlposname, new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center
});
//중심점 센서 확인
g.DrawLine(new Pen(Color.Black, 1), (float)motZLPosX, rect.Top - 5, (float)motZLPosX, rect.Bottom + 5);
//Z축 모터위치와 길이확인
if (this.arMotorLengthZL == 0) this.arMotorLengthZL = 600;
var motZLosY = rect_zlaxis.Top + (rect_zlaxis.Height * ((arMotorPosition[1] + 1) / (this.arMotorLengthZL * 1.0f)));
//상(Rear), 하(Front)로 영역을 그린다
var port_width = rect_picker_left.Width;// * 3f;
var port_height = rect_picker_left.Height; // rect.Height * 0.2f;
//New Front Position
var newYF = (float)(motZLPosX - port_width / 2.0);
if (newYF != rect_picker_left.X)
{
var offset = newYF - rect_picker_left.X;
this.rect_picker_left.Offset(offset, 0); //좌표가 변경되었다면 재계산
this.rect_picker_front_vac1.Offset(offset, 0);
this.rect_picker_front_vac2.Offset(offset, 0);
this.rect_picker_front_vac3.Offset(offset, 0);
this.rect_picker_front_vac4.Offset(offset, 0);
}
if (motZLosY != rect_picker_left.Y)
{
var offset = (float)(motZLosY - rect_picker_left.Y);
this.rect_picker_left.Offset(0, offset); //좌표가 변경되었다면 재계산
this.rect_picker_front_vac1.Offset(0, offset);
this.rect_picker_front_vac2.Offset(0, offset);
this.rect_picker_front_vac3.Offset(0, offset);
this.rect_picker_front_vac4.Offset(0, offset);
}
//피커 #1 Circle 색상
var Bg1 = Color.FromArgb(100, 100, 100);
var Bg2 = Color.FromArgb(160, 160, 160);
if (this.arVar_Picker[0].Overload)
{
Bg1 = Color.Tomato;
Bg2 = Color.Red;
}
else
{
if (this.arVar_Picker[0].ItemOn)
{
//if (this.arVar_Picker[0].isReelDetect)
//{
Bg1 = Color.Lime; //.FromArgb(100, 100, 100);
Bg2 = Color.Green;//.FromArgb(160, 160, 160);
//}
//else
//{
// Bg1 = Color.Magenta; //.FromArgb(100, 100, 100);
// Bg2 = Color.DarkMagenta;//.FromArgb(160, 160, 160);
//}
}
else
{
Bg1 = Color.FromArgb(100, 100, 100);
Bg2 = Color.FromArgb(160, 160, 160);
}
}
using (var br = new LinearGradientBrush(rect_picker_left, Bg1, Bg2, LinearGradientMode.Vertical))
{
g.FillEllipse(br, rect_picker_left);
}
//피커 #2 Circle 색상
if (this.arVar_Picker[1].Overload)
{
Bg1 = Color.Tomato;
Bg2 = Color.Red;
}
else
{
if (this.arVar_Picker[1].ItemOn)
{
//실제 아이템 체크
if (this.arVar_Picker[1].isReelDetect)
{
Bg1 = Color.Lime; //.FromArgb(100, 100, 100);
Bg2 = Color.Green;//.FromArgb(160, 160, 160);
}
else
{
Bg1 = Color.Magenta; //.FromArgb(100, 100, 100);
Bg2 = Color.DarkMagenta;//.FromArgb(160, 160, 160);
}
}
else
{
Bg1 = Color.FromArgb(100, 100, 100);
Bg2 = Color.FromArgb(160, 160, 160);
}
}
//피커 테두리
using (var bgPen = new Pen(Color.Black, 3))
{
var posT = arMotorPosition[6];
g.DrawEllipse(bgPen, rect_picker_left);
g.DrawString(posT.ToString("N0"), this.Font, Brushes.Black, rect_picker_left,new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
}
//피커 내부의 진공 표현
g.FillEllipse((this.arVar_Picker[0].VacOutput[0] ? brVacOn : brVacOff), rect_picker_front_vac1);
g.FillEllipse((this.arVar_Picker[0].VacOutput[1] ? brVacOn : brVacOff), rect_picker_front_vac2);
g.FillEllipse((this.arVar_Picker[0].VacOutput[2] ? brVacOn : brVacOff), rect_picker_front_vac3);
g.FillEllipse((this.arVar_Picker[0].VacOutput[3] ? brVacOn : brVacOff), rect_picker_front_vac4);
//피커설명 표시
if (arVar_Picker[0].Overload)
g.DrawString("OVL", arFont_picker, Brushes.Black, rect_picker_left, sfCenter);
else
g.DrawString(this.arVar_Picker[0].PortPos, arFont_picker, Brushes.Black, rect_picker_left, sfCenter);
//피커 진공표시 테두리 (진공출력상태에 따라서 색상을 달리 함)
g.DrawEllipse((this.arVar_Picker[0].VacOutput[0] ? penVacOn : penVacOff), rect_picker_front_vac1);
g.DrawEllipse((this.arVar_Picker[0].VacOutput[1] ? penVacOn : penVacOff), rect_picker_front_vac2);
g.DrawEllipse((this.arVar_Picker[0].VacOutput[2] ? penVacOn : penVacOff), rect_picker_front_vac3);
g.DrawEllipse((this.arVar_Picker[0].VacOutput[3] ? penVacOn : penVacOff), rect_picker_front_vac4);
}
}
}

View File

@@ -0,0 +1,37 @@
namespace UIControl
{
partial class PrintDirection
{
/// <summary>
/// 필수 디자이너 변수입니다.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 사용 중인 모든 리소스를 정리합니다.
/// </summary>
/// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 디자이너 지원에 필요한 메서드입니다.
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace UIControl
{
public partial class PrintDirection : UserControl
{
public PrintDirection()
{
InitializeComponent();
// Set Optimized Double Buffer to reduce flickering
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.SetStyle(ControlStyles.ContainerControl, false);
this.SetStyle(ControlStyles.Selectable, true);
this.Resize += Loader_Resize;
BorderColor = Color.Black;
}
[DisplayName("AR_TITLEFONT")]
public Font TitleFont { get; set; }
Boolean bRemake = true;
void Loader_Resize(object sender, EventArgs e)
{
if (this.Width < 16) this.Width = 16;
if (this.Height < 16) this.Height = 16;
bRemake = true;
}
public Color BorderColor { get; set; }
List<RectangleF> rects = new List<RectangleF>();
[DisplayName("AR_COLORS")]
public Color[] colors { get; set; }
[DisplayName("AR_TITLES")]
public string[] titles { get; set; }
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
var disprect = new Rectangle(DisplayRectangle.Left, DisplayRectangle.Top, DisplayRectangle.Width - 1, DisplayRectangle.Height - 1); ;
if (bRemake)
{
rects.Clear();
var w = (disprect.Width - 2) / 3f;
var h = (disprect.Height - 2) / 3f;
for (int i = 2; i >= 0; i--)
{
for (int j = 0; j < 3; j++)
{
var rect = new RectangleF(j * w + 2, i * h + 2, w - 2, h - 2);
rects.Add(rect);
}
}
}
for (int i = 0; i < rects.Count; i++)
{
var item = this.rects[i];
if (this.colors != null && i < this.colors.Length)
{
var color = this.colors[i];
if (color != Color.Transparent)
e.Graphics.FillRectangle(new SolidBrush(color), item);
}
//테두리 그리기
if (BorderColor != Color.Transparent)
e.Graphics.DrawRect(item, BorderColor, 1);
if (this.titles != null && i < this.titles.Length)
{
var title = this.titles[i];
if (string.IsNullOrEmpty(title) == false)
{
using (var br = new SolidBrush(this.ForeColor))
{
if (i == 4 && TitleFont != null)
e.Graphics.DrawString(title, this.TitleFont, br, rects[i], new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
else
e.Graphics.DrawString(title, this.Font, br, rects[i], new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
}
}
}
}
//전체외곽
//e.Graphics.DrawRect(disprect, Color.Black, 1);
}
public void SetColor(int idx, Color color)
{
this.colors[idx] = color;
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("CapCleaningControl")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CapCleaningControl")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("9264cd2e-7cf8-4237-a69f-dcda984e0613")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,243 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 도구를 사용하여 생성되었습니다.
// 런타임 버전:4.0.30319.42000
//
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
// 이러한 변경 내용이 손실됩니다.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UIControl.Properties {
using System;
/// <summary>
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
/// </summary>
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
// 클래스에서 자동으로 생성되었습니다.
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
// 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UIControl.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
/// 재정의합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap air {
get {
object obj = ResourceManager.GetObject("air", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap alert {
get {
object obj = ResourceManager.GetObject("alert", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap bcd {
get {
object obj = ResourceManager.GetObject("bcd", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap bg_blue {
get {
object obj = ResourceManager.GetObject("bg_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap bg_red {
get {
object obj = ResourceManager.GetObject("bg_red", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap debug {
get {
object obj = ResourceManager.GetObject("debug", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap debug40 {
get {
object obj = ResourceManager.GetObject("debug40", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap emg {
get {
object obj = ResourceManager.GetObject("emg", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap erase {
get {
object obj = ResourceManager.GetObject("erase", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap error {
get {
object obj = ResourceManager.GetObject("error", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap help {
get {
object obj = ResourceManager.GetObject("help", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap icons8_pause_button_30 {
get {
object obj = ResourceManager.GetObject("icons8_pause_button_30", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap info {
get {
object obj = ResourceManager.GetObject("info", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap mot {
get {
object obj = ResourceManager.GetObject("mot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap plc {
get {
object obj = ResourceManager.GetObject("plc", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap reel_big {
get {
object obj = ResourceManager.GetObject("reel_big", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap reel_small {
get {
object obj = ResourceManager.GetObject("reel_small", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap safty {
get {
object obj = ResourceManager.GetObject("safty", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,435 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="air" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAABXRJREFUWEft
WHlM22UYxmMeMWo8ojPxH2E6l02dqPFWsrgZ2WaWsbiLjcTEOc8tGq9t0f3hkajTMGJBEDY2GFA3xmCj
COUqpXd/pa1dyzoJjGsgx2DGxOn4fN7m/fWADtNC2WL2JE8gv/f73vf5rvd7v8ZdxqUGu91+h9VqXQQu
t1gsiS6X6xo2XVxAzFK9RdLnqN1iR0WbeL+sQ3xZeVKUNTnOwqYA7+KmMwulUnkVgud8W+UVD+cMi3sU
ZydwZWGvqGh2jpjN5sXcbeaApcx9p/RUWGHBXPDjiChudJ2TJOlJ7hp7YOZWfK3yhghZU9wrdle3itxa
t/gUS/147pDftjB7WNTpbW1er/dadhFbNJkk60MIKgsgsZjRDCxlvMPhuAUDWNJokNzJ+/v8bWhvwr6R
XcQOQogrihpc5+XAqw/0CgjazWY/jEbjbapmx8AcxaivXWLOEAksZ3NsYbRIVWklXWJ5wWmham7p1ul0
t7IpBBD0xYrC0/5ZrNbbO9kUW2i12hsRfDsJAOP58wTA9vbGkm6/wHLMKJsuDWDpC5/OG/SJS8gcFdiX
LjZdfGD2krPV7jF59l7c1097VcHm6EGbGyfyFXBTNKRlhZADWTWesfnIgbLADKQg5MJHOUx0MBgMd6u0
9sF3SzvEpoNdUZEOz3N7BvzCiGuLeygN7eMw0QMjfy81aFNPB0mc1mST6GBxmOiB5Vm182hb2ECRkA7E
S/v7haKmdQyDzp8WcQRKwnD4TWWzva9cax+NhkebnYNNRpsTS5oBX4ns+n8OjHYlcpTjcJOjZyZYq7d1
aAwSwlpzwWVYuStZykSYTKbZRSiH5mYFUsJMMAF3dNLe332Vj8Zo80DHUywpFLRPvlKdDOtkpkiFREGD
62/M5nqWFUB9ff3VWF7zB2XtYfNaLEi5cilKMTrtssh78X9+3fF/kEmSWFoAEHkdDCkYQdjbIQZ8C/xO
pXMMrC7q9Yt8MPuMwP5s9xe2ELV4XMdJifZrwAtWL5ECN9dNBqPl2Hokc1kkF7YbaO/totdXakmPWIcG
/8UNuGHoDZJZ4xF6s6WarkWOMyXguXqDWt/SNTeLC9ufhqmoqIgr0zj+kFVHykU4fRVax9CUL38GBO2g
N43sv1LnHIjDwbA/EfSwiZSJeGqq8RBCNX09x4kaWNJVVKDIvpWaX89Rcp6nN1vVuJ66wyXT8SzTOvqy
1Z6xpKBKhU4kRv8xxwkBvq9D4HJwJ/6fxZ/DAvY3X/05UKTg0T/KpsgARwlqg/3UApw2cnQ/9o3OLJnY
7AcG/+wP1R7xANptPthJg8hkU1gYTJKW9h75pL1oNEl6NkUOBNuSpgyM9ojWOcImP6hNanGgTUbNiTHM
5Fo2hwDfP/wsqIKiNwz6f8Lm8ECDRLXB9ptS4/oL/6cH35WYnc9Tgl5qlTp7H5v8wLU1P682UO7TNapQ
t46hby5sz0NUPPwuMVkspZRJ4jlhU+I+1OT8ExniTnYVHhqjZKJfA6jT1sMdNCIlnCbh75YC3NvyW/cR
XFEIUsHdQoD2379xqNPXTmYyakSarfTqE74fmigbBNvpXsYgtrKLC6NOL7nuCyoelhX0ie3lbeJ17Ce6
kuTvVNxCSAp3CwEGM0tntvyyeZzIcIwHt8E/+uRw98mBhmm7qry+juEcEmmZkQVqqMjlbhNAIsF0Ov0v
5IfOFpH8v4zHf2G9kwqFbZP5mgDavLnYR8/wu1bmPLzUPjrSLgxmqRHBb+bmkwL7biH85VXqHGeyaty+
F15OrUeodC39NACIm8NNIwMcPwYHymNae/+eOrcobDh+HoWmHQ5fo98HuVlEgM/ZEEuH5Hb+ND2gh8+M
/Xx2GVNGXNy/B7Gt3iRjVn4AAAAASUVORK5CYII=
</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="alert" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-automatic-gearbox-warning-80.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bcd" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAAsxJREFUWEft
ll1IU1EcwBdGBUFvPfRUD0VBjaAeerCHCMyHHkrXsZwhohOE2q6F835s0jUlg6h7J2rp7hJsICzQHiJI
LGePfdFLDyVEEEG9SEEguez0P/Nfzu3cfRjn+rIf/OAw/uec38O2e11lypQpEcWMBRXTWgSpQ75X++9u
x+sLo5rWC84hYo3EavD6wihmdIJ7iFgJXl8Y1Yz1cQ4QbfGBcsTycg4QbfGBmjG8g3OAaIsPZMAv+Tnn
EGHKkegpvLo45EjMzztIgClwRu+Pb8Ori6PjxthW2Pgl46D/tvPmCJWuD9C27lu0OdxHz3depWcv6efw
ytJRjFgD76JCdvXfXhoY6aWDd0K0vaeXNso9tK49TM8EtBw9kjaE160N+AO9ApcuZUegC7IZfaUY1his
ZdmwTirG6C76aPfmxeSB8VTSTb9NHaKh7jZuHNMT0N7hVWtHNaxKNWINQcQ92bTCqhGtDUZG95BEogJH
cqAJUpGadU+zyPmpw7Q52MENZNZeCO3Ebc7yc8a9DwJ/s8j4YB03jkkktQW3OA/EvWGBrxPHuXHoOI47
D8RNssC5B5W8sGUl9SuMblje4TC/Zt0N8F18+SxePceNQ2v88kHcsj5AxLXsqExJIHQZR9cHiPicHbVK
SXuIo+sDRKRyolb7/Ziub8Rx54EAH/gxIyhHj6QewfH8VHlb3zLZ+oTXp1d5fbS6vnU/k63ZZytzPrpi
S/qVKb2u991n60yamvQt8OQY5sUx4f9QwdH8iApksEiImc+OWzb0GMfyIzKQATHTuXFpfxBd34Rj9ogO
JH5tkhOXlkihozhmj+hACElmh2XYhWP2OBD4IStqRUl9gmP2iAwkUngvNwwlAe0pjtojNDCgSbywv8J3
8CKO2iMyEB5pjbwwNEEIsX0J/ofIQPY4gxD24sCeKgvgJ3DC066expEyZcqUhsv1B6iAtIhPh2shAAAA
AElFTkSuQmCC
</value>
</data>
<data name="bg_blue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAAAsFJREFUeF7t
nL1uE0EUhS0QvBDvYCcVCHAQeRoXId4N1IBrRyClSiSwgR7vFoCgQHZkp4wpDUqo+Bnm7M5AFM1aa07n
OUf6uvG17ifvrKvTUBRFUZan3fl8vdnN7rXS/FkrySetJDu3mDXD7mR3K3bMtrCzW59Lq5vf2UhGJ5e+
LAZmG2l222lYPe2Dg6utNHvkB24/+WR2h3PT//DdHB3/NIPZ77UCO2E37Ihd/d72x/Ow0zFXnJb68fI2
93KTvPliBtPwF68jL6e/TPf1vNgdDpppvue01AseWy+vN/oa/JIY6I0WFySObjk9y4PL0995xS8vMDgm
dl/N/eM8rfViKd629gO4B/BTDg2NCTjYfvyxvA+7o7bTVJ1mkj3HYZgPDYyRneGpE5jtO03VsQePcXjf
vpFCw2Kk//7cPcb5xGmqjj14hsOHkx/BYTFyZF2UArMzp6k67mBwUMx4L05TdSQwjASSSCCJBJJIIIkE
kkggiQSSSCCJBJJIIIkEkkggiQSSSCCJBJJIIIkEkkggiQSSSCCJBJJIIIkEkkggiQSSSCCJBJJIIIkE
kkggiQSSSCCJBJJIIIkEkkggiQSSSCCJBJJIIIkEkkggiQSSSCCJBJJIIIkEkkggiQSSSCDJKgKL0gkU
LYQGxcjh+G/pxDenqTr2kGpPLrFa7UnZn2ceDE+Dw2JkZ1AW7zSTrO80Vcce3MJh1B2p+qmsfrrvqp+a
aX7XaaoOCrbs4Rk+gAq40NCYQJ8gXFimN3rvrjlNy4PmRnyorL9bBAfHwNO3C7OZlvV39v676fTUC5ob
vUQUkcX0OL+wu+KX909eljot9YPaSzQ3ugHFnYgWM7yR1rFXCzthN7w8/Z3n5f1XBagPmhvtkOmFgbFg
d17xsa0KLk+UD6I/zw4eW4o/22sGdhpjR7xta78wFEVRok2j8Qfk0Qty9BRILAAAAABJRU5ErkJggg==
</value>
</data>
<data name="bg_red" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAAAsFJREFUeF7t
nMFOE1EYhRuMvozLtok+gxq1UMDAri7EXaXs2WkpbO3MGiyKb6EriVsD9g68AwFcSa73n/mnMeROM8PZ
zT0n+XZ37uT/OnOnq9NgGIZh5ufh0a8H7ShZaUXJxHHaisyVw9YMN5PMlkzaY7MsM+v4WFrj6aLb/OzW
zUIgaUfTjmqonu6Rved+id18w5W9b/ZwMLRnvZ79s/bS2tUntUJmktlkRpk1n7sZTUeNbbugWsonl/f4
46n9+u69vVl96r1xHbl59cx+2fyQzp6JTHZUS7noa5tucPym771JCBxv9GcSm3HyQvXMjxye7oL0zJMn
z7dxSHzeHGZPYWxMqQ9L9rXNzjx5lH2bhoQ4WN77rk+h6aqm4rTi6aEslsPUt2GIfBqMMoGROVBNxXEL
f8vic/dF8m0WIknvdfYau/+Jqqk4buGlLL6u4V+Vu3K93lGB5lI1FUcXejcKmdyLaioOBfqhQBAKBKFA
EAoEoUAQCgShQBAKBKFAEAoEoUAQCgShQBAKBKFAEAoEoUAQCgShQBAKBKFAEAoEoUAQCgShQBAKBKFA
EAoEoUAQCgShQBAKBKFAEAoEoUAQCgShQBAKBKFAEAoEoUAQCgShQBAKBKFAEAoEoUAQCgShQBAKBKki
MCudWO94NwqRq7XFXOCFaiqOW8Tak1tUrD2RjkBjJ4Md72Yhsr+1mz+B+6qpOFI+KIul7ojVT1n1U1er
nxxLqqk4Wj6WyAVSAefbNCSkAiuVFxvTjH/eV03zI82NclFaf7cRbv3dj7d9+2icdwia56qnXKS5MZco
FXAhvc5/3azy5M3kxclQtVTItl2Q5ka1n56J0mImX6Q69mrJTDLbwdbo/zMvk3eXCtA80two7/9sw1DI
Zq722hZFDk8pH5T+PLfpiSP9s10zZKYTnXGp9AeDYRgm2DQa/wBGopc1FSaqkQAAAABJRU5ErkJggg==
</value>
</data>
<data name="debug" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-bug-80.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="debug40" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-bug-40.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="emg" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAABOJJREFUWEft
WOtvFFUUb6Ifff8HRv8AE9xZmqJsd0ZgW0BCWWp4tDxcKIK8FFsSEx/VAlXjB1NrNWpCMUSiSLR0i00w
EEHlIeq3on4UE40K2Z2ZfR/PuXvnzr0z03Vf9VNP8ktn5575nd/ce+fcc9oyb/NWwf6Khe8yDa0zHdX6
zaj2Nv79iMCv+2mMfLj7/2MQidye0sNPpPXQl2ldKyDgP5BHTKX0UDfE47dxmrkxFLYmpWu/egRUDVPX
fkkZodWcrnl2a2nrfSjsVFBQgrkyClZvHOydW8HevQ3sJ9fjPT3Ql4BcJ28uWnQvp2/MbkVaHwyaNbMr
Brk3DkPxi9MAV34EuPqTD8WpafQZBqt7ufIse97Qfr4ZXfAAD1OfkTgk+10hXhGF/OgIwKVrgaICgS+Q
f2c0aFZv1C2SL6syc3ZiA5TOnlcCFz49CdlDg2DvSoC1uRusresgs7cPskMv4+xOKEJL575Gjo2yQDaT
/0QeuoeHrd6C9pzVuxbgm8ssWOHoUbA2rlHGg2BtWA2Fj0+4Qi99z16Atkh26CXmY+qhT3jY6iwV1eLe
QA7s3QnIDOwLHKuEzMFnAC7/IESWzl+A/IcfiHH8wlfx8JWtnOekpTXCYO/YLIgagf10golzZlMWiLhe
VZ4sJ+HyQ7SEtMeIzFq3SiarHfiiucOvKF+8RyBgjlzLZcxudEKwL3XkLYUs9+ZrClmtMDseZdsjO/gi
5N8bg+LnE5B/d8zrl+Qygu1vY8Hd6FQwOxezPVOaPisEls5dgPSSVi9hs5H/s63tTi7Hb+zglx4onp4q
i5v+Cq+TYO/pk8nmBGb04RiX47e0ERoQjsvb3eV9/Uj5XsdihaxhLGtjqSsde8S9Z2gHuBy/pQxt1HGk
hOsIpPNVEDQJdt8mscetHjefmnp4hMvxGzocEwS4oYXALesFQbNgbep2+Z/aIo2Fx7kcv6FDoECaTZeg
OVAEYhXkjlUQKC+xrSxxQiJoDljS5vzVLzGW6cLxcV0Q5IaHBEGzkKWkTfy4DynvirFo+Fkux29me7hD
JqF6jkjoNJHvNwPFz04xbqp41LHQMi7Hb9TgoBP1EMyZik1nFmnPuCSNgZbU4c0NH5LHchUTNRnmoTOC
CCthJxUUxsdlooZAXEwgFg5m11JpLDzJZcxu1H3JZPmxUfG29ZRZXmSf7xd8VJnLY1TmcRmzG5U8VOU6
D9GJIqrob6+wBCuT1gKWnL+7yrjobPe0ADNVt6UpI9wlPQj2th63B8EAmef2ysR+yEcXBytYHQ78a2/v
UcbN9oUrefjqjFpDmYCOO+ftCbSPgkp+M96Jdd774jedtWrJfw0y+3epzxjaCR62eqO+VV5qgr29V22a
EJl9O9xAWKYVJ6ewnL9YbkknJhVfWlbvzCFmqMzjYWszagmR4IZMaK6IuG0n9hiU0NnYYwuhcPy4IkgA
fekZavBlLsx5v9lLtPt5uPqMRHpnkkDpITOwX/zOHNijisL0VJxMQu7Iq7jsMeVZjpmGxTlGfSu1hgFB
FNBXWkyeYQIpnQT5EGjP1b2slYxaQwxw3RtQAS519oWD2PMOBo3P1Py11mqUq6j7wmBJhDgWfcAujl/n
6ISgJDzn/37zGp2b1ENQmU5lEoqhevIYu8Z7dPD/EYncwd3nbd781tLyLxOgcrDBNHH8AAAAAElFTkSu
QmCC
</value>
</data>
<data name="erase" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAK
YQAACmEB/MxKJQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJrSURBVEhLvdZd
b9JQGAdwEr3wTm9M/AheqJlfxWSfQudMBnYaWarQ8WIyMBlUWoSp0CkzawWM6C5G0aiZzhfoMCZidIu6
bG5DL8yc0mMPO8cwOIUyWv/J/6aF55eekifYzMogHT424AqdoGl6H7pkfSgvn/bzYu36XVmlfNHNU3Tk
MLplXRwe7mn0zqw6pyyCuYUlIL+sgLPe6O+BS+xx9BHzA1GGnVLThTJ4UvxUh2ELrypg2BezBseomFeA
JCsg84iMn2FCfegrvacZxW3BtWMf9se2TMH10B14aSdO+a719uSdUFxTcaMorg7e3bHbPZH0yBVBlfIl
IqLX7OMyeNbwzvPz74HDw//UlsxeNFo/rnCSCgnZqjNwE9x6ME8E2jXThN+QCurgxXA/Gk8OROPizFr1
lwreLa2CnnFtyVzmp2unGfYIIlrTiP7YAvX+wx/uAtfeOZeaUbWjTiOiNe6Q4Elm5Y3vCGxs5es6GNHw
yfvPiQCp4mwJXAgmVDvD3UZEa9qhuBgXci+IUGNNQ3GN4KajuO1wQyjDCkPNPySjJeEQdWqow8uJiGiN
wx8/FJyQlneD4kLcObaNG0Jhzvu5PuGevEoa2E3fLq7Un9wZTKpDTCSLxuunP5XaM8pOvi5/XK6RBhot
PLHxRKZq9/ASGt05lDey380KpTeVz39IQzt1Y7OmLYfcmms8cRKNNJ46HhaUbvGeUByMFytfDOGmoDhG
cVNRnE44RKNTuW+mojh0IH6AhFuK4kCcCQsLxQ/b+H9Bcc6Nxg66rwqKtsfXAxPTK3C9olvWB/5Hosbi
R+F6RZd6jM32F+J393EUKic/AAAAAElFTkSuQmCC
</value>
</data>
<data name="error" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-hazard-warning-flasher-80.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-help-80.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_pause_button_30" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAK
YQAACmEB/MxKJQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKmSURBVEhL1ZfL
bxJRFMbrwvj4a4wLXdRUXZo4vGkxtDst0MQFGKMwMB1eKdVNI9CdaNQmxkWtIQyvqRTqprU8VpZuNLFt
FOq0tbpo7ALvCbch0gsZ4Frjl3wJmTnn/HIvl3MPff+F9NZXZxi7cFnBCka1K3lf7Uzcg88KNjZwhc+c
xmH0pOFSar17Pmfwvd0YCxertsjavmPmUw1se1zeh2cGf2Z90D2fVXMJJU7rXhoucVXPi2vm6dKe/021
9jC+29YQYw4X9/QesazhkwO4TGfSuUXXSCD3zfe6QoS0s3euUhtGuTo+5cDl5EnHi89NofzuA2GHWFiO
IdcULOwg+FNctr104ym/JVz6QSrWjS2hwne09RwuT5aajV8yBhalXlbabKhlDOQkrSt2EWOaVTuhd6dX
fTIOUaf2z1VrWj79ARgY1pDKmVTBd0JKfLn0s3aoz9LBkffw7FAQ2/webArmtxln8jrGNTToSb9rtVoa
YPh16N1iFuPqYvjoWYN/YZOUAKYBBhu8C5t/dDhoeZbpkkQKBtMCm0NFSWEX+jEWTrNgvBMpH5CCwbTA
tsjqL4aN3cBY1BpRl7K/+EgMBtMC21FvR33fhbHQk5Pj9pljAqNFYmx9q2EbSMFgWmArYihZYQhj/+Hh
unZbODXky2yQgsG0wAZvZn10dOUkxtaF2mXubzcQHZ/OYFxD0DLNocI2KYkG2PSoRcsEocu/4Jn9Skzs
xZ7ZL9AuVzDmqDQuod84kduifS0OT2SrKjZ6AWPIQrPS2K2p9y1PeKe+ObUsabi4CZdvL3R3PqM1+mh5
8QkuK09aLn13ZLKHYW9ycUvrTltxuc7EOKLnUfIyGlkrssfbYL6KBrwllSN2DpfpXjCkyx3olVySwWn0
dOx/Yeirr+83SXRvTbd4pKkAAAAASUVORK5CYII=
</value>
</data>
<data name="info" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-info-80.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mot" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAABF1JREFUWEft
Vt1PU2ccZtebu5gXy7Ys2TJ3vf9id5rtZhdeumQxQbaQQQnooAWhxZaPtpSV0p5+QG0nLT0gVaHGQqQF
lkgUK6UyQJSYbZmaqVkCi5ydp/m97Hh62h5LSxazJ3mSk/M+z+/39LwffateOySCX22lr317rxTCS2Uq
h3Ss+o+d9T6hFMJLZSqH/wPuF//pgDVnLJ/09bU/dwx2PyuF8KIGlSsvTp2xftxs9qdH40sCP5MqiZH4
baHFHMjUt9k/pbLlQTnCMZY9ZDnDMZYtZCXCMe47ZCXDMZYc8iDCMb5yyIMMx6g6JM6oZvP5ZRiUCknJ
jSWeGRyRVTU0cRcfFKuJcfQueE42mrw31YT7MXj1UZ3e2UG2oqAfnlYTEhnIlovmXv+MklFK6/Dkb/Ud
Tg1ZVANL54fe4ksHGciSi3qD2x2O31I0gl3c+P269oHjJH9lFAuJ9w0GzkXyXJxq6z/mjszuyI2R6ZSg
t4+u1bcNfE7SklEoJMdf/7tGZztK0lyc0HQeOufk78mNLZZApqbV/hnJ9g2syRZxTcr7oDcykEwZzRZ/
Um4UN4SHhssG1JT3EUMnaDg/Gjpdgcj0y7tNKeCggW8K2q9tXnDMbBQiNNCSbQ/ygOjZcI7z03B+fNfa
f9w7nnwhNcsD9mgDH0U8iY1f7jwV1JD3JDZt2qEjZM9CHtA7lnxRq+0vvgG/1na/Y3Jf3JKa5QHdXdHp
zNKTvQCrqafC8o3Hwu2FR1niGe/Y+F1R6zZGp4Uq4Q0qkRPQxI1vVTf2HabhwtBZAj9LzdKAg/rI9wvx
jb9Y8yUx0NzUQ+FSMCWEXfPbIJ7xDmGZDh54qUxOQK01sEBDxdFgdId5yTpkAbtPez8Ic7NrrOni7O/C
ZGh519cbW7ad5Y8a63xvgnbx2WeeSk+G0rvQMD28qIFa0oA4xhqNnhG8V4XaVvvJoej8rjwgZ4zGVmhq
8eUQzmO6wmVNCuCMV7xToZVdaOGBFzUwJg04HJ0Xas86TmZNavBNU897vZ7or9KAg+189dzV9edohPWF
KcSXI0teiJqVudhD0fNnNiRqoJY0YI/Y64TG+j5Z1EFnDS6yAho9FxxxzqyiAYhNgHWGaSV5Xgy0hb64
/FNKuHPj302FWqjJ6uusgUWSq0edwTXCrktave/+ys3Hew0wZSHn3LZNe+EtkudFp8Z1SNTuSDdM5tYT
oUXve8DqoxfJS4PbOHFZIeCOmoCWmuG3lQK6TdEJkuwfvU3n31WaYuxWkuSFQxf+UmmKUZMk5YHiJhGP
EhrOiyFLLKO0SWi4vJAeM5gynHM4Smg4B+6uS/5YnmOmIlA6qHHO4Uv2d4wdw5oEMa0+cyyDcPkO6opB
8a9OnEKss1FufhvEM96xLwfK/+oqCs40EcdOZM2xvrAJMO0gntmaA3FZEKf2pctCRWE7HfiQ9ybXWYBi
5D3JTVzRyH4wwCU0zF1f472J1UKERunC+pqgquofdvoa6+LDQkwAAAAASUVORK5CYII=
</value>
</data>
<data name="plc" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAAnhJREFUWEft
ls1rE1EUxd/eP0BcigvBpS5sQcVdFEVTUFuoOi1pG8ViotSkBGea1tSQzJBObEhSMOmHMYm2JqmlWgNq
IoiLdiXBD1zozmVx6cJc33u+DIozNZ1JYsU58CMhN/eew7tvYJApU1tZMIe2wRSaw6w1lDh6jj/3Mhv9
ghgaxMOgKcRQidnoFx7iVR3eGCrMRr/++YDvvAgWL6pTvorgW0y9j9H8gPJpBMEObT6Oq/cxmh/wlQvB
LKdO/gKCrxH1PoZ5B41iBjSKGdAoZkCjmAGNYgY0yv8RcOu98vd6pT0cL+0juH3uA6/Du5ffT+5800je
yrtWs+KxrrOeiR3Mtn71jYY+9fAitIpeQfrACVI3s/+zAsl7n8dvp6EV8JEZ6B+TqzSsII6xCBur8Oxl
BQPzKyVw+SQYuMaDP5YA8tvPTM5mwe4SwDnih9TSk19qm+lN5pbBKcbIaVbP82I7i6EtPIAG7By4DPst
JxW8oahicGsmC20Wq1KzdHIwXywp9c32JguP2cqlaRZDW3hIJfWwSJs5hwvuLK7AoRNn4JTtkmJidwu0
Hs88gCteP/0uT6dpTW+v/Ua4ygniKouhLTykQlbUfrQDjnfbwBMIQ9sRK5wbHFJMHCM36WBiUDutqUyO
1vT0xtM5sI2GyF18wWJoCw+hKx72TyirOGztUgIQyJ0jqyE1Qv/QdaWmpzeSKbAnWvSxGNrCQ2hAQnJh
CUKJFGQfPVUMaiwUyyAn72Lz/G81Qj298XSehvtxetJ6n0fezmJoa1hOfHEGo9BsHIFoba3k4Vjv4YMH
WYSNhf98HzettQRBLJO11nVypkz9FSH0HdsLU8gVsNwDAAAAAElFTkSuQmCC
</value>
</data>
<data name="reel_big" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAADlRJREFUeF7t
XOlzFMcV96dcH5L8BTm+53alkg+5/oNUkvJ3V0VoDyGMsGFXO7urlbQ6kXbn2FurvXQghGStThsMso2N
IWAS4jJg7LKNMT6CQRDQEYOh079mZMFs7zkzwgev6le1pZnu9/qpu9/Rr+eRh/SQvr5U74t/x+oM/sni
DFhtLjnU4A0dafAo521u+ZJVkFYszeJnAH7jb3hmp+/g3fpm0bKlOfBH9KF29/WgOqH/txZBbKeK+LfF
JX7a5I9f84gjK10DeSIOHyCxiRfJwNTLJD17jGQXjjPgN/6GZ3gH73rE4ZWm9vg19GHzKKfq3VIbVepv
VDZfLapzKz+2CHIrnUUfbmuNXm+LjN+UR58jmbl/kKFnXtUF9IG+2sLjNxt9kRt2t/KB1SX56Mz+kcr+
y0t1TulRm0d+lipu1SvvWYuMP89VgpEIjy+SFnlszeqW1+weeaHeFfyVKs6Xh6A4q1t50e5Rlulyu23E
TKsW4NmTnL5D981V+g88bHX2/1IV74tLj/uC37e5pSQVeKV3cPZ2bv44d3CbCcjQm5q5Q/dJzMpEvaP7
e6q4XyyyCeJjVHlXPeLoanrmGHcwDxKpmaPEHRyhs1G6ahXEv6liP3h63Of7lk2QB7Z6Q8vhvebvcXoR
HlskW73hFTudjY2N8jfVYTwYgnWly+INZ192OT33xZt1xZCibpGjN7NKjczZB2atLY7+n9sEaal7IP9Z
boEvKFDqmdkoJ1dXIn/L6pau1LnEn6nD2hxCBECVdyOQW7jDE24d0sh+8mRnnDnCvOdmAjzBOzj0LPf5
OjAGui/esDjEP6jDM5egPLpsV+C88gQCBqePEG8wSzy7Q0ROREhnbB/3PTPRQXlKlLe3L8RkSeZf4b4H
YCwYk+lKrHcEfkqn/HV55ABXEACzrrFFJk9PJ8itT3Lk6oUs2eaTSw7AaIAXeII3ZJjMJ5hMUgm5lT0H
CWbiFlfwF+pwjSUYDOx5pZZtd3KK7OoMkXfPpAlZGvocGIBPGeG2MQPgNTmVuE+Gd8+kyK4OhfQM5rlt
AIwNe6LhhkV1Vc7BYPAYI+CH0L7+MLn2fvY+wYG1j3OkqU1hyQBeeyMBHuAFnlo5MCNb+kOkjcqamz/B
bQ/DYndLZwx1cRBdOHrSK3yrdoK0SDnSF4lwhV7HwecGiDuQ4rQ3Fu7+NDl08P7Zdy/+958cCcQjTGbI
rm2PMTp3Z1ZsHimuDl8fIcJo8IZWivl57eExEohFyGef8AVeB/YiZ1eI7TW8fowA+gYP8OLJsA7I2h+N
UNn3cPuBn9hAne0tzsBfVDXURmpse7VYhNERnyStgRD7r/IE1eLE0STZ1RWnbfnLRw8wcxzdcfLq0UEu
by2wWloCYdJFx8DrLzR2iBoVeUlX7Gx3K0mPNLrKYyAO76cGQyH/5ex5xXDnyhDxi2HSn10o6E8v0Gdb
MMJ48HjzgP16Jx1DMLef26cQHF21CUpUVUd1VOeUHqXxIjcxkJp+hWxvC5HzGmtbCd58LUWa2sMsS6Lt
t1bAiO3wh8kbpyqbfffivbNpOhaFjUnbLxIQyGXW5NpQ5b3Um5otcFmwVIT+DJmeLb5Rl4MYj5Z0J6pF
TzJPneYol1clyM8kiNCX4oZ+PcmZ2za38ryqlsoIyUe6fFeznFnSl56j+164rNEohQ/fypBtrQoxIgGB
PtAX+uTxqgQYC1ywvvR8Qf9YKXavsoIVqaqnPDV4lWe7B6ZvazuDQpvo0sW05wlSDTIjMeKPjd/Xfy3w
R8dJZjTG5VENsB1hW+JNmi7q/9o9yryqntLEIg667nlpeOpIk9Bg7UvlXmADZyHe1JECPpUCMTf6WHqv
ckNWCkoyhmOAAj7QBc5Y/i70/VBVU3HC6RkOgHidPNEaIu+fq32paDE1HSc+ufYQr0UaJlN0/+L1XQs+
eDNDnvAp3NNC6MTqkjyqmooTnX0f8E7P8J+JZvQvlXuhJ8QrFbLpQSRFZ+Fg4SyEL0yNyUVVTXzCoTfO
bbWNgV1dsZrchHI4dJCGeDT84vEsBVjNxUMD3D714My/UsTZA2f/fn6w0Ftbwje2OMVfq+oqJKsr6G8L
77upbRyfPEx2tCvk9mU+Uz2ABXR2KUQZrTzEQ8gGJ75cyFYL4Ig/6VfYmLV8W5XxT6mOfKq6CgnlFrxE
KZKTE5r0kJE4eSxJdlYc4p1gIdvJY8avhnWMT8ZZmKrljTyo3R06qarrfkKRDupMeBvoUx2Rghyfkbgb
4kUqCvHwDt6tJmSrFu+cTtMxRwt4Qzesnqcp8G1VbRuEKikU+mgbDdIQp8Ej0eVr/HK5F2+/nmYhXpQa
sPbIGN1zo4wvgN/+8BiJTrxAl1eYvPWaef9MANuK3S2ysWv10dSeuMZN/aPEDFVS2gaB3DOkU4lwGRmJ
W5eGiNCrkO2tMpmbT5ALb6RZlge4QB13/O0J+sxN3zFj79OiQ44QkXMg5Q6OLG9pFreoatsgqyCFUTam
bdARmyBPU3+Nx8QoQHn9UTr70qWTsngWSYVJIFY+56cXk3m6D8YK90Gqozt2ISSpatsgFDfyDl1axCw5
fiTJZWIUhvdGSYwqr5J9De9E02GyZ58xEVExHHs5SceeKdAH6hO3epXDqto2yOZV3uM5tA7qE507leIy
MQIXz9EN2y9V5RCvfpRlbRA58J4bgbPUH3T0JAr0Edv3AqHeyruq2jbIJsiXB/IvFzRArkxPpqMc9k7E
yDzd33jPSmF2Lk7GaVveMyOAMSO5oNXHAI3dabR2SVXbBqEOGWcB2gawgviP85gYgZY+mbxPDQbvWSnA
sPj6Ze4zI7DyUY6NXasPJFmtbvmGqrYNQjE3MrvaBtTvIfXNQdNgE4IVn6ncCyx5uBq8Po2CVRAL9IH8
INXJLVVtG1RMgWajwVvd/rcOtOHNELNRVIHFlrDZ2NkZYT4fT0mlgKTuTupg8/o0E0WXcDEjYjYQYczW
cL4yMxMn7WH9Ge1qUdSI2D2h85tReqFFfOJw1Xk9GDVELLyMidko6sbAkYaTyGtkNlAhoCSjFTvS8kCU
xcu8vsyGOLSf70hTixPuTuZLFkyaBRgv1+5BpsRSLhOe4R0XjiCLFAeZjaKhXLFkwmYhQ63bU9SgNLWK
zEmGkYB7g6WN3/gbniG1lp17MMoDiiYTUHna5E8UpLM2Cz2DM+y8GQ4yIgw4yY1ekQG/xydjLOzzS2HS
myo8s9gsbPfHr9U1B36vqm2DSiVUzQYMCVJVH79dPmT85B2cnMlsM+f1ZSZKJlRBNq9yqlTtsxmAUE91
RsnRlyrP+Bx/ZZDs8Ee4x49mAtkqaoFfVdVVSLiGipuUvMZmAZWtg0PVJwWStE1raPPKhgFfCIdKUouq
rkLCfVtcGeU1NgO4goCCyFpCORgYV0/IlFI5HtaPNcvWyODweDOupSbzR+i+p7Dib56CKgGsM/pAdMDj
YSTCexeJ3aNcUNVUnHBZmVfaYSRyCyeIs2eAHNiv/6j0wP4Blvg02y/0SqNrlmbRraqpOKHEv1hxkVHA
OUt/rLLIoxzQB+oNO+PmXeaBLqxuaa3eIf1AVVNpogp8pntgmnulQS9Qe7yjTa6qNLgcrl/MscoJswrY
uxJTKG+bU9VTnlDSWqzAUg+QCkKaHPUnPEXoAc5tcPwwOH2Uy7tWQAdUeStVfzqAKvBFGh0UFFnWClgx
TyBjaonIvqk4K1QCL54MtaA7OY0S30OqWionlPliL8Ss4XVcLVAyhlDNzPNcVE+wUI9TnlYLUHiOQvua
r8PaBCnuFod1JxiqCdX0wshQTwiOrFoFJayqo3rCJRN20WZskcugEtQSqumFEaHe3Ys20lKjT/6uqo7a
yNIc/CuuPdV6XtIq01Bt2NzSEB4QHrbWeEMUd2Nwvc3iCPxZVYM+srrlRPHLhsWhJ1TTi1pDPYzRsTu7
TP2+iDp8/YSrn3aPdBZXQXlMeTAiVNOLWkK9zvjULWo4Xn/M5/uGOnxjCBGKVZAv0/9oWdfGyFBNL6oJ
9QJZ9v2EyxVHHNUSjZN/YhWk61KZnKE/NkncvSFTaqqrBWSALJCJJ+s6UKNNlXcDXyNRh2sOoTqT7okl
PzqBT9U1706SDuqTIQ3PG9hmAHda4Be6qCyQiScrgNpnjInOvN+pwzSXcB0CM7EvM1fiFO8E2Z2eI9vp
HgQrfOW8eQVKWlw+n2FWGLwhQynj159ZuI2xcM85zCR455TxFRiWUgLi+y347AlzbjMxVsDNG7QRePt0
il0GguHAzYJSfiBkhsHAnoetSR3W5tLd1Jd0xtGbWS7nJ2Iw3ck8c6qbe8JkZjbBTuD0pLTQFpYWV2+b
u0NkJ+0bN6rKOdDw8xy96VWbRz5tmsGolODiWF1yDB8fg/fOE1iLyN5FdssShUUI8YLxKJmeuXtdH7MI
X9dY+TDHFATgN/6GSn68k6fvBuMxss0nsQIj9IUPL/J4aQEZG7zKql1Qooa7KnoIH2iwueUlfGKumgQE
blyiXMIfmyA+KUtcvQmW8mpskYjFFWT1ifiNv+GZT86yd9Gmmo/5IDEgBBDbykuGRRhGE4udPVIUWRzc
9DY6n1gLIANSUsiqILrQHdtuBiEhaxPkRSo0PgF6S09QXyvYnnv3ojRdrvLipn+hzQhSM9vz1Mda88h7
1sz+QCMsK07PcACEM4wGtzJrumO8GYSb3pZm0Ust9kWcrbYqe2/CeTViZqIPVAzg0Bt94+jR6gp6Hrh1
NYtw3xan+zav8k9WZ9KeuCYER7DU736Ie98LLGqAW4SyNwC/2Ye46TMYD+p7EiE4vIxCH/SBG5R0y/DW
VfNhiK8CoUgHoaHFGaxHzV2DN/RSg0d5hxqhS1TJn38K3iKIy/gbnqG4Ee+iDaKHooU+D+khfQ3okUf+
D1WHWk/swkxBAAAAAElFTkSuQmCC
</value>
<comment>rell icon ( 80x80)</comment>
</data>
<data name="reel_small" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAABe5JREFUWEfd
mF1zE1UYxzOjd+r38AVH/TBcOIgX3sggQtJqgQIlpQn2vSSbwiabzW42zXvSNiUJjjJKodBC6oXjgKDA
ADpjWxTEGwWkx/Pf7gm7ydlkU+SGZ+Y3k9lznv95Nuftedb1wtqOfcH3uv3S8N4htXrwWGqpL5i5TLlp
cPngxNQS2tBnZ+/Eu4bb87WPeoZe8/ijg/snEstjavVBbG6RJE4ttwR9RtXqnwfGEsuegcjgTu/kq4bc
/2der/dlj0/y9wXTP0Vnz6/zAnGCNLuwTjWueXyRAWga8s9mu72BLXuHleVw8exj3qCbQSzMP+4ZVmvd
R8U3jWE2Z3v84of9ofxtrVrjDvQsQPNIKH+ryy99YAzXmXn8kT3Dcmm1Lli5RILxPBmX002DOQW+0IAW
ezYolVa7ByKfGsM6s939ke3D8txvTEQuLZCQqpK1Gyo5fVohkeKZ+gBOgQ98oRFSFF2TtQ1F59Yc/5NY
c5hW5ixR4VgqRh7f1Qi5lyBPftdIUNHq4k6BD3yhAS2ZakrF+Xp7fyh3yz0w+YYRBt+ws7Ah2JqLzi4Q
JRMj638kdGFGbVEhxzNf1cXbgb6XFlWLBjSVlKyPgT5apUawcVrubhwlbLdinUzSaf33rjU4xnE1ToWd
bJ6a3pengX8SSyde3ViTYn7+kXsgfMQIx2o4hHHOMeGAmiN3b/KFwfUfVCIky6ZA+AjJk+Rn2penAdZu
xEkgnq33p7fQVe5hjhuCHcLRmQUyV45xBc1Ek4plRzaCNvTh+ZoplRUc4rpPdOb8epc/ctQI66ntn5ha
ZsIBJUUervHFzKzQHRnUpi1BmUEb+vB8zfyzSjeemqr79Y5pNSOsDcPFj7sVjWr5IslMt39rxlReIbGT
S5bAgFJeIql8+1lgJGlfjA3fMbVyf9ch4W0jPExveJRd/MJUhdy52v6tGX/9qtF//OkaYuAZ2ng+PG5f
UYiQqui+sdIF0u2TvjDCc7n2jcQrTBh/deOx0o7sdJQE5Lh+XoKJaJz+ezK3rx0YUzBN894RtWyE53Id
HJ+6yBrklPO3BvduqyRXDJNHxkEO8DtbEPU2c992ROnYLA4a06IRnsvVF8hcYQ1arjPRwrRoCY6BZ8UZ
sel5KzA2iwNJrxEevUGE7HXW4Bckkp9RHaMm7YNQUyLXxw6/EKkH6BUy143wrAF2CtYcLzigpGNcHydY
AjRPcacEYhvT2RgcngnKFNfHCZYpNm+STpFmzpJYMmYJEr9lPRG4wPVxgmWT9JiOmc0wKqVIMnuC5It0
zVHSOZGMRTef2ALLMdN1NDLipELjEc59Tc6dab55LiwoRMw6T8nM4KC23McfHwq+g9KQ17kVeCklbX8t
xlL0GqSD8XxbMaqU7+/oDWwxwtuwA+OJGq+zHVoVG0Qjf6/YH+xIAo7Jmt6Xp2FHU7IAQ1GNupXnwAOZ
Sqs8j3HzCs0bE/YZTyPSzPknbr/YnG4hSURRzXNqJFz4llROOc94ylWF+nzD1WqkL5C8uv2zkVeMsKzm
8Yn9kcLZhzxHBlIiUVM6SijQFz4snbJDzJ951DUQ9hrhNBsKlp4htdaqUJ+QU+TBL/algB0badnTbKUR
FE2fDyqXtm7NvWSEwzd8jkDFzxOZpPnadxedT20j39cUqnGySRd4adm5yyu8boTR2ty+E9toMV0v3AFd
vDTr7SzH4wENaJm1h6TSqtsX2WYM78y6fOHdg9G5FSaCKQgliqRQotfamv3RYgdKzMqXKjmm5Ejc+ulj
xd3ppw9mbp+8DRW/eU1Ks+eIoGVIqqjqpUGrzYK2Oz+qet9QPE0rtnN1HbwwptXtE983htuc4XMEKn4U
1UwcYEdOpqskSAeW0zTZzKokWVB08BuZOdqwbht3bzg//xAbwvGaa2cbHzAj/SiqUbeaB+sEHMI459x+
6XDb3boZw2GOU37/uFZDaejknpVLi/rd2juWqMH3uXwC5hkuc1yPPcNKBbkbEszDQuYGwG88Q5uHlo+f
HAq9Zbi9aOZy/Qe4xYHxvg6NpAAAAABJRU5ErkJggg==
</value>
<comment>reel icon (40x40)</comment>
</data>
<data name="safty" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAAW9JREFUWEfl
2E1qwlAUBeBndygvC9CdCHHcuIkWqp27DK3toLiIOrRkkno1B6TcJO/e95fSA2fiUfgwPogx/yLNYvGw
K4rqOJt9UPfWPtJr7Zw3BNlPpy+nsvw+V1VD/SrL+s3a1+zIxpjJBfJ8j0NPy2V9KIpNNmQfDs2GdMGh
yZESHJoMqcGh0ZE+ODQaMgQODY6U4BBuu28wpPSbQ7jtd72RmsuKcBtXNVL7m0O4ratipM+BQLitr85I
HxwV4bahDiJ9cVSE21zaiQyBoyLc5loWSTebdA/HfUBShNskJQuZWp4xx/n8nXujtAi3Sft5MbW8PwAc
4yWm/zUt73ZIDtY+jeiQrNmTHALp004ckhM5iEPUyNWqqbfba9m9p844RIMkGCJBinGIFKkBqnGIBpkM
h8Q4OMFwSEhkcBwSAhkNh/ggo+MQDTIZDpEgk+MQF2Q2HNKHzI5DCDDaR8AIQeiml+6CqaN6iB43xvwA
iFk1KsvXeuAAAAAASUVORK5CYII=
</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

View File

@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9264CD2E-7CF8-4237-A69F-DCDA984E0613}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>UIControl</RootNamespace>
<AssemblyName>UIControl</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CItem.cs" />
<Compile Include="CMenu.cs" />
<Compile Include="Common.cs" />
<Compile Include="CPicker.cs" />
<Compile Include="CIcon.cs" />
<Compile Include="CPort.cs" />
<Compile Include="EnumStruct.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Events.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="fTestControl.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fTestControl.Designer.cs">
<DependentUpon>fTestControl.cs</DependentUpon>
</Compile>
<Compile Include="HMI.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Loader\Draw_PickerPrinter.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Loader\Draw_PickerY.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="PrintDirection.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="PrintDirection.Designer.cs">
<DependentUpon>PrintDirection.cs</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utility.cs" />
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="fTestControl.resx">
<DependentUpon>fTestControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-code-30.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-erase-30.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-pause-button-30.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-settings-30.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-start-30.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-assembly-machine-40.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-rounded-square-80.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-rounded-square-80_blue.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-rounded-square-80_red.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-high-priority-40.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-wind-40.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-emergency-stop-button-40.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-deployment-40.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-barcode-reader-40.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\reel_big.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\reel_small.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bg_red.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\air.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bcd.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bg_blue.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\emg.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\erase.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8_pause_button_30.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\mot.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\plc.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\safty.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-automatic-gearbox-warning-80.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-hazard-warning-flasher-80.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-info-80.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-help-80.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-bug-80.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-bug-40.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sub\arAzinAxt\arAzinAxt.csproj">
<Project>{4f457e76-bf83-4b98-8565-ae87d7d16744}</Project>
<Name>arAzinAxt</Name>
</ProjectReference>
<ProjectReference Include="..\Sub\CommData\CommData.csproj">
<Project>{14e8c9a5-013e-49ba-b435-efefc77dd623}</Project>
<Name>CommData</Name>
</ProjectReference>
<ProjectReference Include="..\Sub\CommUtil\arCommUtil.csproj">
<Project>{14e8c9a5-013e-49ba-b435-ffffff7dd623}</Project>
<Name>arCommUtil</Name>
</ProjectReference>
<ProjectReference Include="..\Sub\Setting\Setting.csproj">
<Project>{48654765-548d-42ed-9238-d65eb3bc99ad}</Project>
<Name>Setting</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,168 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace UIControl
{
public static class Utility
{
public static Rectangle OffsetRect(this Rectangle rect, int x,int y)
{
var retval = new Rectangle(rect.X + x, rect.Y + y, rect.Width, rect.Height);
return retval;
}
public static void DrawString(this Graphics g,
string msg,
Font font,
Color fcolor,
RectangleF rect,
ContentAlignment textalign = ContentAlignment.MiddleCenter,
Color? ShadowColor = null,
Brush BackBrush = null,
Pen BorderPen = null)
{
DrawString(g, msg, font, fcolor, rect.toRect(), textalign, ShadowColor, BackBrush, BorderPen);
}
public static void DrawRectangle(this Graphics g, Pen pen, RectangleF rect)
{
g.DrawRectangle(pen, rect.Left, rect.Top, rect.Width, rect.Height);
}
public static void DrawString(this Graphics g,
string msg,
Font font,
Color fcolor,
Rectangle rect,
ContentAlignment textalign = ContentAlignment.MiddleCenter,
Color? ShadowColor = null,
Brush BackBrush = null,
Pen BorderPen = null)
{
//배경색 지정되어 있다면
if (BackBrush != null) g.FillRectangle(BackBrush, rect);
//테두리 지정되어 있다면
if (BorderPen != null) g.DrawRectangle(BorderPen, rect);
//그립자가 지정되있다면 별도 처리를 한다
if (ShadowColor != null && ShadowColor != Color.Transparent)
{
SizeF fsize;
var drawPT = GetTextPosition(g, msg, font, rect, textalign, out fsize);
//그림자를 먼저 그린다
g.DrawString(msg, font, new SolidBrush((Color)ShadowColor), drawPT.X + 1, drawPT.Y + 1);
g.DrawString(msg, font, new SolidBrush(fcolor), drawPT.X, drawPT.Y);
}
else
{
var sf = new StringFormat();
if (textalign == ContentAlignment.BottomCenter) { sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Near; }
else if (textalign == ContentAlignment.BottomLeft) { sf.Alignment = StringAlignment.Near; sf.LineAlignment = StringAlignment.Near; }
else if (textalign == ContentAlignment.BottomRight) { sf.Alignment = StringAlignment.Far; sf.LineAlignment = StringAlignment.Near; }
else if (textalign == ContentAlignment.MiddleCenter) { sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Center; }
else if (textalign == ContentAlignment.MiddleLeft) { sf.Alignment = StringAlignment.Near; sf.LineAlignment = StringAlignment.Center; }
else if (textalign == ContentAlignment.MiddleRight) { sf.Alignment = StringAlignment.Far; sf.LineAlignment = StringAlignment.Center; }
else if (textalign == ContentAlignment.TopCenter) { sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Far; }
else if (textalign == ContentAlignment.TopLeft) { sf.Alignment = StringAlignment.Near; sf.LineAlignment = StringAlignment.Far; }
else if (textalign == ContentAlignment.TopRight) { sf.Alignment = StringAlignment.Far; sf.LineAlignment = StringAlignment.Far; }
else { sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Center; }
g.DrawString(msg, font, new SolidBrush(fcolor), rect, sf);
sf.Dispose();
}
}
public static void DrawRect(this Graphics g, Rectangle rect, Color color, Color shadowColor, int pensize = 1)
{
//우측하단에 선을 그려준다. 일단은 검은색
g.DrawLine(new Pen(shadowColor, pensize), rect.Left + 1, rect.Bottom + 1, rect.Right - 1, rect.Bottom + 1);
g.DrawLine(new Pen(shadowColor, pensize), rect.Right + 1, rect.Top + 1, rect.Right + 1, rect.Bottom - 1);
DrawRect(g, rect, color, pensize);
}
public static void DrawRect(this Graphics g, Rectangle rect, Color color, int pensize = 1)
{
g.DrawRectangle(new Pen(color, pensize), rect);
}
public static void DrawRect(this Graphics g, RectangleF rect, Color color, int pensize = 1, Boolean shadow = false)
{
g.DrawRectangle(new Pen(color, pensize), rect.Left, rect.Top, rect.Width, rect.Height);
}
/// <summary>
/// Rectangle 개체를 반환 합니다. 단순 float -> int 로 값을 변환 합니다.
/// </summary>
/// <param name="rect"></param>
/// <returns></returns>
public static Rectangle toRect(this RectangleF rect)
{
return new Rectangle((int)rect.Left, (int)rect.Top, (int)rect.Width, (int)rect.Height); ;
}
static PointF GetTextPosition(Graphics g, string data, Font f, Rectangle rect, ContentAlignment align, System.Windows.Forms.Padding Padding, out SizeF fsize)
{
float x = 0;
float y = 0;
fsize = g.MeasureString(data, f);
if (align == ContentAlignment.MiddleCenter)
{
x = (rect.Width - fsize.Width) / 2 + Padding.Left - Padding.Right;
y = (rect.Height - fsize.Height) / 2 + Padding.Top - Padding.Bottom;
}
else if (align == ContentAlignment.MiddleLeft)
{
x = Padding.Left;
y = (rect.Height - fsize.Height) / 2;
}
else if (align == ContentAlignment.MiddleRight)
{
x = rect.Width - fsize.Width - Padding.Right;
y = (rect.Height - fsize.Height) / 2;
}
else if (align == ContentAlignment.BottomLeft)
{
x = Padding.Left;
y = rect.Height - fsize.Height - Padding.Bottom;
}
else if (align == ContentAlignment.BottomRight)
{
x = rect.Width - fsize.Width - Padding.Right;
y = rect.Height - fsize.Height - Padding.Bottom;
}
else if (align == ContentAlignment.BottomCenter)
{
x = (rect.Width - fsize.Width) / 2;
y = rect.Height - fsize.Height - Padding.Bottom;
}
else if (align == ContentAlignment.TopLeft)
{
x = Padding.Left;
y = Padding.Top;
}
else if (align == ContentAlignment.TopRight)
{
x = rect.Width - fsize.Width - Padding.Right;
y = Padding.Top;
}
else if (align == ContentAlignment.TopCenter)
{
x = (rect.Width - fsize.Width) / 2;
y = Padding.Top;
}
return new PointF(x + rect.Left, y + rect.Top);
}
static PointF GetTextPosition(Graphics g, string data, Font f, Rectangle rect, ContentAlignment align, out SizeF fsize)
{
return GetTextPosition(g, data, f, rect, align, new System.Windows.Forms.Padding(0), out fsize);
}
}
}

View File

@@ -0,0 +1,82 @@
namespace UIControl
{
partial class fTestControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.printDirection1 = new UIControl.PrintDirection();
this.SuspendLayout();
//
// printDirection1
//
this.printDirection1.BackColor = System.Drawing.Color.White;
this.printDirection1.BorderColor = System.Drawing.Color.Black;
this.printDirection1.colors = new System.Drawing.Color[] {
System.Drawing.Color.Empty,
System.Drawing.Color.Empty,
System.Drawing.Color.Empty,
System.Drawing.Color.Empty,
System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))),
System.Drawing.Color.Empty,
System.Drawing.Color.Empty,
System.Drawing.Color.Empty,
System.Drawing.Color.Empty};
this.printDirection1.Font = new System.Drawing.Font("맑은 고딕", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.printDirection1.Location = new System.Drawing.Point(62, 56);
this.printDirection1.Margin = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.printDirection1.Name = "printDirection1";
this.printDirection1.Size = new System.Drawing.Size(323, 283);
this.printDirection1.TabIndex = 0;
this.printDirection1.TitleFont = new System.Drawing.Font("궁서체", 9F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.printDirection1.titles = new string[] {
"↖",
"↑",
"↗",
"←",
"?",
"→",
"↙",
"↓",
"↘"};
//
// fTestControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(476, 453);
this.Controls.Add(this.printDirection1);
this.Name = "fTestControl";
this.Text = "fTestControl";
this.ResumeLayout(false);
}
#endregion
private PrintDirection printDirection1;
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace UIControl
{
public partial class fTestControl : Form
{
public fTestControl()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

BIN
Handler/DLL/ArLog.Net4.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Handler/DLL/libxl.dll Normal file

Binary file not shown.

BIN
Handler/DLL/libxl.net.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,256 @@
File-Spec,2
FileType,User Parameters Data File
Made-by,YASKAWA SigmaWin+ Ver.7
DateTime,12/23/2020 11:45:35 AM
SERVO-TYPE,SGD7S-2R8A00A
SERVO-ID,112
SERVO-YMOD,0
SERVO-SPEC,00
SERVO-SOFT,47
SERVO-CAPACITY,400
SerialNo,D0205I826810007
BTOFlag,1
BTO-ID,
IS-SUPPORTED,1
IS-EDITED,0
MachineName,
OP-TYPE,
OP-ID,65533
OP-YMOD,65535
OP-SOFT,65535
OP1-TYPE,
OP1-TYPEID,0
OP1-ID,65533
OP1-YMOD,65535
OP1-YMODTYPE,65535
OP1-SOFT,65535
OP2-TYPE,
OP2-TYPEID,0
OP2-ID,65533
OP2-YMOD,65535
OP2-YMODTYPE,65535
OP2-SOFT,65535
OP3-TYPE,
OP3-TYPEID,0
OP3-ID,65533
OP3-YMOD,65535
OP3-YMODTYPE,65535
OP3-SOFT,65535
ACCESS-LEVEL,1
SpecVersion,65535
AXIS-NUM,1
MOTOR-TYPE,SGM7J-04AFD21
MOTOR-ID,173
ENCODER-ID,24
ENCODER-SOFT,3
ServoControlType,512
CompatibleMapNum,6
CompatibleMap,0,3,3,6,6,10
CommentCnt,0
Comment,
ServoNameComment,Picker X
UserPrmCnt,198
UserPrm,000,17,2,1
UserPrm,001,0,2,0
UserPrm,002,0,2,0
UserPrm,006,2,2,0
UserPrm,007,0,2,0
UserPrm,008,0,2,0
UserPrm,009,16,2,0
UserPrm,00A,1,2,0
UserPrm,00B,256,2,1
UserPrm,00C,0,2,0
UserPrm,00D,0,2,0
UserPrm,00E,0,2,0
UserPrm,00F,0,2,0
UserPrm,010,1,2,0
UserPrm,021,0,2,0
UserPrm,040,0,2,0
UserPrm,080,0,2,0
UserPrm,081,0,2,0
UserPrm,100,400,2,0
UserPrm,101,2000,2,0
UserPrm,102,400,2,0
UserPrm,103,100,2,0
UserPrm,104,400,2,0
UserPrm,105,2000,2,0
UserPrm,106,400,2,0
UserPrm,109,0,2,0
UserPrm,10A,0,2,0
UserPrm,10B,0,2,0
UserPrm,10C,200,2,0
UserPrm,10D,0,2,0
UserPrm,10E,0,2,0
UserPrm,10F,0,2,0
UserPrm,11F,0,2,0
UserPrm,121,100,2,0
UserPrm,122,100,2,0
UserPrm,123,0,2,0
UserPrm,124,0,2,0
UserPrm,125,100,2,0
UserPrm,131,0,2,0
UserPrm,132,0,2,0
UserPrm,135,0,2,0
UserPrm,136,0,2,0
UserPrm,139,0,2,0
UserPrm,13D,2000,2,0
UserPrm,140,256,2,0
UserPrm,141,500,2,0
UserPrm,142,1000,2,0
UserPrm,143,1000,2,0
UserPrm,144,1000,2,0
UserPrm,145,500,2,0
UserPrm,146,700,2,0
UserPrm,147,1000,2,0
UserPrm,148,500,2,0
UserPrm,149,1000,2,0
UserPrm,14A,800,2,0
UserPrm,14B,100,2,0
UserPrm,14F,33,2,0
UserPrm,160,16,2,0
UserPrm,161,1000,2,0
UserPrm,162,100,2,0
UserPrm,163,0,2,0
UserPrm,164,0,2,0
UserPrm,165,0,2,0
UserPrm,166,0,2,0
UserPrm,170,5121,2,0
UserPrm,200,1,2,1
UserPrm,205,65535,2,0
UserPrm,207,0,2,0
UserPrm,20A,32768,4,0
UserPrm,20E,16777216,4,1
UserPrm,210,20000,4,1
UserPrm,212,5000,4,1
UserPrm,216,0,2,0
UserPrm,217,0,2,0
UserPrm,218,1,2,0
UserPrm,22A,0,2,0
UserPrm,240,0,2,0
UserPrm,281,20,2,0
UserPrm,300,600,2,0
UserPrm,301,100,2,0
UserPrm,302,200,2,0
UserPrm,303,300,2,0
UserPrm,304,50,2,1
UserPrm,305,0,2,0
UserPrm,306,0,2,0
UserPrm,307,40,2,0
UserPrm,308,0,2,0
UserPrm,30A,0,2,0
UserPrm,30C,0,2,0
UserPrm,310,0,2,0
UserPrm,311,100,2,0
UserPrm,312,50,2,0
UserPrm,316,10000,2,0
UserPrm,324,300,2,0
UserPrm,400,30,2,0
UserPrm,401,100,2,0
UserPrm,402,800,2,0
UserPrm,403,800,2,0
UserPrm,404,100,2,0
UserPrm,405,100,2,0
UserPrm,406,800,2,0
UserPrm,407,10000,2,0
UserPrm,408,0,2,0
UserPrm,409,5000,2,0
UserPrm,40A,70,2,0
UserPrm,40B,0,2,0
UserPrm,40C,5000,2,0
UserPrm,40D,70,2,0
UserPrm,40E,0,2,0
UserPrm,40F,5000,2,0
UserPrm,410,50,2,0
UserPrm,412,100,2,0
UserPrm,415,0,2,0
UserPrm,416,0,2,0
UserPrm,417,5000,2,0
UserPrm,418,70,2,0
UserPrm,419,0,2,0
UserPrm,41A,5000,2,0
UserPrm,41B,70,2,0
UserPrm,41C,0,2,0
UserPrm,41D,5000,2,0
UserPrm,41E,70,2,0
UserPrm,41F,0,2,0
UserPrm,423,0,2,0
UserPrm,424,50,2,0
UserPrm,425,100,2,0
UserPrm,426,0,2,0
UserPrm,427,0,2,0
UserPrm,456,15,2,0
UserPrm,460,257,2,0
UserPrm,475,0,2,0
UserPrm,476,0,2,0
UserPrm,481,400,2,0
UserPrm,482,3000,2,0
UserPrm,486,25,2,0
UserPrm,487,0,2,0
UserPrm,488,100,2,0
UserPrm,490,100,2,0
UserPrm,495,100,2,0
UserPrm,498,10,2,0
UserPrm,501,10,2,0
UserPrm,502,20,2,0
UserPrm,503,10,2,0
UserPrm,506,0,2,0
UserPrm,507,100,2,0
UserPrm,508,50,2,0
UserPrm,509,20,2,0
UserPrm,50A,8448,2,0
UserPrm,50B,25923,2,0
UserPrm,50C,34952,2,0
UserPrm,50D,34952,2,0
UserPrm,50E,12817,2,0
UserPrm,50F,0,2,0
UserPrm,510,0,2,0
UserPrm,512,0,2,0
UserPrm,513,0,2,0
UserPrm,514,0,2,0
UserPrm,515,34952,2,0
UserPrm,516,34952,2,0
UserPrm,517,1620,2,0
UserPrm,518,0,2,0
UserPrm,519,34952,2,0
UserPrm,51B,1000,4,0
UserPrm,51E,100,2,0
UserPrm,520,5242880,4,0
UserPrm,522,7,4,0
UserPrm,524,1073741824,4,0
UserPrm,526,5242880,4,0
UserPrm,528,100,2,0
UserPrm,529,10000,2,0
UserPrm,52A,20,2,0
UserPrm,52B,20,2,0
UserPrm,52C,100,2,0
UserPrm,52F,4095,2,0
UserPrm,530,0,2,0
UserPrm,531,32768,4,0
UserPrm,533,500,2,0
UserPrm,534,100,2,0
UserPrm,535,100,2,0
UserPrm,536,1,2,0
UserPrm,550,0,2,0
UserPrm,551,0,2,0
UserPrm,552,100,2,0
UserPrm,553,100,2,0
UserPrm,55A,1,2,0
UserPrm,560,400,2,0
UserPrm,561,100,2,0
UserPrm,600,0,2,0
UserPrm,601,0,2,0
UserPrm,603,0,2,0
UserPrm,604,0,2,0
UserPrm,621,0,2,0
UserPrm,622,10000,2,0
UserPrm,623,10000,2,0
UserPrm,624,10,2,0
UserPrm,625,100,2,0
UserPrm,626,100,4,0
UserPrm,628,10,2,0
Custom
CustomGroupNum,1
Gp1_Begin
GroupName,
Num,0
Gp1_End

Binary file not shown.

View File

@@ -0,0 +1,256 @@
File-Spec,2
FileType,User Parameters Data File
Made-by,YASKAWA SigmaWin+ Ver.7
DateTime,12/23/2020 11:46:21 AM
SERVO-TYPE,SGD7S-1R6A00A002
SERVO-ID,112
SERVO-YMOD,0
SERVO-SPEC,00
SERVO-SOFT,47
SERVO-CAPACITY,200
SerialNo,1A2036500620011
BTOFlag,1
BTO-ID,
IS-SUPPORTED,1
IS-EDITED,0
MachineName,
OP-TYPE,
OP-ID,65533
OP-YMOD,65535
OP-SOFT,65535
OP1-TYPE,
OP1-TYPEID,0
OP1-ID,65533
OP1-YMOD,65535
OP1-YMODTYPE,65535
OP1-SOFT,65535
OP2-TYPE,
OP2-TYPEID,0
OP2-ID,65533
OP2-YMOD,65535
OP2-YMODTYPE,65535
OP2-SOFT,65535
OP3-TYPE,
OP3-TYPEID,0
OP3-ID,65533
OP3-YMOD,65535
OP3-YMODTYPE,65535
OP3-SOFT,65535
ACCESS-LEVEL,1
SpecVersion,65535
AXIS-NUM,1
MOTOR-TYPE,SGM7J-02AFD2C
MOTOR-ID,173
ENCODER-ID,24
ENCODER-SOFT,3
ServoControlType,512
CompatibleMapNum,6
CompatibleMap,0,3,3,6,6,10
CommentCnt,0
Comment,
ServoNameComment,Picker Z
UserPrmCnt,198
UserPrm,000,17,2,1
UserPrm,001,0,2,0
UserPrm,002,0,2,0
UserPrm,006,2,2,0
UserPrm,007,0,2,0
UserPrm,008,0,2,0
UserPrm,009,16,2,0
UserPrm,00A,1,2,0
UserPrm,00B,256,2,1
UserPrm,00C,0,2,0
UserPrm,00D,0,2,0
UserPrm,00E,0,2,0
UserPrm,00F,0,2,0
UserPrm,010,1,2,0
UserPrm,021,0,2,0
UserPrm,040,0,2,0
UserPrm,080,0,2,0
UserPrm,081,0,2,0
UserPrm,100,400,2,0
UserPrm,101,2000,2,0
UserPrm,102,400,2,0
UserPrm,103,100,2,0
UserPrm,104,400,2,0
UserPrm,105,2000,2,0
UserPrm,106,400,2,0
UserPrm,109,0,2,0
UserPrm,10A,0,2,0
UserPrm,10B,0,2,0
UserPrm,10C,200,2,0
UserPrm,10D,0,2,0
UserPrm,10E,0,2,0
UserPrm,10F,0,2,0
UserPrm,11F,0,2,0
UserPrm,121,100,2,0
UserPrm,122,100,2,0
UserPrm,123,0,2,0
UserPrm,124,0,2,0
UserPrm,125,100,2,0
UserPrm,131,0,2,0
UserPrm,132,0,2,0
UserPrm,135,0,2,0
UserPrm,136,0,2,0
UserPrm,139,0,2,0
UserPrm,13D,2000,2,0
UserPrm,140,256,2,0
UserPrm,141,500,2,0
UserPrm,142,1000,2,0
UserPrm,143,1000,2,0
UserPrm,144,1000,2,0
UserPrm,145,500,2,0
UserPrm,146,700,2,0
UserPrm,147,1000,2,0
UserPrm,148,500,2,0
UserPrm,149,1000,2,0
UserPrm,14A,800,2,0
UserPrm,14B,100,2,0
UserPrm,14F,33,2,0
UserPrm,160,16,2,0
UserPrm,161,1000,2,0
UserPrm,162,100,2,0
UserPrm,163,0,2,0
UserPrm,164,0,2,0
UserPrm,165,0,2,0
UserPrm,166,0,2,0
UserPrm,170,5121,2,0
UserPrm,200,1,2,1
UserPrm,205,65535,2,0
UserPrm,207,0,2,0
UserPrm,20A,32768,4,0
UserPrm,20E,16777216,4,1
UserPrm,210,20000,4,1
UserPrm,212,5000,4,1
UserPrm,216,0,2,0
UserPrm,217,0,2,0
UserPrm,218,1,2,0
UserPrm,22A,0,2,0
UserPrm,240,0,2,0
UserPrm,281,20,2,0
UserPrm,300,600,2,0
UserPrm,301,100,2,0
UserPrm,302,200,2,0
UserPrm,303,300,2,0
UserPrm,304,50,2,1
UserPrm,305,0,2,0
UserPrm,306,0,2,0
UserPrm,307,40,2,0
UserPrm,308,0,2,0
UserPrm,30A,0,2,0
UserPrm,30C,0,2,0
UserPrm,310,0,2,0
UserPrm,311,100,2,0
UserPrm,312,50,2,0
UserPrm,316,10000,2,0
UserPrm,324,300,2,0
UserPrm,400,30,2,0
UserPrm,401,85,2,1
UserPrm,402,800,2,0
UserPrm,403,800,2,0
UserPrm,404,100,2,0
UserPrm,405,100,2,0
UserPrm,406,800,2,0
UserPrm,407,10000,2,0
UserPrm,408,256,2,1
UserPrm,409,5000,2,0
UserPrm,40A,70,2,0
UserPrm,40B,0,2,0
UserPrm,40C,1480,2,1
UserPrm,40D,150,2,1
UserPrm,40E,0,2,0
UserPrm,40F,5000,2,0
UserPrm,410,50,2,0
UserPrm,412,100,2,0
UserPrm,415,0,2,0
UserPrm,416,0,2,0
UserPrm,417,5000,2,0
UserPrm,418,70,2,0
UserPrm,419,0,2,0
UserPrm,41A,5000,2,0
UserPrm,41B,70,2,0
UserPrm,41C,0,2,0
UserPrm,41D,5000,2,0
UserPrm,41E,70,2,0
UserPrm,41F,0,2,0
UserPrm,423,0,2,0
UserPrm,424,50,2,0
UserPrm,425,100,2,0
UserPrm,426,0,2,0
UserPrm,427,0,2,0
UserPrm,456,15,2,0
UserPrm,460,257,2,0
UserPrm,475,0,2,0
UserPrm,476,0,2,0
UserPrm,481,400,2,0
UserPrm,482,3000,2,0
UserPrm,486,25,2,0
UserPrm,487,0,2,0
UserPrm,488,100,2,0
UserPrm,490,100,2,0
UserPrm,495,100,2,0
UserPrm,498,10,2,0
UserPrm,501,10,2,0
UserPrm,502,20,2,0
UserPrm,503,10,2,0
UserPrm,506,0,2,0
UserPrm,507,100,2,0
UserPrm,508,50,2,0
UserPrm,509,20,2,0
UserPrm,50A,8448,2,0
UserPrm,50B,25923,2,0
UserPrm,50C,34952,2,0
UserPrm,50D,34952,2,0
UserPrm,50E,12305,2,1
UserPrm,50F,512,2,1
UserPrm,510,0,2,0
UserPrm,512,0,2,0
UserPrm,513,0,2,0
UserPrm,514,0,2,0
UserPrm,515,34952,2,0
UserPrm,516,34952,2,0
UserPrm,517,1620,2,0
UserPrm,518,0,2,0
UserPrm,519,34952,2,0
UserPrm,51B,1000,4,0
UserPrm,51E,100,2,0
UserPrm,520,5242880,4,0
UserPrm,522,7,4,0
UserPrm,524,1073741824,4,0
UserPrm,526,5242880,4,0
UserPrm,528,100,2,0
UserPrm,529,10000,2,0
UserPrm,52A,20,2,0
UserPrm,52B,20,2,0
UserPrm,52C,100,2,0
UserPrm,52F,4095,2,0
UserPrm,530,0,2,0
UserPrm,531,32768,4,0
UserPrm,533,500,2,0
UserPrm,534,100,2,0
UserPrm,535,100,2,0
UserPrm,536,1,2,0
UserPrm,550,0,2,0
UserPrm,551,0,2,0
UserPrm,552,100,2,0
UserPrm,553,100,2,0
UserPrm,55A,1,2,0
UserPrm,560,400,2,0
UserPrm,561,100,2,0
UserPrm,600,0,2,0
UserPrm,601,0,2,0
UserPrm,603,0,2,0
UserPrm,604,0,2,0
UserPrm,621,0,2,0
UserPrm,622,10000,2,0
UserPrm,623,10000,2,0
UserPrm,624,10,2,0
UserPrm,625,100,2,0
UserPrm,626,100,4,0
UserPrm,628,10,2,0
Custom
CustomGroupNum,1
Gp1_Begin
GroupName,
Num,0
Gp1_End

Binary file not shown.

View File

@@ -0,0 +1,256 @@
File-Spec,2
FileType,User Parameters Data File
Made-by,YASKAWA SigmaWin+ Ver.7
DateTime,12/29/2020 4:34:27 PM
SERVO-TYPE,SGD7S-1R6A00A002
SERVO-ID,112
SERVO-YMOD,0
SERVO-SPEC,00
SERVO-SOFT,47
SERVO-CAPACITY,200
SerialNo,1A2036500620026
BTOFlag,1
BTO-ID,
IS-SUPPORTED,1
IS-EDITED,0
MachineName,
OP-TYPE,
OP-ID,65533
OP-YMOD,65535
OP-SOFT,65535
OP1-TYPE,
OP1-TYPEID,0
OP1-ID,65533
OP1-YMOD,65535
OP1-YMODTYPE,65535
OP1-SOFT,65535
OP2-TYPE,
OP2-TYPEID,0
OP2-ID,65533
OP2-YMOD,65535
OP2-YMODTYPE,65535
OP2-SOFT,65535
OP3-TYPE,
OP3-TYPEID,0
OP3-ID,65533
OP3-YMOD,65535
OP3-YMODTYPE,65535
OP3-SOFT,65535
ACCESS-LEVEL,1
SpecVersion,65535
AXIS-NUM,1
MOTOR-TYPE,SGM7J-02AFD21
MOTOR-ID,173
ENCODER-ID,24
ENCODER-SOFT,3
ServoControlType,512
CompatibleMapNum,6
CompatibleMap,0,3,3,6,6,10
CommentCnt,0
Comment,
ServoNameComment,PrintLeft Move
UserPrmCnt,198
UserPrm,000,16,2,1
UserPrm,001,0,2,0
UserPrm,002,0,2,0
UserPrm,006,2,2,0
UserPrm,007,0,2,0
UserPrm,008,0,2,0
UserPrm,009,16,2,0
UserPrm,00A,1,2,0
UserPrm,00B,256,2,1
UserPrm,00C,0,2,0
UserPrm,00D,0,2,0
UserPrm,00E,0,2,0
UserPrm,00F,0,2,0
UserPrm,010,1,2,0
UserPrm,021,0,2,0
UserPrm,040,0,2,0
UserPrm,080,0,2,0
UserPrm,081,0,2,0
UserPrm,100,600,2,1
UserPrm,101,2000,2,0
UserPrm,102,600,2,1
UserPrm,103,3000,2,1
UserPrm,104,400,2,0
UserPrm,105,2000,2,0
UserPrm,106,400,2,0
UserPrm,109,0,2,0
UserPrm,10A,0,2,0
UserPrm,10B,0,2,0
UserPrm,10C,200,2,0
UserPrm,10D,0,2,0
UserPrm,10E,0,2,0
UserPrm,10F,0,2,0
UserPrm,11F,0,2,0
UserPrm,121,100,2,0
UserPrm,122,100,2,0
UserPrm,123,0,2,0
UserPrm,124,0,2,0
UserPrm,125,100,2,0
UserPrm,131,0,2,0
UserPrm,132,0,2,0
UserPrm,135,0,2,0
UserPrm,136,0,2,0
UserPrm,139,0,2,0
UserPrm,13D,2000,2,0
UserPrm,140,256,2,0
UserPrm,141,500,2,0
UserPrm,142,1000,2,0
UserPrm,143,1000,2,0
UserPrm,144,1000,2,0
UserPrm,145,500,2,0
UserPrm,146,700,2,0
UserPrm,147,1000,2,0
UserPrm,148,500,2,0
UserPrm,149,1000,2,0
UserPrm,14A,800,2,0
UserPrm,14B,100,2,0
UserPrm,14F,33,2,0
UserPrm,160,16,2,0
UserPrm,161,1000,2,0
UserPrm,162,100,2,0
UserPrm,163,0,2,0
UserPrm,164,0,2,0
UserPrm,165,0,2,0
UserPrm,166,0,2,0
UserPrm,170,5120,2,1
UserPrm,200,1,2,1
UserPrm,205,65535,2,0
UserPrm,207,0,2,0
UserPrm,20A,32768,4,0
UserPrm,20E,16777216,4,1
UserPrm,210,46000,4,1
UserPrm,212,11500,4,1
UserPrm,216,0,2,0
UserPrm,217,0,2,0
UserPrm,218,1,2,0
UserPrm,22A,0,2,0
UserPrm,240,0,2,0
UserPrm,281,20,2,0
UserPrm,300,600,2,0
UserPrm,301,100,2,0
UserPrm,302,200,2,0
UserPrm,303,300,2,0
UserPrm,304,50,2,1
UserPrm,305,0,2,0
UserPrm,306,0,2,0
UserPrm,307,40,2,0
UserPrm,308,0,2,0
UserPrm,30A,0,2,0
UserPrm,30C,0,2,0
UserPrm,310,0,2,0
UserPrm,311,100,2,0
UserPrm,312,50,2,0
UserPrm,316,10000,2,0
UserPrm,324,300,2,0
UserPrm,400,90,2,1
UserPrm,401,400,2,1
UserPrm,402,800,2,0
UserPrm,403,800,2,0
UserPrm,404,800,2,1
UserPrm,405,800,2,1
UserPrm,406,800,2,0
UserPrm,407,10000,2,0
UserPrm,408,0,2,0
UserPrm,409,5000,2,0
UserPrm,40A,70,2,0
UserPrm,40B,0,2,0
UserPrm,40C,5000,2,0
UserPrm,40D,70,2,0
UserPrm,40E,0,2,0
UserPrm,40F,5000,2,0
UserPrm,410,50,2,0
UserPrm,412,100,2,0
UserPrm,415,0,2,0
UserPrm,416,0,2,0
UserPrm,417,5000,2,0
UserPrm,418,70,2,0
UserPrm,419,0,2,0
UserPrm,41A,5000,2,0
UserPrm,41B,70,2,0
UserPrm,41C,0,2,0
UserPrm,41D,5000,2,0
UserPrm,41E,70,2,0
UserPrm,41F,0,2,0
UserPrm,423,0,2,0
UserPrm,424,50,2,0
UserPrm,425,100,2,0
UserPrm,426,0,2,0
UserPrm,427,0,2,0
UserPrm,456,15,2,0
UserPrm,460,257,2,0
UserPrm,475,0,2,0
UserPrm,476,0,2,0
UserPrm,481,400,2,0
UserPrm,482,3000,2,0
UserPrm,486,25,2,0
UserPrm,487,0,2,0
UserPrm,488,100,2,0
UserPrm,490,100,2,0
UserPrm,495,100,2,0
UserPrm,498,10,2,0
UserPrm,501,10,2,0
UserPrm,502,20,2,0
UserPrm,503,10,2,0
UserPrm,506,0,2,0
UserPrm,507,100,2,0
UserPrm,508,50,2,0
UserPrm,509,20,2,0
UserPrm,50A,33025,2,1
UserPrm,50B,25928,2,1
UserPrm,50C,34952,2,0
UserPrm,50D,34952,2,0
UserPrm,50E,12817,2,0
UserPrm,50F,0,2,0
UserPrm,510,0,2,0
UserPrm,512,0,2,0
UserPrm,513,0,2,0
UserPrm,514,0,2,0
UserPrm,515,34952,2,0
UserPrm,516,34952,2,0
UserPrm,517,1620,2,0
UserPrm,518,0,2,0
UserPrm,519,34952,2,0
UserPrm,51B,1000,4,0
UserPrm,51E,100,2,0
UserPrm,520,5242880,4,0
UserPrm,522,7,4,0
UserPrm,524,1073741824,4,0
UserPrm,526,5242880,4,0
UserPrm,528,100,2,0
UserPrm,529,10000,2,0
UserPrm,52A,20,2,0
UserPrm,52B,20,2,0
UserPrm,52C,100,2,0
UserPrm,52F,4095,2,0
UserPrm,530,5,2,1
UserPrm,531,2000,4,1
UserPrm,533,100,2,1
UserPrm,534,100,2,0
UserPrm,535,3,2,1
UserPrm,536,0,2,1
UserPrm,550,0,2,0
UserPrm,551,0,2,0
UserPrm,552,100,2,0
UserPrm,553,100,2,0
UserPrm,55A,1,2,0
UserPrm,560,400,2,0
UserPrm,561,100,2,0
UserPrm,600,0,2,0
UserPrm,601,0,2,0
UserPrm,603,0,2,0
UserPrm,604,0,2,0
UserPrm,621,0,2,0
UserPrm,622,10000,2,0
UserPrm,623,10000,2,0
UserPrm,624,10,2,0
UserPrm,625,100,2,0
UserPrm,626,100,4,0
UserPrm,628,10,2,0
Custom
CustomGroupNum,1
Gp1_Begin
GroupName,
Num,0
Gp1_End

Binary file not shown.

View File

@@ -0,0 +1,256 @@
File-Spec,2
FileType,User Parameters Data File
Made-by,YASKAWA SigmaWin+ Ver.7
DateTime,12/29/2020 4:42:26 PM
SERVO-TYPE,SGD7S-1R6A00A002
SERVO-ID,112
SERVO-YMOD,0
SERVO-SPEC,00
SERVO-SOFT,47
SERVO-CAPACITY,200
SerialNo,1A2046912320009
BTOFlag,1
BTO-ID,
IS-SUPPORTED,1
IS-EDITED,0
MachineName,
OP-TYPE,
OP-ID,65533
OP-YMOD,65535
OP-SOFT,65535
OP1-TYPE,
OP1-TYPEID,0
OP1-ID,65533
OP1-YMOD,65535
OP1-YMODTYPE,65535
OP1-SOFT,65535
OP2-TYPE,
OP2-TYPEID,0
OP2-ID,65533
OP2-YMOD,65535
OP2-YMODTYPE,65535
OP2-SOFT,65535
OP3-TYPE,
OP3-TYPEID,0
OP3-ID,65533
OP3-YMOD,65535
OP3-YMODTYPE,65535
OP3-SOFT,65535
ACCESS-LEVEL,1
SpecVersion,65535
AXIS-NUM,1
MOTOR-TYPE,SGM7J-02AFD2C
MOTOR-ID,173
ENCODER-ID,24
ENCODER-SOFT,3
ServoControlType,512
CompatibleMapNum,6
CompatibleMap,0,3,3,6,6,10
CommentCnt,0
Comment,
ServoNameComment,Print Left Up/Dn
UserPrmCnt,198
UserPrm,000,17,2,1
UserPrm,001,0,2,0
UserPrm,002,0,2,0
UserPrm,006,2,2,0
UserPrm,007,0,2,0
UserPrm,008,0,2,0
UserPrm,009,16,2,0
UserPrm,00A,1,2,0
UserPrm,00B,256,2,1
UserPrm,00C,0,2,0
UserPrm,00D,0,2,0
UserPrm,00E,0,2,0
UserPrm,00F,0,2,0
UserPrm,010,1,2,0
UserPrm,021,0,2,0
UserPrm,040,0,2,0
UserPrm,080,0,2,0
UserPrm,081,0,2,0
UserPrm,100,400,2,0
UserPrm,101,2000,2,0
UserPrm,102,400,2,0
UserPrm,103,100,2,0
UserPrm,104,400,2,0
UserPrm,105,2000,2,0
UserPrm,106,400,2,0
UserPrm,109,0,2,0
UserPrm,10A,0,2,0
UserPrm,10B,0,2,0
UserPrm,10C,200,2,0
UserPrm,10D,0,2,0
UserPrm,10E,0,2,0
UserPrm,10F,0,2,0
UserPrm,11F,0,2,0
UserPrm,121,100,2,0
UserPrm,122,100,2,0
UserPrm,123,0,2,0
UserPrm,124,0,2,0
UserPrm,125,100,2,0
UserPrm,131,0,2,0
UserPrm,132,0,2,0
UserPrm,135,0,2,0
UserPrm,136,0,2,0
UserPrm,139,0,2,0
UserPrm,13D,2000,2,0
UserPrm,140,256,2,0
UserPrm,141,500,2,0
UserPrm,142,1000,2,0
UserPrm,143,1000,2,0
UserPrm,144,1000,2,0
UserPrm,145,500,2,0
UserPrm,146,700,2,0
UserPrm,147,1000,2,0
UserPrm,148,500,2,0
UserPrm,149,1000,2,0
UserPrm,14A,800,2,0
UserPrm,14B,100,2,0
UserPrm,14F,33,2,0
UserPrm,160,16,2,0
UserPrm,161,1000,2,0
UserPrm,162,100,2,0
UserPrm,163,0,2,0
UserPrm,164,0,2,0
UserPrm,165,0,2,0
UserPrm,166,0,2,0
UserPrm,170,5121,2,0
UserPrm,200,1,2,1
UserPrm,205,65535,2,0
UserPrm,207,0,2,0
UserPrm,20A,32768,4,0
UserPrm,20E,16777216,4,1
UserPrm,210,10000,4,1
UserPrm,212,2500,4,1
UserPrm,216,0,2,0
UserPrm,217,0,2,0
UserPrm,218,1,2,0
UserPrm,22A,0,2,0
UserPrm,240,0,2,0
UserPrm,281,20,2,0
UserPrm,300,600,2,0
UserPrm,301,100,2,0
UserPrm,302,200,2,0
UserPrm,303,300,2,0
UserPrm,304,50,2,1
UserPrm,305,0,2,0
UserPrm,306,0,2,0
UserPrm,307,40,2,0
UserPrm,308,0,2,0
UserPrm,30A,0,2,0
UserPrm,30C,0,2,0
UserPrm,310,0,2,0
UserPrm,311,100,2,0
UserPrm,312,50,2,0
UserPrm,316,10000,2,0
UserPrm,324,300,2,0
UserPrm,400,30,2,0
UserPrm,401,85,2,1
UserPrm,402,800,2,0
UserPrm,403,800,2,0
UserPrm,404,100,2,0
UserPrm,405,100,2,0
UserPrm,406,800,2,0
UserPrm,407,10000,2,0
UserPrm,408,256,2,1
UserPrm,409,5000,2,0
UserPrm,40A,70,2,0
UserPrm,40B,0,2,0
UserPrm,40C,1480,2,1
UserPrm,40D,150,2,1
UserPrm,40E,0,2,0
UserPrm,40F,5000,2,0
UserPrm,410,50,2,0
UserPrm,412,100,2,0
UserPrm,415,0,2,0
UserPrm,416,0,2,0
UserPrm,417,5000,2,0
UserPrm,418,70,2,0
UserPrm,419,0,2,0
UserPrm,41A,5000,2,0
UserPrm,41B,70,2,0
UserPrm,41C,0,2,0
UserPrm,41D,5000,2,0
UserPrm,41E,70,2,0
UserPrm,41F,0,2,0
UserPrm,423,0,2,0
UserPrm,424,50,2,0
UserPrm,425,100,2,0
UserPrm,426,0,2,0
UserPrm,427,0,2,0
UserPrm,456,15,2,0
UserPrm,460,257,2,0
UserPrm,475,0,2,0
UserPrm,476,0,2,0
UserPrm,481,400,2,0
UserPrm,482,3000,2,0
UserPrm,486,25,2,0
UserPrm,487,0,2,0
UserPrm,488,100,2,0
UserPrm,490,100,2,0
UserPrm,495,100,2,0
UserPrm,498,10,2,0
UserPrm,501,10,2,0
UserPrm,502,20,2,0
UserPrm,503,10,2,0
UserPrm,506,0,2,0
UserPrm,507,100,2,0
UserPrm,508,50,2,0
UserPrm,509,20,2,0
UserPrm,50A,8448,2,0
UserPrm,50B,25923,2,0
UserPrm,50C,34952,2,0
UserPrm,50D,34952,2,0
UserPrm,50E,12305,2,1
UserPrm,50F,512,2,1
UserPrm,510,0,2,0
UserPrm,512,0,2,0
UserPrm,513,0,2,0
UserPrm,514,0,2,0
UserPrm,515,34952,2,0
UserPrm,516,34952,2,0
UserPrm,517,1620,2,0
UserPrm,518,0,2,0
UserPrm,519,34952,2,0
UserPrm,51B,1000,4,0
UserPrm,51E,100,2,0
UserPrm,520,5242880,4,0
UserPrm,522,7,4,0
UserPrm,524,1073741824,4,0
UserPrm,526,5242880,4,0
UserPrm,528,100,2,0
UserPrm,529,10000,2,0
UserPrm,52A,20,2,0
UserPrm,52B,20,2,0
UserPrm,52C,100,2,0
UserPrm,52F,4095,2,0
UserPrm,530,0,2,0
UserPrm,531,32768,4,0
UserPrm,533,500,2,0
UserPrm,534,100,2,0
UserPrm,535,100,2,0
UserPrm,536,1,2,0
UserPrm,550,0,2,0
UserPrm,551,0,2,0
UserPrm,552,100,2,0
UserPrm,553,100,2,0
UserPrm,55A,1,2,0
UserPrm,560,400,2,0
UserPrm,561,100,2,0
UserPrm,600,0,2,0
UserPrm,601,0,2,0
UserPrm,603,0,2,0
UserPrm,604,0,2,0
UserPrm,621,0,2,0
UserPrm,622,10000,2,0
UserPrm,623,10000,2,0
UserPrm,624,10,2,0
UserPrm,625,100,2,0
UserPrm,626,100,4,0
UserPrm,628,10,2,0
Custom
CustomGroupNum,1
Gp1_Begin
GroupName,
Num,0
Gp1_End

Binary file not shown.

View File

@@ -0,0 +1,256 @@
File-Spec,2
FileType,User Parameters Data File
Made-by,YASKAWA SigmaWin+ Ver.7
DateTime,12/23/2020 11:42:01 AM
SERVO-TYPE,SGD7S-1R6A00A002
SERVO-ID,112
SERVO-YMOD,0
SERVO-SPEC,00
SERVO-SOFT,47
SERVO-CAPACITY,200
SerialNo,1A2036500620098
BTOFlag,1
BTO-ID,
IS-SUPPORTED,1
IS-EDITED,0
MachineName,
OP-TYPE,
OP-ID,65533
OP-YMOD,65535
OP-SOFT,65535
OP1-TYPE,
OP1-TYPEID,0
OP1-ID,65533
OP1-YMOD,65535
OP1-YMODTYPE,65535
OP1-SOFT,65535
OP2-TYPE,
OP2-TYPEID,0
OP2-ID,65533
OP2-YMOD,65535
OP2-YMODTYPE,65535
OP2-SOFT,65535
OP3-TYPE,
OP3-TYPEID,0
OP3-ID,65533
OP3-YMOD,65535
OP3-YMODTYPE,65535
OP3-SOFT,65535
ACCESS-LEVEL,1
SpecVersion,65535
AXIS-NUM,1
MOTOR-TYPE,SGM7J-02AFD21
MOTOR-ID,173
ENCODER-ID,24
ENCODER-SOFT,3
ServoControlType,512
CompatibleMapNum,6
CompatibleMap,0,3,3,6,6,10
CommentCnt,0
Comment,
ServoNameComment,Picker Theta
UserPrmCnt,198
UserPrm,000,17,2,1
UserPrm,001,0,2,0
UserPrm,002,0,2,0
UserPrm,006,2,2,0
UserPrm,007,0,2,0
UserPrm,008,0,2,0
UserPrm,009,16,2,0
UserPrm,00A,1,2,0
UserPrm,00B,256,2,1
UserPrm,00C,0,2,0
UserPrm,00D,0,2,0
UserPrm,00E,0,2,0
UserPrm,00F,0,2,0
UserPrm,010,1,2,0
UserPrm,021,0,2,0
UserPrm,040,0,2,0
UserPrm,080,0,2,0
UserPrm,081,0,2,0
UserPrm,100,400,2,0
UserPrm,101,2000,2,0
UserPrm,102,400,2,0
UserPrm,103,100,2,0
UserPrm,104,400,2,0
UserPrm,105,2000,2,0
UserPrm,106,400,2,0
UserPrm,109,0,2,0
UserPrm,10A,0,2,0
UserPrm,10B,0,2,0
UserPrm,10C,200,2,0
UserPrm,10D,0,2,0
UserPrm,10E,0,2,0
UserPrm,10F,0,2,0
UserPrm,11F,0,2,0
UserPrm,121,100,2,0
UserPrm,122,100,2,0
UserPrm,123,0,2,0
UserPrm,124,0,2,0
UserPrm,125,100,2,0
UserPrm,131,0,2,0
UserPrm,132,0,2,0
UserPrm,135,0,2,0
UserPrm,136,0,2,0
UserPrm,139,0,2,0
UserPrm,13D,2000,2,0
UserPrm,140,256,2,0
UserPrm,141,500,2,0
UserPrm,142,1000,2,0
UserPrm,143,1000,2,0
UserPrm,144,1000,2,0
UserPrm,145,500,2,0
UserPrm,146,700,2,0
UserPrm,147,1000,2,0
UserPrm,148,500,2,0
UserPrm,149,1000,2,0
UserPrm,14A,800,2,0
UserPrm,14B,100,2,0
UserPrm,14F,33,2,0
UserPrm,160,16,2,0
UserPrm,161,1000,2,0
UserPrm,162,100,2,0
UserPrm,163,0,2,0
UserPrm,164,0,2,0
UserPrm,165,0,2,0
UserPrm,166,0,2,0
UserPrm,170,5121,2,0
UserPrm,200,1,2,1
UserPrm,205,65535,2,0
UserPrm,207,0,2,0
UserPrm,20A,32768,4,0
UserPrm,20E,16777216,4,1
UserPrm,210,20000,4,1
UserPrm,212,5000,4,1
UserPrm,216,0,2,0
UserPrm,217,0,2,0
UserPrm,218,1,2,0
UserPrm,22A,0,2,0
UserPrm,240,0,2,0
UserPrm,281,20,2,0
UserPrm,300,600,2,0
UserPrm,301,100,2,0
UserPrm,302,200,2,0
UserPrm,303,300,2,0
UserPrm,304,200,2,1
UserPrm,305,0,2,0
UserPrm,306,0,2,0
UserPrm,307,40,2,0
UserPrm,308,0,2,0
UserPrm,30A,0,2,0
UserPrm,30C,0,2,0
UserPrm,310,0,2,0
UserPrm,311,100,2,0
UserPrm,312,50,2,0
UserPrm,316,10000,2,0
UserPrm,324,300,2,0
UserPrm,400,30,2,0
UserPrm,401,100,2,0
UserPrm,402,800,2,0
UserPrm,403,800,2,0
UserPrm,404,100,2,0
UserPrm,405,100,2,0
UserPrm,406,800,2,0
UserPrm,407,10000,2,0
UserPrm,408,0,2,0
UserPrm,409,5000,2,0
UserPrm,40A,70,2,0
UserPrm,40B,0,2,0
UserPrm,40C,5000,2,0
UserPrm,40D,70,2,0
UserPrm,40E,0,2,0
UserPrm,40F,5000,2,0
UserPrm,410,50,2,0
UserPrm,412,100,2,0
UserPrm,415,0,2,0
UserPrm,416,0,2,0
UserPrm,417,5000,2,0
UserPrm,418,70,2,0
UserPrm,419,0,2,0
UserPrm,41A,5000,2,0
UserPrm,41B,70,2,0
UserPrm,41C,0,2,0
UserPrm,41D,5000,2,0
UserPrm,41E,70,2,0
UserPrm,41F,0,2,0
UserPrm,423,0,2,0
UserPrm,424,50,2,0
UserPrm,425,100,2,0
UserPrm,426,0,2,0
UserPrm,427,0,2,0
UserPrm,456,15,2,0
UserPrm,460,257,2,0
UserPrm,475,0,2,0
UserPrm,476,0,2,0
UserPrm,481,400,2,0
UserPrm,482,3000,2,0
UserPrm,486,25,2,0
UserPrm,487,0,2,0
UserPrm,488,100,2,0
UserPrm,490,100,2,0
UserPrm,495,100,2,0
UserPrm,498,10,2,0
UserPrm,501,10,2,0
UserPrm,502,20,2,0
UserPrm,503,10,2,0
UserPrm,506,0,2,0
UserPrm,507,100,2,0
UserPrm,508,50,2,0
UserPrm,509,20,2,0
UserPrm,50A,8448,2,0
UserPrm,50B,25923,2,0
UserPrm,50C,34952,2,0
UserPrm,50D,34952,2,0
UserPrm,50E,12817,2,0
UserPrm,50F,0,2,0
UserPrm,510,0,2,0
UserPrm,512,0,2,0
UserPrm,513,0,2,0
UserPrm,514,0,2,0
UserPrm,515,34952,2,0
UserPrm,516,34952,2,0
UserPrm,517,1620,2,0
UserPrm,518,0,2,0
UserPrm,519,34952,2,0
UserPrm,51B,1000,4,0
UserPrm,51E,100,2,0
UserPrm,520,5242880,4,0
UserPrm,522,7,4,0
UserPrm,524,1073741824,4,0
UserPrm,526,5242880,4,0
UserPrm,528,100,2,0
UserPrm,529,10000,2,0
UserPrm,52A,20,2,0
UserPrm,52B,20,2,0
UserPrm,52C,100,2,0
UserPrm,52F,4095,2,0
UserPrm,530,0,2,0
UserPrm,531,32768,4,0
UserPrm,533,500,2,0
UserPrm,534,100,2,0
UserPrm,535,100,2,0
UserPrm,536,1,2,0
UserPrm,550,0,2,0
UserPrm,551,0,2,0
UserPrm,552,100,2,0
UserPrm,553,100,2,0
UserPrm,55A,1,2,0
UserPrm,560,400,2,0
UserPrm,561,100,2,0
UserPrm,600,0,2,0
UserPrm,601,0,2,0
UserPrm,603,0,2,0
UserPrm,604,0,2,0
UserPrm,621,0,2,0
UserPrm,622,10000,2,0
UserPrm,623,10000,2,0
UserPrm,624,10,2,0
UserPrm,625,100,2,0
UserPrm,626,100,4,0
UserPrm,628,10,2,0
Custom
CustomGroupNum,1
Gp1_Begin
GroupName,
Num,0
Gp1_End

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace Project
{
public partial class FMain
{
}
}

View File

@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using UIControl;
using AR;
namespace Project
{
public partial class FMain
{
void _BUTTON_RESET()
{
//RESET 버튼 눌렸을때 공통 처리 사항
DIO.SetBuzzer(false); //buzzer off
if (PUB.popup.Visible)
PUB.popup.needClose = true;
if (
hmi1.Scean == HMI.eScean.xmove)
hmi1.Scean = UIControl.HMI.eScean.Nomal;
PUB.flag.set(eVarBool.FG_KEYENCE_OFFF, false, "USER");
PUB.flag.set(eVarBool.FG_KEYENCE_OFFR, false, "USER");
//팝업메세지가 제거가능한 메세지라면 없앤다.
if (hmi1.HasPopupMenu && hmi1.PopupMenuRequireInput == false)
hmi1.DelMenu();
//알람클리어작업(모션에 오류가 있는 경우에만)
if (PUB.mot.IsInit && PUB.mot.HasServoAlarm)
{
PUB.mot.SetAlarmClearOn();
System.Threading.Thread.Sleep(200);
PUB.mot.SetAlarmClearOff();
}
//자재가 없고, 센서도 반응안하는데. 진공이 되어잇으면 off한다
if (DIO.isVacOKL() == 0 && PUB.flag.get(eVarBool.FG_PK_ITEMON) == false && DIO.GetIOOutput(eDOName.PICK_VAC1) == false)
DIO.SetPickerVac(false, true);
//중단, 오류 모드일때에는 이 리셋이 의미가 있다.
if (PUB.sm.Step == eSMStep.RUN)
{
PUB.log.Add("동작중에는 [RESET] 버튼이 동작하지 않습니다");
}
else if (PUB.sm.Step == eSMStep.PAUSE)
{
//시작대기상태로 전환(대기상태일때 시작키를 누르면 실행 됨)
PUB.sm.SetNewStep(eSMStep.WAITSTART);
PUB.log.AddAT("Reset Clear System Resume & Pause ON");
}
else if (PUB.sm.Step == eSMStep.EMERGENCY)
{
PUB.popup.setMessage("EMERGENCY RESET\n" +
"[비상정지] 상태에는 [시스템초기화] 를 실행 해야 합니다\n" +
"상단메뉴 [초기화] 를 실행하세요");
PUB.log.Add("RESET버튼으로 인해 EMG 상황에서 IDLE전환");
PUB.sm.SetNewStep(eSMStep.IDLE);
}
else if (PUB.sm.Step == eSMStep.ERROR)
{
PUB.log.Add("RESET버튼으로 인해 ERR 상황에서 IDLE전환");
PUB.sm.SetNewStep(eSMStep.IDLE);
}
else if (PUB.sm.Step == eSMStep.WAITSTART)
{
//시작대기중일때에도 아무 처리안함
//Pub.log.Add("시작버튼대기중에는 [RESET] 버튼이 동작하지 않습니다");
}
else if (PUB.sm.Step == eSMStep.IDLE)
{
//Pub.log.Add("대기중에는 [RESET] 버튼이 동작하지 않습니다");
}
else
{
//Pub.log.AddE("정의되지 않은 상태에서의 REST 키 버튼 입력 - 대기상태로 전환합니다");
PUB.sm.SetNewStep(eSMStep.IDLE);
}
}
}
}

View File

@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using AR;
namespace Project
{
public partial class FMain
{
void _BUTTON_START()
{
if (PUB.sm.Step == eSMStep.RUN)
{
//아무것도 하지 않는다
PUB.log.Add("동작중에는 START 버튼이 사용되지 않습니다");
}
else if (PUB.sm.Step == eSMStep.IDLE) //일반대기상태
{
if (DIO.isVacOKL() > 0)
{
DIO.SetBuzzer(true);
PUB.popup.setMessage("PICKER ITEM DETECT\nPICKER 에서 아이템이 감지되었습니다\n[작업취소] 를 눌러서 아이템을 DROP 한 후 제거해주세요.");
return;
}
else if (DIO.getCartSize(1) == eCartSize.None)
{
DIO.SetBuzzer(true);
PUB.popup.setMessage("로더에 카트가 장착되지 않았습니다");
return;
}
else if (DIO.GetIOInput(eDIName.PORTC_LIM_DN) == true && DIO.GetIOInput(eDIName.PORTC_DET_UP) == true)
{
//하단리밋과, 자재감지가 동시에 들어오면 overload 이다
DIO.SetBuzzer(true);
PUB.popup.setMessage("로더에 너무 많은 릴이 적재 되어 있습니다\n" +
"하단 리밋 센서와 상단 릴 감지 센서가 동시에 확인 됩니다");
return;
}
//else if (Util_DO.getCartSize(0) == eCartSize.None && Util_DO.getCartSize(2) == eCartSize.None)
//{
// Util_DO.SetBuzzer(true);
// Pub.popup.setMessage("언로더에 카트가 장착되지 않았습니다");
// return;
//}
Func_start_job_select();
}
else if (PUB.sm.Step == eSMStep.WAITSTART) //시작대기상태
{
DIO.SetRoomLight(true);
//새로시작하면 포트 얼라인을 해제 해준다
PUB.flag.set(eVarBool.FG_RDY_PORT_PL, false, "SW_START");
PUB.flag.set(eVarBool.FG_RDY_PORT_PC, false, "SW_START");
PUB.flag.set(eVarBool.FG_RDY_PORT_PR, false, "SW_START");
//얼라인 상태를 모두 초기화 한다
//loader1.arVar_Port.ToList().ForEach(t => t.AlignOK = 0);
//언로더 체크작업은 항상 다시 시작한다
if (PUB.Result.UnloaderSeq > 1) PUB.Result.UnloaderSeq = 1;
//팝업메세지가 사라지도록 한다
PUB.popup.needClose = true;
PUB.sm.SetNewStep(eSMStep.RUN);
PUB.log.Add("[사용자 일시정지] 해제 => 작업이 계속됩니다");
}
else
{
//string msg = "SYSTEM {0}\n[RESET] 버튼을 누른 후 다시 시도하세요";
//msg = string.Format(msg, PUB.sm.Step);
//PUB.popup.setMessage(msg);
PUB.log.AddE($"[RESET] 버튼을 누른 후 다시 시도하세요");
}
}
}
}

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using AR;
namespace Project
{
public partial class FMain
{
void _BUTTON_STOP()
{
//매거진 투입모터 멈춤
if (DIO.GetIOOutput(eDOName.PORTL_MOT_RUN)) DIO.SetPortMotor(0, eMotDir.CW, false, "Button Stop");
if (DIO.GetIOOutput(eDOName.PORTC_MOT_RUN)) DIO.SetPortMotor(1, eMotDir.CW, false, "Button Stop");
if (DIO.GetIOOutput(eDOName.PORTR_MOT_RUN)) DIO.SetPortMotor(2, eMotDir.CW, false, "Button Stop");
//자재가 없고, 센서도 반응안하는데. 진공이 되어잇으면 off한다
if (DIO.isVacOKL() == 0 && PUB.flag.get(eVarBool.FG_PK_ITEMON) == false && DIO.GetIOOutput(eDOName.PICK_VAC1) == true)
DIO.SetPickerVac(false, true);
//조명켜기
if (AR.SETTING.Data.Disable_RoomLight == false)
DIO.SetRoomLight(true);
//컨베이어 멈춘다 230502
DIO.SetOutput(eDOName.LEFT_CONV, false);
DIO.SetOutput(eDOName.RIGHT_CONV, false);
//모든 모터도 멈춘다
if (PUB.mot.HasMoving) PUB.mot.MoveStop("Stop Button");
if (PUB.sm.Step == eSMStep.RUN)
{
//일시중지상태로 전환한다
PUB.Result.SetResultMessage(eResult.OPERATION, eECode.USER_STOP, eNextStep.PAUSE);
PUB.log.Add("[사용자 일시정지]");
}
else if (PUB.sm.Step == eSMStep.HOME_FULL) //홈진행중에는 대기상태로 전환
{
PUB.sm.SetNewStep(eSMStep.IDLE);
}
//로그 기록
PUB.LogFlush();
}
}
}

View File

@@ -0,0 +1,187 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project
{
public static class AmkorReelID
{
/// <summary>
/// 앰코 ID형태인지 확인합니다.
/// </summary>
/// <param name="rid"></param>
/// <param name="yy"></param>
/// <param name="m"></param>
/// <returns></returns>
public static Boolean IsValidID(string rid, out string yy, out string m)
{
yy = string.Empty;
m = string.Empty;
if (rid.Length != 15) return false;
try
{
var custCost = rid.Substring(2, 4);
var site = "K" + rid.Substring(6, 1);
var mc = rid.Substring(7, 1);
yy = rid.Substring(8, 2);
m = rid.Substring(10, 1);
var sn = rid.Substring(11, 4);
return true;
}
catch
{
return false;
}
}
public static string MakeReelID(string customercode, string ym)
{
if (customercode.Length != 4)
{
return String.Empty;//
//throw new Exception("Customer 코드는 4자리 입니다");
}
if (ym.Length != 3)
{
return string.Empty;//
//throw new Exception("Ym 코드는 3자리 입니다");
}
var rid = "RC{CUST}{DEVLOC}{DEVID}{YM}";
rid = rid.Replace("{DEVLOC}", AR.SETTING.Data.ReelIdDeviceLoc);
rid = rid.Replace("{DEVID}", AR.SETTING.Data.ReelIdDeviceID);
rid = rid.Replace("{CUST}", customercode);
rid = rid.Replace("{YM}", ym);
rid += GetNextSNbyYM(ym);
return rid;
}
/// <summary>
/// 입력된 월 기준으로 시리얼 번호를 생성합니다
/// </summary>
/// <param name="ym">21년 1월의 경우 211, 10월의 경우 21A 식으로 표현</param>
/// <param name="removeR">1,2번 위치에 R기호를 제거 할 것인가?</param>
/// <returns></returns>
public static string GetNextSNbyYM(string ym)
{
//서버에서 자료를 조회해서 처리한다.
var db = new EEEntities();
var dr = db.Component_Reel_Result.Where(t => t.PDATE == ym && t.PDATE.Contains("R") == false).OrderByDescending(t => t.RSN).FirstOrDefault();
if (dr == null) return "0001"; //처음쓰는 자료인다.
var curSN = dr.RSN;
return GetNextSNbySN(curSN);
}
/// <summary>
/// 해당월의 리턴릴의 번호를 생성한다
/// </summary>
/// <param name="ym"></param>
/// <returns></returns>
public static string GetNextSNbyYM_Return(string ym)
{
//서버에서 자료를 조회해서 처리한다.
var db = new EEEntities();
var dr = db.Component_Reel_Result.Where(t => t.PDATE == ym && t.PDATE.StartsWith("R")).OrderByDescending(t => t.RSN).FirstOrDefault();
if (dr == null) return "R001"; //처음쓰는 자료인다.
var curSN = dr.RSN;
return GetNextSNbySN_Return(curSN);
}
/// <summary>
/// 중복릴의 다은번호를 생성한다
/// </summary>
/// <param name="ym"></param>
/// <returns></returns>
public static string GetNextSNbyYM_Dup(string ym)
{
//서버에서 자료를 조회해서 처리한다.
var db = new EEEntities();
var dr = db.Component_Reel_Result.Where(t => t.PDATE == ym && t.PDATE.StartsWith("0R")).OrderByDescending(t => t.RSN).FirstOrDefault();
if (dr == null) return "0R01"; //처음쓰는 자료인다.
var curSN = dr.RSN;
return GetNextSNbySN_Dup(curSN);
}
/// <summary>
/// 입력한 시리얼 번호 이후의 번호를 생성합니다(0000~ZZZZ) 까지의 데이터를 가지며 2번쨰짜리까지는 R을 사용하지 못한다
/// </summary>
/// <param name="sn">기준 시리얼번호 4자리</param>
/// <param name="removeR"></param>
/// <returns></returns>
public static string GetNextSNbySN(string sn)
{
//서버에서 자료를 조회해서 처리한다.
string curSN = sn;
if (sn.Length != 4) throw new Exception("s/n length 4");
var buffer = curSN.ToCharArray();
for (int i = buffer.Length; i > 0; i--)
{
if (i <= 2)
if (buffer[i - 1] == 'Q') buffer[i - 1] = 'R';
if (buffer[i - 1] == '9') { buffer[i - 1] = 'A'; break; }
else if (buffer[i - 1] == 'Z') buffer[i - 1] = '0';
else { buffer[i - 1] = (char)((byte)buffer[i - 1] + 1); break; }
}
return string.Join("", buffer);
}
/// <summary>
/// 리턴릴의 다음 번호 생성 R로시작하며 000~ZZZ 영역을 가진다(제외문자 없음)
/// </summary>
/// <param name="sn"></param>
/// <returns></returns>
public static string GetNextSNbySN_Return(string sn)
{
//서버에서 자료를 조회해서 처리한다.
string curSN = sn;
if (sn.Length != 4) throw new Exception("s/n length 4");
var buffer = curSN.ToCharArray();
for (int i = buffer.Length; i > 1; i--)
{
//if (i <= 2) //1,2번 영역에는 R값이 들어가면 안된다.
//{
// if (buffer[i - 1] == 'Q') buffer[i - 1] = 'R';
//}
if (buffer[i - 1] == '9') { buffer[i - 1] = 'A'; break; }
else if (buffer[i - 1] == 'Z') buffer[i - 1] = '0';
else { buffer[i - 1] = (char)((byte)buffer[i - 1] + 1); break; }
}
buffer[0] = 'R';
return string.Join("", buffer);
}
/// <summary>
/// 중복릴의 다음 번호 생성(0R로 시작하며 00~ZZ의 영역을 가진다)
/// </summary>
/// <param name="sn"></param>
/// <returns></returns>
public static string GetNextSNbySN_Dup(string sn)
{
//서버에서 자료를 조회해서 처리한다.
string curSN = sn;
if (sn.Length != 4) throw new Exception("s/n length 4");
var buffer = curSN.ToCharArray();
for (int i = buffer.Length; i > 2; i--)
{
//if (i <= 2) //1,2번 영역에는 R값이 들어가면 안된다.
//{
// if (buffer[i - 1] == 'Q') buffer[i - 1] = 'R';
//}
if (buffer[i - 1] == '9') { buffer[i - 1] = 'A'; break; }
else if (buffer[i - 1] == 'Z') buffer[i - 1] = '0';
else { buffer[i - 1] = (char)((byte)buffer[i - 1] + 1); break; }
}
buffer[0] = '0';
buffer[1] = 'R';
return string.Join("", buffer);
}
}
}

View File

@@ -0,0 +1,168 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
namespace Project.Class
{
public class CHistoryJOB : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
List<JobData> _items;
public CHistoryJOB()
{
_items = new List<JobData>();
}
public void Clear()
{
lock (_items)
{
_items.Clear();
}
OnPropertyChanged("Clear");
}
public int Count
{
get
{
lock (_items)
{
return _items.Count;
}
}
}
public void SetItems(List<JobData> value)
{
lock (_items)
{
this._items = value;
}
OnPropertyChanged("REFRESH");
}
public List<JobData> Items { get { return _items; } }
public void Add(JobData data)
{
lock (_items)
{
data.No = this._items.Count + 1;
_items.Add(data);
}
OnPropertyChanged("Add:" + data.guid);
}
public void Remove(JobData data)
{
lock (_items)
{
_items.Remove(data);
}
OnPropertyChanged("Remove:" + data.guid);
}
public void Remove(string guid)
{
lock (_items)
{
var data = Get(guid);
_items.Remove(data);
}
OnPropertyChanged("Remove:" + guid);
}
public JobData Get(string guid)
{
lock (_items)
{
return _items.Where(t => t.guid == guid).FirstOrDefault();
}
}
public void Set(JobData data)
{
var item = Get(data.guid);
if (item == null) throw new Exception("No data guid:" + data.guid.ToString());
else
{
//item.No = data.No;
//item.JobStart = data.JobStart;
//item.JobEnd = data.JobEnd;
//item.VisionData = data.VisionData;
//item.error = data.error;
//item.Message = data.Message;
OnPropertyChanged("Set:" + data.guid);
}
}
public void RaiseSetEvent(string guid)
{
OnPropertyChanged("Set:" + guid);
}
protected void OnPropertyChanged([CallerMemberName] string name = null)
{
if (PropertyChanged != null)
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(name));
}
}
//[Serializable]
//public class JobData
//{
// //고유식별자
// public string guid { get; private set; }
// //비젼처리값
// public Class.VisionData VisionData { get; set; }
// //언로더포트(L/R)
// public string PortPos { get; set; }
// //프린트위치(U/LO)
// public string PrintPos { get; set; }
// //작업시작시간
// public DateTime JobStart { get; set; }
// //작업종료시간
// public DateTime JobEnd { get; set; }
// /// <summary>
// /// 이전 출고되는 시점과의 시간차 값
// /// </summary>
// public double TackTime { get { return (JobEnd - JobStart).TotalSeconds; } }
// //작업순서
// public int No { get; set; }
// //오류상태
// public eJobResult error { get; set; }
// //메세지
// public string message { get; set; }
// public TimeSpan JobRun
// {
// get
// {
// if (JobEnd.Year == 1982) return new TimeSpan(0);
// else return this.JobEnd - this.JobStart;
// }
// }
// public JobData()
// {
// this.No = 0;
// PortPos = string.Empty;
// PrintPos = string.Empty;
// guid = Guid.NewGuid().ToString();
// VisionData = new VisionData();
// this.JobStart = new DateTime(1982, 11, 23); // DateTime.Parse("1982-11-23");
// this.JobEnd = new DateTime(1982, 11, 23); // DateTime.Parse("1982-11-23");
// error = eJobResult.None;
// message = string.Empty;
// }
//}
}

View File

@@ -0,0 +1,134 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
namespace Project.Class
{
public class CHistorySIDRef : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public Boolean JobSIDRecvError
{
get
{
//아이템이있어야 정상이다
if (_items == null || _items.Count < 1) return true;
else if (JobSIDRecvTime.Year == 1982) return true;
else return false;
}
}
public DateTime JobSIDRecvTime { get; set; }
public string JobSIDRecvMessage { get; set; }
List<SIDDataRef> _items;
public CHistorySIDRef()
{
Clear();
}
public void SetItems(List<SIDDataRef> value)
{
this._items = value;
OnPropertyChanged("REFRESH");
}
public List<SIDDataRef> Items { get { return _items; } }
public int Count
{
get
{
return _items.Count;
}
}
public SIDDataRef Get(string sid_)
{
return _items.Where(t => t.sid == sid_).FirstOrDefault();
}
public void Set(SIDDataRef data)
{
var item = Get(data.sid);
if (item == null) throw new Exception("No data sid:" + data.sid.ToString());
else
{
item.kpc = data.kpc;
item.unit = data.unit;
OnPropertyChanged("Set:" + data.sid);
}
}
public void Set(string sid, int kpc, string unit)
{
var item = Get(sid);
if (item == null)
{
Add(sid, kpc, unit); //없다면 추가해준다
}
else
{
item.kpc = kpc;
item.unit = unit;
OnPropertyChanged("Set:" + sid);
}
}
public void Add(SIDDataRef data)
{
_items.Add(data);
OnPropertyChanged("Add:" + data.sid);
}
public void Add(string sid, int kpc_, string unit)
{
if (string.IsNullOrEmpty(sid))
{
PUB.log.AddAT("SID 추가 실패 SID 값이 입력되지 않았습니다");
return;
}
//if (JobSidList.ContainsKey(sid) == false)
_items.Add(new SIDDataRef(sid, kpc_, unit));
OnPropertyChanged("Add:" + sid);
//else
//{
//이미 데이터가 있다. 중복이므로 누적한다
//JobSidList.TryGetValue()
//}
}
public void Clear()
{
//JobSIDRecvError = false;
JobSIDRecvMessage = string.Empty;
JobSIDRecvTime = DateTime.Parse("1982-11-23");
if (this._items == null) this._items = new List<SIDDataRef>();
else this._items.Clear();
OnPropertyChanged("Clear");
}
protected void OnPropertyChanged([CallerMemberName] string name = null)
{
if (PropertyChanged != null)
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(name));
}
}
[Serializable]
public class SIDDataRef
{
public string guid { get; set; }
public string sid { get; set; }
public string unit { get; set; }
public int kpc { get; set; }
public SIDDataRef(string sid_, int kpc_, string unit_)
{
guid = Guid.NewGuid().ToString();
sid = sid_;
unit = unit_;
kpc = kpc_;
}
public SIDDataRef() : this(string.Empty, 0, string.Empty) { }
}
}

View File

@@ -0,0 +1,549 @@
using AR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Project
{
public class CResult
{
public enum eInspectResult
{
NG = 0,
OK,
ERROR,
NOTSET = 9,
}
public UInt64 OptionValue = 0;
public UInt64 OptionValueData = 0;
public List<Class.RegexPattern> BCDPattern;
public List<Class.RegexPattern> BCDIgnorePattern;
public List<Class.RegexPattern> BCDPrintPattern;
public DateTime ResetButtonDownTime = DateTime.Now;
public Boolean ClearAllSID = false;
public Class.CHistorySIDRef SIDReference; //SIDLIST받은 내역
public List<UIControl.CItem> OUTHistory; //출고포트 처리내역
public DataSet1.SIDHistoryDataTable SIDHistory; //sID별 rid 전체 목록 차수별로만 저장된다
public DataSet1.Component_Reel_SID_ConvertDataTable DTSidConvert;
public List<string> DTSidConvertEmptyList;
public List<string> DTSidConvertMultiList;
public DSList dsList;
public ModelInfoM mModel; //모션 모델
public ModelInfoV vModel; //작업 모델
/// <summary>
/// 아이템의 정보가 담겨있다 (0:왼쪽,1:비젼,2:오른쪽)
/// </summary>
public Class.JobData ItemDataL = new Class.JobData(0);
public Class.JobData ItemDataC = new Class.JobData(1);
public Class.JobData ItemDataR = new Class.JobData(2);
public Guid guid = new Guid();
public string JobType2 = string.Empty;
public Boolean JobFirst
{
get
{
return VAR.I32[(int)eVarInt32.PickOnCount] == 0;
}
}
public Boolean DryRun
{
get
{
if (string.IsNullOrEmpty(JobType2)) return false;
else return JobType2.ToUpper() == "DRY";
}
}
public int OverLoadCountF { get; set; }
public int OverLoadCountR { get; set; }
public UIControl.CItem UnloaderItem = null;
public DateTime LastExtInputTime = DateTime.Parse("1982-11-23");
public DateTime LastOutTime = DateTime.Parse("1982-11-23");
public Single[] PortAlignWaitSec = new float[] { 0, 0, 0, 0 };
public long[] PortAlignTime = new long[] { 0, 0, 0, 0 };
public byte UnloaderSeq = 0;
public DateTime UnloaderSeqTime;
public DateTime UnloaderSendtime = DateTime.Parse("1982-11-23");
/// <summary>
/// 로딩에 사용하는 포트번호 (자동 판단됨)
/// </summary>
public int LoadPortIndex = -1;
/// <summary>
/// 로딩시에 사용한 포트의 번호(이 값으로 수량기록 위치를 결정)
/// </summary>
public int LoadPickIndex = -1;
/// <summary>
/// 최종 할당된 언로딩 포트번호(1~8)
/// </summary>
public int UnloadPortNo = -1;
public byte LiveViewseq = 0;
public string AcceptBcd = string.Empty;
public DateTime AcceptBcdTime = DateTime.Now;
public string AcceptSid = string.Empty;
//작업정보
public eInspectResult Result; //작업결과가 저장됨
public eResult ResultCode;
public eECode ResultErrorCode;
public string ResultMessage;
public string LastSIDFrom = string.Empty;//101 = string.Empty;
public string LastSIDTo = string.Empty; // 103 = string.Empty;
//public string LastSID103_2 = string.Empty;
public string LastVName = string.Empty;
public int LastSIDCnt = 0;
public Dictionary<string, string> PrintPostionList = null;
//작업정보(시간)
public DateTime JobStartTime = DateTime.Parse("1982-11-23");
public DateTime JobEndTime = DateTime.Parse("1982-11-23");
public TimeSpan JobRunTime()
{
if (JobStartTime.Year == 1982) return new TimeSpan(0);
if (JobEndTime.Year == 1982) return DateTime.Now - JobStartTime;
else return JobEndTime - JobStartTime;
}
/// <summary>
/// RUN -> Pause(Wait Start)모드 전환시 저장할 모터의 위치값
/// 조그모드등으로 좌표를 옴길때의 기준 좌표
/// 이 좌표값에서 현재 모션값에 변화가 있으면 프로그램에서는 오류로 처리하게 됨
/// </summary>
public double[] PreventMotionPosition = new double[8];
#region "SetResultMessage"
public void SetResultMessage(eResult code, eECode err, eNextStep systempause, params object[] args)
{
var rltMsg = PUB.GetResultCodeMessage(code);
var codeMSg = $"[E{(int)err}] ";// + Util.GetResultCodeMessage(code);
if (err == eECode.MESSAGE_ERROR)
{
codeMSg = $"[{rltMsg} ERROR MESSAGE]\n";
}
else if (err == eECode.MESSAGE_INFO)
{
codeMSg = $"[{rltMsg} INFORMATION]\n";
}
var erMsg = PUB.GetErrorMessage(err, args);
var msg = codeMSg + erMsg;
this.ResultCode = code;
this.ResultErrorCode = err;
this.ResultMessage = msg;
if (systempause == eNextStep.PAUSENOMESAGE) this.ResultMessage = string.Empty; //210129
PUB.log.AddE(msg);
if (systempause == eNextStep.PAUSE) PUB.sm.SetNewStep(eSMStep.PAUSE);
else if (systempause == eNextStep.PAUSENOMESAGE) PUB.sm.SetNewStep(eSMStep.PAUSE);
else if (systempause == eNextStep.ERROR) PUB.sm.SetNewStep(eSMStep.ERROR);
}
public void SetResultTimeOutMessage(eDOName pinName, Boolean checkState, eNextStep systemPause)
{
var pindef = DIO.Pin[pinName];
if (checkState) SetResultMessage(eResult.SENSOR, eECode.DOON, systemPause, pindef.terminalno, pindef.name);
else SetResultMessage(eResult.SENSOR, eECode.DOOFF, systemPause, pindef.terminalno, pindef.name);
}
public void SetResultTimeOutMessage(eDIName pinName, Boolean checkState, eNextStep systemPause)
{
var pindef = DIO.Pin[pinName];
if (checkState) SetResultMessage(eResult.SENSOR, eECode.DION, systemPause, pindef.terminalno, pindef.name);
else SetResultMessage(eResult.SENSOR, eECode.DIOFF, systemPause, pindef.terminalno, pindef.name);
}
public void SetResultTimeOutMessage(eAxis motAxis, eECode ecode, eNextStep systemPause, string source, double targetpos, string message)
{
SetResultMessage(eResult.TIMEOUT, ecode, systemPause, motAxis, source, targetpos, message);
}
public void SetResultTimeOutMessage(eECode ecode, eNextStep systemPause, params object[] args)
{
SetResultMessage(eResult.TIMEOUT, ecode, systemPause, args);
}
#endregion
public DateTime[] diCheckTime = new DateTime[256];
public DateTime[] doCheckTime = new DateTime[256];
public Boolean isError { get; set; }
// public Boolean isMarkingMode { get; set; }
public int retry = 0;
public DateTime retryTime;
public DateTime[] WaitForVar = new DateTime[255];
public int JoystickAxisGroup = 0;
public int ABCount = 0;
public CResult()
{
mModel = new ModelInfoM();
vModel = new ModelInfoV();
SIDReference = new Class.CHistorySIDRef();
SIDHistory = new DataSet1.SIDHistoryDataTable();
BCDPattern = new List<Class.RegexPattern>();
BCDPrintPattern = new List<Class.RegexPattern>();
OUTHistory = new List<UIControl.CItem>();
this.Clear("Result ctor");
dsList = new DSList();
LoadListDB();
//230509
if(DTSidConvert != null) DTSidConvert.Dispose();
DTSidConvert = new DataSet1.Component_Reel_SID_ConvertDataTable();
DTSidConvertEmptyList = new List<string>();
DTSidConvertMultiList = new List<string>();
}
public void SaveListDB()
{
var finame = System.IO.Path.Combine(UTIL.CurrentPath, "Data", "SavaedList.xml");
var fi = new System.IO.FileInfo(finame);
if (fi.Directory.Exists == false) fi.Directory.Create();
this.dsList.WriteXml(fi.FullName);
PUB.log.Add("사전목록DB를 저장 했습니다" + fi.FullName);
}
public void LoadListDB()
{
var finame = System.IO.Path.Combine(UTIL.CurrentPath, "Data", "SavaedList.xml");
var fi = new System.IO.FileInfo(finame);
if (fi.Directory.Exists == false) fi.Directory.Create();
if (fi.Exists)
{
this.dsList.ReadXml(fi.FullName);
PUB.log.Add("사전목록DB를 불러왔습니다" + fi.FullName);
}
}
///// <summary>
///// 입력한 sid 가 원본에 존재하지 않으면 -1을 존재하면 입력된 수량을 반환합니다
///// </summary>
///// <param name="sid"></param>
///// <returns></returns>
//public int ExistSIDReferenceCheck(string sid)
//{
// var dr = PUB.Result.SIDReference.Items.Where(t => t.sid.EndsWith(sid)).FirstOrDefault();
// if (dr == null) return -1;
// else return dr.kpc;
//}
//public void ClearHistory()
//{
// //this.JObHistory.Clear();
// this.SIDReference.Clear();
// PUB.log.AddI("Clear History");
//}
public void ClearOutPort()
{
OUTHistory.Clear();
}
public void Clear(string Reason)
{
this.guid = Guid.NewGuid();
//프린트위치를 별도로 저장하고 있는다(나중에 추가 활용한다) 231005
if (PrintPostionList == null)
PrintPostionList = new Dictionary<string, string>();
else
PrintPostionList.Clear();
ItemDataL.Clear(Reason);
ItemDataC.Clear(Reason);
ItemDataR.Clear(Reason);
OverLoadCountF = 0;
OverLoadCountR = 0;
ClearOutPort();
LoadPortIndex = -1;
if (PUB.sm != null)
PUB.sm.seq.ClearTime();
isError = false;
ABCount = 0;
///기다림용 변수모듬
for (int i = 0; i < WaitForVar.Length; i++)
WaitForVar[i] = DateTime.Parse("1982-11-23");
//조그모드시 모션이동 감지용 저장 변수
for (int i = 0; i < 6; i++)
PreventMotionPosition[i] = 0.0;
//JobStartTime = DateTime.Parse("1982-11-23");
//JobEndTime = DateTime.Parse("1982-11-23");
//LastOutTime = DateTime.Parse("1982-11-23");
Result = eInspectResult.NOTSET;
ResultCode = eResult.NOERROR;
ResultMessage = string.Empty;
//시간정보값을 초기화함
for (int i = 0; i < 2; i++)
ClearTime(i);
PUB.log.Add("Result 데이터 초기화");
}
public void ClearTime(int shutIdx)
{
//JobStartTime = DateTime.Parse("1982-11-23");
//JobEndTime = DateTime.Parse("1982-11-23");
Result = eInspectResult.NOTSET;
ResultCode = eResult.NOERROR;
ResultMessage = string.Empty;
PUB.log.Add("Result(Clear Time)");
}
public Boolean isSetmModel
{
get
{
if (PUB.Result.mModel == null || PUB.Result.mModel.idx == -1 || PUB.Result.mModel.Title.isEmpty())
return false;
else return true;
}
}
public Boolean isSetvModel
{
get
{
if (PUB.Result.vModel == null || PUB.Result.vModel.idx == -1 || PUB.Result.vModel.Title.isEmpty())
return false;
else return true;
}
}
//public string getErrorMessage(eResult rlt, eECode err, params object[] args)
//{
// switch (err)
// {
// case eECode.RIDDUPL:
// return string.Format(
// "좌측 언로더에 사용되었던 REEL ID 입니다\n" +
// "바코드 오류 가능성이 있습니다\n" +
// "좌측 릴의 바코드를 확인하시기 바랍니다\n" +
// "작업을 계속할 수 없습니다. 취소 후 다시 시도하세요\n{0}", args);
// case eECode.RIDDUPR:
// return string.Format(
// "우측 언로더에 사용되었던 REEL ID 입니다\n" +
// "바코드 오류 가능성이 있습니다\n" +
// "우측 릴의 바코드를 확인하시기 바랍니다\n" +
// "작업을 계속할 수 없습니다. 취소 후 다시 시도하세요\n{0}", args);
// case eECode.BARCODEVALIDERR:
// return string.Format("바코드 데이터 검증 실패\n" +
// "인쇄전 데이터와 인쇄후 데이터가 일치하지 않습니다\n" +
// "ID(O) : {1}\n" +
// "ID(N) : {2}\n" +
// "SID : {5}->{6}\n" +
// "QTY : {3}->{4}\n" +
// "DATE : {7}->{8}\n" +
// "Index : {0}", args);
// case eECode.MOTX_SAFETY:
// return string.Format("PICKER-X 축이 안전위치에 없습니다\n1. 조그를 이용하여 중앙으로 이동 합니다\n2.홈 작업을 다시 실행합니다", args);
// case eECode.NOERROR:
// return string.Format("오류가 없습니다", args);
// case eECode.PORTOVERLOAD:
// return string.Format("PORT OVERLOAD\n위치 : {0}\n" +
// "너무 많은 양이 적재 되었습니다\n" + "상단 LIMIT 센서에 걸리지 않게 적재하세요", args);
// case eECode.EMERGENCY:
// return string.Format("비상정지 버튼을 확인하세요\n" +
// "버튼 : F{0}\n" +
// "메인전원이 OFF 된 경우에도 이 메세지가 표시 됩니다\n" +
// "메인전원은 모니터 하단 AIR버튼 좌측에 있습니다"
// , DIO.GetIOInput(eDIName.BUT_EMGF));
// case eECode.NOMODELM:
// return "모션모델이 선택되지 않았습니다\n" +
// "상단 메뉴 [모션모델]에서 사용할 모델을 선택하세요";
// case eECode.NOMODELV:
// return "작업모델이 선택되지 않았습니다\n" +
// "상단 메뉴 [작업모델]에서 사용할 모델을 선택하세요";
// case eECode.CARTERROR:
// return string.Format("언로더 카트가 없거나 크기 정보가 일치하지 않습니다\n좌측:{0}, 로더:{1}, 우측:{2}", args);
// case eECode.CARTL:
// return string.Format("왼쪽(UNLOAD) 포트에 카트가 감지되지 않습니다\n카트를 장착하세요\n카트크기 : {0}, 릴크기:{1}", args);
// case eECode.CARTC:
// return string.Format("중앙(LOAD) 포트에 카트가 감지되지 않습니다\n카트를 장착하세요\n카트크기 : {0}, 릴크기:{1}", args);
// case eECode.CARTR:
// return string.Format("오른쪽(UNLOAD) 포트에 카트가 감지되지 않습니다\n카트를 장착하세요\n카트크기 : {0}, 릴크기:{1}", args);
// case eECode.CARTLMATCH:
// return string.Format("왼쪽(UNLOAD) 카트와 피커의 릴 크기가 일치하지 않습니다\n카트크기를 확인 하세요\n카트크기 : {0}, 릴크기:{1}", args);
// case eECode.CARTCMATCH:
// return string.Format("중앙(LOAD) 카트와 피커의 릴 크기가 일치하지 않습니다\n카트크기를 확인 하세요\n카트크기 : {0}, 릴크기:{1}", args);
// case eECode.CARTRMATCH:
// return string.Format("오른쪽(UNLOAD) 카트와 피커의 릴 크기가 일치하지 않습니다\n카트크기를 확인 하세요\n카트크기 : {0}, 릴크기:{1}", args);
// case eECode.NOREELSIZE:
// return string.Format("왼쪽포트에 놓을 릴의 크기정보가 없습니다\n프로그램 오류입니다\n개발자에게 해당 메세지를 전달하세요\n" +
// "장치 초기화를 진행 한 후 다시 시도하세요");
// case eECode.VISION_NOCONN:
// return string.Format("카메라({0}) 연결 안됨", args);
// case eECode.INCOMPLETE_LOADERDATA:
// return string.Format("로더 바코드 필수값을 읽지 못했습니다", args);
// case eECode.CAM_NOBARCODEU:
// return string.Format("언로더({0}) 바코드를 읽지 못했습니다", args);
// case eECode.HOME_TIMEOUT:
// return string.Format("홈 진행이 완료되지 않고 있습니다\n" +
// "오류가 발생했다면 '홈' 작업을 다시 진행하세요\n" +
// "대기시간 : {0}초", args);
// case eECode.DOORSAFTY:
// return string.Format("포트 안전센서가 감지 되었습니다\n" +
// "안전센서를 확인한 후 다시 시도하세요\n", args);
// case eECode.AIRNOOUT:
// return "AIR 공급이 차단 되어 있습니다.\n" +
// "전면의 AIR 버튼을 누르세요\n" +
// "공급이 되지 않으면 메인 전원 을 확인하세요\n" +
// "메인 전원은 AIR 버튼 좌측에 있습니다" +
// "메인 전원 공급 실패시 장비 후면의 차단기를 확인하세요";
// case eECode.DOOFF:
// var pinoOf = (eDOName)args[0];
// return string.Format("출력이 OFF 되지 않았습니다.\n" +
// "포트설명 : {0}\n" +
// "포트번호 : {1} ({2})", DIO.getPinDescription(pinoOf), (int)pinoOf, Enum.GetName(typeof(eDOPin), pinoOf));
// case eECode.DOON:
// var pinoOn = (eDOName)args[0];
// return string.Format("출력이 ON 되지 않았습니다.\n" +
// "포트설명 : {0}\n" +
// "포트번호 : {1} ({2})", DIO.getPinDescription(pinoOn), (int)pinoOn, Enum.GetName(typeof(eDOPin), pinoOn));
// case eECode.DIOFF:
// var piniOf = (eDIName)args[0];
// return string.Format("입력이 OFF 되지 않았습니다.\n" +
// "포트설명 : {0}\n" +
// "포트번호 : {1} ({2})", DIO.getPinDescription(piniOf), (int)piniOf, Enum.GetName(typeof(eDIPin), piniOf));
// case eECode.DION:
// var piniOn = (eDIName)args[0];
// return string.Format("입력이 ON 되지 않았습니다.\n" +
// "포트설명 : {0}\n" +
// "포트번호 : {1} ({2})", DIO.getPinDescription(piniOn), (int)piniOn, Enum.GetName(typeof(eDIPin), piniOn));
// case eECode.AZJINIT:
// return string.Format("DIO 혹은 모션카드가 초기화 되지 않았습니다.\n" +
// "DIO : {0}\n" +
// "MOTION : {1}\n" +
// "해당 카드는 본체 내부 PCI 슬롯에 장착 된 장비 입니다\n" +
// "EzConfig AXT 프로그램으로 카드 상태를 확인하세요",
// PUB.dio.IsInit, PUB.mot.IsInit);
// case eECode.MOT_HSET:
// var msg = "모션의 HOME 검색이 완료되지 않았습니다";
// for (int i = 0; i < 6; i++)
// {
// if (PUB.mot.IsUse(i) == false) continue;
// var axis = (eAxis)i;
// var stat = PUB.mot.IsHomeSet(i);
// if (stat == false) msg += string.Format("\n[{0}] {1} : {2}", i, axis, stat);
// }
// msg += "\n장치 초기화를 실행하세요";
// return msg;
// case eECode.MOT_SVOFF:
// var msgsv = "모션 중 SERVO-OFF 된 축이 있습니다";
// for (int i = 0; i < 6; i++)
// {
// if (PUB.mot.IsUse(i) == false) continue;
// var axis = (eAxis)i;
// var stat = PUB.mot.IsServOn(i);
// if (stat == false) msgsv += string.Format("\n[{0}] {1} : {2}", i, axis, stat);
// }
// msgsv += "\nRESET을 누른 후 '모션설정' 화면에서 확인합니다";
// return msgsv;
// case eECode.MOT_HSEARCH:
// return string.Format("모션의 홈 검색이 실패되었습니다\n" +
// "축 : {0}\n" +
// "메세지 : {1}", args);
// case eECode.MOT_CMD:
// var axisNo = (int)((eAxis)args[0]);
// var axisSrc = args[1].ToString();
// return string.Format("모션축 명령이 실패 되었습니다\n축 : {0}\n" +
// "현재위치 : {2}\n" +
// "명령위치 : {3}\n" +
// "소스 : {1}", axisNo, axisSrc, PUB.mot.GetActPos(axisNo), PUB.mot.GetActPos(axisNo));
// //case eECode.timeout_step:
// // return string.Format("스텝당 최대 실행 시간이 초과 되었습니다.\n" +
// // "스텝 : {0}\n" +
// // "최대동작시간 : " + COMM.SETTING.Data.Timeout_StepMaxTime.ToString(), args);
// case eECode.USER_STOP:
// return "'일시정지' 버튼 눌림\n" +
// "사용자에 의해 작동이 중지 되었습니다\n" +
// "'RESET' -> 'START'로 작업을 계속할 수 있습니다";
// case eECode.CAM_RIGHT:
// return "우측카메라가 사용가능한 상태가 아닙니다.\n" +
// "신규 실행시에는 초기화 완료까지 기다려 주세요";
// case eECode.CAM_LEFT:
// return "좌측카메라가 사용가능한 상태가 아닙니다.\n" +
// "신규 실행시에는 초기화 완료까지 기다려 주세요";
// default:
// return err.ToString();
// }
//}
//public string getResultCodeMessage(eResult rltCode)
//{
// //별도 메세지처리없이 그대로 노출한다
// return rltCode.ToString().ToUpper();
//}
}
}

View File

@@ -0,0 +1,459 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AR;
namespace Project.Commands
{
public class CommandBuffer
{
public int Idx { get; set; }
private int REGISTER_VALUE = 0;
private Boolean REGISTER_TRUE = false;
private Boolean REGISTER_FALSE = false;
private Boolean REGISTER_EQUAL = false;
private Boolean REGISTER_ABOVE = false;
private Boolean REGISTER_BELOW = false;
/// <summary>
/// 순차실행명령
/// </summary>
public List<Command> Commands;
/// <summary>
/// 상시실행명령
/// </summary>
public List<Command> SPS;
public CommandBuffer()
{
Commands = new List<Command>();
SPS = new List<Command>();
}
public void AddSeq(Command cmd)
{
cmd.Idx = this.Commands.Count;
this.Commands.Add(cmd);
}
public void AddSPS(Command cmd)
{
cmd.Idx = this.SPS.Count;
this.SPS.Add(cmd);
}
public void Clear()
{
Commands.Clear();
SPS.Clear();
Idx = 0;
}
public StepResult Run()
{
//sps는 모두 실행한다
StepResult rlt;
foreach (var sps in this.SPS)
{
rlt = RunCode(sps);
if (rlt == StepResult.Wait) return StepResult.Wait; //SPS에서 대기 코드가 있다
else if (rlt == StepResult.Error) return StepResult.Error;
}
//sequece 는 현재 것만 실행한다.
if (Idx < 0) Idx = 0;
var cmd = this.Commands[Idx];
rlt = RunCode(cmd);
if (rlt == StepResult.Complete) //이 명령이 완료되면 다음으로 진행한다
{
Idx += 1;
if (Idx >= this.Commands.Count) return StepResult.Complete;
else return StepResult.Wait;
}
return rlt;
}
private StepResult RunCode(Command cmd)
{
switch (cmd.type)
{
case CType.NOP: return StepResult.Complete;
case CType.Wait:
var data0 = cmd.Data as CDWait;
if (data0.Trigger == false)
{
//아직 시작을 안했으니 시작시키고 대기한다
data0.SetTrigger(true);
return StepResult.Wait;
}
else
{
//아직 시간을 다 쓰지 않았다면 넘어간다
if (data0.TimeOver == false) return StepResult.Wait;
}
break;
case CType.Output:
var data1 = cmd.Data as CDOutput;
if (data1.PinIndex < 0) return StepResult.Error;
if (DIO.SetOutput((eDOName)data1.Pin, data1.Value) == false) return StepResult.Error;
break;
case CType.Move:
var data2 = cmd.Data as CDMove;
MOT.Move((eAxis)data2.Axis, data2.Position, data2.Speed, data2.Acc, data2.Relative);
break;
case CType.MoveForece:
var data3 = cmd.Data as CDMove;
MOT.Move((eAxis)data3.Axis, data3.Position, data3.Speed, data3.Acc, data3.Relative, false, false);
break;
case CType.MoveWait:
var data4 = cmd.Data as CDMove;
var axis = (eAxis)data4.Axis;
var mrlt = MOT.CheckMotionPos(axis, new TimeSpan(1), data4.Position, data4.Speed, data4.Acc, data4.Dcc, cmd.description);
if (mrlt == false) return StepResult.Wait;
break;
case CType.GetFlag:
var data5 = cmd.Data as CDFlag;
data5.Value = PUB.flag.get(data5.Flag);
REGISTER_FALSE = data5.Value == false;
REGISTER_TRUE = data5.Value == true;
break;
case CType.SetFlag:
var data6 = cmd.Data as CDFlag;
PUB.flag.set(data6.Flag, data6.Value, cmd.description);
break;
case CType.True:
var data7 = cmd.Data as CDCommand;
if (REGISTER_TRUE) return RunCode(data7.Command);
break;
case CType.False:
var data8 = cmd.Data as CDCommand;
if (REGISTER_FALSE) return RunCode(data8.Command);
break;
case CType.GetVar: //공용변수의값
var data10 = cmd.Data as CDGetVar;
if (data10.Key == "STEPTIME")
{
data10.Confirm = true;
data10.Value = (int)PUB.sm.StepRunTime.TotalMilliseconds;
}
break;
case CType.GetSetVar: //공용변수(설정)의 값
var data11 = cmd.Data as CDGetVar;
if (data11.Key == "TIMEOUT_HOMEFULL")
{
data11.Confirm = true;
data11.Value = 60;// (int)Pub.sm.StepRunTime.TotalMilliseconds;
}
break;
case CType.Compare:
var data9 = cmd.Data as CDCompare<int>;
if (data9 != null)
{
RunCode(data9.Source); //비교값(좌)
RunCode(data9.Target); //비교값(우)
var valS = data9.Source.Data as ICommandValue;
var valT = data9.Target.Data as ICommandValue;
int ValueS = (int)valS.Value;
int ValueT = (int)valT.Value;
REGISTER_ABOVE = ValueS > ValueT;
REGISTER_BELOW = ValueS < ValueT;
REGISTER_EQUAL = ValueS == ValueT;
REGISTER_TRUE = ValueS == ValueT;
REGISTER_FALSE = ValueS != ValueT;
REGISTER_VALUE = ValueS - ValueT;
}
else return StepResult.Error;
break;
case CType.SetError:
var data12 = cmd.Data as CDError;
PUB.Result.SetResultMessage(data12.ResultCode, data12.ErrorCode, data12.NextStep);
break;
}
return StepResult.Complete;
}
}
public enum CType
{
NOP = 0,
/// <summary>
/// motion move
/// </summary>
Move,
MoveForece,
/// <summary>
/// move and wait
/// </summary>
MoveWait,
/// <summary>
/// set digital output
/// </summary>
Output,
Log,
StepChange,
/// <summary>
/// check digital input
/// </summary>
InputCheck,
/// <summary>
/// check digital output
/// </summary>
OutputCheck,
GetFlag,
SetFlag,
Equal,
NotEqual,
True,
False,
Zero,
NonZero,
SetError,
Compare,
SetVar,
GetVar,
GetSetVar,
Above,
Below,
Wait,
Run,
}
public class Command
{
public CType type { get; set; } = CType.NOP;
public int Idx { get; set; }
public string description { get; set; }
public ICommandData Data { get; set; }
public Command(CType type, string desc = "")
{
this.type = type;
this.description = desc;
}
}
public interface ICommandData
{
// string Description { get; set; }
}
public interface ICommandValue
{
object Value { get; set; }
}
public class CDGetVar : ICommandData, ICommandValue
{
public string Key { get; set; }
public object Value { get; set; }
public Boolean Confirm { get; set; }
public CDGetVar(string key)
{
this.Key = key;
}
}
public class CDGetSetVar : ICommandData, ICommandValue
{
public string Key { get; set; }
public object Value { get; set; }
public Boolean Confirm { get; set; }
public CDGetSetVar(string key)
{
this.Key = key;
}
}
public class CDSetVar : ICommandData
{
public string Key { get; set; }
public int Value { get; set; }
public CDSetVar(string key, int value)
{
this.Key = key;
this.Value = Value;
}
}
public class CDFlag : ICommandData
{
public eVarBool Flag { get; set; }
public Boolean Value { get; set; }
public CDFlag(eVarBool flag)
{
this.Flag = flag;
Value = false;
}
}
public class CDSetValI : ICommandData
{
public int Value { get; set; }
public CDSetValI(int idx, int value)
{
this.Value = value;
}
}
public class CDSetValB : ICommandData
{
public bool Value { get; set; }
public CDSetValB(int idx, bool value)
{
this.Value = value;
}
}
public class CDCommand : ICommandData
{
public Command Command { get; set; }
public CDCommand(Command command)
{
this.Command = command;
}
}
public class CDError : ICommandData
{
public eResult ResultCode { get; set; }
public eECode ErrorCode { get; set; }
public eNextStep NextStep { get; set; }
public CDError(eResult resultCode, eECode errorCode, eNextStep nextStep)
{
ResultCode = resultCode;
ErrorCode = errorCode;
NextStep = nextStep;
}
}
//public class CDCompare<T> : ICommandData
//{
// public T Value { get; set; }
// public CDCompare(T value)
// {
// Value = value;
// }
// public CDCompare(Command source, Command target)
// {
// Value = value;
// }
//}
public class CDCompare<T> : ICommandData
{
public Command Source { get; set; }
public Command Target { get; set; }
public CDCompare(Command source, Command target)
{
Source = source;
Target = target;
}
}
public class CDWait : ICommandData
{
public int WaitMS { get; set; }
public DateTime StartTime { get; set; }
public Boolean Trigger { get; set; }
private TimeSpan GetTime { get { return DateTime.Now - StartTime; } }
public Boolean TimeOver { get { return GetTime.TotalMilliseconds > WaitMS; } }
public void SetTrigger(Boolean value)
{
Trigger = value;
StartTime = DateTime.Now;
}
public CDWait() : this(100) { }
public CDWait(int ms)
{
this.WaitMS = ms;
}
}
public class CDMove : ICommandData
{
public int Axis { get; set; }
public double Position { get; set; }
public double Speed { get; set; }
public double Acc { get; set; }
public double Dcc { get; set; }
public Boolean Relative { get; set; }
// public string Description { get; set; }
public CDMove(eAxis axis, double pos, double speed) : this((int)axis, pos, speed, 0) { }
public CDMove(int axis, double pos, double speed, double acc, double dcc = 0, Boolean relatvie = false)
{
Axis = axis;
Position = pos;
Speed = speed;
Acc = acc;
Dcc = dcc == 0 ? acc : dcc;
Relative = relatvie;
}
}
public class CDOutput : ICommandData
{
public eDOName Pin { get; set; }
public int PinIndex { get; set; }
public Boolean Value { get; set; }
// public string Description { get; set; }
//public CDOutput(eDOName pin) : this(pin, false) { }
public CDOutput(eDOName pin, Boolean value)
{
Pin = pin;
PinIndex = (int)pin;
Value = value;
}
public CDOutput(int point, Boolean value)
{
Pin = (eDOName)point;
PinIndex = point;
Value = value;
}
}
public class CDRun : ICommandData
{
public Action Target { get; set; }
public CDRun(Action target)
{
Target = target;
}
}
public class CDRunRet<T> : ICommandData
{
public Func<T> Target { get; set; }
public CDRunRet(Func<T> target)
{
Target = target;
}
}
public class CDLog : ICommandData
{
public string Message { get; set; }
public Boolean IsError { get; set; }
public CDLog(string message, Boolean err = false)
{
Message = message;
IsError = err;
}
}
public class CDStep : ICommandData
{
public eSMStep Step { get; set; }
public Boolean Force { get; set; }
public CDStep(eSMStep step, Boolean force = false)
{
Step = step;
Force = force;
}
}
}

View File

@@ -0,0 +1,390 @@
using Project;
using Project.Device;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Net;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
/// <summary>
/// ============================================================================
/// 장비기술 상태 모니터링 관련 클래스
/// 이 클래스는 SQLfiletoDB 프로그램과 같이 사용하는 것을 권장합니다.
/// 현재 실행 중인 프로그램의 하위 폴더 Status 에 입력된 상태값을 SQL 파일로 기록합니다.
/// SQLfiletoDB는 SQL파일을 실제 DB에 기록하는 프로그램입니다.
/// ============================================================================
/// 작성자 : chi
/// 작성일 : 202-06-15
/// GIT : (none)
/// </summary>
public static partial class EEMStatus
{
static System.Threading.ManualResetEvent mre = new System.Threading.ManualResetEvent(true);
static string ip = string.Empty;
static string mac = string.Empty;
static DateTime StatusChecktime = DateTime.Now;
static DateTime MonitorChecktime = DateTime.Now.AddYears(-1);
static DateTime FileCheckTime = DateTime.Now;
static string monitorfile = string.Empty;
/// <summary>
/// UpdateStatusSQL 명령이 동작하는 간격이며 기본 180초(=3분)로 되어 있습니다.
/// </summary>
public static int UpdateStatusInterval { get; set; } = 180;
public static int UpdateFileInterval { get; set; } = 3;
static bool queryok = false;
static bool UpdateRun = false;
public static string IP
{
get
{
if (queryok == false) GetNetworkInfo();
return ip;
}
set { ip = value; }
}
public static string MAC
{
get
{
if (queryok == false) GetNetworkInfo();
return mac;
}
set
{
mac = value;
}
}
/// <summary>
/// 현재 시스템의 IP/MAC정보를 취득합니다.
/// </summary>
static void GetNetworkInfo()
{
ip = "";
mac = "";
// string prgmName = Application.ProductName;
var nif = NetworkInterface.GetAllNetworkInterfaces();
var host = Dns.GetHostEntry(Dns.GetHostName());
string fullname = System.Net.Dns.GetHostEntry("").HostName;
foreach (IPAddress r in host.AddressList)
{
string str = r.ToString();
if (str != "" && str.Substring(0, 3) == "10.")
{
ip = str;
break;
}
}
string rtn = string.Empty;
ObjectQuery oq = new System.Management.ObjectQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled='TRUE'");
ManagementObjectSearcher query1 = new ManagementObjectSearcher(oq);
foreach (ManagementObject mo in query1.Get())
{
string[] address = (string[])mo["IPAddress"];
if (address[0] == ip && mo["MACAddress"] != null)
{
mac = mo["MACAddress"].ToString();
break;
}
}
queryok = true;
}
public static void UpdateStatusSQL(eSMStep status, bool _extrun = false, string remark = "")
{
var tsrun = DateTime.Now - StatusChecktime;
if (tsrun.TotalSeconds >= UpdateStatusInterval)
{
AddStatusSQL(status, "UPDATE", extrun: _extrun);
StatusChecktime = DateTime.Now;
}
//내부실행모드일때에만 파일을 처리한다
if (_extrun == false)
{
var tsfile = DateTime.Now - FileCheckTime;
if (tsfile.TotalSeconds >= UpdateFileInterval)
{
if (UpdateRun == false)
{
UpdateRun = true;
Task.Run(() =>
{
UpdateFileToDB();
UpdateRun = false;
});
}
FileCheckTime = DateTime.Now;
}
}
}
/// <summary>
/// 상태모니터링 프로그램의 실행파일 명
/// </summary>
static string StatusMonitorFile
{
get
{
if (string.IsNullOrEmpty(monitorfile))
monitorfile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status", "SQLFileToDB.exe");
return monitorfile;
}
}
static System.Diagnostics.Process CheckMonitor()
{
if (System.IO.File.Exists(StatusMonitorFile) == false) return null;
var prcs = System.Diagnostics.Process.GetProcesses();
return prcs.Where(t => t.ProcessName.ToLower().StartsWith("sqlfiletodb")).FirstOrDefault();
}
public static bool RunStatusMonitor()
{
//파일이 없으면 실행 불가
if (System.IO.File.Exists(StatusMonitorFile) == false) return false;
//실행프로세스 검사
var prc = CheckMonitor();
if (prc == null)
{
try
{
prc = new System.Diagnostics.Process();
prc.StartInfo = new System.Diagnostics.ProcessStartInfo
{
Arguments = string.Empty,
FileName = StatusMonitorFile,
};
prc.Start();
}
catch
{
return false;
}
}
return true;
}
/// <summary>
/// 작업수량을 입력합니다
/// </summary>
/// <param name="cnt"></param>
/// <returns></returns>
public static string AddStatusCount(int cnt, string remark = "")
{
if (remark.isEmpty()) remark = $"Count Set : {cnt}";
return AddStatusSQL(PUB.sm.Step, remark, count: cnt);
}
/// <summary>
/// 상태메세지를 status 폴더에 기록합니다.
/// </summary>
/// <param name="status">상태머신의 상태값</param>
/// <param name="remark">비고</param>
/// <param name="wdate">기록일시</param>
/// <returns>오류발생시 오류메세지가 반환 됩니다</returns>
public static string AddStatusSQL(eSMStep status, string remark = "", DateTime? wdate = null, bool extrun = false, int? count = null)
{
if (queryok == false || MAC.isEmpty()) GetNetworkInfo();
if (status == eSMStep.CLOSEWAIT || status == eSMStep.CLOSED) return string.Empty;
if (extrun)
{
//상태모니터링 프로그램을 실행합니다.
var tsMon = DateTime.Now - MonitorChecktime;
if (tsMon.TotalMinutes > 5) RunStatusMonitor();
}
try
{
var state = 0;
string cntstr = "null";
if (count != null) cntstr = count.ToString();
var alarmid = string.Empty;
var alarmmsg = string.Empty;
if (string.IsNullOrEmpty(remark)) remark = $"STS:{status}";
if (status == eSMStep.RUN) state = 1;
else if (status == eSMStep.ERROR || status == eSMStep.EMERGENCY)
{
state = 2;
alarmid = PUB.Result.ResultErrorCode.ToString();
alarmmsg = PUB.Result.ResultMessage;
}
else if (status == eSMStep.PAUSE) //일시중지도 오류코드가 포함된다,
{
if (PUB.Result.ResultErrorCode == eECode.USER_STEP || PUB.Result.ResultErrorCode == eECode.USER_STOP || PUB.Result.ResultErrorCode.ToString().StartsWith("MESSAGE"))
{
//사용자에의해 멈추는 것은 오류코드를 넣지 않는다.
}
else
{
alarmid = PUB.Result.ResultErrorCode.ToString();
alarmmsg = PUB.Result.ResultMessage;
}
}
else if (status == eSMStep.INIT) state = 3; //시작
else if (status == eSMStep.CLOSING) state = 4; //종료
//length check
if (alarmid.Length > 10) alarmid = alarmid.Substring(0, 10);
if (remark.Length > 99) remark = remark.Substring(0, 99);
if (alarmmsg.Length > 250) alarmmsg = alarmmsg.Substring(0, 50);
var mcid = AR.SETTING.Data.MCID;// Project.PUB.setting.MCID;//.Data.MCID;
//var mcid = Project.PUB.setting.MCID;//.Data.MCID;
var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status");
var file = System.IO.Path.Combine(path, $"{DateTime.Now.ToString("HHmmssfff")}_{status}.sql");
var sql = "insert into MCMonitor_Rawdata(Model,status,remark,ip,mac,time,alarmid,alarmmsg,count,version) " +
" values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}',{8},'{9}')";
var timestr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
if (wdate != null) timestr = ((DateTime)wdate).ToString("yyyy-MM-dd HH:mm:ss");
var VersionNumber = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
sql = string.Format(sql, mcid, state, remark.Replace("'", "''"), IP, MAC, timestr, alarmid, alarmmsg, cntstr, VersionNumber);
System.IO.File.WriteAllText(file, sql, System.Text.Encoding.Default);
////만들어진지 3분이 지난 파일은 삭제한다.
//var di = new System.IO.DirectoryInfo(path);
//var fi = di.GetFiles("*.sql", System.IO.SearchOption.TopDirectoryOnly).Where(t => t.LastWriteTime < DateTime.Now.AddMinutes(-3)).FirstOrDefault();
//if (fi != null) fi.Delete();
if (state == 4) UpdateFileToDB();
return string.Empty;
}
catch (Exception ex)
{
return ex.Message;
}
}
static void UpdateFileToDB()
{
if (mre.WaitOne(1000) == false) return;
mre.Reset();
var cs = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status");
var di = new System.IO.DirectoryInfo(path);
if (di.Exists == false) return;
var file = di.GetFiles("*.sql", System.IO.SearchOption.TopDirectoryOnly)
.Where(t => t.LastWriteTime < DateTime.Now.AddSeconds(-3))
.OrderByDescending(t => t.LastWriteTime).FirstOrDefault();
if (file == null)
{
mre.Set();
return;
}
//파일을 찾아야한다
// PUB.log.Add($">> {file.FullName}");
try
{
var sql = System.IO.File.ReadAllText(file.FullName, System.Text.Encoding.Default);
if (string.IsNullOrEmpty(sql))
{
//비어잇다면
var errpath = System.IO.Path.Combine(di.FullName, "Error");
var errfile = System.IO.Path.Combine(errpath, file.Name);
if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
System.IO.File.Move(file.FullName, errfile);// file.MoveTo(errfile);
// ecnt += 1;
}
else
{
// var csstr = PUB.setting.ConnectionString;
// if (string.IsNullOrEmpty(csstr)) csstr = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
var cn = new System.Data.SqlClient.SqlConnection(cs);
var cmd = new System.Data.SqlClient.SqlCommand(sql, cn);
cn.Open();
var cnt = cmd.ExecuteNonQuery();
//if (cnt == 0) PUB.log.Add($"Result Empty : {sql}");
cn.Close();
cnt += 1;
var errpath = System.IO.Path.Combine(di.FullName, "Complete");
var errfile = System.IO.Path.Combine(errpath, file.Name);
if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
//file.MoveTo(errfile);
System.IO.File.Move(file.FullName, errfile);
}
}
catch (Exception ex)
{
if(ex.Message.Contains("deadlocked") == false)
{
var errpath = System.IO.Path.Combine(di.FullName, "Error");
var errfile = System.IO.Path.Combine(errpath, file.Name);
if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
try
{
//file.MoveTo(errfile);
System.IO.File.Move(file.FullName, errfile);
//오류내용도 저장한다..
var errfilename = errfile + "_error.txt";
System.IO.File.WriteAllText(errfilename, ex.Message, System.Text.Encoding.Default);
}
catch (Exception ex2)
{
}
}
else
{
Console.WriteLine("dead lock 오류는 무시한다");
}
//ecnt += 1;
}
//try
//{
// //생성된지 10일이 넘은 자료는 삭제한다.
// //시간소비를 피해서 1개의 파일만 작업한다
// //var sqlfiles = di.GetFiles("*.sql", System.IO.SearchOption.AllDirectories);
// //총3번의 데이터를 처리한다
// //var files = sqlfiles.Where(t => t.LastWriteTime < DateTime.Now.AddDays(-10)).Select(t => t.FullName);
// //int i = 0;
// //var dellist = files.TakeWhile(t => i++ < 3);
// //foreach (var delfile in dellist)
// //System.IO.File.Delete(delfile);
//}
//catch
//{
//}
mre.Set();
}
}
/*
=================================================
변경내역
=================================================
230619 chi UpdateFileToDB 에서 폴더가 없다면 return 하도록 함
230615 chi UpdateFiletoDB의 ManualResetEvent적용
Version 항목 추가
230612 chi 프로그램 시작/종료 alarmid항목 추가
완료된 파일 10일간 보존하도록 함
230522 chi extrun 모드 추가(agv용 - SQL파일을 외부 프로그램에서 처리하도록 함)
230617 chi 파일쓰기함수를 Task 로 처리
3분지난데이터 삭제기능 제거
230516 chi initial commit
*/

View File

@@ -0,0 +1,692 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace Project
{
public enum StepResult
{
Wait = 0,
Complete,
Error,
}
public enum eWorkPort
{
Left = 0,
Right
}
public enum eNormalResult
{
True = 0,
False,
Error,
}
public enum eSMStep : byte
{
NOTSET = 0,
INIT = 1,
IDLE = 10,
RUN = 50,
RUN_ROOT_SEQUENCE_L,
RUN_ROOT_SEQUENCE_R,
RUN_KEYENCE_READ_L,
RUN_KEYENCE_READ_R,
RUN_PICKER_ON_L,
RUN_PICKER_ON_R,
RUN_PICKER_OFF_L,
RUN_PICKER_OFF_R,
RUN_PRINTER_F,
RUN_PRINTER_R,
RUN_PRINTER_ON_F,
RUN_PRINTER_ON_R,
RUN_PRINTER_OFF_F,
RUN_PRINTER_OFF_R,
RUN_QRVALID_F,
RUN_QRVALID_R,
RUN_COM_PT0,
RUN_COM_PT1,
RUN_COM_PT2,
RUN_PICK_RETRY,
//이후에 사용자 런 코드용 스텝을 추가한다.
EMERGENCY = 200,
HOME_FULL = 201,
HOME_DELAY,
HOME_CONFIRM,
HOME_QUICK,
CLOSING = 250,
CLOSEWAIT = 251,
CLOSED = 252,
//사용자영역
FINISH = 100,
PAUSE,
WAITSTART,
ERROR,
SAFTY,
CLEAR,
}
public enum eWaitMessage
{
PX = 0,
PZ,
LMOVE,
LUPDN,
RMOVE,
RUPDN,
LPRINT,
RPRINT,
VIS0,
VIS1,
VIS2,
}
//public enum eJobResult
//{
// None = 0,
// Error,
// ErrorOut,
// MaxCount,
// NotExistSID,
// DisableUnloader,
// MatchFail,
// NoBarcode
//}
public enum eCartSize
{
None = 0,
Inch7 = 7,
Inch13 = 13
}
public enum ePrintPutPos
{
None = 0,
Top,
Middle,
Bottom,
}
public enum ePrintVac
{
inhalation = 0,
exhaust,
off,
}
public enum eJobType : byte
{
Sorter = 0,
Dryrun,
}
public enum eHeaderHandler
{
Ping = 0,
RequestData,
RequstSeqNo,
RequstInputReel,
JobEnd,
JobDelete,
}
public struct sVisionDMResult
{
public Boolean iSystemErr { get; set; }
public Boolean isError { get; set; }
public string DM { get; set; }
public System.Drawing.Rectangle ROS { get; set; }
public System.Drawing.PointF DMCenter { get; set; }
public List<System.Drawing.PointF> DMCorner { get; set; }
public string DMMessage { get; set; }
}
public struct sObjectDetectResult
{
public string Message { get; set; }
public List<System.Drawing.Rectangle> Rect { get; set; }
public List<uint> Areas { get; set; }
public Boolean OK
{
get
{
if (Areas == null || Areas.Count < 1) return false;
else return true;
}
}
}
public enum eGridValue
{
/// <summary>
/// 아직 처리 전(기본 초기화된 상태)
/// </summary>
NotSet = 0,
/// <summary>
/// 원점검사에서 오류 발생
/// </summary>
OrientError,
/// <summary>
/// 아이템검출에서 실패됨
/// </summary>
NoItem,
/// <summary>
/// 아이템검출성공, 데이터매트릭스 검출 실패
/// </summary>
NewItem,
/// <summary>
/// 데이터매트릭스 읽기 실패
/// </summary>
DMReadError,
/// <summary>
/// 데이터매트릭스 관리 횟수가 기준횟수(10) 미만 (아직 정상)
/// </summary>
DMNotmalCount,
/// <summary>
/// 데이터매트릭스 관리 횟수가 기준횟수(10)를 초과한 경우
/// </summary>
DMOverCount,
}
public enum eRoiSeq
{
Area = 0,
DataMatrix,
Orient,
DetectUnit,
DetectDM
}
public enum eWaitType : byte
{
TryLock = 0,
TryUnLock,
AirBlowOn,
AirBlowOff,
AirBlowDustOn,
AirBlowDustOff,
PrintPickLOff,
PrintPickLOn,
PrintPickROff,
PrintPickROn,
PickOff,
PickOn,
AirBlowCoverDn,
AirBlowCoverUp,
UnloaderUp,
UnloaderDn,
LiftUp,
LiftDn,
}
public enum eSensorState : byte
{
Off = 0,
On = 1,
InComplete = 2,
}
public enum eIOCheckResult
{
Wait = 0,
Complete,
Timeout
}
public enum ePort
{
Left = 0,
Right,
}
enum eResultStringType
{
Nomal = 0,
Attention,
Error,
}
public enum eMotDir
{
Stop = 0,
CW = 1,
CCW = 2
}
/// <summary>
/// RUN중일 때 사용되는 세부 시퀀스
/// </summary>
public enum eRunStep : byte
{
NOTSET = 0,
/// <summary>
/// 프로그램 체크
/// </summary>
STARTCHKSW,
/// <summary>
/// 하드웨어 체크
/// </summary>
STARTCHKHW,
/// <summary>
/// 기계장치를 작업 시작 전 상태로 이동합니다
/// </summary>
INITIALHW,
/// <summary>
/// 안전지대(비활성화된경우 발생)
/// </summary>
SAFTYZONE_GO,
SAFTYZONE_RDY,
BEGINLOAD,
/// <summary>
/// 트레이를 로딩하기 위한 로더 이동 및 트레이 추출
/// </summary>
PORTLOAD,
/// <summary>
/// 비젼촬영을위한 위치로 이동
/// </summary>
BEGINPICK,
ENDPICK,
OVERLOAD,
SAVEDATA,
/// <summary>
/// 모션 원위치
/// </summary>
BARCODE,
/// <summary>
/// AIR/BLOW 위치 이동 및 작업
/// </summary>
AIRBLOW,
REELOUT,
TRAYOUT,
/// <summary>
/// 언로드위치로 셔틀을 이동
/// </summary>
BEGINUNLOADER,
/// <summary>
/// 트레이 언로드 작업
/// </summary>
TRAYUNLOAD,
/// <summary>
/// 언로딩하고 다시 로딩존으로 이동하는 시퀀스
/// </summary>
MOVE_TO_LOAD,
}
public enum ePLCIPin : byte
{
X00, X01, X02, X03, X04, X05, X06, X07, X08, X09, X0A,
X10, X11, X12, X13, X14, X15, X16, X17, X18, X19, X1A
}
public enum ePLCOPin : byte
{
Y00, Y01, Y02, Y03, Y04, Y05, Y06, Y07, Y08, Y09, Y0A,
Y10, Y11, Y12, Y13, Y14, Y15, Y16, Y17, Y18, Y19, Y1A
}
public enum ePLCITitle : byte
{
Run, Cart_Status_01, Cart_Status_02, Cart_Status_03, Cart_Status_04,
Machine_Confirm = 19
}
public enum ePLCOTitle : byte
{
Cart_No_Setting = 0,
Handler_Confirm = 19,
}
public enum eResult : byte
{
NOERROR,
EMERGENCY,
SAFTY,
DEVELOP,
SETUP,
HARDWARE,
SENSOR,
MOTION,
OPERATION,
COMMUNICATION,
TIMEOUT,
UNLOADER,
}
public enum eECode : byte
{
NOTSET = 0,
EMERGENCY = 1,
NOMODELV = 2,//작업모델
NOMODELM = 3,//모션모델
DOORSAFTY = 6,
AREASAFTY = 7,
VIS_LICENSE = 8,
HOME_TIMEOUT = 9,
AIRNOOUT = 10,
NOFUNCTION = 11,
AIRNOTDETECT = 12,
DOOFF = 27,//출력 off
DOON = 28,//출력 on
DIOFF = 29,//입력off
DION = 30,//입력 on
MESSAGE_INFO = 32,
MESSAGE_ERROR = 33,
VISION_NOTREADY = 34,
VISION_NOCONN = 35,
VISION_TRIGERROR = 36,
VISION_COMMERROR = 37,
VISION_NORECV = 38,
AZJINIT = 39, //DIO 혹은 모션카드 초기화 X
MOT_HSET = 41,
MOT_SVOFF = 42,
MOT_HSEARCH = 43,
MOT_CMD = 71,
USER_STOP = 72,
USER_STEP = 73,
POSITION_ERROR = 86,
MOTIONMODEL_MISSMATCH = 96,
//여기서부터는 전용코드로한다(소켓은 조금 섞여 있음)
VISCONF = 100,
NEED_AIROFF_L,
NEED_AIROFF_R,
PORTOVERLOAD,
NOPRINTLDATA,
NOPRINTRDATA,
PRINTL,
PRINTR,
CAM_LEFT,
CAM_RIGHT,
INCOMPLETE_LOADERDATA,
NOPUTPOSITION,
NOREELSIZE,
PRINTER,
QRDATAMISSMATCHL,
QRDATAMISSMATCHR,
MOTX_SAFETY,
NO_PAPER_DETECT_L,
NO_PAPER_DETECT_R,
CART_SIZE_ERROR_L,
CART_SIZE_ERROR_R,
PRE_USE_REELID_L,
PRE_USE_REELID_R,
NEED_JOBCANCEL,
LCONVER_REEL_DECTECT_ALL =150,
RCONVER_REEL_DECTECT_ALL,
LCONVER_REEL_DECTECT_IN,
RCONVER_REEL_DECTECT_IN,
LCONVER_MOVING,
RCONVER_MOVING,
NOREADY_KEYENCE,
PRINTER_LPICKER_NOBW,
PRINTER_RPICKER_NOBW,
NOBYPASSSID,
CONFIG_KEYENCE,
PRINTER_LPRINTER_NOUP,
PRINTER_RPRINTER_NOUP,
NOECSDATA,
PICKER_LCYL_NODOWN,
PICKER_RCYL_NODOWN,
PICKER_LCYL_NOUP,
PICKER_RCYL_NOUP,
NOSIDINFOFROMDB,
INBOUNDWEBAPIERROR,
SIDINFORDUP,
NOECSDATAACTIVE,
}
public enum eNextStep : byte
{
NOTHING = 0,
PAUSE,
PAUSENOMESAGE,
ERROR
}
public enum eILock
{
EMG = 0,
PAUSE,
HOMESET,
DOOR,
SAFTYAREA,
DISABLE,
XMOVE,
YMOVE,
ZMOVE,
X_POS,
Y_POS,
Z_POS,
PY_POS,
PZ_POS,
CYL_FORWARD,
MPrint,
}
//public enum eILockPKX
//{
// EMG = 0,
// PAUSE,
// HOMESET,
// DOOR,
// Disable,
// ZL_POS,
// ZR_POS,
// ZMOVE,
// PKZPOS,
//}
//public enum eILockPKZ
//{
// EMG = 0,
// PAUSE,
// HOMESET,
// DOOR,
// Disable,
// Y_POS,
// YMOVE,
// PORTRUN0,
// PORTRUN1,
// PORTRUN2
//}
//public enum eILockPKT
//{
// EMG = 0,
// PAUSE,
// HOMESET,
// DOOR,
// Disable,
// Y_POS,
// Y_MOVE,
// PortRun
//}
///// <summary>
///// PRINT MOVE AXIS (L+R)
///// </summary>
//public enum eILockPRM
//{
// Emergency = 0,
// Pause,
// HomeSet,
// Safty,
// Disable,
// ZMOVE,
// FORWARD,
// ITEMON,
// PKXPOS,
// PRNZPOS,
//}
//public enum eILockPRZ
//{
// EMG = 0,
// PAUSE,
// HOMESET,
// DOOR,
// Disable,
// YMOVE,
// ITEMON,
// PRNYPOS,
//}
public enum eILockPRL
{
EMG = 0,
PAUSE,
HOMESET,
DOOR,
SAFTYAREA,
DISABLE,
PRNYPOS,
PRNZPOS,
}
public enum eILockPRR
{
EMG = 0,
PAUSE,
HOMESET,
DOOR,
SAFTYAREA,
DISABLE,
PRNYPOS,
PRNZPOS,
}
public enum eILockVS0
{
EMG = 0,
PAUSE,
HOMESET,
DOOR,
SAFTYAREA,
DISABLE,
PORTRDY,
PKXPOS, //피커의 위치
PRNYPOS, //프린터Y축 위치
}
public enum eILockVS1
{
EMG = 0,
PAUSE,
HOMESET,
DOOR,
SAFTYAREA,
DISABLE,
PORTRDY,
PKXPOS,
}
public enum eILockVS2
{
EMG = 0,
PAUSE,
HOMESET,
DOOR,
SAFTYAREA,
DISABLE,
PORTRDY,
PKXPOS, //피커의 위치
PRNYPOS, //프린터Y축 위치
}
public enum eILockCV
{
EMG = 0,
PAUSE,
HOMESET,
DOOR,
SAFTYAREA,
/// <summary>
/// 포트를 사용하지 않는경우
/// </summary>
DISABLE,
/// <summary>
/// 카트모드
/// </summary>
CARTMODE,
/// <summary>
/// 업체컨이어의 ready 신호
/// </summary>
EXTBUSY,
/// <summary>
/// 나의 작업 신호
/// </summary>
BUSY,
VISION,
}
}

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project
{
/// <summary>
/// 모션 축 정보
/// </summary>
public enum eAxis : byte
{
PX_PICK = 0,
PZ_PICK,
PL_MOVE,
PL_UPDN,
PR_MOVE,
PR_UPDN,
Z_THETA,
}
public enum eAxisName : byte
{
Picker_X = 0,
Picker_Z ,
PrinterL_Move,
PrinterL_UpDn,
PrinterR_Move,
PrinterR_UpDn,
Spare_00,
}
}

View File

@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace Project
{
public enum ePXLoc : byte
{
READYL = 0,
READYR,
PICKON,
PICKOFFL,
PICKOFFR,
}
public enum ePZLoc : byte
{
READY = 0,
PICKON,
PICKOFFL,
PICKOFFR,
}
public enum ePTLoc : byte
{
READY = 0,
}
public enum eLMLoc : byte
{
READY = 0,
PRINTH07,
PRINTL07,
PRINTM07,
PRINTH13,
PRINTL13,
PRINTM13,
}
public enum eLZLoc : byte
{
READY = 0,
PICKON,
PICKOFF,
}
public enum eRMLoc : byte
{
READY = 0,
PRINTH07,
PRINTL07,
PRINTM07,
PRINTH13,
PRINTL13,
PRINTM13,
}
public enum eRZLoc : byte
{
READY = 0,
PICKON,
PICKOFF,
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AR.FTPClient
{
public class MessageEventArgs : EventArgs
{
protected Boolean _isError = false;
public Boolean IsError { get { return _isError; } }
protected string _message = string.Empty;
public string Message { get { return _message; } }
public MessageEventArgs(Boolean isError, string Message)
{
_isError = isError;
_message = Message;
}
}
public class ListProgressEventArgs : EventArgs
{
//public long Max { get; set; }
//public long Value { get; set; }
public long TotalRecv { get; set; }
public ListProgressEventArgs(long TotalRecv_)
{
this.TotalRecv = TotalRecv_;
}
}
}

View File

@@ -0,0 +1,574 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
namespace AR.FTPClient
{
public partial class FTPClient : IFTPClient
{
public string errorMessage { get; set; }
private int bufferSize = 2048;
private int timeout = 20000;
#region "Contstruct"
public FTPClient() : this("127.0.0.1", "Anonymous", "") { }
public FTPClient(string Host, string UserID, string UserPass) :
this(Host, UserID, UserPass, 21)
{ }
public FTPClient(string Host, string UserID, string UserPass, bool passive) :
this(Host, UserID, UserPass, 21, passive)
{ }
public FTPClient(string Host, string UserID, string UserPass, int port) :
this(Host, UserID, UserPass, port, false)
{ }
public FTPClient(string host, string userid, string userpass, int port, bool passive)
{
Host = host;
UserID = userid;
UserPassword = userpass;
Port = port;
PassiveMode = passive;
this.TextEncoding = System.Text.Encoding.UTF8;
}
#endregion
public event EventHandler<MessageEventArgs> Message;
public event EventHandler<ListProgressEventArgs> ListPrgress;
#region "Properties"
/// <summary>
/// 접속하려는 FTP서버의 IP혹은 도메인 주소를 입력하세요
/// 기본값 : 127.0.0.1
/// </summary>
public string Host { get; set; }
/// <summary>
/// FTP의 사용자 ID
/// 기본값 : Anonymous
/// </summary>
public string UserID { get; set; }
/// <summary>
/// FTP 사용자 ID의 암호
/// 기본값 : 없음
/// </summary>
public string UserPassword { get; set; }
/// <summary>
/// FTP 접속 포트
/// 기본값 : 21
/// </summary>
public int Port { get; set; }
/// <summary>
/// FTP 접속 방식 (능동형/수동형)
/// </summary>
public bool PassiveMode { get; set; }
/// <summary>
/// 문자수신시 사용할 인코딩 방식
/// </summary>
public System.Text.Encoding TextEncoding { get; set; }
#endregion
public void Dispose()
{
}
/// <summary>
/// 파일을 다운로드 합니다.
/// </summary>
/// <param name="remoteFile">원격위치의 전체 경로</param>
/// <param name="localFile">로컬위치의 전체 경로</param>
public Boolean Download(string remoteFile, string localFile, bool overwrite = false)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
//overwrite funcion - 190622 - chi
errorMessage = string.Empty;
if (overwrite == false && System.IO.File.Exists(localFile))
{
errorMessage = "Target file alreay exists";
return false;
}
else if (overwrite == true && System.IO.File.Exists(localFile))
{
try
{
System.IO.File.Delete(localFile);
}
catch (Exception ex)
{
errorMessage = ex.Message;
return false;
}
}
bool retval = true;
try
{
long Receive = 0;
var url = CombineUrl(remoteFile);
ftpRequest = (FtpWebRequest)FtpWebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(this.UserID, this.UserPassword);
ftpRequest.UseBinary = true;
ftpRequest.UsePassive = this.PassiveMode;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpStream = ftpResponse.GetResponseStream();
FileStream localFileStream = new FileStream(localFile, FileMode.Create);
byte[] byteBuffer = new byte[bufferSize];
int bytesRead = ftpStream.Read(byteBuffer, 0, bufferSize);
Receive += bytesRead;
if (ListPrgress != null)
ListPrgress(this, new ListProgressEventArgs(Receive));
try
{
while (bytesRead > 0)
{
localFileStream.Write(byteBuffer, 0, bytesRead);
bytesRead = ftpStream.Read(byteBuffer, 0, bufferSize);
Receive += bytesRead;
if (ListPrgress != null)
ListPrgress(this, new ListProgressEventArgs(Receive));
}
}
catch (Exception ex) { retval = false; Console.WriteLine(ex.ToString()); }
localFileStream.Close();
ftpStream.Close();
ftpResponse.Close();
ftpRequest = null;
}
catch (Exception ex) { retval = false; this.errorMessage = ex.Message; Console.WriteLine(ex.ToString()); }
return retval;
}
/// <summary>
/// 파일을 업로드 합니다.
/// </summary>
/// <param name="remoteFile">원격위치의 전체 경로</param>
/// <param name="localFile">로컬위치의 전체 경로</param>
/// <returns></returns>
public Boolean Upload(string remoteFile, string localFile)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
try
{
var url = CombineUrl(remoteFile);
ftpRequest = (FtpWebRequest)FtpWebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UseBinary = true;
ftpRequest.UsePassive = PassiveMode;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.Method = WebRequestMethods.Ftp.UploadFile;
ftpStream = ftpRequest.GetRequestStream();
FileStream localFileStream = new FileStream(localFile, FileMode.Open);
byte[] byteBuffer = new byte[bufferSize];
int bytesSent = localFileStream.Read(byteBuffer, 0, bufferSize);
Boolean bError = false;
try
{
System.Diagnostics.Stopwatch wat = new System.Diagnostics.Stopwatch();
wat.Restart();
while (bytesSent != 0)
{
ftpStream.Write(byteBuffer, 0, bytesSent);
bytesSent = localFileStream.Read(byteBuffer, 0, bufferSize);
}
}
catch (Exception ex)
{
bError = true;
}
localFileStream.Close();
ftpStream.Close();
ftpRequest = null;
if (bError) return false;
else return true;
}
catch (Exception ex)
{
this.errorMessage = ex.Message;
return false;
}
}
/// <summary>
/// 원격파일을 삭제 합니다.
/// </summary>
/// <param name="remotefile"></param>
public Boolean Delete(string remotefile)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
try
{
var url = CombineUrl(remotefile);
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UseBinary = true;
ftpRequest.UsePassive = this.PassiveMode;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.Method = WebRequestMethods.Ftp.DeleteFile;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpResponse.Close();
ftpRequest = null;
return true;
}
catch (Exception ex) { this.errorMessage = ex.Message; return false; }
}
/// <summary>
/// 원격파일의 이름을 변경 합니다.
/// </summary>
/// <param name="currentFileNameAndPath"></param>
/// <param name="newFileName"></param>
public Boolean rename(string currentFileNameAndPath, string newFileName)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
try
{
var url = CombineUrl(currentFileNameAndPath);
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UsePassive = this.PassiveMode;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.UseBinary = true;
ftpRequest.KeepAlive = true;
ftpRequest.Method = WebRequestMethods.Ftp.Rename;
ftpRequest.RenameTo = newFileName;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpResponse.Close();
ftpRequest = null;
return true;
}
catch (Exception ex) { this.errorMessage = ex.Message; return false; }
}
/// <summary>
/// 원격위치에 폴더를 생성 합니다.
/// 트리구조로 폴더를 생성하지 않습니다. 여러개의 폴더를 생성하려면 각각 호출 해야 합니다.
/// </summary>
/// <param name="newDirectory"></param>
/// <returns></returns>
public bool createDirectory(string newDirectory)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
try
{
var url = CombineUrl(newDirectory, false);
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UsePassive = this.PassiveMode;
ftpRequest.UseBinary = true;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.Method = WebRequestMethods.Ftp.MakeDirectory;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpResponse.Close();
ftpRequest = null;
return true;
}
catch (Exception ex) { this.errorMessage = ex.Message; return false; }
}
/// <summary>
/// 원격위치의 폴더를 삭제합니다. 폴더 삭제 전 대상 폴더는 비어있어야 합니다.
/// </summary>
/// <param name="Directory"></param>
/// <returns></returns>
public bool RemoveDirectory(string Directory)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
try
{
var url = CombineUrl(Directory, false);
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UsePassive = this.PassiveMode;
ftpRequest.UseBinary = true;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.Method = WebRequestMethods.Ftp.RemoveDirectory;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpResponse.Close();
ftpRequest = null;
return true;
}
catch (Exception ex) { this.errorMessage = ex.Message; return false; }
}
/// <summary>
/// 파일의 생성일자 반환
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
public string getFileCreatedDateTime(string fileName)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
try
{
var url = CombineUrl(fileName);
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UsePassive = this.PassiveMode;
ftpRequest.UseBinary = true;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.Method = WebRequestMethods.Ftp.GetDateTimestamp;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpStream = ftpResponse.GetResponseStream();
StreamReader ftpReader = new StreamReader(ftpStream, this.TextEncoding);
string fileInfo = null;
try { fileInfo = ftpReader.ReadToEnd(); }
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
ftpReader.Close();
ftpStream.Close();
ftpResponse.Close();
ftpRequest = null;
return fileInfo;
}
catch (Exception ex) { this.errorMessage = ex.Message; Console.WriteLine(ex.ToString()); }
return "";
}
/// <summary>
/// 파일의 크기를 반환
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
public string getFileSize(string fileName)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
try
{
var url = CombineUrl(fileName);
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UseBinary = true;
ftpRequest.UsePassive = this.PassiveMode;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.Method = WebRequestMethods.Ftp.GetFileSize;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpStream = ftpResponse.GetResponseStream();
StreamReader ftpReader = new StreamReader(ftpStream, this.TextEncoding);
string fileInfo = null;
try { while (ftpReader.Peek() != -1) { fileInfo = ftpReader.ReadToEnd(); } }
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
ftpReader.Close();
ftpStream.Close();
ftpResponse.Close();
ftpRequest = null;
return fileInfo;
}
catch (Exception ex) { errorMessage = ex.Message; Console.WriteLine(ex.ToString()); }
return "";
}
/// <summary>
/// 폴더와 파일의 이름만 반환 합니다.
/// </summary>
/// <param name="directory"></param>
/// <returns></returns>
public string[] directoryListSimple(string directory)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
errorMessage = string.Empty;
try
{
var url = CombineUrl(directory, false);
if (url.EndsWith("/") == false) url += "/";
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UseBinary = true;
ftpRequest.UsePassive = PassiveMode;
ftpRequest.KeepAlive = true;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.ReadWriteTimeout = 30000;
ftpRequest.Timeout = 30000;
ftpRequest.Method = WebRequestMethods.Ftp.ListDirectory;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpStream = ftpResponse.GetResponseStream();
StreamReader ftpReader = new StreamReader(ftpStream, this.TextEncoding);
string directoryRaw = null;
try
{
while (ftpReader.Peek() != -1)
{
var dataLIne = ftpReader.ReadLine();
if (dataLIne.Trim() != "")
{
if (directoryRaw != null && directoryRaw != "") directoryRaw += "|";
directoryRaw += dataLIne;
}
}
}
catch (Exception ex) { errorMessage += "\n" + ex.Message; }
ftpReader.Close();
ftpStream.Close();
ftpResponse.Close();
ftpRequest = null;
try { string[] directoryList = directoryRaw.Split("|".ToCharArray()); return directoryList; }
catch (Exception ex) { errorMessage += "\n" + ex.Message; }
}
catch (Exception ex) { errorMessage = ex.Message; Console.WriteLine(ex.ToString()); }
return new string[] { "" };
}
/// <summary>
/// 폴더 및 파일의 정보를 상세하게 표시합니다.
/// </summary>
/// <param name="directory"></param>
/// <returns></returns>
public FTPdirectory ListDirectoryDetail(string directory)
{
FtpWebRequest ftpRequest = null;
FtpWebResponse ftpResponse = null;
Stream ftpStream = null;
errorMessage = string.Empty;
try
{
var url = CombineUrl(directory, false);
if (url.EndsWith("/") == false) url += "/";
ftpRequest = (FtpWebRequest)WebRequest.Create(url);
ftpRequest.Credentials = new NetworkCredential(UserID, UserPassword);
ftpRequest.UsePassive = true;
ftpRequest.UseBinary = true;
ftpRequest.KeepAlive = false;
ftpRequest.ReadWriteTimeout = this.timeout;
ftpRequest.ReadWriteTimeout = 30000;
ftpRequest.Timeout = 30000;
ftpRequest.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
ftpStream = ftpResponse.GetResponseStream();
StreamReader ftpReader = new StreamReader(ftpStream, this.TextEncoding);
string directoryRaw = null;
try { while (ftpReader.Peek() != -1) { directoryRaw += ftpReader.ReadLine() + "\r"; } }
catch (Exception ex) { errorMessage += "\n" + ex.Message; }
ftpReader.Close();
ftpStream.Close();
ftpResponse.Close();
ftpRequest = null;
directoryRaw = directoryRaw.Replace("\r\n", "\r").TrimEnd((char)0x0D);
return new FTPdirectory(directoryRaw, directory);
}
catch (Exception ex) { errorMessage += "\n" + ex.Message; }
return null;
}
#region "utillity"
/// <summary>
/// Url을 Host와 결합하여 생성
/// </summary>
/// <param name="file">경로명</param>
/// <param name="isfile">파일인지 여부</param>
/// <returns></returns>
string CombineUrl(string file, bool isfile = true)
{
file = file.Replace("\\", "/");
string url = this.Host;
if (this.Host.ToLower().StartsWith("ftp://") == false) url = "ftp://" + url;
if (url.Substring(5).LastIndexOf(':') == -1)
url += ":" + this.Port.ToString();
if (this.Host.EndsWith("/")) url = this.Host.Substring(0, Host.Length - 1);
if (file.StartsWith("/"))
url = url + System.Web.HttpUtility.UrlPathEncode(file);
else
url = url + "/" + System.Web.HttpUtility.UrlPathEncode(file);
url = url.Replace("#", "%23");
if (isfile)
return url;
else
return url + "/";
}
public string PathCombine(string path, string add)
{
var newpath = string.Empty;
if (path.EndsWith("/")) newpath = path + add;
else newpath = path + "/" + add;
if (!newpath.EndsWith("/")) newpath += '/';
return newpath;
}
public string PathFileCombine(string path, string add)
{
var newpath = string.Empty;
if (path.EndsWith("/")) newpath = path + add;
else newpath = path + "/" + add;
if (newpath.EndsWith("/")) newpath = newpath.Substring(0, newpath.Length - 1);
return newpath;
}
public string getParent(string path)
{
if (path == "/") return path;
else if (path == "") return "/";
else
{
//서브폴더를 찾아서 처리해준다.
if (path.IndexOf('/') == -1) return "/";
else
{
if (path.EndsWith("/")) path = path.Substring(0, path.Length - 1);
var slashindex = path.LastIndexOf('/');
var parent = path.Substring(0, slashindex);
if (!parent.EndsWith("/")) parent += '/';
return parent;
}
}
}
public void RaiseMessage(Boolean isError, string message)
{
if (isError) errorMessage = message; //170920
if (Message != null) Message(this, new MessageEventArgs(isError, message));
}
#endregion
}
}

View File

@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AR.FTPClient
{
/// <summary>
/// ''' Stores a list of files and directories from an FTP result
/// ''' </summary>
/// ''' <remarks></remarks>
public class FTPdirectory : List<FTPfileInfo>
{
public FTPdirectory()
{
}
/// <summary>
/// ''' Constructor: create list from a (detailed) directory string
/// ''' </summary>
/// ''' <param name="dir">directory listing string</param>
/// ''' <param name="path"></param>
/// ''' <remarks></remarks>
public FTPdirectory(string dir, string path)
{
var lines = dir.Replace("\n","").Split('\r');
foreach (var line in lines)
{
if (line != "")
this.Add(new FTPfileInfo(line, path));
}
}
/// <summary>
/// ''' Filter out only files from directory listing
/// ''' </summary>
/// ''' <param name="ext">optional file extension filter</param>
/// ''' <returns>FTPdirectory listing</returns>
public FTPdirectory GetFiles(string ext = "")
{
return this.GetFileOrDir(FTPfileInfo.DirectoryEntryTypes.File, ext);
}
/// <summary>
/// ''' Returns a list of only subdirectories
/// ''' </summary>
/// ''' <returns>FTPDirectory list</returns>
/// ''' <remarks></remarks>
public FTPdirectory GetDirectories()
{
return this.GetFileOrDir(FTPfileInfo.DirectoryEntryTypes.Directory);
}
// internal: share use function for GetDirectories/Files
private FTPdirectory GetFileOrDir(FTPfileInfo.DirectoryEntryTypes type, string ext = "")
{
FTPdirectory result = new FTPdirectory();
foreach (FTPfileInfo fi in this)
{
if (fi.FileType == type)
{
if (ext == "")
result.Add(fi);
else if (ext == fi.Extension)
result.Add(fi);
}
}
return result;
}
public bool FileExists(string filename)
{
foreach (FTPfileInfo ftpfile in this)
{
if (ftpfile.Filename == filename)
return true;
}
return false;
}
private const char slash = '/';
public static string GetParentDirectory(string dir)
{
string tmp = dir.TrimEnd(slash);
int i = tmp.LastIndexOf(slash);
if (i > 0)
return tmp.Substring(0, i - 1);
else
throw new ApplicationException("No parent for root");
}
}
}

View File

@@ -0,0 +1,216 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace AR.FTPClient
{
/// <summary>
/// ''' Represents a file or directory entry from an FTP listing
/// ''' </summary>
/// ''' <remarks>
/// ''' This class is used to parse the results from a detailed
/// ''' directory list from FTP. It supports most formats of
/// ''' </remarks>
public class FTPfileInfo
{
// Stores extended info about FTP file
public string FullName
{
get
{
var retval = Path + "/" + Filename;
return retval.Replace("//", "/");
}
}
public string Filename
{
get
{
return _filename;
}
}
public string Path
{
get
{
return _path;
}
}
public DirectoryEntryTypes FileType
{
get
{
return _fileType;
}
}
public long Size
{
get
{
return _size;
}
}
public DateTime FileDateTime
{
get
{
return _fileDateTime;
}
}
public string Permission
{
get
{
return _permission;
}
}
public string Extension
{
get
{
int i = this.Filename.LastIndexOf(".");
if (i >= 0 & i < (this.Filename.Length - 1))
return this.Filename.Substring(i + 1);
else
return "";
}
}
public string NameOnly
{
get
{
int i = this.Filename.LastIndexOf(".");
if (i > 0)
return this.Filename.Substring(0, i);
else
return this.Filename;
}
}
private string _filename;
private string _path;
private DirectoryEntryTypes _fileType;
private long _size;
private DateTime _fileDateTime;
private string _permission;
/// <summary>
/// ''' Identifies entry as either File or Directory
/// ''' </summary>
public enum DirectoryEntryTypes
{
File,
Directory,
Link
}
/// <summary>
/// ''' Constructor taking a directory listing line and path
/// ''' </summary>
/// ''' <param name="line">The line returned from the detailed directory list</param>
/// ''' <param name="path">Path of the directory</param>
/// ''' <remarks></remarks>
public FTPfileInfo(string line, string path)
{
// parse line
Match m = GetMatchingRegex(line);
if (m == null)
// failed
throw new ApplicationException("Unable to parse line: " + line);
else
{
_filename = m.Groups["name"].Value;
_path = path;
_permission = m.Groups["permission"].Value;
string _dir = m.Groups["dir"].Value;
if ((_dir != "" & (_dir == "d" || _dir == "D")))
{
_fileType = DirectoryEntryTypes.Directory;
_size = 0; // CLng(m.Groups("size").Value)
}
else if ((_dir != "" & (_dir == "l" || _dir == "L")))
{
_fileType = DirectoryEntryTypes.Link;
_size = 0; // CLng(m.Groups("size").Value)
}
else
{
_fileType = DirectoryEntryTypes.File;
_size = System.Convert.ToInt64(m.Groups["size"].Value);
}
try
{
var timestamp = m.Groups["timestamp"].Value;
if (timestamp.IndexOf(':') == -1)
{
_fileDateTime = DateTime.Parse(timestamp);
}
else
{
_fileDateTime = DateTime.Parse(DateTime.Now.Year + " " + timestamp);
}
}
catch
{
// MsgBox("datetime err=" & Now.Year & Space(1) & "value=" & m.Groups("timestamp").Value & vbCrLf & ex.Message.ToString)
_fileDateTime = DateTime.Parse("1982-11-23");
}
}
}
public FTPfileInfo(string filename, string permission, string dir, int size, DateTime filetime, Boolean isdir, string path)
{
_filename = filename;// m.Groups["name"].Value;
_path = path;
_permission = permission; // m.Groups["permission"].Value;
string _dir = dir;// m.Groups["dir"].Value;
if (isdir == true)
{
_fileType = DirectoryEntryTypes.Directory;
_size = 0; // CLng(m.Groups("size").Value)
}
else
{
_fileType = DirectoryEntryTypes.File;
_size = size;//
}
_fileDateTime = filetime;
}
private Match GetMatchingRegex(string line)
{
Regex rx;
Match m;
for (int i = 0; i <= _ParseFormats.Length - 1; i++)
{
rx = new Regex(_ParseFormats[i]);
m = rx.Match(line);
if (m.Success)
return m;
}
return null;
}
/// <summary>
/// ''' List of REGEX formats for different FTP server listing formats
/// ''' </summary>
/// ''' <remarks>
/// ''' The first three are various UNIX/LINUX formats, fourth is for MS FTP
/// ''' in detailed mode and the last for MS FTP in 'DOS' mode.
/// ''' I wish VB.NET had support for Const arrays like C# but there you go
/// ''' </remarks>
private static string[] _ParseFormats = new[] { @"(?<dir>[\-dl])(?<permission>([\-r][\-w][\-xs]){3})\s+\d+\s+\w+\s+\w+\s+(?<size>\d+)\s+(?<timestamp>\w+\s+\d+\s+\d{4})\s+(?<name>.+)", @"(?<dir>[\-dl])(?<permission>([\-r][\-w][\-xs]){3})\s+\d+\s+\d+\s+(?<size>\d+)\s+(?<timestamp>\w+\s+\d+\s+\d{4})\s+(?<name>.+)", @"(?<dir>[\-dl])(?<permission>([\-r][\-w][\-xs]){3})\s+\d+\s+\d+\s+(?<size>\d+)\s+(?<timestamp>\w+\s+\d+\s+\d{1,2}:\d{2})\s+(?<name>.+)", @"(?<dir>[\-dl])(?<permission>([\-r][\-w][\-xs]){3})\s+\d+\s+\w+\s+\w+\s+(?<size>\d+)\s+(?<timestamp>\w+\s+\d+\s+\d{1,2}:\d{2})\s+(?<name>.+)", @"(?<dir>[\-dl])(?<permission>([\-r][\-w][\-xs]){3})(\s+)(?<size>(\d+))(\s+)(?<ctbit>(\w+\s\w+))(\s+)(?<size2>(\d+))\s+(?<timestamp>\w+\s+\d+\s+\d{2}:\d{2})\s+(?<name>.+)", @"(?<timestamp>\d{2}\-\d{2}\-\d{2}\s+\d{2}:\d{2}[Aa|Pp][mM])\s+(?<dir>\<\w+\>){0,1}(?<size>\d+){0,1}\s+(?<name>.+)" };
}
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AR.FTPClient
{
public interface IFTPClient
{
void Dispose();
string errorMessage { get; set; }
//string Host { get; set; }
//string UserID { get; set; }
//string UserPassword { get; set; }
//int Port { get; set; }
System.Text.Encoding TextEncoding { get; set; }
Boolean Download(string remoteFile, string localFile,bool overwrite=false);
Boolean Upload(string remoteFile, string localFile);
Boolean Delete(string remotefile);
Boolean rename(string currentFileNameAndPath, string newFileName);
bool createDirectory(string newDirectory);
bool RemoveDirectory(string Directory);
string getFileCreatedDateTime(string fileName);
string getFileSize(string fileName);
string[] directoryListSimple(string directory);
FTPdirectory ListDirectoryDetail(string directory);
event EventHandler<MessageEventArgs> Message;
event EventHandler<ListProgressEventArgs> ListPrgress;
void RaiseMessage(Boolean isError, string message);
string PathCombine(string path, string add);
string PathFileCombine(string path, string add);
string getParent(string path);
}
}

View File

@@ -0,0 +1,117 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Project.Class
{
public class JobData
{
public enum ErrorCode
{
None = 0,
BarcodeRead,
Print,
Camera,
}
public ErrorCode error = ErrorCode.None;
public int No { get; set; }
public VisionData VisionData;
public DateTime JobStart
{
get
{
if (this.VisionData == null) return new DateTime(1982, 11, 23);
else return VisionData.STime;
}
}
public DateTime JobEnd;
public TimeSpan JobRun
{
get
{
if (JobEnd.Year == 1982) return new TimeSpan(0);
else if (JobStart.Year == 1982) return new TimeSpan(0);
else return JobEnd - JobStart;
}
}
/// <summary>
/// 프린터에 명령을 전송한 시간
/// </summary>
public DateTime PrintTime { get; set; }
/// <summary>
/// 라벨을 추가한 시간
/// </summary>
public DateTime Attachtime { get; set; }
//작업데이터의 GUID(자료식별)
public string guid { get; private set; }
//언로더포트위치(L/R)
public string PortPos;
//동작관련 메세지
public string Message;
int idx;
public JobData(int idx_)
{
this.idx = idx_;
Clear("INIT");
}
public bool PrintAttach { get; set; }
public bool PrintQRValid { get; set; }
public string PrintQRValidResult { get; set; }
public void Clear(string source)
{
No = 0;
//JobStart = new DateTime(1982, 11, 23);
JobEnd = new DateTime(1982, 11, 23);
Attachtime = new DateTime(1982, 11, 23);
PortPos = string.Empty;
guid = Guid.NewGuid().ToString();
Message = string.Empty;
if (VisionData == null)
VisionData = new VisionData(source);
else
VisionData.Clear(source, false);
PrintAttach = false;
PrintQRValid = false;
PrintQRValidResult = string.Empty;
PrintTime = new DateTime(1982, 11, 23);
PUB.AddDebugLog($"item data {idx} clear by {source} guid={guid}");
}
public void CopyTo(ref JobData obj)
{
if (obj == null) return;
obj.No = this.No;
obj.error = this.error;
obj.JobEnd = this.JobEnd;
obj.guid = this.guid;
obj.PortPos = this.PortPos;
obj.Message = this.Message;
obj.PrintAttach = this.PrintAttach;
obj.PrintQRValid = this.PrintQRValid;
obj.PrintQRValidResult = this.PrintQRValidResult;
obj.Attachtime = this.Attachtime;
obj.PrintTime = this.PrintTime;
PUB.AddDebugLog("아이템 복사 전 rid:" + this.VisionData.RID);
this.VisionData.CopyTo(ref obj.VisionData);
PUB.AddDebugLog($"아이템 복사 후 대상 rid : {obj.VisionData.RID}, guid={obj.guid}");
}
}
}

Some files were not shown because too many files have changed in this diff Show More