Exemplo n.º 1
0
        void HandleEventInNewThread(RFIDEventType type, object arg)
        {
            RFIDEventArg     rfidArg           = new RFIDEventArg(type, arg);
            BackgroundWorker backgroundWorker1 = new BackgroundWorker();

            backgroundWorker1.DoWork += new DoWorkEventHandler(BackgroundThreadWork);
            backgroundWorker1.RunWorkerAsync(rfidArg);
        }
Exemplo n.º 2
0
        void BackgroundThreadWork(object sender, DoWorkEventArgs e)
        {
            RFIDEventArg rfidArg = (RFIDEventArg)e.Argument;

            RaiseEvent(rfidArg._type, rfidArg._arg);
        }