Beispiel #1
0
 private void winLircControl_ReceiveIR(object sender, AxWinLIRCClientControl.__WinLIRC_ReceiveIREvent e)
 {
     switch (e.sRemote)
     {
         case "nextChan": break;
     }
 }
Beispiel #2
0
        private void axWinLIRC1_ReceiveIR(object sender, AxWinLIRCClientControl.__WinLIRC_ReceiveIREvent e)
        {
            // Enqueue
            IrCommand ircmd = new IrCommand();
            ircmd.Command = e.sButton;
            ircmd.TimeStamp = DateTime.Now;
            if (ir_commands.Count > 0)
            {
                ircmd.DeltaTime = DateTime.Now - ((IrCommand)ir_commands.Peek()).TimeStamp;
            }
            else
            {
                ircmd.DeltaTime = new TimeSpan(0);
            }
            ir_commands.Enqueue(ircmd);

            // Dequeue
            while (ir_commands.Count > 1)
            {
                ircmd = (IrCommand)ir_commands.Dequeue();
                if (ircmd.DeltaTime.TotalMilliseconds > 250)
                {
                    switch (ircmd.Command)
                    {
                        case "left":
                            flowPrevious();
                            break;
                        case "right":
                            flowNext();
                            break;
                        case "iptv":
                            mediaStramsToolStripMenuItem_Click(this, null);
                            break;
                        case "vod":
                            videoOnDemandList();
                            break;
                        case "ok":
                            flowOK();
                            break;
                        case "off":
                            appExitTimer.Enabled = true;
                            break;
                    }
                }
            }
        }
Beispiel #3
0
 private void winLircControl_Error(object sender, AxWinLIRCClientControl.__WinLIRC_ErrorEvent e)
 {
     MessageBox.Show("WinLirc Error: "+e.sErrDescription);
 }