removed unused code comments

This commit is contained in:
Bitl 2020-01-04 14:21:26 -07:00
parent 0776446690
commit b1af3a2c9b
9 changed files with 7 additions and 161 deletions

View File

@ -483,52 +483,6 @@ public class LauncherFuncs
public static void ReloadLoadtextValue()
{
//Temporarily removed until i can figure out a way to better integrate this.
/*
if (GlobalVars.IsWebServerOn == true)
{
string extra = GlobalVars.Custom_Extra_SelectionIsHat == true ? GlobalVars.WebServer_HatDir + GlobalVars.Custom_Extra : GlobalVars.WebServer_ExtraDir + GlobalVars.Custom_Extra;
GlobalVars.loadtext = "'" + GlobalVars.WebServer_BodyColors + "','" +
GlobalVars.WebServer_HatDir + GlobalVars.Custom_Hat1ID_Offline + "','" +
GlobalVars.WebServer_HatDir + GlobalVars.Custom_Hat2ID_Offline + "','" +
GlobalVars.WebServer_HatDir + GlobalVars.Custom_Hat3ID_Offline + "'," +
GlobalVars.WebServer_TShirtDir + GlobalVars.Custom_T_Shirt_Offline + "','" +
GlobalVars.WebServer_ShirtDir + GlobalVars.Custom_Shirt_Offline + "','" +
GlobalVars.WebServer_PantsDir + GlobalVars.Custom_Pants_Offline + "','" +
GlobalVars.WebServer_FaceDir + GlobalVars.Custom_Face_Offline + "','" +
GlobalVars.WebServer_HeadDir + GlobalVars.Custom_Head_Offline + "','" +
GlobalVars.Custom_Icon_Offline + "','" +
extra + "', true";
GlobalVars.sololoadtext = GlobalVars.loadtext.Replace(GlobalVars.WebServerURI,GlobalVars.LocalWebServerURI);
}
else
{
GlobalVars.loadtext = "'" + GlobalVars.Custom_Hat1ID_Offline + "','" +
GlobalVars.Custom_Hat2ID_Offline + "','" +
GlobalVars.Custom_Hat3ID_Offline + "'," +
GlobalVars.HeadColorID + "," +
GlobalVars.TorsoColorID + "," +
GlobalVars.LeftArmColorID + "," +
GlobalVars.RightArmColorID + "," +
GlobalVars.LeftLegColorID + "," +
GlobalVars.RightLegColorID + ",'" +
GlobalVars.Custom_T_Shirt_Offline + "','" +
GlobalVars.Custom_Shirt_Offline + "','" +
GlobalVars.Custom_Pants_Offline + "','" +
GlobalVars.Custom_Face_Offline + "','" +
GlobalVars.Custom_Head_Offline + "','" +
GlobalVars.Custom_Icon_Offline + "','" +
//GlobalVars.Custom_Extra + "', false";
GlobalVars.Custom_Extra + "'";
GlobalVars.sololoadtext = GlobalVars.loadtext;
}
*/
string hat1 = (GlobalVars.Custom_Hat1ID_Offline != "TeapotTurret.rbxm") ? GlobalVars.Custom_Hat1ID_Offline : "NoHat.rbxm";
string hat2 = (GlobalVars.Custom_Hat2ID_Offline != "TeapotTurret.rbxm") ? GlobalVars.Custom_Hat2ID_Offline : "NoHat.rbxm";
string hat3 = (GlobalVars.Custom_Hat3ID_Offline != "TeapotTurret.rbxm") ? GlobalVars.Custom_Hat3ID_Offline : "NoHat.rbxm";

View File

@ -65,7 +65,6 @@ public static class RobloxXMLLocalizer
//do whatever with your value
string url = item3.Value;
string urlFixed = url.Replace("&", "&").Replace("amp;", "&");
//MessageBox.Show(urlFixed, "Novetus Asset Localizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
string peram = "id=";
if (string.IsNullOrWhiteSpace(name))

View File

@ -95,39 +95,8 @@ public class ScriptGenerator
return "";
}
}
/*
public static string[] GetScriptContents(string scriptPath)
{
List<string> array = new List<string>();
string line = "";
using (StreamReader sr = new StreamReader(scriptPath))
{
while ((line = sr.ReadLine()) != null)
{
array.Add(line);
}
}
return array.ToArray();
}
private static void ReadConfigValues()
{
LauncherFuncs.ReadConfigValues(GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigName);
}
*/
public static void GenerateScriptForClient(ScriptType type, string client)
{
//next, generate the header functions.
//ReadConfigValues();
//string scriptcontents = MultiLine(GetScriptContents(GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptName + ".lua"));
string code = GlobalVars.MultiLine(
"--Load Script",
//scriptcontents,

View File

@ -38,7 +38,6 @@ public class SecurityFuncs
public static string RandomString()
{
CryptoRandom random = new CryptoRandom();
return RandomString(20);
}

View File

@ -225,19 +225,7 @@ public class SimpleHTTPServer
context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
}
} /*else {
if (context.Request.HttpMethod.Equals("GET") && filename.Contains("bodycolors.rbxm", StringComparison.OrdinalIgnoreCase)) {
string output = WebServerGenerator.GenerateBodyColorsXML();
byte[] input = ASCIIEncoding.UTF8.GetBytes(output);
context.Response.ContentType = "text/xml";
context.Response.ContentLength64 = input.Length;
context.Response.OutputStream.Write(input, 0, input.Length);
context.Response.StatusCode = (int)HttpStatusCode.OK;
context.Response.OutputStream.Flush();
} else {
context.Response.StatusCode = (int)HttpStatusCode.NotFound;
}
}*/
}
context.Response.OutputStream.Close();
}
@ -250,16 +238,4 @@ public class SimpleHTTPServer
_serverThread.Start();
GlobalVars.IsWebServerOn = true;
}
}
/*
public static class WebServerGenerator
{
public static string GenerateBodyColorsXML()
{
string xmltemplate = GlobalVars.MultiLine(File.ReadAllLines(GlobalVars.CustomPlayerDir + "\\BodyColors.xml"));
string xml = String.Format(xmltemplate, GlobalVars.HeadColorID, GlobalVars.LeftArmColorID, GlobalVars.LeftLegColorID, GlobalVars.RightArmColorID, GlobalVars.RightLegColorID, GlobalVars.TorsoColorID);
return xml;
}
}
*/
}

