Whats the best way to communicate between events on the Main form and events on a User Control.
Let me explain -
I have a set of Tabs in a Tab Control. Each Tab is a separate file and consists of a User Control. The User Control itself contains a Sub Tab Control and has other User Controls with events within its Tab pages. Lets say a simple Button click on each User Control within a Tab page, when the user clicks on the Button, I need to check if there is filename associated with the Main Tab. If it does not have a file name, I need to show a Save File Dialog. And give the Tab a file name. I want the Save Dialog only if there is no Filename for the Tab opened.
Now, the Main form has Menu Items with [Save, Save As..etc] When I click on Save As the Save File Dialog needs to open. And the Tab gets a new file name.
Now lets say, the user Saves the file first thrrough the Save As menu item and then Clicks the Button on the User Control, then there is no Save File Dialog cause there is already a Filename associated with the tab.
How do I get access to the filename from both the Menu Item event and the User Control event, so that I can keep track to show the Save File Dialog.
What is the best approach, keeping in mind I need to do other events like Open, Save file while closing events etc. I