Exemple #1
0
        public int Init()
        {
            int ret = -1;

            string [] strParams = new string [20];
            //_params = new BT_POINT();
            foreach (BTDevice devParam in _params)
            {
                switch (devParam.FS_TYPE)
                {
                case "WGT":
                    _weight = new CoreWeight();
                    _weight.Init(devParam.FS_PARAM);
                    break;

                case "LCD":
                    _lcd = new LCDScreen();
                    _lcd.Init(devParam.FS_PARAM);
                    break;

                case "LED":
                    _led = new LedScreen();
                    _led.Init(devParam.FS_PARAM);
                    break;

                case "ZPL":
                    _printer = new LablePrinter();
                    _printer.Init(devParam.FS_PARAM);
                    break;

                case "DVR":
                    _dvr = new HkDvr();
                    break;

                case "RTU":
                    _rtu = new CoreRtu();
                    _rtu.init(devParam.FS_PARAM);
                    break;

                case "IOLOGIK":
                    _iologic = new CoreIoLogik();
                    _iologic.Init(devParam.FS_PARAM);
                    break;

                case "CARD":
                    _card = new IcCard();
                    _card.Init(devParam.FS_PARAM, 1);
                    break;
                }
            }

            _thread = null;//new System.Threading.Thread();
            return(0);
        }
Exemple #2
0
        public int Init(int m_iSelectedPound)
        {
            IsSaved = false;
            int ret = -1;
            string [] strParams = new string [5];
            //_params = new BT_POINT();

            _thread = null;//new System.Threading.Thread();
            _flashThread = null;

            if (_params.FS_RTUIP != "")
            {
                _rtu = new HgRtu();
                _rtu.IP = _params.FS_RTUIP;
                if (_params.FS_RTUPORT != "") _rtu.Port = Convert.ToUInt16(_params.FS_RTUPORT);
            }
            if (_params.FS_READERPARA != "")
            {
                _card = new HgIcCard();
                _card.Init(_params.FS_READERPARA,m_iSelectedPound);
            }
            if (_params.FS_LEDIP != "")
            {
                _led = new LedScreen();
                _led.Init(_params.FS_LEDIP);
            }

            if (_params.FS_DISPLAYPARA != "")
            {
                _lcd = new HgLcd();
                _lcd.Init(_params.FS_DISPLAYPARA);
            }
            if (_params.FS_MOXAIP != "")
            {
                _iologic = new CoreIoLogik();
                _iologic.IP = _params.FS_MOXAIP;
                if (_params.FS_MOXAPORT != "") _iologic.Port = Convert.ToInt32(_params.FS_MOXAPORT);
            }
            if (_params.FS_VIEDOIP != "")
            {
                _dvr = new HkDvr();
                _dvr.Init(_params.FS_VIEDOIP+","+_params.FS_VIEDOPORT+"," +_params.FS_VIEDOUSER+"," +_params.FS_VIEDOPWD);
            }

            if (_params.FS_METERPARA != "")
            {
                _weight = new CarWeight();
                _weight.DeviceName = _params.FS_METERTYPE;
                _weight.Init(_params.FS_METERPARA);
            }
            if (_params.FS_PRINTERIP != "")
            {
                _printer = new CorePrinter();
                _printer.Init(_params.FS_PRINTERNAME);
            }

            return ret;
        }
Exemple #3
0
 private void FrmIoLogic_Load(object sender, EventArgs e)
 {
     _iologic = new CoreIoLogik();
     _iologic.Init("10.25.3.243,502");
     _iologic.Open();
 }
Exemple #4
0
 private void reBoot()
 {
     _iologic.Close();
     _iologic = new CoreIoLogik();
     _iologic.Init("10.246.3.31,502");
     _iologic.Open();
 }
Exemple #5
0
        public int Init()
        {
            int ret = -1;
            string [] strParams = new string [20];
            //_params = new BT_POINT();
            foreach (BTDevice devParam in _params)
            {
                switch (devParam.FS_TYPE)
                {
                    case "WGT":
                        _weight = new CoreWeight();
                        _weight.Init(devParam.FS_PARAM);
                        break;
                    case "LCD":
                        _lcd = new LCDScreen();
                        _lcd.Init(devParam.FS_PARAM);
                        break;
                    case "LED":
                        _led = new LedScreen();
                        _led.Init(devParam.FS_PARAM);
                        break;
                    case "ZPL":
                        _printer = new LablePrinter();
                        _printer.Init(devParam.FS_PARAM);
                        break;
                    case "DVR":
                        _dvr = new HkDvr();
                        break;
                    case "RTU":
                        _rtu = new CoreRtu();
                        _rtu.init(devParam.FS_PARAM);
                        break;
                    case "IOLOGIK":
                        _iologic = new CoreIoLogik();
                        _iologic.Init(devParam.FS_PARAM);
                        break;
                    case"CARD":
                        _card = new IcCard();
                        _card.Init(devParam.FS_PARAM,1);
                        break;
                }
            }

            _thread = null;//new System.Threading.Thread();
            return 0;
        }