Esempio n. 1
0
 /// <summary>
 /// Load all of our settings into the respected collections
 /// </summary>
 /// <returns>If this part fails, then we want to kill the application</returns>
 internal static void loadAll()
 {
     try
     {
         //Get all of the settings from the one file
         settingsContent = settingsContent.Replace("&quot;", "\"").Replace("&apos;", "'");
         //settingsContent = settingsContent.Replace("&amp;", "&");
         //Load the email settings.
         email.loadEmail(settingsContent);
         //Load the default AOI settings
         defaultAOI.loadAOI(settingsContent);
         //Load the collection of cameras!
         CAMS.newList(settingsContent);
     }
     catch (Exception x)
     {
         //Show that something failed. Can't run the application if we do not have any values
         MessageBox.Show("Something failed while trying to start the application. Please notify your contact with attach the message below.\r\n\r\n" + x.ToString(), "Critical Error!", MessageBoxButtons.OK);
         //Something failed on load. Exit the application
         exitApp();
     }
 }