366 lines
9.1 KiB
C#
366 lines
9.1 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace INT_LKD.DataStore
|
|
{
|
|
public class Define
|
|
{
|
|
public static readonly Color ColorSelected = Color.MediumSeaGreen;
|
|
public static readonly Color ColorNoneSelected = Color.White;
|
|
|
|
public static readonly Color ColorProgressOff = Color.Azure;
|
|
public static readonly Color ColorProgressOn = Color.Lime;
|
|
|
|
public static readonly Color ColorTextResultPass = Color.Green;
|
|
public static readonly Color ColorTextResultNG = Color.Red;
|
|
public static readonly Color ColorTextResultNone = Color.LightGray;
|
|
|
|
public delegate void EventHandlerAlarmStateChange(Define.E_TrackingAlarm alarm, string status);
|
|
|
|
/// <summary>
|
|
/// 장비 타입
|
|
/// </summary>
|
|
public enum E_EquipmentType
|
|
{
|
|
Type1 = 0, // 중국 타입 12열
|
|
Type2, // 미국 타입 10열
|
|
}
|
|
|
|
public enum E_EquipmentStatus
|
|
{
|
|
Stop = 0,
|
|
Start = 1,
|
|
}
|
|
|
|
public enum E_FormStore
|
|
{
|
|
FormNone = 0,
|
|
FormMainDisplay,
|
|
FormMenu,
|
|
}
|
|
|
|
public enum E_EquipmentMode
|
|
{
|
|
Normal,
|
|
Menu,
|
|
IOTest,
|
|
EquipmentTest,
|
|
}
|
|
|
|
public enum E_TopMenuStore
|
|
{
|
|
Recipe,
|
|
User,
|
|
Manual,
|
|
Log,
|
|
System,
|
|
}
|
|
public enum E_MenuRecipeStore
|
|
{
|
|
_0_None,
|
|
_1_Setting,
|
|
}
|
|
public enum E_MenuUserStore
|
|
{
|
|
_0_None,
|
|
_1_UserEditor,
|
|
_2_GroupEditor,
|
|
}
|
|
public enum E_MenuManualStore
|
|
{
|
|
_0_None,
|
|
_1_IoTest,
|
|
}
|
|
public enum E_MenuLogStore
|
|
{
|
|
_0_None,
|
|
_1_Inspection,
|
|
_2_History,
|
|
_3_Alarm,
|
|
}
|
|
public enum E_MenuSystemStore
|
|
{
|
|
_0_None,
|
|
_1_Information,
|
|
_2_Equipment,
|
|
_3_Ethernet,
|
|
_4_Equipment1,
|
|
_5_Setting,
|
|
}
|
|
|
|
public enum E_DisplayModeStore
|
|
{
|
|
MainDisplay,
|
|
Recipe,
|
|
UserEditor,
|
|
UserMyPage,
|
|
UserGroupEditor,
|
|
IOTest,
|
|
LogInspection,
|
|
LogHistory,
|
|
LogAlarm,
|
|
Information,
|
|
Ethernet,
|
|
Equipment,
|
|
Equipment1,
|
|
}
|
|
|
|
public enum E_CommMode
|
|
{
|
|
f0_None = 0,
|
|
f1_Modbus,
|
|
}
|
|
|
|
public enum E_ProcessStatus
|
|
{
|
|
_0_None = 0,
|
|
_1_Ready,
|
|
_2_ProductEntry,
|
|
_3_MoveToLeak,
|
|
_4_MoveToCheck,
|
|
_5_ChamberMerge,
|
|
_6_VacuumStart,
|
|
_7_VacuumHold,
|
|
_8_Judgment,
|
|
_9_VacuumBreak,
|
|
_10_ChamberRelease,
|
|
_11_MoveToReady,
|
|
}
|
|
|
|
public enum E_JudgmentStatus
|
|
{
|
|
None,
|
|
Pass,
|
|
Ng,
|
|
Empty,
|
|
Error,
|
|
}
|
|
|
|
public enum E_ResponseData
|
|
{
|
|
NAK = 0,
|
|
ACK = 1,
|
|
}
|
|
|
|
public enum E_UpdateCheck
|
|
{
|
|
Fail,
|
|
Success,
|
|
NoUsbMomery,
|
|
NoUpdateFolder,
|
|
NoFile,
|
|
}
|
|
|
|
public enum E_LanguageID
|
|
{
|
|
Korean,
|
|
English,
|
|
Chinese,
|
|
}
|
|
|
|
public enum E_MessageBoxIcon
|
|
{
|
|
None,
|
|
Hand,
|
|
Question,
|
|
Exclamation,
|
|
Asterisk,
|
|
}
|
|
|
|
public enum E_UserGroup
|
|
{
|
|
None = 0,
|
|
Level1 = 1,
|
|
Level2 = 2,
|
|
Level3 = 3,
|
|
Admin = 4,
|
|
Developer = 5,
|
|
NotLogin = 6,
|
|
LogOut = 7,
|
|
}
|
|
|
|
public enum E_TrackingOperation
|
|
{
|
|
None,
|
|
PowerOn,
|
|
BootingComplete,
|
|
EquipmentStart,
|
|
EquipmentStop,
|
|
Login,
|
|
Logout,
|
|
Zero,
|
|
Clear,
|
|
UserEditor,
|
|
|
|
TryEthernetStart,
|
|
TryEthernetStop,
|
|
ClientConnect,
|
|
ClientDisconnect,
|
|
ServerON,
|
|
ServerOFF,
|
|
}
|
|
|
|
public enum E_TrackingParameter
|
|
{
|
|
RecipeNumber,
|
|
Pressure,
|
|
|
|
Disp_STD,
|
|
Disp_EmptyLevel,
|
|
Disp_MaxDiff,
|
|
Disp_MinHight,
|
|
Disp_Enable,
|
|
|
|
Diff_LrLimit,
|
|
Diff_Cycle,
|
|
Diff_HoldDelay,
|
|
|
|
P_reliefTime,
|
|
P_HlodingTime,
|
|
P_HoldingTime2,
|
|
P_BreakTime,
|
|
|
|
Etc_LcdDataPeriod,
|
|
Etc_Chattering,
|
|
Etc_CutWait,
|
|
Etc_Buzzer,
|
|
Etc_SbDiffFilter,
|
|
Etc_EquipmentLane,
|
|
Etc_CheckLane,
|
|
|
|
M_Origin,
|
|
M_Ready,
|
|
M_Chamber1,
|
|
M_Chamber2,
|
|
M_Chamber3,
|
|
M_Chamber4,
|
|
M_Chamber5,
|
|
M_Chamber6,
|
|
M_Chamber7,
|
|
M_ChamberDischarge,
|
|
|
|
ProductNo,
|
|
|
|
TCPOpMode,
|
|
TCPComMode,
|
|
TCPLocalPort,
|
|
TCPLocalIPConfig,
|
|
TCPLocalIPAddress,
|
|
TCPLocalSubnetMask,
|
|
TCPLocalGateway,
|
|
TCPServerIPAddress,
|
|
TCPServerPort,
|
|
Mod_Role,
|
|
Mod_StartAddr,
|
|
|
|
Language,
|
|
}
|
|
|
|
public enum E_TrackingAlarm
|
|
{
|
|
None,
|
|
a1_ServoEmergencyStop,
|
|
a2_PressureError,
|
|
a3_BoardStatusCOM,
|
|
a4_ServoOrigin,
|
|
a5_ServoAlarm1,
|
|
a6_ServoToruqeAlarm1,
|
|
a7_ServoAlarm2,
|
|
a8_ServoTorqueAlarm2,
|
|
a9_PressureSensorError1,
|
|
a10_PressureSensorError2,
|
|
a11_,
|
|
a12_,
|
|
a13_DiffSensorError1,
|
|
a14_DiffSensorError2,
|
|
a15_,
|
|
a16_,
|
|
a17_DispSensorError1,
|
|
a18_DispSensorError2,
|
|
a19_,
|
|
a20_,
|
|
}
|
|
|
|
public enum E_TrackingType
|
|
{
|
|
Operation,
|
|
Parameter,
|
|
Alarm,
|
|
}
|
|
|
|
public enum E_DataType
|
|
{
|
|
None,
|
|
History,
|
|
Inspection,
|
|
Alarm,
|
|
}
|
|
|
|
public enum E_ModbusFunction
|
|
{
|
|
_04_ReadInputRegister,
|
|
_16_WriteMultipleRegister,
|
|
_03_ReadHoldingRegister,
|
|
}
|
|
}
|
|
|
|
public static class FindByNameUtil
|
|
{
|
|
public static T FindByName<T>(this object targetClass, string name) where T : class
|
|
{
|
|
System.Reflection.FieldInfo fi = targetClass.GetType().GetField(name, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
|
|
return fi.GetValue(targetClass) as T;
|
|
}
|
|
public static T FindByName<T>(this string name, object targetClass) where T : class
|
|
{
|
|
System.Reflection.FieldInfo fi = targetClass.GetType().GetField(name, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
|
|
return fi.GetValue(targetClass) as T;
|
|
}
|
|
public static System.Windows.Forms.Label Is_Label_From(this string name, object targetClass)
|
|
{
|
|
return FindByName<System.Windows.Forms.Label>(targetClass, name);
|
|
}
|
|
public static System.Windows.Forms.TextBox Is_TextBox_From(this string name, object targetClass)
|
|
{
|
|
return FindByName<System.Windows.Forms.TextBox>(targetClass, name);
|
|
}
|
|
public static System.Windows.Forms.TextBox TextBox(string name, object targetClass)
|
|
{
|
|
return FindByName<System.Windows.Forms.TextBox>(targetClass, name);
|
|
}
|
|
public static System.Windows.Forms.Label Label(string name, object targetClass)
|
|
{
|
|
return FindByName<System.Windows.Forms.Label>(targetClass, name);
|
|
}
|
|
public static System.Windows.Forms.PictureBox PictureBox(string name, object targetClass)
|
|
{
|
|
return FindByName<System.Windows.Forms.PictureBox>(targetClass, name);
|
|
}
|
|
|
|
|
|
public static SmartX.SmartLabel SmartLabel(string name, object targetClass)
|
|
{
|
|
return FindByName<SmartX.SmartLabel>(targetClass, name);
|
|
}
|
|
public static SmartX.SmartProgressBar SmartProgressBar(string name, object targetClass)
|
|
{
|
|
return FindByName<SmartX.SmartProgressBar>(targetClass, name);
|
|
}
|
|
public static SmartX.SmartButton SmartButton(string name, object targetClass)
|
|
{
|
|
return FindByName<SmartX.SmartButton>(targetClass, name);
|
|
}
|
|
public static SmartX.SmartDraw SmartDraw(string name, object targetClass)
|
|
{
|
|
return FindByName<SmartX.SmartDraw>(targetClass, name);
|
|
}
|
|
public static SmartX.SmartListBox SmartListBox(string name, object targetClass)
|
|
{
|
|
return FindByName<SmartX.SmartListBox>(targetClass, name);
|
|
}
|
|
}
|
|
}
|