my WPF application is build around 4 Window classes; every window is run by a ShowDialog() command.
The application needs to communicate with external machine via socket connection: this communication is developed in a class.
The communication can interact with each window, the active one, receiving events and sending some commands.
How can i implement this requirement?
My first idea is to instantiate the communication class on the first window and then passing it by reference to the other following windows: they can receive the class and could connect the event system to receive events and send some kind of command.
Any other way?