* Optimized usings (the 'LL ate my scripts' commit)

* added some licensing info
This commit is contained in:
lbsa71
2007-07-03 14:37:29 +00:00
parent 73a5ec391a
commit 9b6b6d05d4
184 changed files with 705 additions and 1207 deletions

View File

@@ -26,10 +26,9 @@
*
*/
using System;
using System.Collections.Generic;
using Db4objects.Db4o;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using Db4objects.Db4o;
namespace OpenUser.Config.UserConfigDb4o
{
@@ -37,7 +36,7 @@ namespace OpenUser.Config.UserConfigDb4o
{
public UserConfig GetConfigObject()
{
OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll");
MainLog.Instance.Verbose("Loading Db40Config dll");
return ( new DbUserConfig());
}
}
@@ -47,13 +46,13 @@ namespace OpenUser.Config.UserConfigDb4o
private IObjectContainer db;
public void LoadDefaults() {
OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
this.DefaultStartupMsg = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
this.GridServerURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server","null");
this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server","null");
this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null");
this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null");
}
public override void InitConfig() {
@@ -61,7 +60,7 @@ namespace OpenUser.Config.UserConfigDb4o
db = Db4oFactory.OpenFile("openuser.yap");
IObjectSet result = db.Get(typeof(DbUserConfig));
if(result.Count==1) {
OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading");
MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading");
foreach (DbUserConfig cfg in result) {
this.GridServerURL=cfg.GridServerURL;
this.GridSendKey=cfg.GridSendKey;
@@ -69,22 +68,22 @@ namespace OpenUser.Config.UserConfigDb4o
this.DefaultStartupMsg=cfg.DefaultStartupMsg;
}
} else {
OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
LoadDefaults();
OpenSim.Framework.Console.MainLog.Instance.Verbose("Writing out default settings to local database");
MainLog.Instance.Verbose("Writing out default settings to local database");
db.Set(this);
db.Close();
}
} catch(Exception e) {
OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
MainLog.Instance.Warn(e.ToString());
}
OpenSim.Framework.Console.MainLog.Instance.Verbose("User settings loaded:");
OpenSim.Framework.Console.MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg);
OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL);
OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey);
OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey);
MainLog.Instance.Verbose("User settings loaded:");
MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg);
MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL);
MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey);
MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey);
}