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