I have a large c# project at work that controls a radar jammer. When the project is loaded, we create 3 threads and each one opens what we call a "mainform" (closing one of the mainforms will shut down the program.
The problem I'm currently encountering is that I am able to close one of the mainforms before making sure all other forms have been saved and properly closed themselves. What is the best way to go about this task? My current recommendation is to keep a global stack that keeps track of all open forms and before closing the mainform, it'll attempt to save and close all the forms in the stack.