Reply to thread

[CODE=csharp]            tvNotifyDlg.SetDefaultToYes(true);

            tvNotifyDlg.DoModal(GUIWindowManager.ActiveWindow);


            if (tvNotifyDlg.IsConfirmed)

            {

              try

              {

                MediaPortal.Player.g_Player.Stop();

                if (c.IsTv)

                {

                  MediaPortal.GUI.Library.GUIWindowManager.ActivateWindow((int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_TV);

                  TVHome.ViewChannelAndCheck(c);

                  if (TVHome.Card.IsTimeShifting && TVHome.Card.IdChannel == c.IdChannel)

                  {

                    g_Player.ShowFullScreenWindow();

                  }

                }

                else if (c.IsRadio)

                {

                  MediaPortal.GUI.Library.GUIWindowManager.ActivateWindow((int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_RADIO);

                  Radio.CurrentChannel = c;

                  Radio.Play();

                }

              }

              catch (Exception e)

              {

                Log.Error("TVHome: TVNotification: Error on starting channel {0} after notification: {1} {2} {3}", notify.Channel.DisplayName, e.Message, e.Source, e.StackTrace);

              }

            }

            break;

          }[/CODE]


Setting default to true should satisfy if (tvNotifyDlg.IsConfirmed) and enable the change.


Top Bottom