Okay so I’m going to try my best to explain this. Me and a group of my friends are running a streaming event and as a little extra thing for the viewers we decided to have our own custom C# game running in the stream.
Here is my issue, we want a form box of some sort in a separate window so we can move it too a second monitor. We want it on a second monitor because we are capturing an entire screen and we don’t want them (the viewers) to ever see the form box.
We need this form to be able to control certain variables that trigger events within the game to add the illusion of an AI. The reason I don’t just make an AI is because we want it to do different things based on the viewers which we have no control over. Is there anyway at all to achieve this in C#?
If you created a class that represented your view (like a ViewModel). And it implemented INotifyPropertyChanged… you could create a public static instance (probably a singleton) that you could bind both forms to. If your properties are created like this:
both of the forms should be notified when either form updates a value on the class instance.
THIS IS NOT THREADSAFE!!! But that might not matter.