View File

@ -1343,52 +1343,5 @@ namespace NovetusLauncher
LauncherFuncs.WriteCustomizationValues(GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigNameCustomization);
MessageBox.Show("Outfit Saved!");
}
/*
private void button61_Click(object sender, EventArgs e)
{
try
{
if (GlobalVars.IsWebServerOn == true)
{
string IP = SecurityFuncs.GetExternalIPAddress();
string localWebServerURL = "http://" + IP + ":" + GlobalVars.WebServer.Port.ToString();
string localWebServer_CustomPlayerDir = localWebServerURL + "/charcustom/";
string localWebServer_HatDir = localWebServer_CustomPlayerDir + "hats/";
string localWebServer_FaceDir = localWebServer_CustomPlayerDir + "faces/";
string localWebServer_HeadDir = localWebServer_CustomPlayerDir + "heads/";
string localWebServer_TShirtDir = localWebServer_CustomPlayerDir + "tshirts/";
string localWebServer_ShirtDir = localWebServer_CustomPlayerDir + "shirts/";
string localWebServer_PantsDir = localWebServer_CustomPlayerDir + "pants/";
string localWebServer_ExtraDir = localWebServer_CustomPlayerDir + "custom/";
string localWebServer_BodyColors = localWebServer_CustomPlayerDir + "bodycolors.rbxm";
string charapp = localWebServer_BodyColors + ";" +
localWebServer_HatDir + GlobalVars.Custom_Hat1ID_Offline + ";" +
localWebServer_HatDir + GlobalVars.Custom_Hat2ID_Offline + ";" +
localWebServer_HatDir + GlobalVars.Custom_Hat3ID_Offline + ";" +
localWebServer_HeadDir + GlobalVars.Custom_Head_Offline + ";" +
localWebServer_FaceDir + GlobalVars.Custom_Face_Offline + ";" +
localWebServer_TShirtDir + GlobalVars.Custom_T_Shirt_Offline + ";" +
localWebServer_ShirtDir + GlobalVars.Custom_Shirt_Offline + ";" +
localWebServer_PantsDir + GlobalVars.Custom_Pants_Offline + ";" +
localWebServer_ExtraDir + GlobalVars.Custom_Extra;
textBox1.Text = charapp;
GlobalVars.CharacterID = charapp;
}
else
{
MessageBox.Show("Could not generate charapp. Are you running Novetus as as administrator and is the webserver running?");
textBox1.Text = "";
GlobalVars.CharacterID = "";
}
}
catch(Exception ex) when (!Env.Debugging)
{
MessageBox.Show("Could not generate charapp. Error: " + ex.Message);
textBox1.Text = "";
GlobalVars.CharacterID = "";
}
}
*/
}
}

View File

@ -1349,7 +1349,7 @@ namespace NovetusLauncher
string loadstring = GlobalVars.BasePath + "/" + System.AppDomain.CurrentDomain.FriendlyName;
SecurityFuncs.RegisterURLProtocol("Novetus", loadstring, "Novetus URI");
ConsolePrint("URI Successfully Installed!", 3);
DialogResult result1 = MessageBox.Show("URI Successfully Installed!","Novetus - Install URI", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("URI Successfully Installed!","Novetus - Install URI", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex) when (!Env.Debugging)
{

View File

@ -24,7 +24,7 @@ namespace NovetusLauncher
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog()
OpenFileDialog openFileDialog1 = new OpenFileDialog
{
Filter = (currentType == RobloxXMLLocalizer.DLType.RBXL) ? "ROBLOX Level (*.rbxl)|*.rbxl" : "ROBLOX Model (*.rbxm)|*.rbxm",
Title = "Open ROBLOX level or model"
@ -104,7 +104,7 @@ namespace NovetusLauncher
}
}
private string GetProgressString(RobloxXMLLocalizer.DLType type, int percent)
private string GetProgressString(int percent)
{
string progressString = "";
@ -422,6 +422,7 @@ namespace NovetusLauncher
worker.ReportProgress(100);
break;
default:
worker.ReportProgress(100);
break;
}
}
@ -434,7 +435,7 @@ namespace NovetusLauncher
// This event handler updates the progress.
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
label2.Text = GetProgressString(currentType, e.ProgressPercentage);
label2.Text = GetProgressString(e.ProgressPercentage);
}
// This event handler deals with the results of the background operation.

View File

@ -209,11 +209,6 @@ namespace NovetusLauncher
}
}
void ReadConfigValues()
{
LauncherFuncs.ReadConfigValues(GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigName);
}
void ReadClientValues(string ClientName)
{
string clientpath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\clients\\" + ClientName + "\\clientinfo.nov";