private void Sender()
        {
            irblaster = new HCWIRBlaster();
            while (_running)
            {
                if (_sending || !_send)
                {
                    Thread.Sleep(50);
                    continue;
                }
                _sending = true;
                Log.WriteFile("Blaster Sending: Channel:{0}, Card:{1}, VideoInput:{2}", _channel, _card,
                              _videoInputType.ToString());
                switch (_deviceType)
                {
                case 0:
                    Send(_channel, _card);
                    break;

                case 1:
                    Send(_channel, _card);
                    break;

                case 2:
                    Log.WriteFile("ServerBlaster.Send: Case 2");
                    if (_videoInputType.ToString() == "Tuner")
                    {
                        Log.WriteFile("ServerBlaster.Send: Channel {0} not blasted}", _channel);
                    }
                    else
                    {
                        Log.WriteFile("ServerBlaster.Send: Channel {0} blasted}", _channel);
                        Send(_channel); // Hauppauge blasting
                    }
                    break;

                default:
                    Log.WriteFile("ServerBlaster: Invalid _deviceType {0}", _deviceType);
                    break;
                }
                _sending = false;
                _send    = false;
                Log.WriteFile("ServerBlaster:Send Finished");
            }
            irblaster = null;
        }
예제 #2
0
 private void Sender()
 {
   irblaster = new HCWIRBlaster();
   while (_running)
   {
     if (_sending || !_send)
     {
       Thread.Sleep(50);
       continue;
     }
     _sending = true;
     Log.WriteFile("Blaster Sending: Channel:{0}, Card:{1}, VideoInput:{2}", _channel, _card,
                   _videoInputType.ToString());
     switch (_deviceType)
     {
       case 0:
         Send(_channel, _card);
         break;
       case 1:
         Send(_channel, _card);
         break;
       case 2:
         Log.WriteFile("ServerBlaster.Send: Case 2");
         if (_videoInputType.ToString() == "Tuner")
         {
           Log.WriteFile("ServerBlaster.Send: Channel {0} not blasted}", _channel);
         }
         else
         {
           Log.WriteFile("ServerBlaster.Send: Channel {0} blasted}", _channel);
           Send(_channel); // Hauppauge blasting
         }
         break;
       default:
         Log.WriteFile("ServerBlaster: Invalid _deviceType {0}", _deviceType);
         break;
     }
     _sending = false;
     _send = false;
     Log.WriteFile("ServerBlaster:Send Finished");
   }
   irblaster = null;
 }