Seitenhierarchie

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Question

How do I create a dialog box?

Answer

This is how to present an "OK" dialog (it can be used do display error messages as well)

/// <summary>
   /// Shows the Error Dialog
   /// </summary>
   private void ShowErrorDialog(string messsage)
   {
      GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
      if (dlgOK != null)
      {
         dlgOK.SetHeading("Error" /* or Message */);
         dlgOK.SetLine(1, messsage);
         dlgOK.SetLine(2, "");
         dlgOK.DoModal(PARENT_WINDOW_ID);
      }
   }

   

 

This page has no comments.