Esempio n. 1
0
 public void Run()
 {
     dlgAbout.Icon = new Gdk.Pixbuf(null, "lPhant.png");
     dlgAbout.Run();
     dlgAbout.Hide();
     dlgAbout.Dispose();
 }
Esempio n. 2
0
        protected override bool RunDefault()
        {
            Gtk.Dialog md = null;
            try {
                md = new Gtk.Dialog(Caption, TransientFor, DialogFlags.Modal | DialogFlags.DestroyWithParent)
                {
                    HasSeparator = false,
                    BorderWidth  = 6,
                };

                var questionLabel = new Label(Question)
                {
                    UseMarkup = true,
                    Xalign    = 0.0F,
                };
                md.VBox.PackStart(questionLabel, true, false, 6);

                var responseEntry = new Entry(Value ?? "")
                {
                    Visibility = !IsPassword,
                };
                responseEntry.Activated += (sender, e) => {
                    md.Respond(ResponseType.Ok);
                };
                md.VBox.PackStart(responseEntry, false, true, 6);

                md.AddActionWidget(new Button(Gtk.Stock.Cancel)
                {
                    CanDefault = true
                }, ResponseType.Cancel);
                md.AddActionWidget(new Button(Gtk.Stock.Ok), ResponseType.Ok);

                md.DefaultResponse = ResponseType.Cancel;

                md.Child.ShowAll();

                var response = (ResponseType)MonoDevelop.Ide.MessageService.RunCustomDialog(md, TransientFor);
                if (response == ResponseType.Ok)
                {
                    Value = responseEntry.Text;
                    return(true);
                }

                return(false);
            } finally {
                if (md != null)
                {
                    md.Destroy();
                    md.Dispose();
                }
            }
        }
Esempio n. 3
0
 private void on_NewPhoneBookDialog_delete_event(object o, DeleteEventArgs args)
 {
     NewPhoneBookDialog.Hide();
     NewPhoneBookDialog.Dispose();
     args.RetVal = true;
 }
Esempio n. 4
0
 public void Dispose()
 {
     dialog.Dispose();
 }
 public void Dispose()
 {
     thisDialog.Dispose();
 }