How to get TVNotifyYesNoDialog? (1 Viewer)

glenn 1990

Portal Pro
July 1, 2010
247
36
Home Country
Belgium Belgium
Hi,

I'm implementing a notify manager in the 4TR Tv client plugin,
but how can I use the TVNotifyYesNoDialog?? Other dialogs are working with a reference to Dialogs.dll.

this works:
Code:
GUIDialogYesNo tvNotifyDlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);

but this doesn't::(
Code:
TVNotifyYesNoDialog tvNotifyDlg = (TVNotifyYesNoDialog)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TVNOTIFYYESNO);
 

SilentException

Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    TvNotifyYesNoDialog is implemented in TvPlugin so you should either reference TvPlugin or write your own (read copy) TvNotifyYesNoDialog.
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    If you copy the code to create new dialog you have to use your own ID / skin file / use that id when fetching dialog from window manager.
     

    glenn 1990

    Portal Pro
    July 1, 2010
    247
    36
    Home Country
    Belgium Belgium
    I still get this in my mp log:
    Code:
    GUIWindowManager: Could not find window 9999

    first part of my new dialog:
    Code:
    namespace ForTheRecord.UI.MediaPortal
    {
        class NotifyYesNo: GUIDialogYesNo
        {
                        [SkinControl(12)] protected GUIImage imgLogo = null;
    
        private bool m_bNeedRefresh = false;
        private string logoUrl = string.Empty;
    
        public NotifyYesNo()
        {
            GetID = 9999;//(int)Window.WINDOW_DIALOG_TVNOTIFYYESNO;
        }
    
        public override bool Init()
        {
          return Load(GUIGraphicsContext.Skin + @"\NotifyYesNo.xml");
        }

    And the call to my new dialog:
    Code:
    NotifyYesNo tvNotifyDlg = (NotifyYesNo)GUIWindowManager.GetWindow(9999);

    NotifyYesNo.xml exist and has ID 9999, do I need to register the dialog or something?
     

    Users who are viewing this thread

    Top Bottom