more cleanup

This commit is contained in:
Bitl 2020-01-04 14:08:56 -07:00
parent d67336bf9f
commit 0776446690
6 changed files with 51 additions and 54 deletions

View File

@ -91,6 +91,7 @@ namespace NovetusCMD
Parameter = null; Parameter = null;
break; break;
default: default:
Parameter = null;
break; break;
} }
} }

View File

@ -57,7 +57,7 @@ class Downloader
{ {
string downloadOutcomeAddText = additionalText; string downloadOutcomeAddText = additionalText;
SaveFileDialog saveFileDialog1 = new SaveFileDialog() SaveFileDialog saveFileDialog1 = new SaveFileDialog
{ {
FileName = fileName, FileName = fileName,
//"Compressed zip files (*.zip)|*.zip|All files (*.*)|*.*" //"Compressed zip files (*.zip)|*.zip|All files (*.*)|*.*"

View File

@ -96,7 +96,7 @@ public class ScriptGenerator
} }
} }
/* /*
public static string[] GetScriptContents(string scriptPath) public static string[] GetScriptContents(string scriptPath)
{ {
List<string> array = new List<string>(); List<string> array = new List<string>();
@ -111,14 +111,16 @@ public class ScriptGenerator
return array.ToArray(); return array.ToArray();
} }
*/
private static void ReadConfigValues() private static void ReadConfigValues()
{ {
LauncherFuncs.ReadConfigValues(GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigName); LauncherFuncs.ReadConfigValues(GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigName);
} }
public static void GenerateScriptForClient(ScriptType type, string client) */
public static void GenerateScriptForClient(ScriptType type, string client)
{ {
//next, generate the header functions. //next, generate the header functions.

View File

@ -44,74 +44,74 @@ namespace NovetusLauncher
PartColorList = new List<PartColors>() PartColorList = new List<PartColors>()
{ {
//White //White
new PartColors(){ ColorID = 1, ButtonColor = button7.BackColor }, new PartColors{ ColorID = 1, ButtonColor = button7.BackColor },
//Light stone grey //Light stone grey
new PartColors(){ ColorID = 208, ButtonColor = button8.BackColor }, new PartColors{ ColorID = 208, ButtonColor = button8.BackColor },
//Medium stone grey //Medium stone grey
new PartColors(){ ColorID = 194, ButtonColor = button9.BackColor }, new PartColors{ ColorID = 194, ButtonColor = button9.BackColor },
//Dark stone grey //Dark stone grey
new PartColors(){ ColorID = 199, ButtonColor = button10.BackColor }, new PartColors{ ColorID = 199, ButtonColor = button10.BackColor },
//Black //Black
new PartColors(){ ColorID = 26, ButtonColor = button14.BackColor }, new PartColors{ ColorID = 26, ButtonColor = button14.BackColor },
//Bright red //Bright red
new PartColors(){ ColorID = 21, ButtonColor = button13.BackColor }, new PartColors{ ColorID = 21, ButtonColor = button13.BackColor },
//Bright yellow //Bright yellow
new PartColors(){ ColorID = 24, ButtonColor = button12.BackColor }, new PartColors{ ColorID = 24, ButtonColor = button12.BackColor },
//Cool yellow //Cool yellow
new PartColors(){ ColorID = 226, ButtonColor = button11.BackColor }, new PartColors{ ColorID = 226, ButtonColor = button11.BackColor },
//Bright blue //Bright blue
new PartColors(){ ColorID = 23, ButtonColor = button18.BackColor }, new PartColors{ ColorID = 23, ButtonColor = button18.BackColor },
//Bright bluish green //Bright bluish green
new PartColors(){ ColorID = 107, ButtonColor = button17.BackColor }, new PartColors{ ColorID = 107, ButtonColor = button17.BackColor },
//Medium blue //Medium blue
new PartColors(){ ColorID = 102, ButtonColor = button16.BackColor }, new PartColors{ ColorID = 102, ButtonColor = button16.BackColor },
//Pastel Blue //Pastel Blue
new PartColors(){ ColorID = 11, ButtonColor = button15.BackColor }, new PartColors{ ColorID = 11, ButtonColor = button15.BackColor },
//Light blue //Light blue
new PartColors(){ ColorID = 45, ButtonColor = button22.BackColor }, new PartColors{ ColorID = 45, ButtonColor = button22.BackColor },
//Sand blue //Sand blue
new PartColors(){ ColorID = 135, ButtonColor = button21.BackColor }, new PartColors{ ColorID = 135, ButtonColor = button21.BackColor },
//Bright orange //Bright orange
new PartColors(){ ColorID = 106, ButtonColor = button20.BackColor }, new PartColors{ ColorID = 106, ButtonColor = button20.BackColor },
//Br. yellowish orange //Br. yellowish orange
new PartColors(){ ColorID = 105, ButtonColor = button19.BackColor }, new PartColors{ ColorID = 105, ButtonColor = button19.BackColor },
//Earth green //Earth green
new PartColors(){ ColorID = 141, ButtonColor = button26.BackColor }, new PartColors{ ColorID = 141, ButtonColor = button26.BackColor },
//Dark green //Dark green
new PartColors(){ ColorID = 28, ButtonColor = button25.BackColor }, new PartColors{ ColorID = 28, ButtonColor = button25.BackColor },
//Bright green //Bright green
new PartColors(){ ColorID = 37, ButtonColor = button24.BackColor }, new PartColors{ ColorID = 37, ButtonColor = button24.BackColor },
//Br. yellowish green //Br. yellowish green
new PartColors(){ ColorID = 119, ButtonColor = button23.BackColor }, new PartColors{ ColorID = 119, ButtonColor = button23.BackColor },
//Medium green //Medium green
new PartColors(){ ColorID = 29, ButtonColor = button30.BackColor }, new PartColors{ ColorID = 29, ButtonColor = button30.BackColor },
//Sand green //Sand green
new PartColors(){ ColorID = 151, ButtonColor = button29.BackColor }, new PartColors{ ColorID = 151, ButtonColor = button29.BackColor },
//Dark orange //Dark orange
new PartColors(){ ColorID = 38, ButtonColor = button28.BackColor }, new PartColors{ ColorID = 38, ButtonColor = button28.BackColor },
//Reddish brown //Reddish brown
new PartColors(){ ColorID = 192, ButtonColor = button27.BackColor }, new PartColors{ ColorID = 192, ButtonColor = button27.BackColor },
//Bright violet //Bright violet
new PartColors(){ ColorID = 104, ButtonColor = button34.BackColor }, new PartColors{ ColorID = 104, ButtonColor = button34.BackColor },
//Light reddish violet //Light reddish violet
new PartColors(){ ColorID = 9, ButtonColor = button33.BackColor }, new PartColors{ ColorID = 9, ButtonColor = button33.BackColor },
//Medium red //Medium red
new PartColors(){ ColorID = 101, ButtonColor = button32.BackColor }, new PartColors{ ColorID = 101, ButtonColor = button32.BackColor },
//Brick yellow //Brick yellow
new PartColors(){ ColorID = 5, ButtonColor = button31.BackColor }, new PartColors{ ColorID = 5, ButtonColor = button31.BackColor },
//Sand red //Sand red
new PartColors(){ ColorID = 153, ButtonColor = button38.BackColor }, new PartColors{ ColorID = 153, ButtonColor = button38.BackColor },
//Brown //Brown
new PartColors(){ ColorID = 217, ButtonColor = button37.BackColor }, new PartColors{ ColorID = 217, ButtonColor = button37.BackColor },
//Nougat //Nougat
new PartColors(){ ColorID = 18, ButtonColor = button36.BackColor }, new PartColors{ ColorID = 18, ButtonColor = button36.BackColor },
//Light orange //Light orange
new PartColors(){ ColorID = 125, ButtonColor = button35.BackColor }, new PartColors{ ColorID = 125, ButtonColor = button35.BackColor },
// RARE 2006 COLORS!! // RARE 2006 COLORS!!
//Med. reddish violet //Med. reddish violet
new PartColors(){ ColorID = 22, ButtonColor = button69.BackColor }, new PartColors{ ColorID = 22, ButtonColor = button69.BackColor },
//Dark nougat //Dark nougat
new PartColors(){ ColorID = 128, ButtonColor = button70.BackColor } new PartColors{ ColorID = 128, ButtonColor = button70.BackColor }
}; };
} }
@ -1081,7 +1081,7 @@ namespace NovetusLauncher
} }
catch (Exception ex) when (!Env.Debugging) catch (Exception ex) when (!Env.Debugging)
{ {
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }

View File

@ -845,13 +845,13 @@ namespace NovetusLauncher
else else
{ {
ConsolePrint("ERROR 4 - Failed to launch Novetus. (The client has been detected as modified.)", 2); ConsolePrint("ERROR 4 - Failed to launch Novetus. (The client has been detected as modified.)", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
else else
{ {
ConsolePrint("ERROR 4 - Failed to launch Novetus. (The client has been detected as modified.)", 2); ConsolePrint("ERROR 4 - Failed to launch Novetus. (The client has been detected as modified.)", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: The client has been detected as modified.)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
else else
@ -867,7 +867,7 @@ namespace NovetusLauncher
catch (Exception ex) when (!Env.Debugging) catch (Exception ex) when (!Env.Debugging)
{ {
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -932,7 +932,7 @@ namespace NovetusLauncher
catch (Exception ex) when (!Env.Debugging) catch (Exception ex) when (!Env.Debugging)
{ {
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -982,7 +982,7 @@ namespace NovetusLauncher
catch (Exception ex) when (!Env.Debugging) catch (Exception ex) when (!Env.Debugging)
{ {
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -1033,7 +1033,7 @@ namespace NovetusLauncher
catch (Exception ex) when (!Env.Debugging) catch (Exception ex) when (!Env.Debugging)
{ {
ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
@ -1354,13 +1354,13 @@ namespace NovetusLauncher
catch (Exception ex) when (!Env.Debugging) catch (Exception ex) when (!Env.Debugging)
{ {
ConsolePrint("ERROR 5 - Failed to install URI. (" + ex.Message + ")", 2); ConsolePrint("ERROR 5 - Failed to install URI. (" + ex.Message + ")", 2);
DialogResult result2 = MessageBox.Show("Failed to install URI. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to install URI. (Error: " + ex.Message + ")","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
else else
{ {
ConsolePrint("ERROR 5 - Failed to install URI. (Did not run as Administrator)", 2); ConsolePrint("ERROR 5 - Failed to install URI. (Did not run as Administrator)", 2);
DialogResult result2 = MessageBox.Show("Failed to install URI. (Error: Did not run as Administrator)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to install URI. (Error: Did not run as Administrator)","Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }

View File

@ -63,12 +63,6 @@ namespace NovetusLauncher
textBox2.Text = GlobalVars.UserID.ToString(); textBox2.Text = GlobalVars.UserID.ToString();
} }
void GenerateTripcode()
{
LauncherFuncs.GenerateTripcode();
label3.Text = GlobalVars.PlayerTripcode;
}
void TextBox1TextChanged(object sender, EventArgs e) void TextBox1TextChanged(object sender, EventArgs e)
{ {
GlobalVars.PlayerName = textBox1.Text; GlobalVars.PlayerName = textBox1.Text;