Passing info between two classes of the same DLL but without Global, Public variables
<p>When a dialog shows in my form, it can be opened from two different call stacks, either from a right click menu option or from a Menu command. And they are different ( one is creating a new report field and the other shows the properties of the current report field) So the data I populate in the fields of that form are different but somewhere in the way, they are using some common methods too.
So I wanted a way to pass the information to the <code>PopulateFields()</code> method so it knows if it has been called from the Right-Click of properties window or from the Insert Menu option.</p>

<p>So in the lowest level class I created a public enumaration like this to know where is it being called from so at the end the <code>PopulateFields()</code> know how to populate the fields depending on where is it comign from, as you see the call stack goes to different classes so I had to define my enumeration as public. So Public global variable? meh! That's what I would like to change, so it won't be public anymore. What is a better solution? Maybe instead of defining it in that class I can create a separate class for this enum? Is that better?</p>

<pre><code>public enum FieldDialogSource
{
    FromPropertiesWindow,
    FromInsertMenu
}

public FieldDialogSource FieldDialogLaunchSource { get; set; }

MyLibrary.FieldDlgController.PopulateFields()
MyLibrary.frmMyForm.Init()
MyLibrary.frmMyForm.ShowForm()
MyLibrary.FieldDlgController.ShowForm()
MyLibrary.Controller.FiledProperties()
</code></pre>
