diff --git a/Novetus/NovetusCMD/Novetus.CMD.csproj b/Novetus/NovetusCMD/Novetus.CMD.csproj
index ac2109b..8a2e507 100644
--- a/Novetus/NovetusCMD/Novetus.CMD.csproj
+++ b/Novetus/NovetusCMD/Novetus.CMD.csproj
@@ -92,6 +92,9 @@
..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll
+
+ ..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll
+
3.5
diff --git a/Novetus/NovetusCMD/packages.config b/Novetus/NovetusCMD/packages.config
index aabae54..b7926cb 100644
--- a/Novetus/NovetusCMD/packages.config
+++ b/Novetus/NovetusCMD/packages.config
@@ -5,4 +5,5 @@
+
\ No newline at end of file
diff --git a/Novetus/NovetusCore/GlobalFuncs.cs b/Novetus/NovetusCore/GlobalFuncs.cs
index 5059db2..6d4717f 100644
--- a/Novetus/NovetusCore/GlobalFuncs.cs
+++ b/Novetus/NovetusCore/GlobalFuncs.cs
@@ -1,4 +1,5 @@
#region Usings
+using Nini.Config;
using System;
using System.Diagnostics;
using System.Drawing;
@@ -20,19 +21,19 @@ public class GlobalFuncs
string versionbranch, defaultclient, defaultmap, regclient1,
regclient2, issnapshot, snapshottemplate, snapshotrevision;
- INIFile ini = new INIFile(infopath);
+ IConfigSource ini = new IniConfigSource(infopath);
string section = "ProgramInfo";
//not using the GlobalVars definitions as those are empty until we fill them in.
- versionbranch = ini.IniReadValue(section, "Branch", "0.0");
- defaultclient = ini.IniReadValue(section, "DefaultClient", "2009E");
- defaultmap = ini.IniReadValue(section, "DefaultMap", "Dev - Baseplate2048.rbxl");
- regclient1 = ini.IniReadValue(section, "UserAgentRegisterClient1", "2007M");
- regclient2 = ini.IniReadValue(section, "UserAgentRegisterClient2", "2009L");
- issnapshot = ini.IniReadValue(section, "IsSnapshot", "False");
- snapshottemplate = ini.IniReadValue(section, "SnapshotTemplate", "%version% Snapshot (%build%.%revision%.%snapshot-revision%)");
- snapshotrevision = ini.IniReadValue(section, "SnapshotRevision", "1");
+ versionbranch = ini.Configs[section].Get("Branch", "0.0");
+ defaultclient = ini.Configs[section].Get("DefaultClient", "2009E");
+ defaultmap = ini.Configs[section].Get("DefaultMap", "Dev - Baseplate2048.rbxl");
+ regclient1 = ini.Configs[section].Get("UserAgentRegisterClient1", "2007M");
+ regclient2 = ini.Configs[section].Get("UserAgentRegisterClient2", "2009L");
+ issnapshot = ini.Configs[section].Get("IsSnapshot", "False");
+ snapshottemplate = ini.Configs[section].Get("SnapshotTemplate", "%version% Snapshot (%build%.%revision%.%snapshot-revision%)");
+ snapshotrevision = ini.Configs[section].Get("SnapshotRevision", "1");
try
{
@@ -92,28 +93,30 @@ public class GlobalFuncs
if (write)
{
//WRITE
- INIFile ini = new INIFile(cfgpath);
+ IConfigSource ini = new IniConfigSource(cfgpath);
string section = "Config";
- ini.IniWriteValue(section, "CloseOnLaunch", GlobalVars.UserConfiguration.CloseOnLaunch.ToString());
- ini.IniWriteValue(section, "UserID", GlobalVars.UserConfiguration.UserID.ToString());
- ini.IniWriteValue(section, "PlayerName", GlobalVars.UserConfiguration.PlayerName.ToString());
- ini.IniWriteValue(section, "SelectedClient", GlobalVars.UserConfiguration.SelectedClient.ToString());
- ini.IniWriteValue(section, "Map", GlobalVars.UserConfiguration.Map.ToString());
- ini.IniWriteValue(section, "RobloxPort", GlobalVars.UserConfiguration.RobloxPort.ToString());
- ini.IniWriteValue(section, "PlayerLimit", GlobalVars.UserConfiguration.PlayerLimit.ToString());
- ini.IniWriteValue(section, "UPnP", GlobalVars.UserConfiguration.UPnP.ToString());
- ini.IniWriteValue(section, "ItemMakerDisableHelpMessage", GlobalVars.UserConfiguration.DisabledItemMakerHelp.ToString());
- ini.IniWriteValue(section, "PlayerTripcode", SecurityFuncs.Base64Encode(GlobalVars.UserConfiguration.PlayerTripcode.ToString()));
- ini.IniWriteValue(section, "DiscordRichPresence", GlobalVars.UserConfiguration.DiscordPresence.ToString());
- ini.IniWriteValue(section, "MapPath", GlobalVars.UserConfiguration.MapPath.ToString());
- ini.IniWriteValue(section, "MapPathSnip", GlobalVars.UserConfiguration.MapPathSnip.ToString());
- ini.IniWriteValue(section, "GraphicsMode", Settings.GraphicsOptions.GetIntForMode(GlobalVars.UserConfiguration.GraphicsMode).ToString());
- ini.IniWriteValue(section, "ReShade", GlobalVars.UserConfiguration.ReShade.ToString());
- ini.IniWriteValue(section, "QualityLevel", Settings.GraphicsOptions.GetIntForLevel(GlobalVars.UserConfiguration.QualityLevel).ToString());
- ini.IniWriteValue(section, "Style", Settings.UIOptions.GetIntForStyle(GlobalVars.UserConfiguration.LauncherStyle).ToString());
- ini.IniWriteValue(section, "AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
+ ini.Configs[section].Set("CloseOnLaunch", GlobalVars.UserConfiguration.CloseOnLaunch.ToString());
+ ini.Configs[section].Set("UserID", GlobalVars.UserConfiguration.UserID.ToString());
+ ini.Configs[section].Set("PlayerName", GlobalVars.UserConfiguration.PlayerName.ToString());
+ ini.Configs[section].Set("SelectedClient", GlobalVars.UserConfiguration.SelectedClient.ToString());
+ ini.Configs[section].Set("Map", GlobalVars.UserConfiguration.Map.ToString());
+ ini.Configs[section].Set("RobloxPort", GlobalVars.UserConfiguration.RobloxPort.ToString());
+ ini.Configs[section].Set("PlayerLimit", GlobalVars.UserConfiguration.PlayerLimit.ToString());
+ ini.Configs[section].Set("UPnP", GlobalVars.UserConfiguration.UPnP.ToString());
+ ini.Configs[section].Set("ItemMakerDisableHelpMessage", GlobalVars.UserConfiguration.DisabledItemMakerHelp.ToString());
+ ini.Configs[section].Set("PlayerTripcode", SecurityFuncs.Base64Encode(GlobalVars.UserConfiguration.PlayerTripcode.ToString()));
+ ini.Configs[section].Set("DiscordRichPresence", GlobalVars.UserConfiguration.DiscordPresence.ToString());
+ ini.Configs[section].Set("MapPath", GlobalVars.UserConfiguration.MapPath.ToString());
+ ini.Configs[section].Set("MapPathSnip", GlobalVars.UserConfiguration.MapPathSnip.ToString());
+ ini.Configs[section].Set("GraphicsMode", Settings.GraphicsOptions.GetIntForMode(GlobalVars.UserConfiguration.GraphicsMode).ToString());
+ ini.Configs[section].Set("ReShade", GlobalVars.UserConfiguration.ReShade.ToString());
+ ini.Configs[section].Set("QualityLevel", Settings.GraphicsOptions.GetIntForLevel(GlobalVars.UserConfiguration.QualityLevel).ToString());
+ ini.Configs[section].Set("Style", Settings.UIOptions.GetIntForStyle(GlobalVars.UserConfiguration.LauncherStyle).ToString());
+ ini.Configs[section].Set("AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
+
+ ini.Save();
}
else
{
@@ -123,28 +126,28 @@ public class GlobalFuncs
disablehelpmessage, tripcode, discord, mappath, mapsnip,
graphics, reshade, qualitylevel, style, savebackups;
- INIFile ini = new INIFile(cfgpath);
+ IConfigSource ini = new IniConfigSource(cfgpath);
string section = "Config";
- closeonlaunch = ini.IniReadValue(section, "CloseOnLaunch", GlobalVars.UserConfiguration.CloseOnLaunch.ToString());
- userid = ini.IniReadValue(section, "UserID", GlobalVars.UserConfiguration.UserID.ToString());
- name = ini.IniReadValue(section, "PlayerName", GlobalVars.UserConfiguration.PlayerName.ToString());
- selectedclient = ini.IniReadValue(section, "SelectedClient", GlobalVars.UserConfiguration.SelectedClient.ToString());
- map = ini.IniReadValue(section, "Map", GlobalVars.UserConfiguration.Map.ToString());
- port = ini.IniReadValue(section, "RobloxPort", GlobalVars.UserConfiguration.RobloxPort.ToString());
- limit = ini.IniReadValue(section, "PlayerLimit", GlobalVars.UserConfiguration.PlayerLimit.ToString());
- upnp = ini.IniReadValue(section, "UPnP", GlobalVars.UserConfiguration.UPnP.ToString());
- disablehelpmessage = ini.IniReadValue(section, "ItemMakerDisableHelpMessage", GlobalVars.UserConfiguration.DisabledItemMakerHelp.ToString());
- tripcode = ini.IniReadValue(section, "PlayerTripcode", GenerateAndReturnTripcode());
- discord = ini.IniReadValue(section, "DiscordRichPresence", GlobalVars.UserConfiguration.DiscordPresence.ToString());
- mappath = ini.IniReadValue(section, "MapPath", GlobalVars.UserConfiguration.MapPath.ToString());
- mapsnip = ini.IniReadValue(section, "MapPathSnip", GlobalVars.UserConfiguration.MapPathSnip.ToString());
- graphics = ini.IniReadValue(section, "GraphicsMode", Settings.GraphicsOptions.GetIntForMode(GlobalVars.UserConfiguration.GraphicsMode).ToString());
- reshade = ini.IniReadValue(section, "ReShade", GlobalVars.UserConfiguration.ReShade.ToString());
- qualitylevel = ini.IniReadValue(section, "QualityLevel", Settings.GraphicsOptions.GetIntForLevel(GlobalVars.UserConfiguration.QualityLevel).ToString());
- style = ini.IniReadValue(section, "Style", Settings.UIOptions.GetIntForStyle(GlobalVars.UserConfiguration.LauncherStyle).ToString());
- savebackups = ini.IniReadValue(section, "AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
+ closeonlaunch = ini.Configs[section].Get("CloseOnLaunch", GlobalVars.UserConfiguration.CloseOnLaunch.ToString());
+ userid = ini.Configs[section].Get("UserID", GlobalVars.UserConfiguration.UserID.ToString());
+ name = ini.Configs[section].Get("PlayerName", GlobalVars.UserConfiguration.PlayerName.ToString());
+ selectedclient = ini.Configs[section].Get("SelectedClient", GlobalVars.UserConfiguration.SelectedClient.ToString());
+ map = ini.Configs[section].Get("Map", GlobalVars.UserConfiguration.Map.ToString());
+ port = ini.Configs[section].Get("RobloxPort", GlobalVars.UserConfiguration.RobloxPort.ToString());
+ limit = ini.Configs[section].Get("PlayerLimit", GlobalVars.UserConfiguration.PlayerLimit.ToString());
+ upnp = ini.Configs[section].Get("UPnP", GlobalVars.UserConfiguration.UPnP.ToString());
+ disablehelpmessage = ini.Configs[section].Get("ItemMakerDisableHelpMessage", GlobalVars.UserConfiguration.DisabledItemMakerHelp.ToString());
+ tripcode = ini.Configs[section].Get("PlayerTripcode", GenerateAndReturnTripcode());
+ discord = ini.Configs[section].Get("DiscordRichPresence", GlobalVars.UserConfiguration.DiscordPresence.ToString());
+ mappath = ini.Configs[section].Get("MapPath", GlobalVars.UserConfiguration.MapPath.ToString());
+ mapsnip = ini.Configs[section].Get("MapPathSnip", GlobalVars.UserConfiguration.MapPathSnip.ToString());
+ graphics = ini.Configs[section].Get("GraphicsMode", Settings.GraphicsOptions.GetIntForMode(GlobalVars.UserConfiguration.GraphicsMode).ToString());
+ reshade = ini.Configs[section].Get("ReShade", GlobalVars.UserConfiguration.ReShade.ToString());
+ qualitylevel = ini.Configs[section].Get("QualityLevel", Settings.GraphicsOptions.GetIntForLevel(GlobalVars.UserConfiguration.QualityLevel).ToString());
+ style = ini.Configs[section].Get("Style", Settings.UIOptions.GetIntForStyle(GlobalVars.UserConfiguration.LauncherStyle).ToString());
+ savebackups = ini.Configs[section].Get("AssetLocalizerSaveBackups", GlobalVars.UserConfiguration.AssetLocalizerSaveBackups.ToString());
try
{
@@ -210,41 +213,43 @@ public class GlobalFuncs
if (write)
{
//WRITE
- INIFile ini = new INIFile(cfgpath);
+ IConfigSource ini = new IniConfigSource(cfgpath);
string section = "Items";
- ini.IniWriteValue(section, "Hat1", GlobalVars.UserCustomization.Hat1.ToString());
- ini.IniWriteValue(section, "Hat2", GlobalVars.UserCustomization.Hat2.ToString());
- ini.IniWriteValue(section, "Hat3", GlobalVars.UserCustomization.Hat3.ToString());
- ini.IniWriteValue(section, "Face", GlobalVars.UserCustomization.Face.ToString());
- ini.IniWriteValue(section, "Head", GlobalVars.UserCustomization.Head.ToString());
- ini.IniWriteValue(section, "TShirt", GlobalVars.UserCustomization.TShirt.ToString());
- ini.IniWriteValue(section, "Shirt", GlobalVars.UserCustomization.Shirt.ToString());
- ini.IniWriteValue(section, "Pants", GlobalVars.UserCustomization.Pants.ToString());
- ini.IniWriteValue(section, "Icon", GlobalVars.UserCustomization.Icon.ToString());
- ini.IniWriteValue(section, "Extra", GlobalVars.UserCustomization.Extra.ToString());
+ ini.Configs[section].Set("Hat1", GlobalVars.UserCustomization.Hat1.ToString());
+ ini.Configs[section].Set("Hat2", GlobalVars.UserCustomization.Hat2.ToString());
+ ini.Configs[section].Set("Hat3", GlobalVars.UserCustomization.Hat3.ToString());
+ ini.Configs[section].Set("Face", GlobalVars.UserCustomization.Face.ToString());
+ ini.Configs[section].Set("Head", GlobalVars.UserCustomization.Head.ToString());
+ ini.Configs[section].Set("TShirt", GlobalVars.UserCustomization.TShirt.ToString());
+ ini.Configs[section].Set("Shirt", GlobalVars.UserCustomization.Shirt.ToString());
+ ini.Configs[section].Set("Pants", GlobalVars.UserCustomization.Pants.ToString());
+ ini.Configs[section].Set("Icon", GlobalVars.UserCustomization.Icon.ToString());
+ ini.Configs[section].Set("Extra", GlobalVars.UserCustomization.Extra.ToString());
string section2 = "Colors";
- ini.IniWriteValue(section2, "HeadColorID", GlobalVars.UserCustomization.HeadColorID.ToString());
- ini.IniWriteValue(section2, "HeadColorString", GlobalVars.UserCustomization.HeadColorString.ToString());
- ini.IniWriteValue(section2, "TorsoColorID", GlobalVars.UserCustomization.TorsoColorID.ToString());
- ini.IniWriteValue(section2, "TorsoColorString", GlobalVars.UserCustomization.TorsoColorString.ToString());
- ini.IniWriteValue(section2, "LeftArmColorID", GlobalVars.UserCustomization.LeftArmColorID.ToString());
- ini.IniWriteValue(section2, "LeftArmColorString", GlobalVars.UserCustomization.LeftArmColorString.ToString());
- ini.IniWriteValue(section2, "RightArmColorID", GlobalVars.UserCustomization.RightArmColorID.ToString());
- ini.IniWriteValue(section2, "RightArmColorString", GlobalVars.UserCustomization.RightArmColorString.ToString());
- ini.IniWriteValue(section2, "LeftLegColorID", GlobalVars.UserCustomization.LeftLegColorID.ToString());
- ini.IniWriteValue(section2, "LeftLegColorString", GlobalVars.UserCustomization.LeftLegColorString.ToString());
- ini.IniWriteValue(section2, "RightLegColorID", GlobalVars.UserCustomization.RightLegColorID.ToString());
- ini.IniWriteValue(section2, "RightLegColorString", GlobalVars.UserCustomization.RightLegColorString.ToString());
+ ini.Configs[section2].Set("HeadColorID", GlobalVars.UserCustomization.HeadColorID.ToString());
+ ini.Configs[section2].Set("HeadColorString", GlobalVars.UserCustomization.HeadColorString.ToString());
+ ini.Configs[section2].Set("TorsoColorID", GlobalVars.UserCustomization.TorsoColorID.ToString());
+ ini.Configs[section2].Set("TorsoColorString", GlobalVars.UserCustomization.TorsoColorString.ToString());
+ ini.Configs[section2].Set("LeftArmColorID", GlobalVars.UserCustomization.LeftArmColorID.ToString());
+ ini.Configs[section2].Set("LeftArmColorString", GlobalVars.UserCustomization.LeftArmColorString.ToString());
+ ini.Configs[section2].Set("RightArmColorID", GlobalVars.UserCustomization.RightArmColorID.ToString());
+ ini.Configs[section2].Set("RightArmColorString", GlobalVars.UserCustomization.RightArmColorString.ToString());
+ ini.Configs[section2].Set("LeftLegColorID", GlobalVars.UserCustomization.LeftLegColorID.ToString());
+ ini.Configs[section2].Set("LeftLegColorString", GlobalVars.UserCustomization.LeftLegColorString.ToString());
+ ini.Configs[section2].Set("RightLegColorID", GlobalVars.UserCustomization.RightLegColorID.ToString());
+ ini.Configs[section2].Set("RightLegColorString", GlobalVars.UserCustomization.RightLegColorString.ToString());
string section3 = "Other";
- ini.IniWriteValue(section3, "CharacterID", GlobalVars.UserCustomization.CharacterID.ToString());
- ini.IniWriteValue(section3, "ExtraSelectionIsHat", GlobalVars.UserCustomization.ExtraSelectionIsHat.ToString());
- ini.IniWriteValue(section3, "ShowHatsOnExtra", GlobalVars.UserCustomization.ShowHatsInExtra.ToString());
+ ini.Configs[section3].Set("CharacterID", GlobalVars.UserCustomization.CharacterID.ToString());
+ ini.Configs[section3].Set("ExtraSelectionIsHat", GlobalVars.UserCustomization.ExtraSelectionIsHat.ToString());
+ ini.Configs[section3].Set("ShowHatsOnExtra", GlobalVars.UserCustomization.ShowHatsInExtra.ToString());
+
+ ini.Save();
}
else
{
@@ -256,41 +261,41 @@ public class GlobalFuncs
larmid, larmstring, rarmid, rarmstring, llegid,
llegstring, rlegid, rlegstring, characterid, extraishat, showhatsonextra;
- INIFile ini = new INIFile(cfgpath);
+ IConfigSource ini = new IniConfigSource(cfgpath);
string section = "Items";
- hat1 = ini.IniReadValue(section, "Hat1", GlobalVars.UserCustomization.Hat1.ToString());
- hat2 = ini.IniReadValue(section, "Hat2", GlobalVars.UserCustomization.Hat2.ToString());
- hat3 = ini.IniReadValue(section, "Hat3", GlobalVars.UserCustomization.Hat3.ToString());
- face = ini.IniReadValue(section, "Face", GlobalVars.UserCustomization.Face.ToString());
- head = ini.IniReadValue(section, "Head", GlobalVars.UserCustomization.Head.ToString());
- tshirt = ini.IniReadValue(section, "TShirt", GlobalVars.UserCustomization.TShirt.ToString());
- shirt = ini.IniReadValue(section, "Shirt", GlobalVars.UserCustomization.Shirt.ToString());
- pants = ini.IniReadValue(section, "Pants", GlobalVars.UserCustomization.Pants.ToString());
- icon = ini.IniReadValue(section, "Icon", GlobalVars.UserCustomization.Icon.ToString());
- extra = ini.IniReadValue(section, "Extra", GlobalVars.UserCustomization.Extra.ToString());
+ hat1 = ini.Configs[section].Get("Hat1", GlobalVars.UserCustomization.Hat1.ToString());
+ hat2 = ini.Configs[section].Get("Hat2", GlobalVars.UserCustomization.Hat2.ToString());
+ hat3 = ini.Configs[section].Get("Hat3", GlobalVars.UserCustomization.Hat3.ToString());
+ face = ini.Configs[section].Get("Face", GlobalVars.UserCustomization.Face.ToString());
+ head = ini.Configs[section].Get("Head", GlobalVars.UserCustomization.Head.ToString());
+ tshirt = ini.Configs[section].Get("TShirt", GlobalVars.UserCustomization.TShirt.ToString());
+ shirt = ini.Configs[section].Get("Shirt", GlobalVars.UserCustomization.Shirt.ToString());
+ pants = ini.Configs[section].Get("Pants", GlobalVars.UserCustomization.Pants.ToString());
+ icon = ini.Configs[section].Get("Icon", GlobalVars.UserCustomization.Icon.ToString());
+ extra = ini.Configs[section].Get("Extra", GlobalVars.UserCustomization.Extra.ToString());
string section2 = "Colors";
- headcolorid = ini.IniReadValue(section2, "HeadColorID", GlobalVars.UserCustomization.HeadColorID.ToString());
- headcolorstring = ini.IniReadValue(section2, "HeadColorString", GlobalVars.UserCustomization.HeadColorString.ToString());
- torsocolorid = ini.IniReadValue(section2, "TorsoColorID", GlobalVars.UserCustomization.TorsoColorID.ToString());
- torsocolorstring = ini.IniReadValue(section2, "TorsoColorString", GlobalVars.UserCustomization.TorsoColorString.ToString());
- larmid = ini.IniReadValue(section2, "LeftArmColorID", GlobalVars.UserCustomization.LeftArmColorID.ToString());
- larmstring = ini.IniReadValue(section2, "LeftArmColorString", GlobalVars.UserCustomization.LeftArmColorString.ToString());
- rarmid = ini.IniReadValue(section2, "RightArmColorID", GlobalVars.UserCustomization.RightArmColorID.ToString());
- rarmstring = ini.IniReadValue(section2, "RightArmColorString", GlobalVars.UserCustomization.RightArmColorString.ToString());
- llegid = ini.IniReadValue(section2, "LeftLegColorID", GlobalVars.UserCustomization.LeftLegColorID.ToString());
- llegstring = ini.IniReadValue(section2, "LeftLegColorString", GlobalVars.UserCustomization.LeftLegColorString.ToString());
- rlegid = ini.IniReadValue(section2, "RightLegColorID", GlobalVars.UserCustomization.RightLegColorID.ToString());
- rlegstring = ini.IniReadValue(section2, "RightLegColorString", GlobalVars.UserCustomization.RightLegColorString.ToString());
+ headcolorid = ini.Configs[section2].Get("HeadColorID", GlobalVars.UserCustomization.HeadColorID.ToString());
+ headcolorstring = ini.Configs[section2].Get("HeadColorString", GlobalVars.UserCustomization.HeadColorString.ToString());
+ torsocolorid = ini.Configs[section2].Get("TorsoColorID", GlobalVars.UserCustomization.TorsoColorID.ToString());
+ torsocolorstring = ini.Configs[section2].Get("TorsoColorString", GlobalVars.UserCustomization.TorsoColorString.ToString());
+ larmid = ini.Configs[section2].Get("LeftArmColorID", GlobalVars.UserCustomization.LeftArmColorID.ToString());
+ larmstring = ini.Configs[section2].Get("LeftArmColorString", GlobalVars.UserCustomization.LeftArmColorString.ToString());
+ rarmid = ini.Configs[section2].Get("RightArmColorID", GlobalVars.UserCustomization.RightArmColorID.ToString());
+ rarmstring = ini.Configs[section2].Get("RightArmColorString", GlobalVars.UserCustomization.RightArmColorString.ToString());
+ llegid = ini.Configs[section2].Get("LeftLegColorID", GlobalVars.UserCustomization.LeftLegColorID.ToString());
+ llegstring = ini.Configs[section2].Get("LeftLegColorString", GlobalVars.UserCustomization.LeftLegColorString.ToString());
+ rlegid = ini.Configs[section2].Get("RightLegColorID", GlobalVars.UserCustomization.RightLegColorID.ToString());
+ rlegstring = ini.Configs[section2].Get("RightLegColorString", GlobalVars.UserCustomization.RightLegColorString.ToString());
string section3 = "Other";
- characterid = ini.IniReadValue(section3, "CharacterID", GlobalVars.UserCustomization.CharacterID.ToString());
- extraishat = ini.IniReadValue(section3, "ExtraSelectionIsHat", GlobalVars.UserCustomization.ExtraSelectionIsHat.ToString());
- showhatsonextra = ini.IniReadValue(section3, "ShowHatsOnExtra", GlobalVars.UserCustomization.ShowHatsInExtra.ToString());
+ characterid = ini.Configs[section3].Get("CharacterID", GlobalVars.UserCustomization.CharacterID.ToString());
+ extraishat = ini.Configs[section3].Get("ExtraSelectionIsHat", GlobalVars.UserCustomization.ExtraSelectionIsHat.ToString());
+ showhatsonextra = ini.Configs[section3].Get("ShowHatsOnExtra", GlobalVars.UserCustomization.ShowHatsInExtra.ToString());
try
{
@@ -338,30 +343,32 @@ public class GlobalFuncs
if (write)
{
//WRITE
- INIFile ini = new INIFile(cfgpath);
+ IConfigSource ini = new IniConfigSource(cfgpath);
string section = "GENERAL";
int FPS = GlobalVars.UserConfiguration.ReShadeFPSDisplay ? 1 : 0;
- ini.IniWriteValue(section, "ShowFPS", FPS.ToString());
- ini.IniWriteValue(section, "ShowFrameTime", FPS.ToString());
+ ini.Configs[section].Set("ShowFPS", FPS.ToString());
+ ini.Configs[section].Set("ShowFrameTime", FPS.ToString());
int PerformanceMode = GlobalVars.UserConfiguration.ReShadePerformanceMode ? 1 : 0;
- ini.IniWriteValue(section, "PerformanceMode", PerformanceMode.ToString());
+ ini.Configs[section].Set("PerformanceMode", PerformanceMode.ToString());
+
+ ini.Save();
}
else
{
//READ
string framerate, frametime, performance;
- INIFile ini = new INIFile(cfgpath);
+ IConfigSource ini = new IniConfigSource(cfgpath);
string section = "GENERAL";
int FPS = GlobalVars.UserConfiguration.ReShadeFPSDisplay ? 1 : 0;
- framerate = ini.IniReadValue(section, "ShowFPS", FPS.ToString());
- frametime = ini.IniReadValue(section, "ShowFrameTime", FPS.ToString());
+ framerate = ini.Configs[section].Get("ShowFPS", FPS.ToString());
+ frametime = ini.Configs[section].Get("ShowFrameTime", FPS.ToString());
int PerformanceMode = GlobalVars.UserConfiguration.ReShadePerformanceMode ? 1 : 0;
- performance = ini.IniReadValue(section, "PerformanceMode", PerformanceMode.ToString());
+ performance = ini.Configs[section].Get("PerformanceMode", PerformanceMode.ToString());
if (setglobals)
{
@@ -648,25 +655,6 @@ public class GlobalFuncs
return GlobalVars.UserConfiguration.PlayerTripcode;
}
- public static Image LoadImage(string fileFullName)
- {
- Stream fileStream = File.OpenRead(fileFullName);
- Image image = Image.FromStream(fileStream);
-
- // PropertyItems seem to get lost when fileStream is closed to quickly (?); perhaps
- // this is the reason Microsoft didn't want to close it in the first place.
- PropertyItem[] items = image.PropertyItems;
-
- fileStream.Close();
-
- foreach (PropertyItem item in items)
- {
- image.SetPropertyItem(item);
- }
-
- return image;
- }
-
public static void UpdateRichPresence(GlobalVars.LauncherState state, string mapname, bool initial = false)
{
if (GlobalVars.UserConfiguration.DiscordPresence)
diff --git a/Novetus/NovetusCore/INIFile.cs b/Novetus/NovetusCore/INIFile.cs
deleted file mode 100644
index 7dba0a3..0000000
--- a/Novetus/NovetusCore/INIFile.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-#region Usings
-using System;
-using System.Runtime.InteropServices;
-using System.Text;
-#endregion
-
-#region INI File Parser
-//modified from https://www.codeproject.com/articles/1966/an-ini-file-handling-class-using-c?fid=425860&df=90&mpp=25&prof=True&sort=Position&view=Normal&spc=Relaxed&fr=51
-
-public class INIFile
-{
- public string path;
-
- [DllImport("kernel32")]
- private static extern long WritePrivateProfileString(string section,
- string key, string val, string filePath);
- [DllImport("kernel32")]
- private static extern int GetPrivateProfileString(string section,
- string key, string def, StringBuilder retVal,
- int size, string filePath);
-
- ///
- /// INIFile Constructor.
- ///
- ///
- public INIFile(string INIPath)
- {
- path = INIPath;
- }
- ///
- /// Write Data to the INI File
- ///
- ///
- /// Section name
- ///
- /// Key Name
- ///
- /// Value Name
- public void IniWriteValue(string Section, string Key, string Value)
- {
- WritePrivateProfileString(Section, Key, Value, this.path);
- }
-
- ///
- /// Read Data Value From the Ini File
- ///
- ///
- ///
- ///
- ///
- public string IniReadValue(string Section, string Key, string DefaultValue = "")
- {
- try
- {
- StringBuilder temp = new StringBuilder(255);
- int i = GetPrivateProfileString(Section, Key, "", temp,
- 255, this.path);
- return temp.ToString();
- }
- catch (Exception)
- {
- IniWriteValue(Section, Key, DefaultValue);
- return IniReadValue(Section, Key);
- }
- }
-}
-#endregion
diff --git a/Novetus/NovetusCore/NovetusCore.projitems b/Novetus/NovetusCore/NovetusCore.projitems
index 2960e8b..4fa2755 100644
--- a/Novetus/NovetusCore/NovetusCore.projitems
+++ b/Novetus/NovetusCore/NovetusCore.projitems
@@ -14,7 +14,6 @@
-
diff --git a/Novetus/NovetusCore/SecurityFuncs.cs b/Novetus/NovetusCore/SecurityFuncs.cs
index 485c551..3582e6e 100644
--- a/Novetus/NovetusCore/SecurityFuncs.cs
+++ b/Novetus/NovetusCore/SecurityFuncs.cs
@@ -151,8 +151,9 @@ public class SecurityFuncs
public static string GenerateMD5(string filename)
{
- using (var md5 = MD5.Create()) {
- using (var stream = File.OpenRead(filename))
+ using (var md5 = MD5.Create())
+ {
+ using (var stream = new BufferedStream(File.OpenRead(filename), 1200000))
{
return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "");
}
diff --git a/Novetus/NovetusLauncher/Classes/CharCustom/CustomizationFuncs.cs b/Novetus/NovetusLauncher/Classes/CharCustom/CustomizationFuncs.cs
new file mode 100644
index 0000000..38eb416
--- /dev/null
+++ b/Novetus/NovetusLauncher/Classes/CharCustom/CustomizationFuncs.cs
@@ -0,0 +1,131 @@
+#region Usings
+using System;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Windows.Forms;
+#endregion
+
+namespace NovetusLauncher
+{
+ #region Customization Functions
+ class CustomizationFuncs
+ {
+ //modified from the following:
+ //https://stackoverflow.com/questions/28887314/performance-of-image-loading
+ //https://stackoverflow.com/questions/2479771/c-why-am-i-getting-the-process-cannot-access-the-file-because-it-is-being-u
+ public static Image LoadImage(string fileFullName, string fallbackFileFullName = "")
+ {
+ Image image = null;
+
+ try
+ {
+ using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(fileFullName)))
+ {
+ image = Image.FromStream(ms);
+ }
+
+ // PropertyItems seem to get lost when fileStream is closed to quickly (?); perhaps
+ // this is the reason Microsoft didn't want to close it in the first place.
+ PropertyItem[] items = image.PropertyItems;
+
+ foreach (PropertyItem item in items)
+ {
+ image.SetPropertyItem(item);
+ }
+ }
+ catch (Exception)
+ {
+ image = LoadImage(fallbackFileFullName);
+ }
+
+ return image;
+ }
+
+ public static void ChangeItem(string item, string itemdir, string defaultitem, PictureBox outputImage, TextBox outputString, ListBox box, bool initial, bool hatsinextra = false)
+ {
+ if (Directory.Exists(itemdir))
+ {
+ if (initial)
+ {
+ box.Items.Clear();
+ DirectoryInfo dinfo = new DirectoryInfo(itemdir);
+ FileInfo[] Files = dinfo.GetFiles("*.rbxm");
+ foreach (FileInfo file in Files)
+ {
+ if (file.Name.Equals(string.Empty))
+ {
+ continue;
+ }
+
+ if (hatsinextra)
+ {
+ if (file.Name.Equals("NoHat.rbxm"))
+ {
+ continue;
+ }
+ }
+
+ box.Items.Add(file.Name);
+ }
+ //selecting items triggers the event.
+ try
+ {
+ box.SelectedItem = item;
+ }
+ catch (Exception)
+ {
+ box.SelectedItem = defaultitem + ".rbxm";
+ }
+
+ box.Enabled = true;
+ }
+ }
+
+ if (File.Exists(itemdir + @"\\" + item.Replace(".rbxm", "") + "_desc.txt"))
+ {
+ outputString.Text = File.ReadAllText(itemdir + @"\\" + item.Replace(".rbxm", "") + "_desc.txt");
+ }
+ else
+ {
+ outputString.Text = item;
+ }
+
+ if (IsItemURL(item))
+ {
+ outputImage.Image = GetItemURLImage(item);
+ }
+ else
+ {
+ outputImage.Image = LoadImage(itemdir + @"\\" + item.Replace(".rbxm", "") + ".png", itemdir + @"\\" + defaultitem + ".png");
+ }
+ }
+
+ public static bool IsItemURL(string item)
+ {
+ switch (item)
+ {
+ case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
+ return true;
+ case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ public static Image GetItemURLImage(string item)
+ {
+ switch (item)
+ {
+ case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
+ return LoadImage(GlobalPaths.CustomPlayerDir + @"\\finobe.png", GlobalPaths.extradir + @"\\NoExtra.png");
+ case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
+ return LoadImage(GlobalPaths.CustomPlayerDir + @"\\roblox.png", GlobalPaths.extradir + @"\\NoExtra.png");
+ default:
+ return LoadImage(GlobalPaths.extradir + @"\\NoExtra.png");
+ }
+ }
+ }
+ #endregion
+}
diff --git a/Novetus/NovetusLauncher/Classes/Launcher/LauncherFuncs.cs b/Novetus/NovetusLauncher/Classes/Launcher/LauncherFuncs.cs
index 34d4621..d67ae4e 100644
--- a/Novetus/NovetusLauncher/Classes/Launcher/LauncherFuncs.cs
+++ b/Novetus/NovetusLauncher/Classes/Launcher/LauncherFuncs.cs
@@ -1,4 +1,7 @@
#region Usings
+using System;
+using System.Drawing;
+using System.Drawing.Imaging;
using System.IO;
#endregion
diff --git a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.Designer.cs b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.Designer.cs
index 7500cad..638a992 100644
--- a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.Designer.cs
+++ b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.Designer.cs
@@ -127,24 +127,27 @@ namespace NovetusLauncher
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.listBox4 = new System.Windows.Forms.ListBox();
this.tabPage4 = new System.Windows.Forms.TabPage();
+ this.TShirtsTypeBox = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
- this.textBox11 = new System.Windows.Forms.TextBox();
+ this.TShirtsIDBox = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.button46 = new System.Windows.Forms.Button();
this.button47 = new System.Windows.Forms.Button();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.listBox5 = new System.Windows.Forms.ListBox();
this.tabPage5 = new System.Windows.Forms.TabPage();
+ this.ShirtsTypeBox = new System.Windows.Forms.ComboBox();
this.label10 = new System.Windows.Forms.Label();
- this.textBox12 = new System.Windows.Forms.TextBox();
+ this.ShirtsIDBox = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.button48 = new System.Windows.Forms.Button();
this.button49 = new System.Windows.Forms.Button();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.listBox6 = new System.Windows.Forms.ListBox();
this.tabPage6 = new System.Windows.Forms.TabPage();
+ this.PantsTypeBox = new System.Windows.Forms.ComboBox();
this.label11 = new System.Windows.Forms.Label();
- this.textBox13 = new System.Windows.Forms.TextBox();
+ this.PantsIDBox = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.button50 = new System.Windows.Forms.Button();
this.button51 = new System.Windows.Forms.Button();
@@ -173,9 +176,6 @@ namespace NovetusLauncher
this.button54 = new System.Windows.Forms.Button();
this.button53 = new System.Windows.Forms.Button();
this.button52 = new System.Windows.Forms.Button();
- this.comboBox3 = new System.Windows.Forms.ComboBox();
- this.comboBox1 = new System.Windows.Forms.ComboBox();
- this.comboBox2 = new System.Windows.Forms.ComboBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -1176,9 +1176,9 @@ namespace NovetusLauncher
//
// tabPage4
//
- this.tabPage4.Controls.Add(this.comboBox2);
+ this.tabPage4.Controls.Add(this.TShirtsTypeBox);
this.tabPage4.Controls.Add(this.label9);
- this.tabPage4.Controls.Add(this.textBox11);
+ this.tabPage4.Controls.Add(this.TShirtsIDBox);
this.tabPage4.Controls.Add(this.textBox7);
this.tabPage4.Controls.Add(this.button46);
this.tabPage4.Controls.Add(this.button47);
@@ -1191,6 +1191,19 @@ namespace NovetusLauncher
this.tabPage4.Text = "T-SHIRTS";
this.tabPage4.UseVisualStyleBackColor = true;
//
+ // TShirtsTypeBox
+ //
+ this.TShirtsTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.TShirtsTypeBox.FormattingEnabled = true;
+ this.TShirtsTypeBox.Items.AddRange(new object[] {
+ "Roblox",
+ "Finobe"});
+ this.TShirtsTypeBox.Location = new System.Drawing.Point(6, 162);
+ this.TShirtsTypeBox.Name = "TShirtsTypeBox";
+ this.TShirtsTypeBox.Size = new System.Drawing.Size(194, 21);
+ this.TShirtsTypeBox.TabIndex = 80;
+ this.TShirtsTypeBox.SelectedIndexChanged += new System.EventHandler(this.TShirtsTypeBox_SelectedIndexChanged);
+ //
// label9
//
this.label9.AutoSize = true;
@@ -1200,13 +1213,13 @@ namespace NovetusLauncher
this.label9.TabIndex = 70;
this.label9.Text = "Custom T-Shirt ID";
//
- // textBox11
+ // TShirtsIDBox
//
- this.textBox11.Location = new System.Drawing.Point(6, 136);
- this.textBox11.Name = "textBox11";
- this.textBox11.Size = new System.Drawing.Size(100, 20);
- this.textBox11.TabIndex = 69;
- this.textBox11.TextChanged += new System.EventHandler(this.textBox11_TextChanged);
+ this.TShirtsIDBox.Location = new System.Drawing.Point(6, 136);
+ this.TShirtsIDBox.Name = "TShirtsIDBox";
+ this.TShirtsIDBox.Size = new System.Drawing.Size(100, 20);
+ this.TShirtsIDBox.TabIndex = 69;
+ this.TShirtsIDBox.TextChanged += new System.EventHandler(this.TShirtsIDBox_TextChanged);
//
// textBox7
//
@@ -1259,9 +1272,9 @@ namespace NovetusLauncher
//
// tabPage5
//
- this.tabPage5.Controls.Add(this.comboBox1);
+ this.tabPage5.Controls.Add(this.ShirtsTypeBox);
this.tabPage5.Controls.Add(this.label10);
- this.tabPage5.Controls.Add(this.textBox12);
+ this.tabPage5.Controls.Add(this.ShirtsIDBox);
this.tabPage5.Controls.Add(this.textBox8);
this.tabPage5.Controls.Add(this.button48);
this.tabPage5.Controls.Add(this.button49);
@@ -1274,6 +1287,19 @@ namespace NovetusLauncher
this.tabPage5.Text = "SHIRTS";
this.tabPage5.UseVisualStyleBackColor = true;
//
+ // ShirtsTypeBox
+ //
+ this.ShirtsTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.ShirtsTypeBox.FormattingEnabled = true;
+ this.ShirtsTypeBox.Items.AddRange(new object[] {
+ "Roblox",
+ "Finobe"});
+ this.ShirtsTypeBox.Location = new System.Drawing.Point(6, 162);
+ this.ShirtsTypeBox.Name = "ShirtsTypeBox";
+ this.ShirtsTypeBox.Size = new System.Drawing.Size(194, 21);
+ this.ShirtsTypeBox.TabIndex = 80;
+ this.ShirtsTypeBox.SelectedIndexChanged += new System.EventHandler(this.ShirtsTypeBox_SelectedIndexChanged);
+ //
// label10
//
this.label10.AutoSize = true;
@@ -1283,13 +1309,13 @@ namespace NovetusLauncher
this.label10.TabIndex = 72;
this.label10.Text = "Custom Shirt ID";
//
- // textBox12
+ // ShirtsIDBox
//
- this.textBox12.Location = new System.Drawing.Point(6, 136);
- this.textBox12.Name = "textBox12";
- this.textBox12.Size = new System.Drawing.Size(100, 20);
- this.textBox12.TabIndex = 71;
- this.textBox12.TextChanged += new System.EventHandler(this.textBox12_TextChanged);
+ this.ShirtsIDBox.Location = new System.Drawing.Point(6, 136);
+ this.ShirtsIDBox.Name = "ShirtsIDBox";
+ this.ShirtsIDBox.Size = new System.Drawing.Size(100, 20);
+ this.ShirtsIDBox.TabIndex = 71;
+ this.ShirtsIDBox.TextChanged += new System.EventHandler(this.ShirtsIDBox_TextChanged);
//
// textBox8
//
@@ -1342,9 +1368,9 @@ namespace NovetusLauncher
//
// tabPage6
//
- this.tabPage6.Controls.Add(this.comboBox3);
+ this.tabPage6.Controls.Add(this.PantsTypeBox);
this.tabPage6.Controls.Add(this.label11);
- this.tabPage6.Controls.Add(this.textBox13);
+ this.tabPage6.Controls.Add(this.PantsIDBox);
this.tabPage6.Controls.Add(this.textBox9);
this.tabPage6.Controls.Add(this.button50);
this.tabPage6.Controls.Add(this.button51);
@@ -1357,6 +1383,19 @@ namespace NovetusLauncher
this.tabPage6.Text = "PANTS";
this.tabPage6.UseVisualStyleBackColor = true;
//
+ // PantsTypeBox
+ //
+ this.PantsTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.PantsTypeBox.FormattingEnabled = true;
+ this.PantsTypeBox.Items.AddRange(new object[] {
+ "Roblox",
+ "Finobe"});
+ this.PantsTypeBox.Location = new System.Drawing.Point(6, 162);
+ this.PantsTypeBox.Name = "PantsTypeBox";
+ this.PantsTypeBox.Size = new System.Drawing.Size(194, 21);
+ this.PantsTypeBox.TabIndex = 79;
+ this.PantsTypeBox.SelectedIndexChanged += new System.EventHandler(this.PantsTypeBox_SelectedIndexChanged);
+ //
// label11
//
this.label11.AutoSize = true;
@@ -1366,13 +1405,13 @@ namespace NovetusLauncher
this.label11.TabIndex = 74;
this.label11.Text = "Custom Pants ID";
//
- // textBox13
+ // PantsIDBox
//
- this.textBox13.Location = new System.Drawing.Point(6, 136);
- this.textBox13.Name = "textBox13";
- this.textBox13.Size = new System.Drawing.Size(100, 20);
- this.textBox13.TabIndex = 73;
- this.textBox13.TextChanged += new System.EventHandler(this.textBox13_TextChanged);
+ this.PantsIDBox.Location = new System.Drawing.Point(6, 136);
+ this.PantsIDBox.Name = "PantsIDBox";
+ this.PantsIDBox.Size = new System.Drawing.Size(100, 20);
+ this.PantsIDBox.TabIndex = 73;
+ this.PantsIDBox.TextChanged += new System.EventHandler(this.PantsIDBox_TextChanged);
//
// textBox9
//
@@ -1675,49 +1714,7 @@ namespace NovetusLauncher
this.button52.UseVisualStyleBackColor = true;
this.button52.Click += new System.EventHandler(this.Button52Click);
//
- // comboBox3
- //
- this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox3.FormattingEnabled = true;
- this.comboBox3.Items.AddRange(new object[] {
- "Roblox",
- "Finobe"});
- this.comboBox3.SelectedItem = "Roblox";
- this.comboBox3.Location = new System.Drawing.Point(6, 162);
- this.comboBox3.Name = "comboBox3";
- this.comboBox3.Size = new System.Drawing.Size(194, 21);
- this.comboBox3.TabIndex = 79;
- this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
- //
- // comboBox1
- //
- this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox1.FormattingEnabled = true;
- this.comboBox1.Items.AddRange(new object[] {
- "Roblox",
- "Finobe"});
- this.comboBox1.SelectedItem = "Roblox";
- this.comboBox1.Location = new System.Drawing.Point(6, 162);
- this.comboBox1.Name = "comboBox1";
- this.comboBox1.Size = new System.Drawing.Size(194, 21);
- this.comboBox1.TabIndex = 80;
- this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
- //
- // comboBox2
- //
- this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox2.FormattingEnabled = true;
- this.comboBox2.Items.AddRange(new object[] {
- "Roblox",
- "Finobe"});
- this.comboBox2.SelectedItem = "Roblox";
- this.comboBox2.Location = new System.Drawing.Point(6, 162);
- this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(194, 21);
- this.comboBox2.TabIndex = 80;
- this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
- //
- // CharacterCustomization_legacy
+ // CharacterCustomizationCompact
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -1727,7 +1724,7 @@ namespace NovetusLauncher
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
- this.Name = "CharacterCustomization_legacy";
+ this.Name = "CharacterCustomizationCompact";
this.Text = "Avatar Customization";
this.Closing += new System.ComponentModel.CancelEventHandler(this.CharacterCustomizationClose);
this.Load += new System.EventHandler(this.CharacterCustomizationLoad);
@@ -1899,13 +1896,13 @@ namespace NovetusLauncher
private System.Windows.Forms.TextBox textBox10;
public System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.Label label9;
- private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox TShirtsIDBox;
private System.Windows.Forms.Label label10;
- private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox ShirtsIDBox;
private System.Windows.Forms.Label label11;
- private System.Windows.Forms.TextBox textBox13;
- private System.Windows.Forms.ComboBox comboBox2;
- private System.Windows.Forms.ComboBox comboBox1;
- private System.Windows.Forms.ComboBox comboBox3;
+ private System.Windows.Forms.TextBox PantsIDBox;
+ private System.Windows.Forms.ComboBox TShirtsTypeBox;
+ private System.Windows.Forms.ComboBox ShirtsTypeBox;
+ private System.Windows.Forms.ComboBox PantsTypeBox;
}
}
diff --git a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.cs b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.cs
index 6ee3278..05c647c 100644
--- a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.cs
+++ b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Compact/CharacterCustomizationCompact.cs
@@ -7,19 +7,19 @@
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
-using System.Drawing;
-using System.Windows.Forms;
-using System.IO;
-using System.Diagnostics;
-using System.ComponentModel;
using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Drawing;
+using System.IO;
+using System.Windows.Forms;
namespace NovetusLauncher
{
- ///
- /// Description of CharacterCustomization.
- ///
- public partial class CharacterCustomizationCompact : Form
+ ///
+ /// Description of CharacterCustomization.
+ ///
+ public partial class CharacterCustomizationCompact : Form
{
private string SelectedPart = "Head";
private string Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id=";
@@ -138,50 +138,62 @@ namespace NovetusLauncher
//clothing
if (GlobalVars.UserCustomization.TShirt.Contains("http://"))
{
+ string TShirtWebSource = "Roblox";
+
switch (GlobalVars.UserCustomization.TShirt)
{
case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
- textBox11.Text = GlobalVars.UserCustomization.TShirt.Replace("http://finobe.com/asset/?id=", "");
- comboBox2.SelectedItem = "Finobe";
+ TShirtsIDBox.Text = GlobalVars.UserCustomization.TShirt.Replace("http://finobe.com/asset/?id=", "");
+ TShirtWebSource = "Finobe";
break;
case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
default:
- textBox11.Text = GlobalVars.UserCustomization.TShirt.Replace("http://www.roblox.com/asset/?id=", "");
- comboBox2.SelectedItem = "Roblox";
+ TShirtsIDBox.Text = GlobalVars.UserCustomization.TShirt.Replace("http://www.roblox.com/asset/?id=", "");
+ TShirtWebSource = "Roblox";
break;
}
+
+ TShirtsTypeBox.SelectedItem = TShirtWebSource;
}
if (GlobalVars.UserCustomization.Shirt.Contains("http://"))
{
+ string ShirtWebSource = "Roblox";
+
switch (GlobalVars.UserCustomization.Shirt)
{
case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
- textBox12.Text = GlobalVars.UserCustomization.Shirt.Replace("http://finobe.com/asset/?id=", "");
- comboBox1.SelectedItem = "Finobe";
+ ShirtsIDBox.Text = GlobalVars.UserCustomization.Shirt.Replace("http://finobe.com/asset/?id=", "");
+ ShirtWebSource = "Finobe";
break;
case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
default:
- textBox12.Text = GlobalVars.UserCustomization.Shirt.Replace("http://www.roblox.com/asset/?id=", "");
- comboBox1.SelectedItem = "Roblox";
+ ShirtsIDBox.Text = GlobalVars.UserCustomization.Shirt.Replace("http://www.roblox.com/asset/?id=", "");
+ ShirtWebSource = "Roblox";
break;
}
+
+ ShirtsTypeBox.SelectedItem = ShirtWebSource;
}
if (GlobalVars.UserCustomization.Pants.Contains("http://"))
{
+ string PantsWebSource = "Roblox";
+
switch (GlobalVars.UserCustomization.Pants)
{
case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
- textBox13.Text = GlobalVars.UserCustomization.Pants.Replace("http://finobe.com/asset/?id=", "");
- comboBox3.SelectedItem = "Finobe";
+ PantsIDBox.Text = GlobalVars.UserCustomization.Pants.Replace("http://finobe.com/asset/?id=", "");
+ PantsWebSource = "Finobe";
break;
case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
default:
- textBox13.Text = GlobalVars.UserCustomization.Pants.Replace("http://www.roblox.com/asset/?id=", "");
- comboBox3.SelectedItem = "Roblox";
+ PantsIDBox.Text = GlobalVars.UserCustomization.Pants.Replace("http://www.roblox.com/asset/?id=", "");
+ PantsWebSource = "Roblox";
break;
}
+
+ PantsTypeBox.SelectedItem = PantsWebSource;
}
//discord
@@ -195,6 +207,7 @@ namespace NovetusLauncher
switch (tabControl1.SelectedTab)
{
case TabPage pg1 when pg1 == tabControl1.TabPages["tabPage1"]:
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -206,6 +219,7 @@ namespace NovetusLauncher
listBox9.Items.Clear();
break;
case TabPage pg7 when pg7 == tabControl1.TabPages["tabPage7"]:
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -216,19 +230,13 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png");
- pictureBox10.Image = icon1;
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\NoExtra.png");
- pictureBox10.Image = icon1;
- }
+ Image icon1 = CustomizationFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png", GlobalPaths.extradir + "\\NoExtra.png");
+ pictureBox10.Image = icon1;
+
break;
case TabPage pg2 when pg2 == tabControl1.TabPages["tabPage2"]:
//hats
+
listBox4.Items.Clear();
listBox5.Items.Clear();
listBox6.Items.Clear();
@@ -236,63 +244,40 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat1,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox1,
+ textBox2,
+ listBox1,
+ true
+ );
- listBox1.Items.Add(file.Name);
- listBox2.Items.Add(file.Name);
- listBox3.Items.Add(file.Name);
- }
- listBox1.SelectedItem = GlobalVars.UserCustomization.Hat1;
- listBox2.SelectedItem = GlobalVars.UserCustomization.Hat2;
- listBox3.SelectedItem = GlobalVars.UserCustomization.Hat3;
- listBox1.Enabled = true;
- listBox2.Enabled = true;
- listBox3.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat2,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox2,
+ textBox3,
+ listBox2,
+ true
+ );
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat3,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox3,
+ textBox4,
+ listBox3,
+ true
+ );
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
- }
break;
case TabPage pg3 when pg3 == tabControl1.TabPages["tabPage3"]:
//faces
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -302,36 +287,20 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- if (Directory.Exists(GlobalPaths.facedir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.facedir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Face,
+ GlobalPaths.facedir,
+ "DefaultFace",
+ pictureBox4,
+ textBox6,
+ listBox4,
+ true
+ );
- listBox4.Items.Add(file.Name);
- }
- listBox4.SelectedItem = GlobalVars.UserCustomization.Face;
- listBox4.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
-
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
- }
break;
case TabPage pg4 when pg4 == tabControl1.TabPages["tabPage4"]:
//faces
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -341,44 +310,20 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.tshirtdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ true
+ );
- listBox5.Items.Add(file.Name);
- }
- listBox5.SelectedItem = GlobalVars.UserCustomization.TShirt;
- listBox5.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
-
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
- }
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + @"\\NoTShirt.png");
- pictureBox5.Image = icon1;
- }
break;
case TabPage pg5 when pg5 == tabControl1.TabPages["tabPage5"]:
//faces
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -388,44 +333,20 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.shirtdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ true
+ );
- listBox6.Items.Add(file.Name);
- }
- listBox6.SelectedItem = GlobalVars.UserCustomization.Shirt;
- listBox6.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
-
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
- }
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + @"\\NoShirt.png");
- pictureBox6.Image = icon1;
- }
break;
case TabPage pg6 when pg6 == tabControl1.TabPages["tabPage6"]:
//faces
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -435,44 +356,20 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.pantsdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ true
+ );
- listBox7.Items.Add(file.Name);
- }
- listBox7.SelectedItem = GlobalVars.UserCustomization.Pants;
- listBox7.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
-
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
- }
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + @"\\NoPants.png");
- pictureBox7.Image = icon1;
- }
break;
case TabPage pg8 when pg8 == tabControl1.TabPages["tabPage8"]:
//faces
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -482,36 +379,20 @@ namespace NovetusLauncher
listBox7.Items.Clear();
listBox9.Items.Clear();
- if (Directory.Exists(GlobalPaths.headdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.headdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Head,
+ GlobalPaths.headdir,
+ "DefaultHead",
+ pictureBox8,
+ textBox5,
+ listBox8,
+ true
+ );
- listBox8.Items.Add(file.Name);
- }
- listBox8.SelectedItem = GlobalVars.UserCustomization.Head;
- listBox8.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
-
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
- }
break;
case TabPage pg9 when pg9 == tabControl1.TabPages["tabPage9"]:
//faces
+
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -521,74 +402,28 @@ namespace NovetusLauncher
listBox7.Items.Clear();
listBox8.Items.Clear();
- if (Directory.Exists(GlobalPaths.extradir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.extradir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
-
- listBox9.Items.Add(file.Name);
- }
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.extradir,
+ "NoExtra",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true
+ );
if (GlobalVars.UserCustomization.ShowHatsInExtra)
{
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
-
- if (file.Name.Equals("NoHat.rbxm"))
- {
- continue;
- }
-
- listBox9.Items.Add(file.Name);
- }
- }
- }
-
- listBox9.SelectedItem = GlobalVars.UserCustomization.Extra;
- listBox9.Enabled = true;
- try
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true,
+ GlobalVars.UserCustomization.ShowHatsInExtra
+ );
}
break;
default:
@@ -606,506 +441,321 @@ namespace NovetusLauncher
}
void CharacterCustomizationClose(object sender, CancelEventArgs e)
- {
+ {
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
GlobalFuncs.ReloadLoadoutValue();
- }
-
- // hats
-
- void ListBox1SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ // hats
+
+ void ListBox1SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat1,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox1,
+ textBox2,
+ listBox1,
+ false
+ );
}
}
-
- void ListBox2SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ void ListBox2SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat2,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox2,
+ textBox3,
+ listBox2,
+ false
+ );
}
- }
-
- void ListBox3SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
+ void ListBox3SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat3,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox3,
+ textBox4,
+ listBox3,
+ false
+ );
}
- }
-
- void Button41Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- Random random = new Random();
- int randomHat1 = random.Next(listBox1.Items.Count);
- listBox1.SelectedItem = listBox1.Items[randomHat1];
- GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
- int randomHat2 = random.Next(listBox2.Items.Count);
- listBox2.SelectedItem = listBox1.Items[randomHat2];
- GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- int randomHat3 = random.Next(listBox3.Items.Count);
- listBox3.SelectedItem = listBox1.Items[randomHat3];
- GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ void Button41Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ Random random = new Random();
+ int randomHat1 = random.Next(listBox1.Items.Count);
+ listBox1.SelectedItem = listBox1.Items[randomHat1];
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
+ int randomHat2 = random.Next(listBox2.Items.Count);
+ listBox2.SelectedItem = listBox1.Items[randomHat2];
+
+ int randomHat3 = random.Next(listBox3.Items.Count);
+ listBox3.SelectedItem = listBox1.Items[randomHat3];
}
- }
-
- void Button42Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- listBox1.SelectedItem = "NoHat.rbxm";
- GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
- listBox2.SelectedItem = "NoHat.rbxm";
- GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- listBox3.SelectedItem = "NoHat.rbxm";
- GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ void Button42Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ listBox1.SelectedItem = "NoHat.rbxm";
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
+ listBox2.SelectedItem = "NoHat.rbxm";
+
+ listBox3.SelectedItem = "NoHat.rbxm";
}
- }
-
- //faces
-
- void ListBox4SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.facedir))
- {
- GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + "\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
+ //faces
+
+ void ListBox4SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.facedir))
+ {
+ GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Face,
+ GlobalPaths.facedir,
+ "DefaultFace",
+ pictureBox4,
+ textBox6,
+ listBox4,
+ false
+ );
}
- }
-
- void Button45Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.facedir))
- {
- Random random = new Random();
- int randomFace1 = random.Next(listBox4.Items.Count);
- listBox4.SelectedItem = listBox4.Items[randomFace1];
- GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + "\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
- }
- }
-
- void Button44Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.facedir))
- {
- listBox4.SelectedItem = "DefaultFace.rbxm";
- GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + "\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
-
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
+ void Button45Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.facedir))
+ {
+ Random random = new Random();
+ int randomFace1 = random.Next(listBox4.Items.Count);
+ listBox4.SelectedItem = listBox4.Items[randomFace1];
}
- }
-
- //t-shirt
-
- void ListBox5SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
+ }
+
+ void Button44Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.facedir))
+ {
+ listBox4.SelectedItem = "DefaultFace.rbxm";
+ }
+ }
+
+ //t-shirt
+
+ void ListBox5SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.tshirtdir))
+ {
string previtem = listBox5.SelectedItem.ToString();
- textBox11.Text = "";
- comboBox2.SelectedItem = "Roblox";
+ if (!TShirtsIDBox.Focused && !TShirtsTypeBox.Focused)
+ {
+ TShirtsIDBox.Text = "";
+ TShirtsTypeBox.SelectedItem = "Roblox";
+ }
listBox5.SelectedItem = previtem;
- GlobalVars.UserCustomization.TShirt = listBox5.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + "\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
+ GlobalVars.UserCustomization.TShirt = previtem;
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ false
+ );
}
- }
-
- void Button47Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
- textBox11.Text = "";
- comboBox2.SelectedItem = "Roblox";
+ }
+
+ void Button47Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.tshirtdir))
+ {
+ TShirtsIDBox.Text = "";
+ TShirtsTypeBox.SelectedItem = "Roblox";
Random random = new Random();
- int randomTShirt1 = random.Next(listBox5.Items.Count);
- listBox5.SelectedItem = listBox5.Items[randomTShirt1];
- GlobalVars.UserCustomization.TShirt = listBox5.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + "\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
-
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
+ int randomTShirt1 = random.Next(listBox5.Items.Count);
+ listBox5.SelectedItem = listBox5.Items[randomTShirt1];
}
- }
-
- void Button46Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
- textBox11.Text = "";
- comboBox2.SelectedItem = "Roblox";
+ }
+
+ void Button46Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.tshirtdir))
+ {
+ TShirtsIDBox.Text = "";
+ TShirtsTypeBox.SelectedItem = "Roblox";
listBox5.SelectedItem = "NoTShirt.rbxm";
- GlobalVars.UserCustomization.TShirt = listBox5.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + "\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
-
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
}
- }
-
- //shirt
-
- void ListBox6SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
+ }
+
+ //shirt
+
+ void ListBox6SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.shirtdir))
+ {
string previtem = listBox6.SelectedItem.ToString();
- textBox12.Text = "";
- comboBox1.SelectedItem = "Roblox";
+ if (!ShirtsIDBox.Focused && !ShirtsTypeBox.Focused)
+ {
+ ShirtsIDBox.Text = "";
+ ShirtsTypeBox.SelectedItem = "Roblox";
+ }
listBox6.SelectedItem = previtem;
- GlobalVars.UserCustomization.Shirt = listBox6.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + "\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
+ GlobalVars.UserCustomization.Shirt = previtem;
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ false
+ );
}
- }
-
- void Button49Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
- textBox12.Text = "";
- comboBox1.SelectedItem = "Roblox";
+ }
+
+ void Button49Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.shirtdir))
+ {
+ ShirtsIDBox.Text = "";
+ ShirtsTypeBox.SelectedItem = "Roblox";
Random random = new Random();
- int randomShirt1 = random.Next(listBox6.Items.Count);
- listBox6.SelectedItem = listBox6.Items[randomShirt1];
- GlobalVars.UserCustomization.Shirt = listBox6.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + "\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
-
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
+ int randomShirt1 = random.Next(listBox6.Items.Count);
+ listBox6.SelectedItem = listBox6.Items[randomShirt1];
}
- }
-
- void Button48Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
- textBox12.Text = "";
- comboBox1.SelectedItem = "Roblox";
+ }
+
+ void Button48Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.shirtdir))
+ {
+ ShirtsIDBox.Text = "";
+ ShirtsTypeBox.SelectedItem = "Roblox";
listBox6.SelectedItem = "NoShirt.rbxm";
- GlobalVars.UserCustomization.Shirt = listBox6.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + "\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
-
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
}
- }
-
- //pants
-
- void ListBox7SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
+ }
+
+ //pants
+
+ void ListBox7SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.pantsdir))
+ {
string previtem = listBox7.SelectedItem.ToString();
- textBox13.Text = "";
- comboBox3.SelectedItem = "Roblox";
+ if (!PantsIDBox.Focused && !PantsTypeBox.Focused)
+ {
+ PantsIDBox.Text = "";
+ PantsTypeBox.SelectedItem = "Roblox";
+ }
listBox7.SelectedItem = previtem;
- GlobalVars.UserCustomization.Pants = listBox7.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + "\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
+ GlobalVars.UserCustomization.Pants = previtem;
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ false
+ );
}
- }
-
- void Button51Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
- textBox13.Text = "";
- comboBox3.SelectedItem = "Roblox";
+ }
+
+ void Button51Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.pantsdir))
+ {
+ PantsIDBox.Text = "";
+ PantsTypeBox.SelectedItem = "Roblox";
Random random = new Random();
- int randomPants1 = random.Next(listBox7.Items.Count);
- listBox7.SelectedItem = listBox7.Items[randomPants1];
- GlobalVars.UserCustomization.Pants = listBox7.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + "\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
-
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
+ int randomPants1 = random.Next(listBox7.Items.Count);
+ listBox7.SelectedItem = listBox7.Items[randomPants1];
}
- }
-
- void Button50Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
- textBox13.Text = "";
- comboBox3.SelectedItem = "Roblox";
+ }
+
+ void Button50Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.pantsdir))
+ {
+ PantsIDBox.Text = "";
+ PantsTypeBox.SelectedItem = "Roblox";
listBox7.SelectedItem = "NoPants.rbxm";
- GlobalVars.UserCustomization.Pants = listBox7.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + "\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
-
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
}
- }
-
- //head
-
- void ListBox8SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.headdir))
- {
- GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + "\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
- }
- }
-
- void Button57Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.headdir))
- {
- Random random = new Random();
- int randomHead1 = random.Next(listBox8.Items.Count);
- listBox8.SelectedItem = listBox8.Items[randomHead1];
- GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + "\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
+ //head
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
- }
- }
-
- void Button56Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.headdir))
- {
- listBox8.SelectedItem = "DefaultHead.rbxm";
- GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + "\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
+ void ListBox8SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.headdir))
+ {
+ GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Head,
+ GlobalPaths.headdir,
+ "DefaultHead",
+ pictureBox8,
+ textBox5,
+ listBox8,
+ false
+ );
}
- }
-
- //body
-
- void Button1Click(object sender, EventArgs e)
+ }
+
+ void Button57Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.headdir))
+ {
+ Random random = new Random();
+ int randomHead1 = random.Next(listBox8.Items.Count);
+ listBox8.SelectedItem = listBox8.Items[randomHead1];
+ }
+ }
+
+ void Button56Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.headdir))
+ {
+ listBox8.SelectedItem = "DefaultHead.rbxm";
+ }
+ }
+
+ //body
+
+ void Button1Click(object sender, EventArgs e)
{
SelectedPart = "Head";
label2.Text = SelectedPart;
@@ -1482,216 +1132,86 @@ namespace NovetusLauncher
{
GlobalVars.UserCustomization.CharacterID = textBox1.Text;
}
-
- //extra
- void ListBox9SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.extradir))
- {
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
+ //extra
+
+ void ListBox9SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.extradir))
+ {
+ GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.extradir,
+ "NoExtra",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ false
+ );
+
+ if (GlobalVars.UserCustomization.ShowHatsInExtra)
{
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- }
- }
-
- void Button59Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.extradir))
- {
- Random random = new Random();
- int randomItem1 = random.Next(listBox9.Items.Count);
- listBox9.SelectedItem = listBox9.Items[randomItem1];
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ false,
+ GlobalVars.UserCustomization.ShowHatsInExtra
+ );
}
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- }
- }
-
- void Button58Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.extradir))
- {
- listBox9.SelectedItem = "NoExtra.rbxm";
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- }
- }
+ }
+ }
+
+ void Button59Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.extradir))
+ {
+ Random random = new Random();
+ int randomItem1 = random.Next(listBox9.Items.Count);
+ listBox9.SelectedItem = listBox9.Items[randomItem1];
+ }
+ }
+
+ void Button58Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.extradir))
+ {
+ listBox9.SelectedItem = "NoExtra.rbxm";
+ }
+ }
void CheckBox1CheckedChanged(object sender, EventArgs e)
{
- switch (checkBox1.Checked)
+ GlobalVars.UserCustomization.ShowHatsInExtra = checkBox1.Checked;
+ listBox9.Items.Clear();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.extradir,
+ "NoExtra",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true
+ );
+
+ if (GlobalVars.UserCustomization.ShowHatsInExtra)
{
- case true:
- GlobalVars.UserCustomization.ShowHatsInExtra = true;
-
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
-
- if (file.Name.Equals("NoHat.rbxm"))
- {
- continue;
- }
-
- listBox9.Items.Add(file.Name);
- }
- }
- break;
- case false:
- GlobalVars.UserCustomization.ShowHatsInExtra = false;
- listBox9.Items.Clear();
-
- if (Directory.Exists(GlobalPaths.extradir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.extradir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
-
- listBox9.Items.Add(file.Name);
- }
- }
-
- listBox9.SelectedItem = "NoExtra.rbxm";
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- break;
- default:
- break;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true,
+ GlobalVars.UserCustomization.ShowHatsInExtra
+ );
}
}
@@ -1711,16 +1231,8 @@ namespace NovetusLauncher
MessageBox.Show(icon.getInstallOutcome());
}
- try
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png");
- pictureBox10.Image = icon1;
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\NoExtra.png");
- pictureBox10.Image = icon1;
- }
+ Image icon1 = CustomizationFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png", GlobalPaths.extradir + "\\NoExtra.png");
+ pictureBox10.Image = icon1;
}
public void ApplyPreset(int head, int torso, int larm, int rarm, int lleg, int rleg)
@@ -1839,45 +1351,66 @@ namespace NovetusLauncher
tabControl2.SelectedTab = tabPage12;
}
- private void textBox11_TextChanged(object sender, EventArgs e)
+ private void ShirtsIDBox_TextChanged(object sender, EventArgs e)
{
- listBox5.SelectedItem = "NoTShirt.rbxm";
- GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + textBox11.Text;
- }
-
- private void textBox12_TextChanged(object sender, EventArgs e)
- {
- listBox6.SelectedItem = "NoShirt.rbxm";
- GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + textBox12.Text;
- }
-
- private void textBox13_TextChanged(object sender, EventArgs e)
- {
- listBox7.SelectedItem = "NoPants.rbxm";
- GlobalVars.UserCustomization.Pants = Custom_Pants_URL + textBox13.Text;
- }
-
- private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
- {
- switch (comboBox2.SelectedIndex)
+ if (!string.IsNullOrWhiteSpace(ShirtsIDBox.Text))
{
- case 1:
- Custom_T_Shirt_URL = "http://finobe.com/asset/?id=";
- break;
- default:
- Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id=";
- break;
- }
-
- if (!string.IsNullOrWhiteSpace(textBox11.Text))
- {
- GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + textBox11.Text;
+ listBox6.SelectedItem = "NoShirt.rbxm";
+ GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + ShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ false
+ );
+ ShirtsIDBox.Focus();
}
}
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
+ private void TShirtsIDBox_TextChanged(object sender, EventArgs e)
{
- switch (comboBox1.SelectedIndex)
+ if (!string.IsNullOrWhiteSpace(TShirtsIDBox.Text))
+ {
+ listBox5.SelectedItem = "NoTShirt.rbxm";
+ GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + TShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ false
+ );
+ TShirtsIDBox.Focus();
+ }
+ }
+
+ private void PantsIDBox_TextChanged(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrWhiteSpace(PantsIDBox.Text))
+ {
+ listBox7.SelectedItem = "NoPants.rbxm";
+ GlobalVars.UserCustomization.Pants = Custom_Pants_URL + PantsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ false
+ );
+ PantsIDBox.Focus();
+ }
+ }
+
+ private void ShirtsTypeBox_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ switch (ShirtsTypeBox.SelectedIndex)
{
case 1:
Custom_Shirt_URL = "http://finobe.com/asset/?id=";
@@ -1887,15 +1420,24 @@ namespace NovetusLauncher
break;
}
- if (!string.IsNullOrWhiteSpace(textBox12.Text))
+ if (!string.IsNullOrWhiteSpace(ShirtsIDBox.Text))
{
- GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + textBox12.Text;
+ GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + ShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ false
+ );
}
}
- private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
+ private void PantsTypeBox_SelectedIndexChanged(object sender, EventArgs e)
{
- switch (comboBox3.SelectedIndex)
+ switch (PantsTypeBox.SelectedIndex)
{
case 1:
Custom_Pants_URL = "http://finobe.com/asset/?id=";
@@ -1905,9 +1447,45 @@ namespace NovetusLauncher
break;
}
- if (!string.IsNullOrWhiteSpace(textBox13.Text))
+ if (!string.IsNullOrWhiteSpace(PantsIDBox.Text))
{
- GlobalVars.UserCustomization.Pants = Custom_Pants_URL + textBox13.Text;
+ GlobalVars.UserCustomization.Pants = Custom_Pants_URL + PantsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ false
+ );
+ }
+ }
+
+ private void TShirtsTypeBox_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ switch (TShirtsTypeBox.SelectedIndex)
+ {
+ case 1:
+ Custom_T_Shirt_URL = "http://finobe.com/asset/?id=";
+ break;
+ default:
+ Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id=";
+ break;
+ }
+
+ if (!string.IsNullOrWhiteSpace(TShirtsIDBox.Text))
+ {
+ GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + TShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ false
+ );
}
}
}
diff --git a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.Designer.cs b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.Designer.cs
index 2b165f0..9ad6a9b 100644
--- a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.Designer.cs
+++ b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.Designer.cs
@@ -140,24 +140,27 @@ namespace NovetusLauncher
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.listBox4 = new System.Windows.Forms.ListBox();
this.tabPage4 = new System.Windows.Forms.TabPage();
+ this.TShirtsTypeBox = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
- this.textBox12 = new System.Windows.Forms.TextBox();
+ this.TShirtsIDBox = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.button46 = new System.Windows.Forms.Button();
this.button47 = new System.Windows.Forms.Button();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.listBox5 = new System.Windows.Forms.ListBox();
this.tabPage5 = new System.Windows.Forms.TabPage();
+ this.ShirtsTypeBox = new System.Windows.Forms.ComboBox();
this.label14 = new System.Windows.Forms.Label();
- this.textBox11 = new System.Windows.Forms.TextBox();
+ this.ShirtsIDBox = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.button48 = new System.Windows.Forms.Button();
this.button49 = new System.Windows.Forms.Button();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.listBox6 = new System.Windows.Forms.ListBox();
this.tabPage6 = new System.Windows.Forms.TabPage();
+ this.PantsTypeBox = new System.Windows.Forms.ComboBox();
this.label15 = new System.Windows.Forms.Label();
- this.textBox13 = new System.Windows.Forms.TextBox();
+ this.PantsIDBox = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.button50 = new System.Windows.Forms.Button();
this.button51 = new System.Windows.Forms.Button();
@@ -190,9 +193,6 @@ namespace NovetusLauncher
this.button82 = new System.Windows.Forms.Button();
this.button42 = new System.Windows.Forms.Button();
this.button81 = new System.Windows.Forms.Button();
- this.comboBox1 = new System.Windows.Forms.ComboBox();
- this.comboBox2 = new System.Windows.Forms.ComboBox();
- this.comboBox3 = new System.Windows.Forms.ComboBox();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.tabControl1.SuspendLayout();
@@ -1357,9 +1357,9 @@ namespace NovetusLauncher
//
// tabPage4
//
- this.tabPage4.Controls.Add(this.comboBox3);
+ this.tabPage4.Controls.Add(this.TShirtsTypeBox);
this.tabPage4.Controls.Add(this.label13);
- this.tabPage4.Controls.Add(this.textBox12);
+ this.tabPage4.Controls.Add(this.TShirtsIDBox);
this.tabPage4.Controls.Add(this.textBox7);
this.tabPage4.Controls.Add(this.button46);
this.tabPage4.Controls.Add(this.button47);
@@ -1372,6 +1372,19 @@ namespace NovetusLauncher
this.tabPage4.Text = "T-SHIRTS";
this.tabPage4.UseVisualStyleBackColor = true;
//
+ // TShirtsTypeBox
+ //
+ this.TShirtsTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.TShirtsTypeBox.FormattingEnabled = true;
+ this.TShirtsTypeBox.Items.AddRange(new object[] {
+ "Roblox",
+ "Finobe"});
+ this.TShirtsTypeBox.Location = new System.Drawing.Point(3, 221);
+ this.TShirtsTypeBox.Name = "TShirtsTypeBox";
+ this.TShirtsTypeBox.Size = new System.Drawing.Size(253, 21);
+ this.TShirtsTypeBox.TabIndex = 78;
+ this.TShirtsTypeBox.SelectedIndexChanged += new System.EventHandler(this.TShirtsTypeBox_SelectedIndexChanged);
+ //
// label13
//
this.label13.AutoSize = true;
@@ -1381,13 +1394,13 @@ namespace NovetusLauncher
this.label13.TabIndex = 74;
this.label13.Text = "Custom T-Shirt ID";
//
- // textBox12
+ // TShirtsIDBox
//
- this.textBox12.Location = new System.Drawing.Point(3, 195);
- this.textBox12.Name = "textBox12";
- this.textBox12.Size = new System.Drawing.Size(100, 20);
- this.textBox12.TabIndex = 73;
- this.textBox12.TextChanged += new System.EventHandler(this.textBox12_TextChanged);
+ this.TShirtsIDBox.Location = new System.Drawing.Point(3, 195);
+ this.TShirtsIDBox.Name = "TShirtsIDBox";
+ this.TShirtsIDBox.Size = new System.Drawing.Size(100, 20);
+ this.TShirtsIDBox.TabIndex = 73;
+ this.TShirtsIDBox.TextChanged += new System.EventHandler(this.TShirtsIDBox_TextChanged);
//
// textBox7
//
@@ -1440,9 +1453,9 @@ namespace NovetusLauncher
//
// tabPage5
//
- this.tabPage5.Controls.Add(this.comboBox2);
+ this.tabPage5.Controls.Add(this.ShirtsTypeBox);
this.tabPage5.Controls.Add(this.label14);
- this.tabPage5.Controls.Add(this.textBox11);
+ this.tabPage5.Controls.Add(this.ShirtsIDBox);
this.tabPage5.Controls.Add(this.textBox8);
this.tabPage5.Controls.Add(this.button48);
this.tabPage5.Controls.Add(this.button49);
@@ -1455,6 +1468,19 @@ namespace NovetusLauncher
this.tabPage5.Text = "SHIRTS";
this.tabPage5.UseVisualStyleBackColor = true;
//
+ // ShirtsTypeBox
+ //
+ this.ShirtsTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.ShirtsTypeBox.FormattingEnabled = true;
+ this.ShirtsTypeBox.Items.AddRange(new object[] {
+ "Roblox",
+ "Finobe"});
+ this.ShirtsTypeBox.Location = new System.Drawing.Point(3, 221);
+ this.ShirtsTypeBox.Name = "ShirtsTypeBox";
+ this.ShirtsTypeBox.Size = new System.Drawing.Size(253, 21);
+ this.ShirtsTypeBox.TabIndex = 78;
+ this.ShirtsTypeBox.SelectedIndexChanged += new System.EventHandler(this.ShirtsTypeBox_SelectedIndexChanged);
+ //
// label14
//
this.label14.AutoSize = true;
@@ -1464,13 +1490,13 @@ namespace NovetusLauncher
this.label14.TabIndex = 76;
this.label14.Text = "Custom Shirt ID";
//
- // textBox11
+ // ShirtsIDBox
//
- this.textBox11.Location = new System.Drawing.Point(3, 195);
- this.textBox11.Name = "textBox11";
- this.textBox11.Size = new System.Drawing.Size(100, 20);
- this.textBox11.TabIndex = 75;
- this.textBox11.TextChanged += new System.EventHandler(this.textBox11_TextChanged);
+ this.ShirtsIDBox.Location = new System.Drawing.Point(3, 195);
+ this.ShirtsIDBox.Name = "ShirtsIDBox";
+ this.ShirtsIDBox.Size = new System.Drawing.Size(100, 20);
+ this.ShirtsIDBox.TabIndex = 75;
+ this.ShirtsIDBox.TextChanged += new System.EventHandler(this.ShirtsIDBox_TextChanged);
//
// textBox8
//
@@ -1523,9 +1549,9 @@ namespace NovetusLauncher
//
// tabPage6
//
- this.tabPage6.Controls.Add(this.comboBox1);
+ this.tabPage6.Controls.Add(this.PantsTypeBox);
this.tabPage6.Controls.Add(this.label15);
- this.tabPage6.Controls.Add(this.textBox13);
+ this.tabPage6.Controls.Add(this.PantsIDBox);
this.tabPage6.Controls.Add(this.textBox9);
this.tabPage6.Controls.Add(this.button50);
this.tabPage6.Controls.Add(this.button51);
@@ -1538,6 +1564,19 @@ namespace NovetusLauncher
this.tabPage6.Text = "PANTS";
this.tabPage6.UseVisualStyleBackColor = true;
//
+ // PantsTypeBox
+ //
+ this.PantsTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.PantsTypeBox.FormattingEnabled = true;
+ this.PantsTypeBox.Items.AddRange(new object[] {
+ "Roblox",
+ "Finobe"});
+ this.PantsTypeBox.Location = new System.Drawing.Point(3, 221);
+ this.PantsTypeBox.Name = "PantsTypeBox";
+ this.PantsTypeBox.Size = new System.Drawing.Size(253, 21);
+ this.PantsTypeBox.TabIndex = 77;
+ this.PantsTypeBox.SelectedIndexChanged += new System.EventHandler(this.PantsTypeBox_SelectedIndexChanged);
+ //
// label15
//
this.label15.AutoSize = true;
@@ -1547,13 +1586,13 @@ namespace NovetusLauncher
this.label15.TabIndex = 76;
this.label15.Text = "Custom Pants ID";
//
- // textBox13
+ // PantsIDBox
//
- this.textBox13.Location = new System.Drawing.Point(3, 195);
- this.textBox13.Name = "textBox13";
- this.textBox13.Size = new System.Drawing.Size(100, 20);
- this.textBox13.TabIndex = 75;
- this.textBox13.TextChanged += new System.EventHandler(this.textBox13_TextChanged);
+ this.PantsIDBox.Location = new System.Drawing.Point(3, 195);
+ this.PantsIDBox.Name = "PantsIDBox";
+ this.PantsIDBox.Size = new System.Drawing.Size(100, 20);
+ this.PantsIDBox.TabIndex = 75;
+ this.PantsIDBox.TextChanged += new System.EventHandler(this.PantsIDBox_TextChanged);
//
// textBox9
//
@@ -1898,49 +1937,7 @@ namespace NovetusLauncher
this.button81.UseVisualStyleBackColor = true;
this.button81.Click += new System.EventHandler(this.button81_Click);
//
- // comboBox1
- //
- this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox1.FormattingEnabled = true;
- this.comboBox1.Items.AddRange(new object[] {
- "Roblox",
- "Finobe"});
- this.comboBox1.SelectedItem = "Roblox";
- this.comboBox1.Location = new System.Drawing.Point(3, 221);
- this.comboBox1.Name = "comboBox1";
- this.comboBox1.Size = new System.Drawing.Size(194, 21);
- this.comboBox1.TabIndex = 77;
- this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
- //
- // comboBox2
- //
- this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox2.FormattingEnabled = true;
- this.comboBox2.Items.AddRange(new object[] {
- "Roblox",
- "Finobe"});
- this.comboBox2.SelectedItem = "Roblox";
- this.comboBox2.Location = new System.Drawing.Point(3, 221);
- this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(194, 21);
- this.comboBox2.TabIndex = 78;
- this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
- //
- // comboBox3
- //
- this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox3.FormattingEnabled = true;
- this.comboBox3.Items.AddRange(new object[] {
- "Roblox",
- "Finobe"});
- this.comboBox3.SelectedItem = "Roblox";
- this.comboBox3.Location = new System.Drawing.Point(3, 221);
- this.comboBox3.Name = "comboBox3";
- this.comboBox3.Size = new System.Drawing.Size(194, 21);
- this.comboBox3.TabIndex = 78;
- this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
- //
- // CharacterCustomization
+ // CharacterCustomizationExtended
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -1952,7 +1949,7 @@ namespace NovetusLauncher
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
- this.Name = "CharacterCustomization";
+ this.Name = "CharacterCustomizationExtended";
this.Text = "Avatar Customization";
this.Closing += new System.ComponentModel.CancelEventHandler(this.CharacterCustomizationClose);
this.Load += new System.EventHandler(this.CharacterCustomizationLoad);
@@ -2146,13 +2143,13 @@ namespace NovetusLauncher
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label13;
- private System.Windows.Forms.TextBox textBox12;
+ private System.Windows.Forms.TextBox TShirtsIDBox;
private System.Windows.Forms.Label label14;
- private System.Windows.Forms.TextBox textBox11;
+ private System.Windows.Forms.TextBox ShirtsIDBox;
private System.Windows.Forms.Label label15;
- private System.Windows.Forms.TextBox textBox13;
- private System.Windows.Forms.ComboBox comboBox3;
- private System.Windows.Forms.ComboBox comboBox2;
- private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.TextBox PantsIDBox;
+ private System.Windows.Forms.ComboBox TShirtsTypeBox;
+ private System.Windows.Forms.ComboBox ShirtsTypeBox;
+ private System.Windows.Forms.ComboBox PantsTypeBox;
}
}
diff --git a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.cs b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.cs
index 4897f72..1ebc9eb 100644
--- a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.cs
+++ b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.cs
@@ -141,50 +141,62 @@ namespace NovetusLauncher
//clothing
if (GlobalVars.UserCustomization.TShirt.Contains("http://"))
{
+ string TShirtWebSource = "Roblox";
+
switch (GlobalVars.UserCustomization.TShirt)
{
case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
- textBox12.Text = GlobalVars.UserCustomization.TShirt.Replace("http://finobe.com/asset/?id=", "");
- comboBox3.SelectedItem = "Finobe";
+ TShirtsIDBox.Text = GlobalVars.UserCustomization.TShirt.Replace("http://finobe.com/asset/?id=", "");
+ TShirtWebSource = "Finobe";
break;
case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
default:
- textBox12.Text = GlobalVars.UserCustomization.TShirt.Replace("http://www.roblox.com/asset/?id=", "");
- comboBox3.SelectedItem = "Roblox";
+ TShirtsIDBox.Text = GlobalVars.UserCustomization.TShirt.Replace("http://www.roblox.com/asset/?id=", "");
+ TShirtWebSource = "Roblox";
break;
}
+
+ TShirtsTypeBox.SelectedItem = TShirtWebSource;
}
if (GlobalVars.UserCustomization.Shirt.Contains("http://"))
{
+ string ShirtWebSource = "Roblox";
+
switch (GlobalVars.UserCustomization.Shirt)
{
case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
- textBox11.Text = GlobalVars.UserCustomization.Shirt.Replace("http://finobe.com/asset/?id=", "");
- comboBox2.SelectedItem = "Finobe";
+ ShirtsIDBox.Text = GlobalVars.UserCustomization.Shirt.Replace("http://finobe.com/asset/?id=", "");
+ ShirtWebSource = "Finobe";
break;
case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
default:
- textBox11.Text = GlobalVars.UserCustomization.Shirt.Replace("http://www.roblox.com/asset/?id=", "");
- comboBox2.SelectedItem = "Roblox";
+ ShirtsIDBox.Text = GlobalVars.UserCustomization.Shirt.Replace("http://www.roblox.com/asset/?id=", "");
+ ShirtWebSource = "Roblox";
break;
}
+
+ ShirtsTypeBox.SelectedItem = ShirtWebSource;
}
if (GlobalVars.UserCustomization.Pants.Contains("http://"))
{
+ string PantsWebSource = "Roblox";
+
switch (GlobalVars.UserCustomization.Pants)
{
case string finobe when finobe.Contains("http://finobe.com/asset/?id="):
- textBox13.Text = GlobalVars.UserCustomization.Pants.Replace("http://finobe.com/asset/?id=", "");
- comboBox1.SelectedItem = "Finobe";
+ PantsIDBox.Text = GlobalVars.UserCustomization.Pants.Replace("http://finobe.com/asset/?id=", "");
+ PantsWebSource = "Finobe";
break;
case string roblox when roblox.Contains("http://www.roblox.com/asset/?id="):
default:
- textBox13.Text = GlobalVars.UserCustomization.Pants.Replace("http://www.roblox.com/asset/?id=", "");
- comboBox1.SelectedItem = "Roblox";
+ PantsIDBox.Text = GlobalVars.UserCustomization.Pants.Replace("http://www.roblox.com/asset/?id=", "");
+ PantsWebSource = "Roblox";
break;
}
+
+ PantsTypeBox.SelectedItem = PantsWebSource;
}
//discord
@@ -192,9 +204,9 @@ namespace NovetusLauncher
GlobalFuncs.ReloadLoadoutValue();
}
-
- void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
- {
+
+ void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
+ {
switch (tabControl1.SelectedTab)
{
case TabPage pg1 when pg1 == tabControl1.TabPages["tabPage1"]:
@@ -221,16 +233,9 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png");
- pictureBox10.Image = icon1;
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\NoExtra.png");
- pictureBox10.Image = icon1;
- }
+ Image icon1 = CustomizationFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png", GlobalPaths.extradir + "\\NoExtra.png");
+ pictureBox10.Image = icon1;
+
break;
case TabPage pg2 when pg2 == tabControl1.TabPages["tabPage2"]:
//hats
@@ -242,60 +247,36 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat1,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox1,
+ textBox2,
+ listBox1,
+ true
+ );
- listBox1.Items.Add(file.Name);
- listBox2.Items.Add(file.Name);
- listBox3.Items.Add(file.Name);
- }
- listBox1.SelectedItem = GlobalVars.UserCustomization.Hat1;
- listBox2.SelectedItem = GlobalVars.UserCustomization.Hat2;
- listBox3.SelectedItem = GlobalVars.UserCustomization.Hat3;
- listBox1.Enabled = true;
- listBox2.Enabled = true;
- listBox3.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat2,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox2,
+ textBox3,
+ listBox2,
+ true
+ );
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat3,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox3,
+ textBox4,
+ listBox3,
+ true
+ );
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
- }
break;
case TabPage pg3 when pg3 == tabControl1.TabPages["tabPage3"]:
//faces
@@ -309,36 +290,20 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- if (Directory.Exists(GlobalPaths.facedir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.facedir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Face,
+ GlobalPaths.facedir,
+ "DefaultFace",
+ pictureBox4,
+ textBox6,
+ listBox4,
+ true
+ );
- listBox4.Items.Add(file.Name);
- }
- listBox4.SelectedItem = GlobalVars.UserCustomization.Face;
- listBox4.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
-
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
- }
break;
case TabPage pg4 when pg4 == tabControl1.TabPages["tabPage4"]:
//faces
+ panel3.Location = new Point(110, 359);
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -348,44 +313,20 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.tshirtdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ true
+ );
- listBox5.Items.Add(file.Name);
- }
- listBox5.SelectedItem = GlobalVars.UserCustomization.TShirt;
- listBox5.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
-
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
- }
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + @"\\NoTShirt.png");
- pictureBox5.Image = icon1;
- }
break;
case TabPage pg5 when pg5 == tabControl1.TabPages["tabPage5"]:
//faces
+ panel3.Location = new Point(110, 359);
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -395,44 +336,20 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.shirtdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ true
+ );
- listBox6.Items.Add(file.Name);
- }
- listBox6.SelectedItem = GlobalVars.UserCustomization.Shirt;
- listBox6.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
-
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
- }
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + @"\\NoShirt.png");
- pictureBox6.Image = icon1;
- }
break;
case TabPage pg6 when pg6 == tabControl1.TabPages["tabPage6"]:
//faces
+ panel3.Location = new Point(110, 359);
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -442,41 +359,16 @@ namespace NovetusLauncher
listBox8.Items.Clear();
listBox9.Items.Clear();
- try
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.pantsdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ true
+ );
- listBox7.Items.Add(file.Name);
- }
- listBox7.SelectedItem = GlobalVars.UserCustomization.Pants;
- listBox7.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
-
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
- }
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + @"\\NoPants.png");
- pictureBox7.Image = icon1;
- }
break;
case TabPage pg8 when pg8 == tabControl1.TabPages["tabPage8"]:
//faces
@@ -490,33 +382,16 @@ namespace NovetusLauncher
listBox7.Items.Clear();
listBox9.Items.Clear();
- if (Directory.Exists(GlobalPaths.headdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.headdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Head,
+ GlobalPaths.headdir,
+ "DefaultHead",
+ pictureBox8,
+ textBox5,
+ listBox8,
+ true
+ );
- listBox8.Items.Add(file.Name);
- }
- listBox8.SelectedItem = GlobalVars.UserCustomization.Head;
- listBox8.Enabled = true;
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
-
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
- }
break;
case TabPage pg9 when pg9 == tabControl1.TabPages["tabPage9"]:
//faces
@@ -530,77 +405,32 @@ namespace NovetusLauncher
listBox7.Items.Clear();
listBox8.Items.Clear();
- if (Directory.Exists(GlobalPaths.extradir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.extradir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
-
- listBox9.Items.Add(file.Name);
- }
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.extradir,
+ "NoExtra",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true
+ );
if (GlobalVars.UserCustomization.ShowHatsInExtra)
{
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
-
- if (file.Name.Equals("NoHat.rbxm"))
- {
- continue;
- }
-
- listBox9.Items.Add(file.Name);
- }
- }
- }
-
- listBox9.SelectedItem = GlobalVars.UserCustomization.Extra;
- listBox9.Enabled = true;
- try
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true,
+ GlobalVars.UserCustomization.ShowHatsInExtra
+ );
}
break;
default:
+ panel3.Location = new Point(110, 359);
listBox1.Items.Clear();
listBox2.Items.Clear();
listBox3.Items.Clear();
@@ -612,509 +442,324 @@ namespace NovetusLauncher
listBox9.Items.Clear();
break;
}
- }
-
- void CharacterCustomizationClose(object sender, CancelEventArgs e)
- {
+ }
+
+ void CharacterCustomizationClose(object sender, CancelEventArgs e)
+ {
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
GlobalFuncs.ReloadLoadoutValue();
- }
-
- // hats
-
- void ListBox1SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ // hats
+
+ void ListBox1SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat1,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox1,
+ textBox2,
+ listBox1,
+ false
+ );
}
}
-
- void ListBox2SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ void ListBox2SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat2,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox2,
+ textBox3,
+ listBox2,
+ false
+ );
}
- }
-
- void ListBox3SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
+ void ListBox3SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Hat3,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox3,
+ textBox4,
+ listBox3,
+ false
+ );
}
- }
-
- void Button41Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- Random random = new Random();
- int randomHat1 = random.Next(listBox1.Items.Count);
- listBox1.SelectedItem = listBox1.Items[randomHat1];
- GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
- int randomHat2 = random.Next(listBox2.Items.Count);
- listBox2.SelectedItem = listBox1.Items[randomHat2];
- GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- int randomHat3 = random.Next(listBox3.Items.Count);
- listBox3.SelectedItem = listBox1.Items[randomHat3];
- GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ void Button41Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ Random random = new Random();
+ int randomHat1 = random.Next(listBox1.Items.Count);
+ listBox1.SelectedItem = listBox1.Items[randomHat1];
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
+ int randomHat2 = random.Next(listBox2.Items.Count);
+ listBox2.SelectedItem = listBox1.Items[randomHat2];
+
+ int randomHat3 = random.Next(listBox3.Items.Count);
+ listBox3.SelectedItem = listBox1.Items[randomHat3];
}
- }
-
- void Button42Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- listBox1.SelectedItem = "NoHat.rbxm";
- GlobalVars.UserCustomization.Hat1 = listBox1.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + ".png");
- pictureBox1.Image = icon1;
- listBox2.SelectedItem = "NoHat.rbxm";
- GlobalVars.UserCustomization.Hat2 = listBox2.SelectedItem.ToString();
- Image icon2 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + ".png");
- pictureBox2.Image = icon2;
- listBox3.SelectedItem = "NoHat.rbxm";
- GlobalVars.UserCustomization.Hat3 = listBox3.SelectedItem.ToString();
- Image icon3 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + ".png");
- pictureBox3.Image = icon3;
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox2.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat1.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox2.Text = GlobalVars.UserCustomization.Hat1;
- }
+ }
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox3.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat2.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox3.Text = GlobalVars.UserCustomization.Hat2;
- }
+ void Button42Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.hatdir))
+ {
+ listBox1.SelectedItem = "NoHat.rbxm";
- if (File.Exists(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox4.Text = File.ReadAllText(GlobalPaths.hatdir + @"\\" + GlobalVars.UserCustomization.Hat3.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox4.Text = GlobalVars.UserCustomization.Hat3;
- }
+ listBox2.SelectedItem = "NoHat.rbxm";
+
+ listBox3.SelectedItem = "NoHat.rbxm";
}
- }
-
- //faces
-
- void ListBox4SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.facedir))
- {
- GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + "\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
+ //faces
+
+ void ListBox4SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.facedir))
+ {
+ GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
+
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Face,
+ GlobalPaths.facedir,
+ "DefaultFace",
+ pictureBox4,
+ textBox6,
+ listBox4,
+ false
+ );
}
- }
-
- void Button45Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.facedir))
- {
- Random random = new Random();
- int randomFace1 = random.Next(listBox4.Items.Count);
- listBox4.SelectedItem = listBox4.Items[randomFace1];
- GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + "\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
- }
- }
-
- void Button44Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.facedir))
- {
- listBox4.SelectedItem = "DefaultFace.rbxm";
- GlobalVars.UserCustomization.Face = listBox4.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.facedir + "\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + ".png");
- pictureBox4.Image = icon1;
-
- if (File.Exists(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox6.Text = File.ReadAllText(GlobalPaths.facedir + @"\\" + GlobalVars.UserCustomization.Face.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox6.Text = GlobalVars.UserCustomization.Face;
- }
+ void Button45Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.facedir))
+ {
+ Random random = new Random();
+ int randomFace1 = random.Next(listBox4.Items.Count);
+ listBox4.SelectedItem = listBox4.Items[randomFace1];
}
- }
-
- //t-shirt
-
- void ListBox5SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
+ }
+
+ void Button44Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.facedir))
+ {
+ listBox4.SelectedItem = "DefaultFace.rbxm";
+ }
+ }
+
+ //t-shirt
+
+ void ListBox5SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.tshirtdir))
+ {
string previtem = listBox5.SelectedItem.ToString();
- textBox12.Text = "";
- comboBox3.SelectedItem = "Roblox";
+ if (!TShirtsIDBox.Focused && !TShirtsTypeBox.Focused)
+ {
+ TShirtsIDBox.Text = "";
+ TShirtsTypeBox.SelectedItem = "Roblox";
+ }
listBox5.SelectedItem = previtem;
- GlobalVars.UserCustomization.TShirt = listBox5.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + "\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
+ GlobalVars.UserCustomization.TShirt = previtem;
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ false
+ );
}
- }
-
- void Button47Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
- textBox12.Text = "";
- comboBox3.SelectedItem = "Roblox";
+ }
+
+ void Button47Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.tshirtdir))
+ {
+ TShirtsIDBox.Text = "";
+ TShirtsTypeBox.SelectedItem = "Roblox";
Random random = new Random();
- int randomTShirt1 = random.Next(listBox5.Items.Count);
- listBox5.SelectedItem = listBox5.Items[randomTShirt1];
- GlobalVars.UserCustomization.TShirt = listBox5.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + "\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
-
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
+ int randomTShirt1 = random.Next(listBox5.Items.Count);
+ listBox5.SelectedItem = listBox5.Items[randomTShirt1];
}
- }
-
- void Button46Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.tshirtdir))
- {
- textBox12.Text = "";
- comboBox3.SelectedItem = "Roblox";
+ }
+
+ void Button46Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.tshirtdir))
+ {
+ TShirtsIDBox.Text = "";
+ TShirtsTypeBox.SelectedItem = "Roblox";
listBox5.SelectedItem = "NoTShirt.rbxm";
- GlobalVars.UserCustomization.TShirt = listBox5.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.tshirtdir + "\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + ".png");
- pictureBox5.Image = icon1;
-
- if (File.Exists(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox7.Text = File.ReadAllText(GlobalPaths.tshirtdir + @"\\" + GlobalVars.UserCustomization.TShirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox7.Text = GlobalVars.UserCustomization.TShirt;
- }
}
- }
-
- //shirt
-
- void ListBox6SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
+ }
+
+ //shirt
+
+ void ListBox6SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.shirtdir))
+ {
string previtem = listBox6.SelectedItem.ToString();
- textBox11.Text = "";
- comboBox2.SelectedItem = "Roblox";
+ if (!ShirtsIDBox.Focused && !ShirtsTypeBox.Focused)
+ {
+ ShirtsIDBox.Text = "";
+ ShirtsTypeBox.SelectedItem = "Roblox";
+ }
listBox6.SelectedItem = previtem;
- GlobalVars.UserCustomization.Shirt = listBox6.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + "\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
+ GlobalVars.UserCustomization.Shirt = previtem;
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ false
+ );
}
- }
-
- void Button49Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
- textBox11.Text = "";
- comboBox2.SelectedItem = "Roblox";
+ }
+
+ void Button49Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.shirtdir))
+ {
+ ShirtsIDBox.Text = "";
+ ShirtsTypeBox.SelectedItem = "Roblox";
Random random = new Random();
- int randomShirt1 = random.Next(listBox6.Items.Count);
- listBox6.SelectedItem = listBox6.Items[randomShirt1];
- GlobalVars.UserCustomization.Shirt = listBox6.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + "\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
-
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
+ int randomShirt1 = random.Next(listBox6.Items.Count);
+ listBox6.SelectedItem = listBox6.Items[randomShirt1];
}
- }
-
- void Button48Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.shirtdir))
- {
- textBox11.Text = "";
- comboBox2.SelectedItem = "Roblox";
+ }
+
+ void Button48Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.shirtdir))
+ {
+ ShirtsIDBox.Text = "";
+ ShirtsTypeBox.SelectedItem = "Roblox";
listBox6.SelectedItem = "NoShirt.rbxm";
- GlobalVars.UserCustomization.Shirt = listBox6.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.shirtdir + "\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + ".png");
- pictureBox6.Image = icon1;
-
- if (File.Exists(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox8.Text = File.ReadAllText(GlobalPaths.shirtdir + @"\\" + GlobalVars.UserCustomization.Shirt.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox8.Text = GlobalVars.UserCustomization.Shirt;
- }
}
- }
-
- //pants
-
- void ListBox7SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
+ }
+
+ //pants
+
+ void ListBox7SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.pantsdir))
+ {
string previtem = listBox7.SelectedItem.ToString();
- textBox13.Text = "";
- comboBox1.SelectedItem = "Roblox";
+ if (!PantsIDBox.Focused && !PantsTypeBox.Focused)
+ {
+ PantsIDBox.Text = "";
+ PantsTypeBox.SelectedItem = "Roblox";
+ }
listBox7.SelectedItem = previtem;
- GlobalVars.UserCustomization.Pants = listBox7.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + "\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
+ GlobalVars.UserCustomization.Pants = previtem;
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ false
+ );
}
- }
-
- void Button51Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
- textBox13.Text = "";
- comboBox1.SelectedItem = "Roblox";
+ }
+
+ void Button51Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.pantsdir))
+ {
+ PantsIDBox.Text = "";
+ PantsTypeBox.SelectedItem = "Roblox";
Random random = new Random();
- int randomPants1 = random.Next(listBox7.Items.Count);
- listBox7.SelectedItem = listBox7.Items[randomPants1];
- GlobalVars.UserCustomization.Pants = listBox7.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + "\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
-
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
+ int randomPants1 = random.Next(listBox7.Items.Count);
+ listBox7.SelectedItem = listBox7.Items[randomPants1];
}
- }
-
- void Button50Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.pantsdir))
- {
- textBox13.Text = "";
- comboBox1.SelectedItem = "Roblox";
+ }
+
+ void Button50Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.pantsdir))
+ {
+ PantsIDBox.Text = "";
+ PantsTypeBox.SelectedItem = "Roblox";
listBox7.SelectedItem = "NoPants.rbxm";
- GlobalVars.UserCustomization.Pants = listBox7.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.pantsdir + "\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + ".png");
- pictureBox7.Image = icon1;
-
- if (File.Exists(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox9.Text = File.ReadAllText(GlobalPaths.pantsdir + @"\\" + GlobalVars.UserCustomization.Pants.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox9.Text = GlobalVars.UserCustomization.Pants;
- }
}
- }
-
- //head
-
- void ListBox8SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.headdir))
- {
- GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + "\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
+ }
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
- }
- }
-
- void Button57Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.headdir))
- {
- Random random = new Random();
- int randomHead1 = random.Next(listBox8.Items.Count);
- listBox8.SelectedItem = listBox8.Items[randomHead1];
- GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + "\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
+ //head
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
- }
- }
-
- void Button56Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.headdir))
- {
- listBox8.SelectedItem = "DefaultHead.rbxm";
- GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.headdir + "\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + ".png");
- pictureBox8.Image = icon1;
+ void ListBox8SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.headdir))
+ {
+ GlobalVars.UserCustomization.Head = listBox8.SelectedItem.ToString();
- if (File.Exists(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox5.Text = File.ReadAllText(GlobalPaths.headdir + @"\\" + GlobalVars.UserCustomization.Head.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox5.Text = GlobalVars.UserCustomization.Head;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Head,
+ GlobalPaths.headdir,
+ "DefaultHead",
+ pictureBox8,
+ textBox5,
+ listBox8,
+ false
+ );
}
- }
-
- //body
-
- void Button1Click(object sender, EventArgs e)
+ }
+
+ void Button57Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.headdir))
+ {
+ Random random = new Random();
+ int randomHead1 = random.Next(listBox8.Items.Count);
+ listBox8.SelectedItem = listBox8.Items[randomHead1];
+ }
+ }
+
+ void Button56Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.headdir))
+ {
+ listBox8.SelectedItem = "DefaultHead.rbxm";
+ }
+ }
+
+ //body
+
+ void Button1Click(object sender, EventArgs e)
{
SelectedPart = "Head";
label2.Text = SelectedPart;
@@ -1491,218 +1136,88 @@ namespace NovetusLauncher
{
GlobalVars.UserCustomization.CharacterID = textBox1.Text;
}
-
- //extra
-
- void ListBox9SelectedIndexChanged(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.extradir))
- {
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- }
- }
-
- void Button59Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.extradir))
- {
- Random random = new Random();
- int randomItem1 = random.Next(listBox9.Items.Count);
- listBox9.SelectedItem = listBox9.Items[randomItem1];
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- }
- }
-
- void Button58Click(object sender, EventArgs e)
- {
- if (Directory.Exists(GlobalPaths.extradir))
- {
- listBox9.SelectedItem = "NoExtra.rbxm";
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- }
- }
-
- void CheckBox1CheckedChanged(object sender, EventArgs e)
- {
- switch (checkBox1.Checked)
+
+ //extra
+
+ void ListBox9SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.extradir))
{
- case true:
- GlobalVars.UserCustomization.ShowHatsInExtra = true;
+ GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.extradir,
+ "NoExtra",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ false
+ );
- if (file.Name.Equals("NoHat.rbxm"))
- {
- continue;
- }
+ if (GlobalVars.UserCustomization.ShowHatsInExtra)
+ {
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ false,
+ GlobalVars.UserCustomization.ShowHatsInExtra
+ );
+ }
+ }
+ }
- listBox9.Items.Add(file.Name);
- }
- }
- break;
- case false:
- GlobalVars.UserCustomization.ShowHatsInExtra = false;
- listBox9.Items.Clear();
+ void Button59Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.extradir))
+ {
+ Random random = new Random();
+ int randomItem1 = random.Next(listBox9.Items.Count);
+ listBox9.SelectedItem = listBox9.Items[randomItem1];
+ }
+ }
- if (Directory.Exists(GlobalPaths.extradir))
- {
- DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.extradir);
- FileInfo[] Files = dinfo.GetFiles("*.rbxm");
- foreach (FileInfo file in Files)
- {
- if (file.Name.Equals(String.Empty))
- {
- continue;
- }
+ void Button58Click(object sender, EventArgs e)
+ {
+ if (Directory.Exists(GlobalPaths.extradir))
+ {
+ listBox9.SelectedItem = "NoExtra.rbxm";
+ }
+ }
- listBox9.Items.Add(file.Name);
- }
- }
+ void CheckBox1CheckedChanged(object sender, EventArgs e)
+ {
+ GlobalVars.UserCustomization.ShowHatsInExtra = checkBox1.Checked;
+ listBox9.Items.Clear();
- listBox9.SelectedItem = "NoExtra.rbxm";
- try
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = false;
- if (File.Exists(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.extradir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- catch (Exception)
- {
- if (Directory.Exists(GlobalPaths.hatdir))
- {
- GlobalVars.UserCustomization.Extra = listBox9.SelectedItem.ToString();
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + ".png");
- pictureBox9.Image = icon1;
- GlobalVars.UserCustomization.ExtraSelectionIsHat = true;
- if (File.Exists(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt"))
- {
- textBox10.Text = File.ReadAllText(GlobalPaths.hatdir + "\\" + GlobalVars.UserCustomization.Extra.Replace(".rbxm", "") + "_desc.txt");
- }
- else
- {
- textBox10.Text = GlobalVars.UserCustomization.Extra;
- }
- }
- }
- break;
- default:
- break;
- }
- }
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.extradir,
+ "NoExtra",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true
+ );
+
+ if (GlobalVars.UserCustomization.ShowHatsInExtra)
+ {
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Extra,
+ GlobalPaths.hatdir,
+ "NoHat",
+ pictureBox9,
+ textBox10,
+ listBox9,
+ true,
+ GlobalVars.UserCustomization.ShowHatsInExtra
+ );
+ }
+ }
private void button60_Click(object sender, EventArgs e)
{
@@ -1720,16 +1235,8 @@ namespace NovetusLauncher
MessageBox.Show(icon.getInstallOutcome());
}
- try
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png");
- pictureBox10.Image = icon1;
- }
- catch (Exception)
- {
- Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\NoExtra.png");
- pictureBox10.Image = icon1;
- }
+ Image icon1 = CustomizationFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png", GlobalPaths.extradir + "\\NoExtra.png");
+ pictureBox10.Image = icon1;
}
public void ApplyPreset(int head, int torso, int larm, int rarm, int lleg, int rleg)
@@ -1848,27 +1355,66 @@ namespace NovetusLauncher
tabControl2.SelectedTab = tabPage12;
}
- private void textBox11_TextChanged(object sender, EventArgs e)
+ private void ShirtsIDBox_TextChanged(object sender, EventArgs e)
{
- listBox6.SelectedItem = "NoShirt.rbxm";
- GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + textBox11.Text;
+ if (!string.IsNullOrWhiteSpace(ShirtsIDBox.Text))
+ {
+ listBox6.SelectedItem = "NoShirt.rbxm";
+ GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + ShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ false
+ );
+ ShirtsIDBox.Focus();
+ }
}
- private void textBox12_TextChanged(object sender, EventArgs e)
+ private void TShirtsIDBox_TextChanged(object sender, EventArgs e)
{
- listBox5.SelectedItem = "NoTShirt.rbxm";
- GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + textBox12.Text;
+ if (!string.IsNullOrWhiteSpace(TShirtsIDBox.Text))
+ {
+ listBox5.SelectedItem = "NoTShirt.rbxm";
+ GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + TShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ false
+ );
+ TShirtsIDBox.Focus();
+ }
}
- private void textBox13_TextChanged(object sender, EventArgs e)
+ private void PantsIDBox_TextChanged(object sender, EventArgs e)
{
- listBox7.SelectedItem = "NoPants.rbxm";
- GlobalVars.UserCustomization.Pants = Custom_Pants_URL + textBox13.Text;
+ if (!string.IsNullOrWhiteSpace(PantsIDBox.Text))
+ {
+ listBox7.SelectedItem = "NoPants.rbxm";
+ GlobalVars.UserCustomization.Pants = Custom_Pants_URL + PantsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ false
+ );
+ PantsIDBox.Focus();
+ }
}
- private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
+ private void ShirtsTypeBox_SelectedIndexChanged(object sender, EventArgs e)
{
- switch (comboBox2.SelectedIndex)
+ switch (ShirtsTypeBox.SelectedIndex)
{
case 1:
Custom_Shirt_URL = "http://finobe.com/asset/?id=";
@@ -1878,15 +1424,24 @@ namespace NovetusLauncher
break;
}
- if (!string.IsNullOrWhiteSpace(textBox11.Text))
+ if (!string.IsNullOrWhiteSpace(ShirtsIDBox.Text))
{
- GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + textBox11.Text;
+ GlobalVars.UserCustomization.Shirt = Custom_Shirt_URL + ShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Shirt,
+ GlobalPaths.shirtdir,
+ "NoShirt",
+ pictureBox6,
+ textBox8,
+ listBox6,
+ false
+ );
}
}
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
+ private void PantsTypeBox_SelectedIndexChanged(object sender, EventArgs e)
{
- switch (comboBox1.SelectedIndex)
+ switch (PantsTypeBox.SelectedIndex)
{
case 1:
Custom_Pants_URL = "http://finobe.com/asset/?id=";
@@ -1896,15 +1451,24 @@ namespace NovetusLauncher
break;
}
- if (!string.IsNullOrWhiteSpace(textBox13.Text))
+ if (!string.IsNullOrWhiteSpace(PantsIDBox.Text))
{
- GlobalVars.UserCustomization.Pants = Custom_Pants_URL + textBox13.Text;
+ GlobalVars.UserCustomization.Pants = Custom_Pants_URL + PantsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.Pants,
+ GlobalPaths.pantsdir,
+ "NoPants",
+ pictureBox7,
+ textBox9,
+ listBox7,
+ false
+ );
}
}
- private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
+ private void TShirtsTypeBox_SelectedIndexChanged(object sender, EventArgs e)
{
- switch (comboBox3.SelectedIndex)
+ switch (TShirtsTypeBox.SelectedIndex)
{
case 1:
Custom_T_Shirt_URL = "http://finobe.com/asset/?id=";
@@ -1914,9 +1478,18 @@ namespace NovetusLauncher
break;
}
- if (!string.IsNullOrWhiteSpace(textBox12.Text))
+ if (!string.IsNullOrWhiteSpace(TShirtsIDBox.Text))
{
- GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + textBox12.Text;
+ GlobalVars.UserCustomization.TShirt = Custom_T_Shirt_URL + TShirtsIDBox.Text;
+ CustomizationFuncs.ChangeItem(
+ GlobalVars.UserCustomization.TShirt,
+ GlobalPaths.tshirtdir,
+ "NoTShirt",
+ pictureBox5,
+ textBox7,
+ listBox5,
+ false
+ );
}
}
}
diff --git a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.resx b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.resx
index 8a1d005..6318a19 100644
--- a/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.resx
+++ b/Novetus/NovetusLauncher/Forms/CharacterCustomization/Extended/CharacterCustomizationExtended.resx
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACe
- OAAAAk1TRnQBSQFMAgEBAwEAAXwBAAF8AQABQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ OAAAAk1TRnQBSQFMAgEBAwEAAYwBAAGMAQABQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
BAABAQIAAUADAAEBAQABCAYAAUAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
diff --git a/Novetus/NovetusLauncher/Novetus.Launcher.csproj b/Novetus/NovetusLauncher/Novetus.Launcher.csproj
index a15b8d8..4bf97e6 100644
--- a/Novetus/NovetusLauncher/Novetus.Launcher.csproj
+++ b/Novetus/NovetusLauncher/Novetus.Launcher.csproj
@@ -92,6 +92,9 @@
..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll
+
+ ..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll
+
3.5
@@ -122,6 +125,7 @@
+
diff --git a/Novetus/NovetusLauncher/packages.config b/Novetus/NovetusLauncher/packages.config
index aabae54..b7926cb 100644
--- a/Novetus/NovetusLauncher/packages.config
+++ b/Novetus/NovetusLauncher/packages.config
@@ -5,4 +5,5 @@
+
\ No newline at end of file
diff --git a/Novetus/NovetusURI/Novetus.URI.csproj b/Novetus/NovetusURI/Novetus.URI.csproj
index 500d1f8..4335c53 100644
--- a/Novetus/NovetusURI/Novetus.URI.csproj
+++ b/Novetus/NovetusURI/Novetus.URI.csproj
@@ -60,6 +60,9 @@
..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll
True
+
+ ..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll
+
diff --git a/Novetus/NovetusURI/packages.config b/Novetus/NovetusURI/packages.config
index aabae54..b7926cb 100644
--- a/Novetus/NovetusURI/packages.config
+++ b/Novetus/NovetusURI/packages.config
@@ -5,4 +5,5 @@
+
\ No newline at end of file