public Form1() { InitializeComponent(); _nfcWrapper = new NfcDongleWrapper(null); _nfcWrapper.TagFound += _nfcWrapper_TagFound; _nfcWrapper.TagLost += _nfcWrapper_TagLost; _nfcWrapper.BeginSearch(); }
public RadXInteractionModel() { var thr = new Thread(new ThreadStart(() => { Dispatcher = Dispatcher.CurrentDispatcher; Dispatcher.Run(); })) { Name = "RadUI-Interaction-Thread", Priority = ThreadPriority.AboveNormal }; thr.Start(); while (thr.ThreadState != System.Threading.ThreadState.Running) thr.Join(10); _dongleConnector = new NfcDongleWrapper(DataManager.GetInstance().GetNfcWriteKey()); if (!IS_DEMO) { _dongleConnector.TagFound += _dongleConnector_TagFound; _dongleConnector.TagLost += _dongleConnector_TagLost; _dongleConnector.BeginSearch(); } }