public bool Load(String filename)
 {
     try
     {
         XmlHelper xh = new XmlHelper();
         bool fileExist = xh.Start(filename, "ApplicationConfig");
         XmlNode ac = xh.m_toplevel;
         m_LastModelFilename = xh.GetString(ac, "LastModelName","");
         m_cursliceprofilename = UVDLPApp.Instance().m_PathProfiles + UVDLPApp.m_pathsep + xh.GetString(ac, "SliceProfileName", "default.slicing");
         m_curmachineeprofilename = UVDLPApp.Instance().m_PathMachines + UVDLPApp.m_pathsep + xh.GetString(ac, "MachineProfileName", "NullMachine.machine");
         m_autoconnect = xh.GetBool(ac, "AutoConnect", false);
         m_loadlastmodel = xh.GetBool(ac, "LoadLastModel", true);
         m_slic3rloc = xh.GetString(ac, "Slic3rLocation", "");
         m_foregroundcolor =  xh.GetColor(ac, "ForegroundColor", Color.White);
         m_backgroundcolor = xh.GetColor(ac, "BackgroundColor", Color.Black);
         m_previewslicesbuilddisplay = xh.GetBool(ac, "PreviewSlices", false);
         if (!fileExist)
         {
             xh.Save(FILE_VERSION);
         }
         return true;
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogRecord(ex.Message);
         return false;
     }
 }
 public bool Load(String filename) 
 {
     try
     {
         XmlHelper xh = new XmlHelper();
         bool fileExist = xh.Start(filename, "ApplicationConfig");
         XmlNode ac = xh.m_toplevel;
         m_LastModelFilename = xh.GetString(ac, "LastModelName","");
         m_cursliceprofilename = UVDLPApp.Instance().m_PathProfiles + UVDLPApp.m_pathsep + xh.GetString(ac, "SliceProfileName", "default.slicing");
         m_curmachineeprofilename = UVDLPApp.Instance().m_PathMachines + UVDLPApp.m_pathsep + xh.GetString(ac, "MachineProfileName", "NullMachine.machine");
         m_autoconnect = xh.GetBool(ac, "AutoConnect", false);
         m_loadlastmodel = xh.GetBool(ac, "LoadLastModel", true);
         m_slic3rloc = xh.GetString(ac, "Slic3rLocation", "");
         m_slic3rparameters = xh.GetString(ac,"Slic3rParams","");
         m_foregroundcolor =  xh.GetColor(ac, "ForegroundColor", Color.White);
         m_backgroundcolor = xh.GetColor(ac, "BackgroundColor", Color.Black);
         m_previewslicesbuilddisplay = xh.GetBool(ac, "PreviewSlices", false);
         m_viewslice3d = xh.GetBool(ac, "Preview3dSlice", false);
         m_viewslice3dheight = xh.GetBool(ac, "Preview3dSliceHeight", false);
         m_driverdebuglog = xh.GetBool(ac, "DriverLogging", false);
         m_ignoreGCrsp = xh.GetBool(ac, "IgnoreGCRsp", false);
         m_showBoundingBox = xh.GetBool(ac, "ShowBoundingBox", true);
         m_showShaded = xh.GetBool(ac, "ShowShaded", false);
         m_showOutline = xh.GetBool(ac, "ShowOutline", false);
         m_licensekey = xh.GetString(ac, "LicenseKey", "00000000000000000000");
         m_serveraddress = xh.GetString(ac,"ServerAddress","www.buildyourownsla.com");
         m_contactform = xh.GetString(ac,"ContactForm","cwupdate.php");
         if (!fileExist)
         {
             xh.Save(FILE_VERSION);
         }
         return true;
     }
     catch (Exception ex) 
     {
         DebugLogger.Instance().LogRecord(ex.Message);
         return false;
     }
 }