private void Instance_QRCodeUpdated(object sender, QRCodeEventArgs <Microsoft.MixedReality.QR.QRCode> e) { Debug.Log("QRCodesVisualizer Instance_QRCodeUpdated"); lock (pendingActions) { pendingActions.Enqueue(new ActionData(ActionData.Type.Updated, e.Data)); } }
private void Instance_QRCodeRemoved(object sender, QRCodeEventArgs <QRCodesTrackerPlugin.QRCode> e) { Debug.Log("QRCodesVisualizer Instance_QRCodeRemoved"); lock (pendingActions) { pendingActions.Enqueue(new ActionData(ActionData.Type.Removed, e.Data)); } }
private void QRCodeWatcher_Added(object sender, QRCodeAddedEventArgs args) { Debug.Log("QRCodesManager QRCodeWatcher_Added"); lock (qrCodesList) { qrCodesList[args.Code.Id] = args.Code; } var handlers = QRCodeAdded; if (handlers != null) { handlers(this, QRCodeEventArgs.Create(args.Code)); } }
private void QrTracker_Removed(QRCodeRemovedEventArgs args) { Debug.Log("QRCodesManager QrTracker_Removed"); bool found = false; lock (qrCodesList) { if (qrCodesList.ContainsKey(args.Code.Id)) { qrCodesList.Remove(args.Code.Id); } } if (found) { var handlers = QRCodeRemoved; if (handlers != null) { handlers(this, QRCodeEventArgs.Create(args.Code)); } } }
private void QRCodeWatcher_Updated(object sender, QRCodeUpdatedEventArgs args) { Debug.Log("QRCodesManager QRCodeWatcher_Updated"); bool found = false; lock (qrCodesList) { if (qrCodesList.ContainsKey(args.Code.Id)) { found = true; qrCodesList[args.Code.Id] = args.Code; } } if (found) { var handlers = QRCodeUpdated; if (handlers != null) { handlers(this, QRCodeEventArgs.Create(args.Code)); } } }