Exemplo n.º 1
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            //TODO 临时关闭保护线程
            startProtectProcess();//启动保护进程
            lastMessageTime = DateTime.Now;
            int ret = Init();

            if (Global.bUseCacheCar)
            {
                Global.listCarArrive      = new List <ClsCarArrive>();
                timerClearCarlist.Enabled = true;
            }

            InitFormInfo();
            if (ret == 0)
            {
                SPlate.SP_BeginRecog();
                ShowNozzleCarList();
                ShowAreaCarList();
                return;
            }
            if ((ret & 0x01) == 0x01)
            {
                MessageBox.Show("日志启动失败");
            }
            if ((ret & 0x02) == 0x02)
            {
                MessageBox.Show("数据库连接失败");
            }
            if ((ret & 0x04) == 0x04)
            {
                MessageBox.Show("参数初始化失败");
            }
            if ((ret & 0x08) == 0x08)
            {
                MessageBox.Show("算法初始化失败");
            }
            if ((ret & 0x10) == 0x10)
            {
                MessageBox.Show("设备初始化失败");
            }
            if ((ret & 0x20) == 0x20)
            {
                MessageBox.Show("网络服务初始化失败");
            }
        }
        private void FormMain_Load(object sender, EventArgs e)
        {
            startProtectProcess();//启动保护进程
            lastMessageTime = DateTime.Now;
            int ret = Init();

            InitFormInfo();
            if (ret == 0)
            {
                SPlate.SP_BeginRecog();
                ShowNozzleCarList();
                ShowAreaCarList();
                return;
            }
            if ((ret & 0x01) == 0x01)
            {
                MessageBox.Show("日志启动失败");
            }
            if ((ret & 0x02) == 0x02)
            {
                MessageBox.Show("数据库连接失败");
            }
            if ((ret & 0x04) == 0x04)
            {
                MessageBox.Show("参数初始化失败");
            }
            if ((ret & 0x08) == 0x08)
            {
                MessageBox.Show("算法初始化失败");
            }
            if ((ret & 0x10) == 0x10)
            {
                MessageBox.Show("设备初始化失败");
            }
            if ((ret & 0x20) == 0x20)
            {
                MessageBox.Show("网络服务初始化失败");
            }
        }