more permanent fix + cool feature :D
This commit is contained in:
parent
129db484ac
commit
bd568071bf
|
|
@ -19,9 +19,9 @@ namespace Novetus.Bootstrapper
|
||||||
|
|
||||||
private void NovetusLaunchForm_Load(object sender, EventArgs e)
|
private void NovetusLaunchForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FileManagement.ReadInfoFile(LocalPaths.InfoPath,
|
//FileManagement.ReadInfoFile(LocalPaths.InfoPath,
|
||||||
LocalPaths.VersionTermList,
|
//LocalPaths.VersionTermList,
|
||||||
LocalPaths.LauncherPath);
|
//LocalPaths.LauncherPath);
|
||||||
|
|
||||||
if (File.Exists(LocalPaths.ConfigPath))
|
if (File.Exists(LocalPaths.ConfigPath))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,8 @@ namespace Novetus.Core
|
||||||
FileName = fileName;
|
FileName = fileName;
|
||||||
FullPath = Path + "\\" + FileName;
|
FullPath = Path + "\\" + FileName;
|
||||||
|
|
||||||
|
FilePreLoadEvent();
|
||||||
|
|
||||||
bool fileExists = File.Exists(FullPath);
|
bool fileExists = File.Exists(FullPath);
|
||||||
|
|
||||||
if (!fileExists)
|
if (!fileExists)
|
||||||
|
|
@ -97,6 +99,11 @@ namespace Novetus.Core
|
||||||
GenerateDefaults();
|
GenerateDefaults();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void FilePreLoadEvent()
|
||||||
|
{
|
||||||
|
//fill dictionary here
|
||||||
|
}
|
||||||
|
|
||||||
public virtual void DefineDefaults()
|
public virtual void DefineDefaults()
|
||||||
{
|
{
|
||||||
//fill dictionary here
|
//fill dictionary here
|
||||||
|
|
@ -252,14 +259,31 @@ namespace Novetus.Core
|
||||||
|
|
||||||
public Config(string filename) : base("Config", GlobalPaths.ConfigDir, filename) { }
|
public Config(string filename) : base("Config", GlobalPaths.ConfigDir, filename) { }
|
||||||
|
|
||||||
|
public override void FilePreLoadEvent()
|
||||||
|
{
|
||||||
|
FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
||||||
|
GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName);
|
||||||
|
}
|
||||||
|
|
||||||
public override void DefineDefaults()
|
public override void DefineDefaults()
|
||||||
{
|
{
|
||||||
|
string userName = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
userName = Environment.UserName;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
userName = "Player";
|
||||||
|
}
|
||||||
|
|
||||||
ValueDefaults = new Dictionary<string, string>(){
|
ValueDefaults = new Dictionary<string, string>(){
|
||||||
{"SelectedClient", GlobalVars.ProgramInformation.DefaultClient},
|
{"SelectedClient", GlobalVars.ProgramInformation.DefaultClient},
|
||||||
{"Map", GlobalVars.ProgramInformation.DefaultMap},
|
{"Map", GlobalVars.ProgramInformation.DefaultMap},
|
||||||
{"CloseOnLaunch", Util.BoolValue(false)},
|
{"CloseOnLaunch", Util.BoolValue(false)},
|
||||||
{"UserID", Util.IntValue(NovetusFuncs.GeneratePlayerID())},
|
{"UserID", Util.IntValue(NovetusFuncs.GeneratePlayerID())},
|
||||||
{"PlayerName", "Player"},
|
{"PlayerName", userName},
|
||||||
{"RobloxPort", Util.IntValue(53640)},
|
{"RobloxPort", Util.IntValue(53640)},
|
||||||
{"PlayerLimit", Util.IntValue(12)},
|
{"PlayerLimit", Util.IntValue(12)},
|
||||||
{"UPnP", Util.BoolValue(false)},
|
{"UPnP", Util.BoolValue(false)},
|
||||||
|
|
@ -334,10 +358,10 @@ namespace Novetus.Core
|
||||||
{
|
{
|
||||||
Version = "";
|
Version = "";
|
||||||
Branch = "";
|
Branch = "";
|
||||||
DefaultClient = "2009E";
|
DefaultClient = "";
|
||||||
RegisterClient1 = "";
|
RegisterClient1 = "";
|
||||||
RegisterClient2 = "";
|
RegisterClient2 = "";
|
||||||
DefaultMap = "Dev - Baseplate2048.rbxl.bz2";
|
DefaultMap = "";
|
||||||
VersionName = "";
|
VersionName = "";
|
||||||
//HACK
|
//HACK
|
||||||
NetVersion = ".NET Framework 4.5.1";
|
NetVersion = ".NET Framework 4.5.1";
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ namespace NovetusLauncher
|
||||||
config.AddRuleForAllLevels(logfile);
|
config.AddRuleForAllLevels(logfile);
|
||||||
LogManager.Configuration = config;
|
LogManager.Configuration = config;
|
||||||
|
|
||||||
FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
//FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
||||||
GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName);
|
//GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName);
|
||||||
|
|
||||||
GlobalVars.ColorsLoaded = FileManagement.InitColors();
|
GlobalVars.ColorsLoaded = FileManagement.InitColors();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ namespace NovetusURI
|
||||||
#region Form Events
|
#region Form Events
|
||||||
private void InstallForm_Load(object sender, EventArgs e)
|
private void InstallForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
//FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
||||||
GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName,
|
//GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName,
|
||||||
GlobalPaths.RootPathLauncher + "\\Novetus.exe");
|
//GlobalPaths.RootPathLauncher + "\\Novetus.exe");
|
||||||
CenterToScreen();
|
CenterToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ namespace NovetusURI
|
||||||
config.AddRuleForAllLevels(logfile);
|
config.AddRuleForAllLevels(logfile);
|
||||||
LogManager.Configuration = config;
|
LogManager.Configuration = config;
|
||||||
|
|
||||||
FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
//FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName,
|
||||||
GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName);
|
//GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName);
|
||||||
GlobalVars.ColorsLoaded = FileManagement.InitColors();
|
GlobalVars.ColorsLoaded = FileManagement.InitColors();
|
||||||
if (args.Length == 0)
|
if (args.Length == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue