void IRfidEventsListener.EventStatusNotify(RfidStatusEvents p0) { Log.Debug(TAG, "Status Notification: " + p0.StatusEventData.StatusEventType); RunOnUiThread(() => { tvStatus.Text = "" + p0.StatusEventData.StatusEventType; }); if (p0.StatusEventData.StatusEventType == STATUS_EVENT_TYPE.HandheldTriggerEvent) { if (p0.StatusEventData.HandheldTriggerEventData.HandheldEvent == HANDHELD_TRIGGER_EVENT_TYPE.HandheldTriggerPressed) { ThreadPool.QueueUserWorkItem(o => PerformInventory()); RunOnUiThread(() => { tvStatus.Text = "HandheldTriggerPressed => PERFORMING INVENTORY"; }); } if (p0.StatusEventData.HandheldTriggerEventData.HandheldEvent == HANDHELD_TRIGGER_EVENT_TYPE.HandheldTriggerReleased) { ThreadPool.QueueUserWorkItem(o => StopInventory()); RunOnUiThread(() => { tvStatus.Text = "HandheldTriggerReleased => STOPPING INVENTORY"; }); } } }
// Status Event Notification public void EventStatusNotify(RfidStatusEvents rfidStatusEvents) { //Log.Debug(appTAG, "Status Notification: " + rfidStatusEvents.StatusEventData.StatusEventType); //if (rfidStatusEvents.StatusEventData.StatusEventType == STATUS_EVENT_TYPE.HandheldTriggerEvent) //{ // if (rfidStatusEvents.StatusEventData.HandheldTriggerEventData.HandheldEvent == HANDHELD_TRIGGER_EVENT_TYPE.HandheldTriggerPressed) // { // ThreadPool.QueueUserWorkItem(o => // { // try // { // Reader.Actions.Inventory.Perform(); // } // catch // (InvalidUsageException e) // { // e.PrintStackTrace(); // } // catch // (OperationFailureException e) // { // e.PrintStackTrace(); // } // }); // } // if (rfidStatusEvents.StatusEventData.HandheldTriggerEventData.HandheldEvent == HANDHELD_TRIGGER_EVENT_TYPE.HandheldTriggerReleased) // { // ThreadPool.QueueUserWorkItem(o => // { // try // { // Reader.Actions.Inventory.Stop(); // } // catch // (InvalidUsageException e) // { // e.PrintStackTrace(); // } // catch // (OperationFailureException e) // { // e.PrintStackTrace(); // } // }); // } //} }