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();
     }
 }
Exemple #2
0
        //Run and destroy a standard confirmation dialog
        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();
            }
        }
Exemple #3
0
        void Translations()
        {
            HigMessageDialog dlg;

            dlg = new HigMessageDialog (app_window,
                Gtk.DialogFlags.DestroyWithParent,
                Gtk.MessageType.Warning,
                Gtk.ButtonsType.Ok,
                Catalog.GetString ("The level of translation of gbrainy for your language is low."),
                Catalog.GetString ("You may be exposed to partially translated games making it more difficult to play. If you prefer to play in English, there is an option for doing so in gbrainy's Preferences."));

            try {
             			dlg.Run ();
             		} finally {
             			dlg.Destroy ();
             		}
        }
Exemple #4
0
        //Run and destroy a standard confirmation dialog
        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();
             		}
        }