Beispiel #1
0
        void WriteKey0()
        {
            RaisePropertyChanged(() => entrySelectedKey0);
            if (entrySelectedKey0.Length != 32)
            {
                _userDialogs.Alert("Key 0 Error, please input 128bit (32 hex)");
                return;
            }

            _currentOperation = CURRENTOPERATION.WRITEKEY0;

            labelKey0Status = "W";
            RaisePropertyChanged(() => labelKey0Status);

            BleMvxApplication._reader.rfid.Options.TagWrite.bank           = CSLibrary.Constants.MemoryBank.RESERVED;
            BleMvxApplication._reader.rfid.Options.TagWrite.accessPassword = accessPwd;
            BleMvxApplication._reader.rfid.Options.TagWrite.offset         = 0x10; // m_writeAllBank.OffsetUser;
            BleMvxApplication._reader.rfid.Options.TagWrite.count          = 8;    // m_writeAllBank.WordUser;
            BleMvxApplication._reader.rfid.Options.TagWrite.pData          = CSLibrary.Tools.Hex.ToUshorts(entrySelectedKey0);

            BleMvxApplication._reader.rfid.StartOperation(CSLibrary.Constants.Operation.TAG_WRITE);
        }