Index: Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
===================================================================
--- Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs	(revision 1112)
+++ Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs	(revision 1117)
@@ -354,6 +354,6 @@
             threadSplash.Start(m_ds); // pass form as parameter.
 
-            //There are 19 steps to load the application. That's max for the progress bar.
-            setMaxProgressDelegate(19);
+            //There are 21 steps to load the application. That's max for the progress bar.
+            setMaxProgressDelegate(21);
             
             // smh--not used: System.Configuration.ConfigurationManager.GetSection("appSettings");
@@ -472,6 +472,5 @@
             }
            
-            //User Preferences Object
-            _current.UserPreferences = new UserPreferences();
+            
 
             //User Interface Culture (m_CultureName is set from the command line flag /culture)
@@ -536,6 +535,12 @@
 			setStatusDelegate("Setting Application Context to BSDXRPC...");
 			m_ConnectInfo.AppContext = "BSDXRPC";
-	
-			//Load global recordsets
+
+            //User Preferences Object
+            setProgressDelegate(4); //next number is 6 b/c two calls
+            setStatusDelegate("Getting User Preferences from the Server...");
+
+            _current.UserPreferences = new UserPreferences(); // Does the calling to do that...
+            
+            //Load global recordsets
             string statusConst = "Loading VistA data tables...";
 			setStatusDelegate(statusConst);
@@ -545,5 +550,5 @@
             //Schedule User Info
             // Table #4
-            setProgressDelegate(4);
+            setProgressDelegate(6);
             setStatusDelegate(statusConst + " Schedule User");
             DataTable dtUser = _dal.GetUserInfo(m_ConnectInfo.DUZ);
@@ -560,5 +565,5 @@
             //Get Access Types
             // Table #5
-            setProgressDelegate(5);
+            setProgressDelegate(7);
             setStatusDelegate(statusConst + " Access Types");
             DataTable dtAccessTypes = _dal.GetAccessTypes();
@@ -568,5 +573,5 @@
             //Get Access Groups
             // Table #6
-            setProgressDelegate(6);
+            setProgressDelegate(8);
             setStatusDelegate(statusConst + " Access Groups");
             LoadAccessGroupsTable();
@@ -583,5 +588,5 @@
             // But they are heavily referenced throughout the code.
             // Table #7
-            setProgressDelegate(7);
+            setProgressDelegate(9);
             setStatusDelegate(statusConst + " Access Group Types");
             LoadAccessGroupTypesTable();
@@ -603,5 +608,5 @@
             // Table #8
             // What shows up on the tree. The groups the user has access to.
-            setProgressDelegate(8);
+            setProgressDelegate(10);
             setStatusDelegate(statusConst + " Resource Groups By User");
             LoadResourceGroupTable();
@@ -610,5 +615,5 @@
             // Table #9
             // Individual Resources
-            setProgressDelegate(9);
+            setProgressDelegate(11);
             setStatusDelegate(statusConst + " Resources By User");
             LoadBSDXResourcesTable();
@@ -622,5 +627,5 @@
             // Table #10
             // Resource Groups and Indivdual Resources together
-            setProgressDelegate(10);
+            setProgressDelegate(12);
             setStatusDelegate(statusConst + " Group Resources");
             LoadGroupResourcesTable();
@@ -640,5 +645,5 @@
             //HospitalLocation table
             //Table #11
-            setProgressDelegate(11);
+            setProgressDelegate(13);
             setStatusDelegate(statusConst + " Clinics");
             //cmd.CommandText = "SELECT BMXIEN 'HOSPITAL_LOCATION_ID', NAME 'HOSPITAL_LOCATION', DEFAULT_PROVIDER, STOP_CODE_NUMBER, INACTIVATE_DATE, REACTIVATE_DATE FROM HOSPITAL_LOCATION";
@@ -661,5 +666,5 @@
             //Build ScheduleUser table
             //Table #12
-            setProgressDelegate(12);
+            setProgressDelegate(14);
             setStatusDelegate(statusConst + " Schedule User");
             this.LoadScheduleUserTable();
@@ -674,5 +679,5 @@
             //Table #13
             //Acess to Resources by [this] User
-            setProgressDelegate(13);
+            setProgressDelegate(15);
             setStatusDelegate(statusConst + " Resource User");
             this.LoadResourceUserTable();
@@ -693,5 +698,5 @@
             //Table #14
             //TODO: Lazy load the provider table; no need to load in advance.
-            setProgressDelegate(14);
+            setProgressDelegate(16);
             setStatusDelegate(statusConst + " Providers");
             sCommandText = "SELECT BMXIEN, NAME FROM NEW_PERSON WHERE INACTIVE_DATE = '' AND BMXIEN > 1";
@@ -701,5 +706,5 @@
             //Build the HOLIDAY table
             //Table #15
-            setProgressDelegate(15);
+            setProgressDelegate(17);
             setStatusDelegate(statusConst + " Holiday");
             sCommandText = "SELECT NAME, DATE FROM HOLIDAY WHERE INTERNAL[DATE] > '" + FMDateTime.Create(DateTime.Today).DateOnly.FMDateString + "'";
@@ -721,14 +726,14 @@
             setStatusDelegate("Subscribing to Server Events");
             //Table #16
-            setProgressDelegate(16);
+            setProgressDelegate(18);
             _current.m_ConnectInfo.SubscribeEvent("BSDX SCHEDULE");
 			//Table #17
-            setProgressDelegate(17);
+            setProgressDelegate(19);
             _current.m_ConnectInfo.SubscribeEvent("BSDX CALL WORKSTATIONS");
 			//Table #18
-            setProgressDelegate(18);
+            setProgressDelegate(20);
             _current.m_ConnectInfo.SubscribeEvent("BSDX ADMIN MESSAGE");
 			//Table #19
-            setProgressDelegate(19);
+            setProgressDelegate(21);
             _current.m_ConnectInfo.SubscribeEvent("BSDX ADMIN SHUTDOWN");
 
