void ListenCallback(IAsyncResult ar) { HandleConnection(VirtualMachineManager.EndListen(ar)); Gtk.Application.Invoke(delegate { if (dialog != null) { dialog.Respond(Gtk.ResponseType.Ok); } }); }
public void Dispose() { if (disposed) { return; } disposed = true; if (dialog != null) { Gtk.Application.Invoke(delegate { if (dialog != null) { dialog.Respond(Gtk.ResponseType.Ok); } }); } }
static void ShowEvalDialog () { string evalTitle = GettextCatalog.GetString ("Evaluation Version"); string evalHeader = GettextCatalog.GetString ("Feature Not Available In Evaluation Version"); string evalMessage = GettextCatalog.GetString ( "Upgrade to the full version of Mono for Android to deploy\n" + "to devices, and to enable your applications to be distributed."); string continueMessage = GettextCatalog.GetString ("Continue evaluation"); var dialog = new Gtk.Dialog () { Title = evalTitle, }; dialog.VBox.PackStart ( new Gtk.Label ("<b><big>" + evalHeader + "</big></b>") { Xalign = 0.5f, UseMarkup = true }, true, false, 12); var align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 1.0f) { LeftPadding = 12, RightPadding = 12 }; dialog.VBox.PackStart (align, true, false, 12); align.Add (new Gtk.Label (evalMessage) { Xalign = 0.5f, Justify = Gtk.Justification.Center }); align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 1.0f) { LeftPadding = 12, RightPadding = 12 }; dialog.VBox.PackStart (align, true, false, 12); string activateMessage; if (PropertyService.IsWindows) { activateMessage = GettextCatalog.GetString ("Activate Mono for Android"); } else { activateMessage = GettextCatalog.GetString ("Buy Mono for Android"); } var buyButton = new Gtk.Button (new Gtk.Label ("<big>" + activateMessage + "</big>") { UseMarkup = true } ); buyButton.Clicked += delegate { Activate (); dialog.Respond (Gtk.ResponseType.Accept); }; align.Add (buyButton); dialog.AddButton (continueMessage, Gtk.ResponseType.Close); dialog.ShowAll (); MessageService.ShowCustomDialog (dialog); }
static void ShowEvalDialog() { string evalTitle = GettextCatalog.GetString("Evaluation Version"); string evalHeader = GettextCatalog.GetString("Feature Not Available In Evaluation Version"); string evalMessage = GettextCatalog.GetString( "Upgrade to the full version of Mono for Android to deploy\n" + "to devices, and to enable your applications to be distributed."); string continueMessage = GettextCatalog.GetString("Continue evaluation"); var dialog = new Gtk.Dialog() { Title = evalTitle, }; dialog.VBox.PackStart( new Gtk.Label("<b><big>" + evalHeader + "</big></b>") { Xalign = 0.5f, UseMarkup = true }, true, false, 12); var align = new Gtk.Alignment(0.5f, 0.5f, 1.0f, 1.0f) { LeftPadding = 12, RightPadding = 12 }; dialog.VBox.PackStart(align, true, false, 12); align.Add(new Gtk.Label(evalMessage) { Xalign = 0.5f, Justify = Gtk.Justification.Center }); align = new Gtk.Alignment(0.5f, 0.5f, 1.0f, 1.0f) { LeftPadding = 12, RightPadding = 12 }; dialog.VBox.PackStart(align, true, false, 12); string activateMessage; if (PropertyService.IsWindows) { activateMessage = GettextCatalog.GetString("Activate Mono for Android"); } else { activateMessage = GettextCatalog.GetString("Buy Mono for Android"); } var buyButton = new Gtk.Button(new Gtk.Label("<big>" + activateMessage + "</big>") { UseMarkup = true }); buyButton.Clicked += delegate { Activate(); dialog.Respond(Gtk.ResponseType.Accept); }; align.Add(buyButton); dialog.AddButton(continueMessage, Gtk.ResponseType.Close); dialog.ShowAll(); MessageService.ShowCustomDialog(dialog); }