Exemplo n.º 1
0
        private void SetupManagers()
        {
            // Open a connection to the reader
            _dataManager = new DataManager(DataManager.ConnectionTypes.SOCKET, _ipAddress, 0);
            _dataManager.OpenConnection();
            //Console.WriteLine("Connection Opened");

            // Get the reader's name
            _infoManager = new InfoManager(_dataManager);
            String v = _infoManager.Name;
            //Console.WriteLine("Name: " + v);
            _infoManager = null;

            // Login as administrator
            _readerManager = new ReaderManager(_dataManager);
            if (!_readerManager.Login(_login, _password))
            {
                throw new Exception("Login attempt failed: " + _readerManager.LastErrorMessage);
            }

            v = _readerManager.WhoAmI();
            //Console.WriteLine("Login: " + v);
        }