C#: GUI to display realtime messages from Windows Service

后端 未结 8 1612
盖世英雄少女心
盖世英雄少女心 2020-12-03 06:04

I\'ve written a C# windows service which can write messages to a custom EventLog or to any number of files. These messages are all marked with some priority (so, for exampl

相关标签:
8条回答
  • 2020-12-03 06:51

    .NET remoting over IPC channel.

    0 讨论(0)
  • 2020-12-03 07:01

    What you can do is have the windows service have way of registering for an event (you can do this through using Windows Communication Foundation). When your error comes up, it fires that event, and your winforms app will be notified. It's called a duplex contract:

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/0eb69998-0388-4731-913e-fb205528d374/

    http://msdn.microsoft.com/en-us/library/ms731184.aspx

    Actually the really cool thing is that you can have multiple applications listening this way too. So you can display it on screen, and have another application log it etc. without the two external apps knowing anything about each other.

    0 讨论(0)
提交回复
热议问题