Example #1
0
        private bool SelectYesNo(string label)
        {
            GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_YES_NO);

            if (dlg == null)
            {
                return(false);
            }

            dlg.SetHeading(196);
            dlg.SetLine(1, label);
            dlg.SetYesLabel(GUILocalizeStrings.Get(186)); //OK
            dlg.SetNoLabel(GUILocalizeStrings.Get(222));  //Cancel
            dlg.SetDefaultToYes(true);
            dlg.DoModal(GUIWindowManager.ActiveWindow);

            return(dlg.IsConfirmed);
        }