private void SetupControls()
        {
            if (FWSim != null)
            {
                foreach (string StateName in ProviderClass.StateNames)
                {
                    StateClass TempStateClass = new StateClass(StateName);
                    TheStates.Add(TempStateClass);
                }
                for (int i = 0; i < ProviderClass.ProviderNameList.Length; i++)
                {
                    string     MySTate      = ProviderClass.RegionStateName[i];
                    StateClass MyStateClass = TheStates.Find(
                        delegate(StateClass SC) { return(SC.Name == MySTate); });
                    if (MyStateClass != null)
                    {
                        string    RName = ProviderClass.ProviderNameList[i];
                        eProvider Ep    = (eProvider)i;
                        string    RFld  = ProviderClass.FieldNameList[i];
                        MyStateClass.AddRegion(RName, Ep, i, RFld);
                    }
                }

                foreach (StateClass SC in TheStates)
                {
                    TreeNode TempStateNode = new TreeNode(SC.Name);
                    foreach (RegionClass RC in SC.Regions)
                    {
                        TempStateNode.Nodes.Add(new TreeNode(RC.Name));
                    }
                    this.Nodes.Add(TempStateNode);
                }
            }
        }
 public RegionClass(string aName, eProvider AnEProvider, int aIndex, string aFieldName, StateClass owner)
 {
     Fname    = aName;
     FeP      = AnEProvider;
     FIndex   = aIndex;
     FOwner   = owner;
     FFldName = aFieldName;
 }