Example #1
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, Enum _eCyl, CDioMan _Dio)
        {
            m_eLangSel         = _eLanSel;
            m_sParaFolderPath  = _sParaFolderPath;
            Repeat.DelayRepeat = new CDelayTimer();

            Type  type      = _eCyl.GetType();
            Array arrayTemp = Enum.GetValues(type);

            m_iMaxCylinder = arrayTemp.Length - 1;
            if (m_iMaxCylinder < 0)
            {
                m_iMaxCylinder = 0;
            }

            m_aCylinder = new CCylinder[m_iMaxCylinder];

            DIO = _Dio;

            for (int i = 0; i < m_iMaxCylinder; i++)
            {
                m_aCylinder[i] = new CCylinder();
                //m_aCylinder[i].Init(_eLanSel,ref _Dio);
                m_aCylinder[i].Init(ref _Dio);
                m_aCylinder[i].Para.sEnum = arrayTemp.GetValue(i).ToString();
            }

            LoadSave(true);

            Repeat.DelayRepeat.Clear();

            return(true);
        }
Example #2
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, int _iMaxCylinder, CDioMan _Dio)
        {
            m_sParaFolderPath  = _sParaFolderPath;
            Repeat.DelayRepeat = new CDelayTimer();
            m_aCylinder        = new CCylinder[_iMaxCylinder];
            m_iMaxCylinder     = _iMaxCylinder;

            DIO = _Dio;

            for (int i = 0; i < m_iMaxCylinder; i++)
            {
                m_aCylinder[i] = new CCylinder();
                m_aCylinder[i].Init(_eLanSel, ref _Dio);
            }

            LoadSave(true);

            Repeat.DelayRepeat.Clear();

            return(true);
        }