From 8093437cf739613dae5c10496762e392c18f4e6e Mon Sep 17 00:00:00 2001 From: Bitl Date: Sun, 21 Aug 2022 09:17:59 -0700 Subject: [PATCH] misc. fixes --- .../StorageAndFunctions/GlobalFuncs.cs | 19 +++++++++++++-- .../NovetusURI/Forms/LoaderForm.Designer.cs | 1 - Novetus/NovetusURI/Forms/LoaderForm.cs | 23 ++++++++++++++++--- Novetus/NovetusURI/Forms/LoaderForm.resx | 2 +- Novetus/NovetusURI/Forms/QuickConfigure.cs | 4 ++-- 5 files changed, 40 insertions(+), 9 deletions(-) diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs index 237bb08..129d4a3 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs @@ -2172,10 +2172,15 @@ public class GlobalFuncs ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); #endif -#if URI || LAUNCHER +#if LAUNCHER MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); #endif + +#if URI + throw new IOException("The client has been detected as modified."); +#else return; +#endif } else { @@ -2267,10 +2272,15 @@ public class GlobalFuncs ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); #endif -#if URI || LAUNCHER +#if LAUNCHER MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); #endif + +#if URI + throw new IOException("The client has been detected as modified."); +#else return; +#endif } } else @@ -2335,6 +2345,11 @@ public class GlobalFuncs #if URI || LAUNCHER || CMD || BASICLAUNCHER LogExceptions(ex); #endif + +#if URI + //toss the exception back to the URI + throw new Exception(ex.Message); +#endif } } diff --git a/Novetus/NovetusURI/Forms/LoaderForm.Designer.cs b/Novetus/NovetusURI/Forms/LoaderForm.Designer.cs index 4ed4492..d15effc 100644 --- a/Novetus/NovetusURI/Forms/LoaderForm.Designer.cs +++ b/Novetus/NovetusURI/Forms/LoaderForm.Designer.cs @@ -69,7 +69,6 @@ namespace NovetusURI this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(291, 21); this.label1.TabIndex = 2; - this.label1.Text = "Initializing..."; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // LoaderForm diff --git a/Novetus/NovetusURI/Forms/LoaderForm.cs b/Novetus/NovetusURI/Forms/LoaderForm.cs index 7abd0f2..f1f8991 100644 --- a/Novetus/NovetusURI/Forms/LoaderForm.cs +++ b/Novetus/NovetusURI/Forms/LoaderForm.cs @@ -69,19 +69,36 @@ namespace NovetusURI #region Form Events void LoaderFormLoad(object sender, EventArgs e) { + GlobalFuncs.UpdateStatus(label1, "Initializing..."); + if (GlobalVars.UserConfiguration.URIQuickConfigure) { GlobalFuncs.UpdateStatus(label1, "Loading Player Configuration Menu...."); QuickConfigure main = new QuickConfigure(); main.ShowDialog(); - System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(CheckIfFinished), null, 1, 0); } + else + { + GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true); + GlobalFuncs.ReadClientValues(); + LocalVars.ReadyToLaunch = true; + } + + System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(CheckIfFinished), null, 1, 0); } void StartGame() { - GlobalFuncs.LaunchRBXClient(ScriptType.Client, false, true, new EventHandler(ClientExited), label1); - Visible = false; + try + { + GlobalFuncs.LaunchRBXClient(ScriptType.Client, false, true, new EventHandler(ClientExited), label1); + Visible = false; + } + catch (Exception ex) + { + GlobalFuncs.LogExceptions(ex); + Close(); + } } void ClientExited(object sender, EventArgs e) diff --git a/Novetus/NovetusURI/Forms/LoaderForm.resx b/Novetus/NovetusURI/Forms/LoaderForm.resx index 028997f..a1cfb29 100644 --- a/Novetus/NovetusURI/Forms/LoaderForm.resx +++ b/Novetus/NovetusURI/Forms/LoaderForm.resx @@ -121,7 +121,7 @@ iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAA/7JJREFUeF7s/Qd0XPl15/vW2KNgyUGyLUuWZMlxbI+zFS2p1c2IDFREKISqQgVk + wgAADsIBFShKgAAA/7JJREFUeF7s/Qd0XPl15/vW2KNgyUGyLUuWZMlxbI+zFS2p1c2IDFREKISqQgVk 5swOCq1gxc6JbLKbbOYckSNjk52jWmrZ9773/NZLvvd6ZrzefTP3Yr/f/odz/ufUKQDsLops6b/X+q4K AMEWxKoP9qlCVciOHTt27NixY8eOHTt27NixY8eOHTt27NixY8eOHTt27NixY8eOHTt27NixY8eOHTt2 7NixY8eOHTt27NixY8eOHTt27NixY8eOHTt27NixY8eOHTt27NixY8eOHTt27NixY8eOHTt27NixY8eO diff --git a/Novetus/NovetusURI/Forms/QuickConfigure.cs b/Novetus/NovetusURI/Forms/QuickConfigure.cs index 7f0eb5d..f1473d6 100644 --- a/Novetus/NovetusURI/Forms/QuickConfigure.cs +++ b/Novetus/NovetusURI/Forms/QuickConfigure.cs @@ -32,7 +32,7 @@ namespace NovetusURI void ReadConfigValues(string cfgpath) { GlobalFuncs.Config(cfgpath, false); - DontShowBox.Checked = GlobalVars.UserConfiguration.URIQuickConfigure; + DontShowBox.Checked = !GlobalVars.UserConfiguration.URIQuickConfigure; IDBox.Text = GlobalVars.UserConfiguration.UserID.ToString(); TripcodeLabel.Text = GlobalVars.PlayerTripcode.ToString(); NameBox.Text = GlobalVars.UserConfiguration.PlayerName; @@ -81,7 +81,7 @@ namespace NovetusURI private void DontShowBox_CheckedChanged(object sender, EventArgs e) { - GlobalVars.UserConfiguration.URIQuickConfigure = DontShowBox.Checked; + GlobalVars.UserConfiguration.URIQuickConfigure = !DontShowBox.Checked; } void QuickConfigureClose(object sender, CancelEventArgs e)