Re[3]: OPOS UPOS
От: _d_m_  
Дата: 06.06.07 12:45
Оценка:
Здравствуйте, StriderMan, Вы писали:

___>> void s_DataEvent(int Status)

___>> {
___>> this.label1.Text = this.s.ScanData;

___>> this.s.DeviceEnabled = true;

___>> this.s.DataEventEnabled = true;
___>> }


SM>Использую MSROPOS (OPOS ридер маг. карт). После возникновения события считывания карточки флаг DataEventEnabled сбрасывается в false. Пробовал, как вы написали, выставлять в обработчике DataEventEnabled = true — после обработчика все равно сбрасывается. Пишу на D7. Как можно решить проблему? Спасибо.


Не понял в чем проблема . Работаю и с MSR и использую точно такую же схему. Вот выдержка из стандарта OPOS:

The MSR Control follows the general input model for event-driven input:

· When input is received by the Control, it enqueues a DataEvent.

· If the AutoDisable property is TRUE, then the control automatically disables itself when a DataEvent is enqueued.

· An enqueued DataEvent can be delivered to the application when the DataEventEnabled property is TRUE. Just before delivering this event, the Control copies the data into properties, and disables further data events by setting the DataEventEnabled property to FALSE. This causes subsequent input data to be enqueued by the Control while the application processes the current input and associated properties. When the application has finished the current input and is ready for more data, it reenables events by setting DataEventEnabled to TRUE.

· An ErrorEvent (or events) are enqueued if the Control encounters an error while gathering or processing input, and is delivered to the application when the DataEventEnabled property is TRUE.

 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.