Fixed clients not loading
This commit is contained in:
parent
5a5bbd2ed7
commit
71bbd7dc3d
|
|
@ -147,24 +147,7 @@ namespace NovetusCMD
|
||||||
{
|
{
|
||||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||||
GlobalFuncs.ConsolePrint("Config loaded.", 3);
|
GlobalFuncs.ConsolePrint("Config loaded.", 3);
|
||||||
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
GlobalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
||||||
}
|
|
||||||
|
|
||||||
static void ReadClientValues(string ClientName)
|
|
||||||
{
|
|
||||||
string clientpath = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
|
|
||||||
|
|
||||||
if (!File.Exists(clientpath))
|
|
||||||
{
|
|
||||||
GlobalFuncs.ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2);
|
|
||||||
GlobalVars.UserConfiguration.SelectedClient = GlobalVars.ProgramInformation.DefaultClient;
|
|
||||||
ReadClientValues(ClientName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GlobalFuncs.ReadClientValues(clientpath);
|
|
||||||
GlobalFuncs.ConsolePrint("Client '" + GlobalVars.UserConfiguration.SelectedClient + "' successfully loaded.", 3);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -291,7 +274,7 @@ namespace NovetusCMD
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
GlobalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
InitUPnP();
|
InitUPnP();
|
||||||
|
|
|
||||||
|
|
@ -402,7 +402,42 @@ public class GlobalFuncs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ReadClientValues(string clientpath)
|
#if LAUNCHER
|
||||||
|
public static void ReadClientValues(string ClientName, RichTextBox box)
|
||||||
|
#else
|
||||||
|
public static void ReadClientValues(string ClientName)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
string clientpath = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
|
||||||
|
|
||||||
|
if (!File.Exists(clientpath))
|
||||||
|
{
|
||||||
|
#if LAUNCHER
|
||||||
|
ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2, box);
|
||||||
|
#elif CMD
|
||||||
|
GlobalFuncs.ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2);
|
||||||
|
#elif URI
|
||||||
|
#endif
|
||||||
|
GlobalVars.UserConfiguration.SelectedClient = GlobalVars.ProgramInformation.DefaultClient;
|
||||||
|
#if LAUNCHER
|
||||||
|
ReadClientValues(ClientName, box);
|
||||||
|
#else
|
||||||
|
ReadClientValues(ClientName);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LoadClientValues(clientpath);
|
||||||
|
#if LAUNCHER
|
||||||
|
ConsolePrint("Client '" + GlobalVars.UserConfiguration.SelectedClient + "' successfully loaded.", 3, box);
|
||||||
|
#elif CMD
|
||||||
|
GlobalFuncs.ConsolePrint("Client '" + GlobalVars.UserConfiguration.SelectedClient + "' successfully loaded.", 3);
|
||||||
|
#elif URI
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LoadClientValues(string clientpath)
|
||||||
{
|
{
|
||||||
string file, usesplayername, usesid, warning,
|
string file, usesplayername, usesid, warning,
|
||||||
legacymode, clientmd5, scriptmd5,
|
legacymode, clientmd5, scriptmd5,
|
||||||
|
|
@ -959,7 +994,11 @@ public class GlobalFuncs
|
||||||
{
|
{
|
||||||
if (SecurityFuncs.checkClientMD5(GlobalVars.UserConfiguration.SelectedClient) && SecurityFuncs.checkScriptMD5(GlobalVars.UserConfiguration.SelectedClient))
|
if (SecurityFuncs.checkClientMD5(GlobalVars.UserConfiguration.SelectedClient) && SecurityFuncs.checkScriptMD5(GlobalVars.UserConfiguration.SelectedClient))
|
||||||
{
|
{
|
||||||
|
#if LAUNCHER
|
||||||
|
OpenClient(type, rbxexe, args, mapname, e, box);
|
||||||
|
#else
|
||||||
OpenClient(type, rbxexe, args, mapname, e);
|
OpenClient(type, rbxexe, args, mapname, e);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -975,17 +1014,29 @@ public class GlobalFuncs
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if LAUNCHER
|
||||||
|
OpenClient(type, rbxexe, args, mapname, e, box);
|
||||||
|
#else
|
||||||
OpenClient(type, rbxexe, args, mapname, e);
|
OpenClient(type, rbxexe, args, mapname, e);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if LAUNCHER
|
||||||
|
OpenClient(type, rbxexe, args, mapname, e, box);
|
||||||
|
#else
|
||||||
OpenClient(type, rbxexe, args, mapname, e);
|
OpenClient(type, rbxexe, args, mapname, e);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if LAUNCHER
|
||||||
|
OpenClient(type, rbxexe, args, mapname, e, box);
|
||||||
|
#else
|
||||||
OpenClient(type, rbxexe, args, mapname, e);
|
OpenClient(type, rbxexe, args, mapname, e);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -1001,13 +1052,21 @@ public class GlobalFuncs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LAUNCHER
|
||||||
|
private static void OpenClient(ScriptType type, string rbxexe, string args, string mapname, EventHandler e, RichTextBox box)
|
||||||
|
#else
|
||||||
private static void OpenClient(ScriptType type, string rbxexe, string args, string mapname, EventHandler e)
|
private static void OpenClient(ScriptType type, string rbxexe, string args, string mapname, EventHandler e)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Process client = new Process();
|
Process client = new Process();
|
||||||
client.StartInfo.FileName = rbxexe;
|
client.StartInfo.FileName = rbxexe;
|
||||||
client.StartInfo.Arguments = args;
|
client.StartInfo.Arguments = args;
|
||||||
client.EnableRaisingEvents = true;
|
client.EnableRaisingEvents = true;
|
||||||
|
#if LAUNCHER
|
||||||
|
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient, box);
|
||||||
|
#else
|
||||||
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
||||||
|
#endif
|
||||||
client.Exited += e;
|
client.Exited += e;
|
||||||
client.Start();
|
client.Start();
|
||||||
client.PriorityClass = ProcessPriorityClass.RealTime;
|
client.PriorityClass = ProcessPriorityClass.RealTime;
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,15 @@
|
||||||
*
|
*
|
||||||
* To change this template use Tools | Options | Coding | Edit Standard Headers.
|
* To change this template use Tools | Options | Coding | Edit Standard Headers.
|
||||||
*/
|
*/
|
||||||
|
using Mono.Nat;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.IO;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Reflection;
|
using System.Diagnostics;
|
||||||
using Mono.Nat;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace NovetusLauncher
|
namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
|
|
@ -47,7 +46,7 @@ namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NetFuncs.InitUPnP(DeviceFound,DeviceLost);
|
NetFuncs.InitUPnP(DeviceFound, DeviceLost);
|
||||||
GlobalFuncs.ConsolePrint("UPnP: Service initialized", 3, richTextBox1);
|
GlobalFuncs.ConsolePrint("UPnP: Service initialized", 3, richTextBox1);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -63,7 +62,7 @@ namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NetFuncs.StartUPnP(device,protocol,port);
|
NetFuncs.StartUPnP(device, protocol, port);
|
||||||
GlobalFuncs.ConsolePrint("UPnP: Port " + port + " opened on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3, richTextBox1);
|
GlobalFuncs.ConsolePrint("UPnP: Port " + port + " opened on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3, richTextBox1);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -79,7 +78,7 @@ namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NetFuncs.StopUPnP(device,protocol,port);
|
NetFuncs.StopUPnP(device, protocol, port);
|
||||||
GlobalFuncs.ConsolePrint("UPnP: Port " + port + " closed on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3, richTextBox1);
|
GlobalFuncs.ConsolePrint("UPnP: Port " + port + " closed on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3, richTextBox1);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -508,7 +507,7 @@ namespace NovetusLauncher
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalFuncs.ConsolePrint("Config loaded.", 3, richTextBox1);
|
GlobalFuncs.ConsolePrint("Config loaded.", 3, richTextBox1);
|
||||||
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
ReadClientValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteConfigValues()
|
void WriteConfigValues()
|
||||||
|
|
@ -523,20 +522,9 @@ namespace NovetusLauncher
|
||||||
GlobalFuncs.ConsolePrint("Config Saved.", 3, richTextBox1);
|
GlobalFuncs.ConsolePrint("Config Saved.", 3, richTextBox1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadClientValues(string ClientName)
|
void ReadClientValues()
|
||||||
{
|
{
|
||||||
string clientpath = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
|
GlobalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient, richTextBox1);
|
||||||
|
|
||||||
if (!File.Exists(clientpath))
|
|
||||||
{
|
|
||||||
GlobalFuncs.ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2, richTextBox1);
|
|
||||||
MessageBox.Show("No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", "Novetus - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
GlobalVars.UserConfiguration.SelectedClient = GlobalVars.ProgramInformation.DefaultClient;
|
|
||||||
ReadClientValues(ClientName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GlobalFuncs.ReadClientValues(clientpath);
|
|
||||||
|
|
||||||
switch (GlobalVars.SelectedClientInfo.UsesPlayerName)
|
switch (GlobalVars.SelectedClientInfo.UsesPlayerName)
|
||||||
{
|
{
|
||||||
|
|
@ -578,8 +566,6 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
textBox6.Text = GlobalVars.SelectedClientInfo.Description;
|
textBox6.Text = GlobalVars.SelectedClientInfo.Description;
|
||||||
label26.Text = GlobalVars.UserConfiguration.SelectedClient;
|
label26.Text = GlobalVars.UserConfiguration.SelectedClient;
|
||||||
GlobalFuncs.ConsolePrint("Client '" + GlobalVars.UserConfiguration.SelectedClient + "' successfully loaded.", 3, richTextBox1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneratePlayerID()
|
void GeneratePlayerID()
|
||||||
|
|
@ -626,7 +612,7 @@ namespace NovetusLauncher
|
||||||
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GlobalVars.UserConfiguration.SelectedClient = listBox2.SelectedItem.ToString();
|
GlobalVars.UserConfiguration.SelectedClient = listBox2.SelectedItem.ToString();
|
||||||
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
ReadClientValues();
|
||||||
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -766,9 +752,9 @@ namespace NovetusLauncher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( e.Modifiers == Keys.Control )
|
if (e.Modifiers == Keys.Control)
|
||||||
{
|
{
|
||||||
switch(e.KeyCode)
|
switch (e.KeyCode)
|
||||||
{
|
{
|
||||||
case Keys.X:
|
case Keys.X:
|
||||||
case Keys.Z:
|
case Keys.Z:
|
||||||
|
|
@ -976,13 +962,13 @@ namespace NovetusLauncher
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
GlobalFuncs.ConsolePrint("ERROR - Failed to register. (" + ex.Message + ")", 2, richTextBox1);
|
GlobalFuncs.ConsolePrint("ERROR - Failed to register. (" + ex.Message + ")", 2, richTextBox1);
|
||||||
MessageBox.Show("Failed to register. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("Failed to register. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GlobalFuncs.ConsolePrint("ERROR - Failed to register. (Did not run as Administrator)", 2, richTextBox1);
|
GlobalFuncs.ConsolePrint("ERROR - Failed to register. (Did not run as Administrator)", 2, richTextBox1);
|
||||||
MessageBox.Show("Failed to register. (Error: Did not run as Administrator)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("Failed to register. (Error: Did not run as Administrator)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1046,7 +1032,7 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
void Button6Click(object sender, EventArgs e)
|
void Button6Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start("explorer.exe", GlobalPaths.MapsDir.Replace(@"\\",@"\"));
|
Process.Start("explorer.exe", GlobalPaths.MapsDir.Replace(@"\\", @"\"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckBox4CheckedChanged(object sender, EventArgs e)
|
void CheckBox4CheckedChanged(object sender, EventArgs e)
|
||||||
|
|
@ -1065,7 +1051,7 @@ namespace NovetusLauncher
|
||||||
_fieldsTreeCache.Nodes.Clear();
|
_fieldsTreeCache.Nodes.Clear();
|
||||||
string mapdir = GlobalPaths.MapsDir;
|
string mapdir = GlobalPaths.MapsDir;
|
||||||
TreeNodeHelper.ListDirectory(treeView1, mapdir, ".rbxl");
|
TreeNodeHelper.ListDirectory(treeView1, mapdir, ".rbxl");
|
||||||
TreeNodeHelper.CopyNodes(treeView1.Nodes,_fieldsTreeCache.Nodes);
|
TreeNodeHelper.CopyNodes(treeView1.Nodes, _fieldsTreeCache.Nodes);
|
||||||
treeView1.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.Map, treeView1.Nodes);
|
treeView1.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.Map, treeView1.Nodes);
|
||||||
treeView1.Focus();
|
treeView1.Focus();
|
||||||
if (File.Exists(GlobalPaths.RootPath + @"\\" + treeView1.SelectedNode.FullPath.ToString().Replace(".rbxl", "") + "_desc.txt"))
|
if (File.Exists(GlobalPaths.RootPath + @"\\" + treeView1.SelectedNode.FullPath.ToString().Replace(".rbxl", "") + "_desc.txt"))
|
||||||
|
|
@ -1215,7 +1201,7 @@ namespace NovetusLauncher
|
||||||
DialogResult result = MessageBox.Show("If you want to test out your place, you will have to save your place in Novetus's map folder, then launch your place in Play Solo." + Environment.NewLine + Environment.NewLine + "Press Yes to launch Studio with a map, or No to launch Studio without a map.", "Novetus - Launch ROBLOX Studio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);
|
DialogResult result = MessageBox.Show("If you want to test out your place, you will have to save your place in Novetus's map folder, then launch your place in Play Solo." + Environment.NewLine + Environment.NewLine + "Press Yes to launch Studio with a map, or No to launch Studio without a map.", "Novetus - Launch ROBLOX Studio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);
|
||||||
bool nomap = false;
|
bool nomap = false;
|
||||||
|
|
||||||
switch(result)
|
switch (result)
|
||||||
{
|
{
|
||||||
case DialogResult.No:
|
case DialogResult.No:
|
||||||
nomap = true;
|
nomap = true;
|
||||||
|
|
|
||||||
|
|
@ -544,7 +544,7 @@ namespace NovetusLauncher
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalFuncs.ConsolePrint("Config loaded.", 3, richTextBox1);
|
GlobalFuncs.ConsolePrint("Config loaded.", 3, richTextBox1);
|
||||||
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
ReadClientValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteConfigValues()
|
void WriteConfigValues()
|
||||||
|
|
@ -559,20 +559,9 @@ namespace NovetusLauncher
|
||||||
GlobalFuncs.ConsolePrint("Config Saved.", 3, richTextBox1);
|
GlobalFuncs.ConsolePrint("Config Saved.", 3, richTextBox1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadClientValues(string ClientName)
|
void ReadClientValues()
|
||||||
{
|
{
|
||||||
string clientpath = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
|
GlobalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient, richTextBox1);
|
||||||
|
|
||||||
if (!File.Exists(clientpath))
|
|
||||||
{
|
|
||||||
GlobalFuncs.ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2, richTextBox1);
|
|
||||||
MessageBox.Show("No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", "Novetus - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
GlobalVars.UserConfiguration.SelectedClient = GlobalVars.ProgramInformation.DefaultClient;
|
|
||||||
ReadClientValues(ClientName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GlobalFuncs.ReadClientValues(clientpath);
|
|
||||||
|
|
||||||
switch (GlobalVars.SelectedClientInfo.UsesPlayerName)
|
switch (GlobalVars.SelectedClientInfo.UsesPlayerName)
|
||||||
{
|
{
|
||||||
|
|
@ -614,8 +603,6 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
textBox6.Text = GlobalVars.SelectedClientInfo.Description;
|
textBox6.Text = GlobalVars.SelectedClientInfo.Description;
|
||||||
label26.Text = GlobalVars.UserConfiguration.SelectedClient;
|
label26.Text = GlobalVars.UserConfiguration.SelectedClient;
|
||||||
GlobalFuncs.ConsolePrint("Client '" + GlobalVars.UserConfiguration.SelectedClient + "' successfully loaded.", 3, richTextBox1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneratePlayerID()
|
void GeneratePlayerID()
|
||||||
|
|
@ -662,7 +649,7 @@ namespace NovetusLauncher
|
||||||
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GlobalVars.UserConfiguration.SelectedClient = listBox2.SelectedItem.ToString();
|
GlobalVars.UserConfiguration.SelectedClient = listBox2.SelectedItem.ToString();
|
||||||
ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
ReadClientValues();
|
||||||
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,22 +33,6 @@ namespace NovetusURI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ReadClientValues(string ClientName)
|
|
||||||
{
|
|
||||||
string clientpath = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
|
|
||||||
|
|
||||||
if (!File.Exists(clientpath))
|
|
||||||
{
|
|
||||||
MessageBox.Show("No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", "Novetus Launcher - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
GlobalVars.UserConfiguration.SelectedClient = GlobalVars.ProgramInformation.DefaultClient;
|
|
||||||
ReadClientValues(ClientName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GlobalFuncs.ReadClientValues(clientpath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SetupURIValues()
|
public static void SetupURIValues()
|
||||||
{
|
{
|
||||||
string ExtractedArg = GlobalVars.SharedArgs.Replace("novetus://", "").Replace("novetus", "").Replace(":", "").Replace("/", "").Replace("?", "");
|
string ExtractedArg = GlobalVars.SharedArgs.Replace("novetus://", "").Replace("novetus", "").Replace(":", "").Replace("/", "").Replace("?", "");
|
||||||
|
|
@ -60,7 +44,7 @@ namespace NovetusURI
|
||||||
GlobalVars.UserConfiguration.SelectedClient = client;
|
GlobalVars.UserConfiguration.SelectedClient = client;
|
||||||
GlobalVars.IP = ip;
|
GlobalVars.IP = ip;
|
||||||
GlobalVars.UserConfiguration.RobloxPort = Convert.ToInt32(port);
|
GlobalVars.UserConfiguration.RobloxPort = Convert.ToInt32(port);
|
||||||
LocalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
GlobalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue