Parent Directory
|
Revision Log
|
Patch
--- trunk/TSAdminTool/frmAdmin.cs 2012/07/16 11:43:29 175 +++ trunk/TSAdminTool/frmAdmin.cs 2012/07/16 11:49:13 176 @@ -764,35 +764,31 @@ // Setup managed mode. This can alternatively be set from frmConfigMode, but this form is now disabled // Create Datbase directory - //string dataDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\AnywhereTS"; - //try - //{ - // Directory.CreateDirectory(dataDir); - //} - //catch (Exception ex) - //{ - // this.Cursor = Cursors.Default; - // MessageBox.Show("Could not create directory '" + dataDir + "'. Error: " + ex.Message); - // using (log4net.NDC.Push(string.Format("directory={0}", dataDir))) - // { - // Logging.ATSAdminLog.Error("Could not create directory."); - // } - // return false; - //} + string dataDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\AnywhereTS"; + try + { + Directory.CreateDirectory(dataDir); + } + catch (Exception ex) + { + this.Cursor = Cursors.Default; + MessageBox.Show("Could not create directory '" + dataDir + "'. Error: " + ex.Message); + using (log4net.NDC.Push(string.Format("directory={0}", dataDir))) + { + Logging.ATSAdminLog.Error("Could not create directory."); + } + return false; + } ATSGlobals.managedMode = 1; // We are running in Managed Mode - - //// Save the database directory to registry - //ProSupport.strDatabasePath = dataDir; - //ATSGlobals.SetATSRegValue(ProSupport.strRegDatabaseDir, ProSupport.strDatabasePath); - + #if HAVE_FRMCONFIGMODE + // Save the database directory to registry + ProSupport.strDatabasePath = dataDir; + ATSGlobals.SetATSRegValue(ProSupport.strRegDatabaseDir, ProSupport.strDatabasePath); +#endif // Save mode ATSGlobals.SetATSRegValue(ATSGlobals.strRegManagedMode, ATSGlobals.managedMode); - //// Set up database - //DatabaseSupport dataSupport = new DatabaseSupport(); - //dataSupport.SetupDatabase(); // Creates updates the database if necessary - DisplayMode: // Configure mode /* The unmanged mode is presently not possible to select using (frmConfigMode objCustomDialogBox = new frmConfigMode())
ViewVC Help | |
Powered by ViewVC 1.1.22 |