gbrainy.Clients.Classical.Dialogs.HigMessageDialog.RunHigConfirmation C# (CSharp) Méthode

RunHigConfirmation() public static méthode

public static RunHigConfirmation ( Gtk parent, Gtk flags, Gtk type, string header, string msg, string ok_caption ) : Gtk.ResponseType
parent Gtk
flags Gtk
type Gtk
header string
msg string
ok_caption string
Résultat Gtk.ResponseType
        public static Gtk.ResponseType RunHigConfirmation(Gtk.Window parent,
					 Gtk.DialogFlags flags,
					 Gtk.MessageType type,
					 string          header,
					 string          msg,
					 string          ok_caption)
        {
            HigMessageDialog hmd = new HigMessageDialog(parent, flags, type, header, msg, ok_caption);
             		try {
             			return (Gtk.ResponseType)hmd.Run();
             		} finally {
             			hmd.Destroy();
             		}
        }

Usage Example

Exemple #1
0
 private void OnCleanHistory(object sender, EventArgs args)
 {
     if (ResponseType.Ok == HigMessageDialog.RunHigConfirmation(
             this,
             Gtk.DialogFlags.DestroyWithParent,
             Gtk.MessageType.Warning,
             Catalog.GetString("You are about to delete the player's game session history."),
             Catalog.GetString("If you proceed, you will lose the history of the previous game sessions. Do you want to continue?"),
             Catalog.GetString("_Delete")))
     {
         history.Clean();
     }
 }