3 digit channel in tv guide (1 Viewer)

elihunter

Portal Member
November 16, 2005
7
0
I was having problems not being able to change to a channel with 3 digits in the TV guide. I found this section of code
Code:
    void OnKeyCode(char chKey)
    {
      if (chKey >= '0' && chKey <= '9') //Make sure it's only for the remote
      {
        TimeSpan ts = DateTime.Now - m_timeKeyPressed;
        if (m_strInput.Length >= 2 || ts.TotalMilliseconds >= 800)
        {
          m_strInput = String.Empty;
        }
        m_timeKeyPressed = DateTime.Now;
        if (chKey == '0' && m_strInput.Length == 0) return;
        m_strInput += chKey;
        if (m_strInput.Length == 2)

and changed it to this

Code:
    void OnKeyCode(char chKey)
    {
      if (chKey >= '0' && chKey <= '9') //Make sure it's only for the remote
      {
        TimeSpan ts = DateTime.Now - m_timeKeyPressed;
        if (m_strInput.Length >= 3 || ts.TotalMilliseconds >= 800)
        {
          m_strInput = String.Empty;
        }
        m_timeKeyPressed = DateTime.Now;
        if (chKey == '0' && m_strInput.Length == 0) return;
        m_strInput += chKey;
        if (m_strInput.Length == 3)

which seemed to fix the problem. I don't know how to submit changes or anything or even if this is really right. Hopefully we can get this changed in the CVS.

Eli
Code:
 

Users who are viewing this thread

Top Bottom