I want to pop up a dialog box to get confirmation. How do I use the Messaging Service to do that?

asked 01 Jun '10, 21:43

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦
696262833
accept rate: 50%


First you need to import a reference to the Messaging Service:

[Import(SoapBox.Core.Services.Messaging.MessagingService, 
        typeof(IMessagingService))]
private Lazy<IMessagingService> messagingService { get; set; }

Then you can show a dialog box (it will log the message and result using the LoggingService as well):

DialogResult result = messagingService.Value.ShowDialog(
        "Are you sure you want to self destruct?",
        "Arm Self Desctruct Sequence", MessageBoxButtons.YesNo);
link

answered 01 Jun '10, 21:43

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦
696262833
accept rate: 50%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×23
×2

Asked: 01 Jun '10, 21:43

Seen: 1,373 times

Last updated: 01 Jun '10, 21:43

powered by OSQA