using System;
using System.Linq;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace ITC81DB_2
{
    public class Define
    {
        public delegate void EventHandlerAlarmStateChange(Define.E_TrackingAlarm alarm, string status);

        #region Enum
        public enum E_EquipmentStatus
        {
            Stop = 0,
            Start = 1,
        }

        public enum E_Lane
        {
            All = 0,
            Lane1 = 1,
            Lane2 = 2,
        }

        public enum E_DisplayMode
        { 
            Normal,
            Menu,
            Calibration,
            SystemSetting,
            IOTest,
            Bypass,
            EquipmentTest,
            SorterTest,
        }

        public enum E_DisplayStore
        {
            MainDisplay,

            BasicDataBackup,
            BasicDataStatistics,
            BasicHelp,
            BasicProduct,
            BasicTime,

            ConfiCommunication,
            ConfiHelp,
            ConfiOptionBoard,
            ConfiOptionBoard1,
            ConfiSerial,
            ConfiEthernet,

            EquipHelp,
            EquipInitialize,
            EquipUpdate,
            EquipFuctionSetting,
            EquipUser,
            EquipEngineer,

            InforAS,
            InforHelp,
            InforSystem,

            SystemAutoZero,
            SystemCalibration,
            SystemHelp,
            SystemIOTest,
            SystemJudgmentSetting,
            SystemSorterSetting,
        }

        public enum E_FormStore
        {
            FormNone = 0,
            FormMainDisplay,
            FormMenu,
        }

        public enum E_MainDisplayStore
        {
            //DisplayStop,
            BarGraph,
            LineGraph,
            List,
            DataStat,
            SubMenu,
            Feedback,
            Modbus,
        }

        public enum E_MenuSide
        {
            Basic,
            Configuration,
            System,
            Equipment,
            Information,
        }

        public enum E_MenuBottomBasic
        {
            DataBackup,
            DataStatistics,
            Help,
            Product,
            Time,
        }

        public enum E_MenuBottomConfiguration
        {
            Help,
            OptionBoard,
            SerialCOM1,
            SerialCOM3,
            SerialCOM4,
            Ethernet,
        }

        public enum E_MenuBottomEquipment
        {
            FunctionSetting,
            Help,
            Initialize,
            Update,
            User,
            Engineer,
        }

        public enum E_MenuBottomSystem
        {
            AutoZero,
            Calibration,
            Help,
            IOTest,
            JudgmentSetting,
            SorterSetting,
        }

        public enum E_MenuBottomInformation
        {
            Help,
            SystemInformation,
            AS,
        }

        public enum E_LanguageID
        {
            Korean,
            English,
            Chinese,
            Czech,
            Russian,
            German,
            Spanish,
        }

        public enum E_JudgmentStatus
        {
            Empty,
            Under,
            Pass,
            Over,
            Double,
            Metal,
            ExNg,
        }

        public enum E_WeightStatus
        {
            Empty,
            WeightChange,
            WeightZero,
            CalNomal,
            CalBalans,
            CalStandby,
            CalFinish,
            CalError,
        }

        public enum E_UserGroup
        {
            None = 0,
            Level1 = 1,
            Level2 = 2,
            Level3 = 3,
            Admin = 4,
            Developer = 5,
            NotLogin = 6,
            LogOut = 7,
        }

        public enum E_ResponseData
        {
            NAK = 0,
            ACK = 1,
        }

        public enum E_UpdateCheck
        {
            Fail,
            Success,
            NotUsbMomery,
            NotUpdateFolder,
            NotFile,
        }

        public enum E_WeightInputMode
        { 
            Weight,
            Deviation,
        }

        public enum E_Step2
        {
            Step1,
            Step2,
        }

        public enum E_Step3
        { 
            Step1,
            Step2,
            Step3,
        }

        public enum E_Step4
        {
            Step1,
            Step2,
            Step3,
            Step4,
        }

        public enum E_SeparateType
        {
            STXANDETX,
            ETXONLY,
            NONEFRAME_READTIMEOUT,
            STXONLY,
        }

        public enum E_EnumFileUserPassword
        {
            f0_Level1 = 0,
            f1_Level2 = 1,
            f2_Level3 = 2,
        }

        public enum E_EnumFileUserGroup
        { 
            f0_Level1 = 0,
            f1_Level2 = 1,
            f2_Level3 = 2,
        }

        public enum E_CommMode
        {
            f0_None = 0,
            f1_STD1,
            f2_Remote,
            f3_Printer,
            f4_STD2,
            f5_imaje_9028_OPT2,
            f99_Modbus,
        }

        public enum E_ModbusFunction
        {
            _04_ReadInputRegister,
            _16_WriteMultipleRegister,
            _03_ReadHoldingRegister,
        }

        public enum E_CharValue
        {
            ENQ, // 0x05
            ACK, // 0x06
            NAK, // 0x15
            Space, // 0x20
        }

        public enum E_TrackingAlarm
        {
            None,
            a1_EntrySensorError = 1,
            a2_LoadCellError = 2,
            a3_PressureSensingError = 3,
            a4_DoorInterlock = 4,
            a6_StackUpSensorError = 6,
            a7_SorterAError = 7,
            a8_EmergencyStop = 8,
            a9_InverterError = 9,
            a13_WindProofError = 13,
            a14_SorterBError = 14,
            a18_EntryNotDetected = 18,
        }
        #endregion
    }
}
