Exemplo n.º 1
0
 /// <summary>
 /// Removes a listening client from our list of subscribers.
 /// </summary>
 public void Unsubscribe()
 {
     senderInstance.NewPacket -= new NewPacketEventHandler(NewPacketHandler);
     senderInstance = null;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Adds a new listening client to our list of subscribers.
        /// </summary>
        public void Subscribe()
        {
            //We must check that there are devices ready to be used!

            if (EMGSingleton.Instance.EPdevices.Count > 0)
            {
                senderInstance = EMGSingleton.Instance.EPdevices.ElementAt(deviceNum);
                senderInstance.NewPacket += new NewPacketEventHandler(NewPacketHandler);
                serviceCallback = OperationContext.Current.GetCallbackChannel<IEMGCallbacks>();
            }
        }