How to display a "GUIDialogYesNo" on any screen screen? (1 Viewer)

MoPhat

Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi, how can i do this that a messagebox with a ok and cance button are displayes on any screen even a event has created?

    i found that code in the forum but doesnt work :(

    Code:
               GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
                dlgYesNo.SetHeading("Test message");
                dlgYesNo.SetLine(1, "message...");
                dlgYesNo.DoModal(GUIWindowManager.ActiveWindow);
    
                if (dlgYesNo.IsConfirmed)
                {
                    GUIWindowManager.ActivateWindow(35);
                }



    i need this for my Standby.Watcher plugin which are nearly completed.

    Can i fire a dialogbox with a OK button from a process plugin?

    thank you for any tips or sample code(s) :D
    MoPhat
     

    jburnette

    Portal Pro
    August 24, 2006
    758
    116
    Kentucky
    Home Country
    United States of America United States of America
    You can't convert between two different types of dialogs like this:

    GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);


    Change that to WINDOW_DIALOG_YES_NO and it should work fine.
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Ok, i have seen this

    with this code its works fine from a process plugin :D

    Code:
     GUIDialogOK standbyMessage = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
                standbyMessage.Reset();
                standbyMessage.SetHeading("Standby Notification");
                standbyMessage.SetLine(1, "message...");
    
                standbyMessage.DoModal(MediaPortal.GUI.Library.GUIWindowManager.ActiveWindow);

    thx
    MoPhat
     

    Users who are viewing this thread

    Top Bottom