partcolors enhancements
This commit is contained in:
parent
ae8bf46a44
commit
83c92a486e
|
|
@ -42,7 +42,7 @@ class CharacterCustomizationShared
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Form Event Functions
|
#region Form Event Functions
|
||||||
public async void InitForm()
|
public void InitForm()
|
||||||
{
|
{
|
||||||
if (GlobalFuncs.HasColorsChanged())
|
if (GlobalFuncs.HasColorsChanged())
|
||||||
{
|
{
|
||||||
|
|
@ -112,10 +112,7 @@ class CharacterCustomizationShared
|
||||||
}
|
}
|
||||||
|
|
||||||
int imgsize = (FormStyle == Settings.Style.Extended) ? 28 : 18;
|
int imgsize = (FormStyle == Settings.Style.Extended) ? 28 : 18;
|
||||||
string oldTitle = Parent.Text;
|
PartColorLoader.AddPartColorsToListView(GlobalVars.PartColorList, ColorView, imgsize);
|
||||||
Parent.Text = "Please Wait...";
|
|
||||||
await PartColorLoader.AddPartColorsToListView(GlobalVars.PartColorList, ColorView, imgsize);
|
|
||||||
Parent.Text = oldTitle;
|
|
||||||
|
|
||||||
//body
|
//body
|
||||||
SelectedPartLabel.Text = SelectedPart;
|
SelectedPartLabel.Text = SelectedPart;
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,12 @@ public class OnlineClothing
|
||||||
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ContentProviderXMLName))
|
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ContentProviderXMLName))
|
||||||
{
|
{
|
||||||
XmlSerializer serializer = new XmlSerializer(typeof(ContentProviders));
|
XmlSerializer serializer = new XmlSerializer(typeof(ContentProviders));
|
||||||
|
|
||||||
FileStream fs = new FileStream(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ContentProviderXMLName, FileMode.Open);
|
|
||||||
ContentProviders providers;
|
ContentProviders providers;
|
||||||
providers = (ContentProviders)serializer.Deserialize(fs);
|
|
||||||
fs.Close();
|
using (FileStream fs = new FileStream(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ContentProviderXMLName, FileMode.Open))
|
||||||
|
{
|
||||||
|
providers = (ContentProviders)serializer.Deserialize(fs);
|
||||||
|
}
|
||||||
|
|
||||||
return providers.Providers;
|
return providers.Providers;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,15 +237,15 @@ partial class CharacterCustomizationCompact
|
||||||
this.label30.Name = "label30";
|
this.label30.Name = "label30";
|
||||||
this.label30.Size = new System.Drawing.Size(271, 15);
|
this.label30.Size = new System.Drawing.Size(271, 15);
|
||||||
this.label30.TabIndex = 4;
|
this.label30.TabIndex = 4;
|
||||||
this.label30.Text = "Incompatible colors will show up as grey in-game. ";
|
this.label30.Text = "Some colors may show up as grey in-game.";
|
||||||
this.label30.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
this.label30.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||||
//
|
//
|
||||||
// listView1
|
// listView1
|
||||||
//
|
//
|
||||||
this.listView1.HideSelection = false;
|
this.listView1.HideSelection = false;
|
||||||
this.listView1.Location = new System.Drawing.Point(6, 15);
|
this.listView1.Location = new System.Drawing.Point(6, 15);
|
||||||
this.listView1.Name = "listView1";
|
|
||||||
this.listView1.MultiSelect = false;
|
this.listView1.MultiSelect = false;
|
||||||
|
this.listView1.Name = "listView1";
|
||||||
this.listView1.Size = new System.Drawing.Size(271, 115);
|
this.listView1.Size = new System.Drawing.Size(271, 115);
|
||||||
this.listView1.TabIndex = 0;
|
this.listView1.TabIndex = 0;
|
||||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ public partial class CharacterCustomizationCompact : Form
|
||||||
void CharacterCustomizationLoad(object sender, EventArgs e)
|
void CharacterCustomizationLoad(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
characterCustomizationForm.InitForm();
|
characterCustomizationForm.InitForm();
|
||||||
|
CenterToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -398,13 +398,12 @@ partial class CharacterCustomizationExtended
|
||||||
//
|
//
|
||||||
this.label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.label30.ForeColor = System.Drawing.Color.Red;
|
this.label30.ForeColor = System.Drawing.Color.Red;
|
||||||
this.label30.Location = new System.Drawing.Point(6, 156);
|
this.label30.Location = new System.Drawing.Point(6, 177);
|
||||||
this.label30.Name = "label30";
|
this.label30.Name = "label30";
|
||||||
this.label30.Size = new System.Drawing.Size(329, 36);
|
this.label30.Size = new System.Drawing.Size(329, 15);
|
||||||
this.label30.TabIndex = 5;
|
this.label30.TabIndex = 5;
|
||||||
this.label30.Text = "Some colors may be incompatible with earlier clients. Incompatible colors will sh" +
|
this.label30.Text = "Some colors may show up as grey in-game.";
|
||||||
"ow up as grey in-game. ";
|
this.label30.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||||
this.label30.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
|
||||||
//
|
//
|
||||||
// listView1
|
// listView1
|
||||||
//
|
//
|
||||||
|
|
@ -412,7 +411,7 @@ partial class CharacterCustomizationExtended
|
||||||
this.listView1.Location = new System.Drawing.Point(6, 16);
|
this.listView1.Location = new System.Drawing.Point(6, 16);
|
||||||
this.listView1.MultiSelect = false;
|
this.listView1.MultiSelect = false;
|
||||||
this.listView1.Name = "listView1";
|
this.listView1.Name = "listView1";
|
||||||
this.listView1.Size = new System.Drawing.Size(329, 137);
|
this.listView1.Size = new System.Drawing.Size(329, 161);
|
||||||
this.listView1.TabIndex = 0;
|
this.listView1.TabIndex = 0;
|
||||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||||
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
|
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ public partial class CharacterCustomizationExtended : Form
|
||||||
void CharacterCustomizationLoad(object sender, EventArgs e)
|
void CharacterCustomizationLoad(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
characterCustomizationForm.InitForm();
|
characterCustomizationForm.InitForm();
|
||||||
|
CenterToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACe
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACe
|
||||||
OAAAAk1TRnQBSQFMAgEBAwEAAYQBAQGEAQEBQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
OAAAAk1TRnQBSQFMAgEBAwEAAYwBAQGMAQEBQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
BAABAQIAAUADAAEBAQABCAYAAUAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
BAABAQIAAUADAAEBAQABCAYAAUAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ public class PartColor
|
||||||
public string ColorGroup;
|
public string ColorGroup;
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
public string ColorRawName;
|
public string ColorRawName;
|
||||||
|
[XmlIgnore]
|
||||||
|
public Bitmap ColorImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
[XmlRoot("PartColors")]
|
[XmlRoot("PartColors")]
|
||||||
|
|
@ -39,32 +41,34 @@ public class PartColorLoader
|
||||||
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName))
|
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName))
|
||||||
{
|
{
|
||||||
XmlSerializer serializer = new XmlSerializer(typeof(PartColors));
|
XmlSerializer serializer = new XmlSerializer(typeof(PartColors));
|
||||||
|
|
||||||
FileStream fs = new FileStream(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName, FileMode.Open);
|
|
||||||
PartColors colors;
|
PartColors colors;
|
||||||
colors = (PartColors)serializer.Deserialize(fs);
|
|
||||||
fs.Close();
|
|
||||||
|
|
||||||
for (int i = 0; i < colors.ColorList.Length; i++)
|
using (FileStream fs = new FileStream(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName, FileMode.Open))
|
||||||
{
|
{
|
||||||
string colorFixed = Regex.Replace(colors.ColorList[i].ColorRGB, @"[\[\]\{\}\(\)\<\> ]", "");
|
colors = (PartColors)serializer.Deserialize(fs);
|
||||||
string[] rgbValues = colorFixed.Split(',');
|
}
|
||||||
colors.ColorList[i].ColorObject = Color.FromArgb(Convert.ToInt32(rgbValues[0]), Convert.ToInt32(rgbValues[1]), Convert.ToInt32(rgbValues[2]));
|
|
||||||
|
|
||||||
if (!(colors.ColorList[i].ColorName.Contains("[") && colors.ColorList[i].ColorName.Contains("]")))
|
foreach (var item in colors.ColorList)
|
||||||
|
{
|
||||||
|
string colorFixed = Regex.Replace(item.ColorRGB, @"[\[\]\{\}\(\)\<\> ]", "");
|
||||||
|
string[] rgbValues = colorFixed.Split(',');
|
||||||
|
item.ColorObject = Color.FromArgb(Convert.ToInt32(rgbValues[0]), Convert.ToInt32(rgbValues[1]), Convert.ToInt32(rgbValues[2]));
|
||||||
|
|
||||||
|
if (!(item.ColorName.Contains("[") && item.ColorName.Contains("]")))
|
||||||
{
|
{
|
||||||
colors.ColorList[i].ColorRawName = colors.ColorList[i].ColorName;
|
item.ColorRawName = item.ColorName;
|
||||||
colors.ColorList[i].ColorName = "[Uncategorized]" + colors.ColorList[i].ColorName;
|
item.ColorName = "[Uncategorized]" + item.ColorName;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
colors.ColorList[i].ColorRawName = colors.ColorList[i].ColorName;
|
item.ColorRawName = item.ColorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pFrom = colors.ColorList[i].ColorName.IndexOf("[");
|
int pFrom = item.ColorName.IndexOf("[");
|
||||||
int pTo = colors.ColorList[i].ColorName.IndexOf("]");
|
int pTo = item.ColorName.IndexOf("]");
|
||||||
colors.ColorList[i].ColorGroup = colors.ColorList[i].ColorName.Substring(pFrom + 1, pTo - pFrom - 1);
|
item.ColorGroup = item.ColorName.Substring(pFrom + 1, pTo - pFrom - 1);
|
||||||
colors.ColorList[i].ColorName = colors.ColorList[i].ColorName.Replace(colors.ColorList[i].ColorGroup, "").Replace("[", "").Replace("]", "");
|
item.ColorName = item.ColorName.Replace(item.ColorGroup, "").Replace("[", "").Replace("]", "");
|
||||||
|
item.ColorImage = GeneratePartColorIcon(item, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors.ColorList;
|
return colors.ColorList;
|
||||||
|
|
@ -76,11 +80,7 @@ public class PartColorLoader
|
||||||
}
|
}
|
||||||
|
|
||||||
//make faster
|
//make faster
|
||||||
#if !BASICLAUNCHER
|
|
||||||
public static async Task AddPartColorsToListView(PartColor[] PartColorList, ListView ColorView, int imgsize, bool showIDs = false)
|
|
||||||
#else
|
|
||||||
public static void AddPartColorsToListView(PartColor[] PartColorList, ListView ColorView, int imgsize, bool showIDs = false)
|
public static void AddPartColorsToListView(PartColor[] PartColorList, ListView ColorView, int imgsize, bool showIDs = false)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -110,21 +110,19 @@ public class PartColorLoader
|
||||||
|
|
||||||
lvi.Group = group;
|
lvi.Group = group;
|
||||||
|
|
||||||
#if !BASICLAUNCHER
|
if (item.ColorImage != null)
|
||||||
Bitmap Bmp = await GeneratePartColorIconAsync(item, imgsize);
|
|
||||||
if (Bmp != null)
|
|
||||||
{
|
{
|
||||||
ColorImageList.Images.Add(item.ColorName, Bmp);
|
ColorImageList.Images.Add(item.ColorName, item.ColorImage);
|
||||||
lvi.ImageIndex = ColorImageList.Images.IndexOfKey(item.ColorName);
|
lvi.ImageIndex = ColorImageList.Images.IndexOfKey(item.ColorName);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
ColorView.Items.Add(lvi);
|
ColorView.Items.Add(lvi);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var group in ColorView.Groups.Cast<ListViewGroup>())
|
/*foreach (var group in ColorView.Groups.Cast<ListViewGroup>())
|
||||||
{
|
{
|
||||||
group.Header = group.Header + " (" + group.Items.Count + ")";
|
group.Header = group.Header + " (" + group.Items.Count + ")";
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
#if URI || LAUNCHER || CMD
|
#if URI || LAUNCHER || CMD
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -137,15 +135,6 @@ public class PartColorLoader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !BASICLAUNCHER
|
|
||||||
public static async Task<Bitmap> GeneratePartColorIconAsync(PartColor color, int imgsize)
|
|
||||||
{
|
|
||||||
Task<Bitmap> task = Task<Bitmap>.Factory.StartNew(() => GeneratePartColorIcon(color, imgsize));
|
|
||||||
await task;
|
|
||||||
return task.Result;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public static Bitmap GeneratePartColorIcon(PartColor color, int imgsize)
|
public static Bitmap GeneratePartColorIcon(PartColor color, int imgsize)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -269,8 +269,6 @@ public class GlobalFuncs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalVars.ColorsLoaded = InitColors();
|
|
||||||
|
|
||||||
if (!File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization))
|
if (!File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization))
|
||||||
{
|
{
|
||||||
Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, true);
|
Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, true);
|
||||||
|
|
@ -592,7 +590,7 @@ public class GlobalFuncs
|
||||||
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName))
|
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName))
|
||||||
{
|
{
|
||||||
tempList = PartColorLoader.GetPartColors();
|
tempList = PartColorLoader.GetPartColors();
|
||||||
if (tempList.Length == GlobalVars.PartColorList.Length)
|
if (tempList.Length != GlobalVars.PartColorList.Length)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -721,6 +719,40 @@ public class GlobalFuncs
|
||||||
ChangeGameSettings(ClientName);
|
ChangeGameSettings(ClientName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Modified from https://stackoverflow.com/questions/4286487/is-there-any-lorem-ipsum-generator-in-c
|
||||||
|
public static string LoremIpsum(int minWords, int maxWords,
|
||||||
|
int minSentences, int maxSentences,
|
||||||
|
int numParagraphs)
|
||||||
|
{
|
||||||
|
|
||||||
|
var words = new[]{"lorem", "ipsum", "dolor", "sit", "amet", "consectetuer",
|
||||||
|
"adipiscing", "elit", "sed", "diam", "nonummy", "nibh", "euismod",
|
||||||
|
"tincidunt", "ut", "laoreet", "dolore", "magna", "aliquam", "erat"};
|
||||||
|
|
||||||
|
var rand = new Random();
|
||||||
|
int numSentences = rand.Next(maxSentences - minSentences)
|
||||||
|
+ minSentences + 1;
|
||||||
|
int numWords = rand.Next(maxWords - minWords) + minWords + 1;
|
||||||
|
|
||||||
|
StringBuilder result = new StringBuilder();
|
||||||
|
|
||||||
|
for (int p = 0; p < numParagraphs; p++)
|
||||||
|
{
|
||||||
|
result.Append("lorem ipsum ");
|
||||||
|
for (int s = 0; s < numSentences; s++)
|
||||||
|
{
|
||||||
|
for (int w = 0; w < numWords; w++)
|
||||||
|
{
|
||||||
|
if (w > 0) { result.Append(" "); }
|
||||||
|
result.Append(words[rand.Next(words.Length)]);
|
||||||
|
}
|
||||||
|
result.Append(". ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
public static void GenerateDefaultClientInfo(string path)
|
public static void GenerateDefaultClientInfo(string path)
|
||||||
{
|
{
|
||||||
FileFormat.ClientInfo DefaultClientInfo = new FileFormat.ClientInfo();
|
FileFormat.ClientInfo DefaultClientInfo = new FileFormat.ClientInfo();
|
||||||
|
|
@ -751,7 +783,7 @@ public class GlobalFuncs
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IOException clientNotFoundEX = new IOException("Could not find client exe for MD5 generation.");
|
IOException clientNotFoundEX = new IOException("Could not find client exe for MD5 generation. It must be named either RobloxApp.exe or RobloxApp_client.exe in order to function.");
|
||||||
throw clientNotFoundEX;
|
throw clientNotFoundEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -763,12 +795,13 @@ public class GlobalFuncs
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IOException clientNotFoundEX = new IOException("Could not find script file for MD5 generation.");
|
IOException clientNotFoundEX = new IOException("Could not find script file for MD5 generation. You must have a CSMPFunctions.lua script in your client's content/scripts folder.");
|
||||||
throw clientNotFoundEX;
|
throw clientNotFoundEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
string desc = "This client information file for '" + GlobalVars.UserConfiguration.SelectedClient +
|
string desc = "This client information file for '" + GlobalVars.UserConfiguration.SelectedClient +
|
||||||
"' was pre-generated by Novetus for your convienence. You will need to load and save this clientinfo.nov file into the Client SDK.";
|
"' was pre-generated by Novetus for your convienence. You will need to load this clientinfo.nov file into the Client SDK for additional options.\n\n"
|
||||||
|
+ LoremIpsum(1, 128, 1, 6, 1);
|
||||||
|
|
||||||
DefaultClientInfo.Description = desc;
|
DefaultClientInfo.Description = desc;
|
||||||
|
|
||||||
|
|
@ -2189,6 +2222,20 @@ public class GlobalFuncs
|
||||||
#if LAUNCHER || URI
|
#if LAUNCHER || URI
|
||||||
public static void LaunchCharacterCustomization()
|
public static void LaunchCharacterCustomization()
|
||||||
{
|
{
|
||||||
|
//https://stackoverflow.com/questions/9029351/close-all-open-forms-except-the-main-menu-in-c-sharp
|
||||||
|
FormCollection fc = Application.OpenForms;
|
||||||
|
|
||||||
|
foreach (Form frm in fc)
|
||||||
|
{
|
||||||
|
//iterate through
|
||||||
|
if (frm.Name == "CharacterCustomizationExtended" ||
|
||||||
|
frm.Name == "CharacterCustomizationCompact")
|
||||||
|
{
|
||||||
|
frm.Close();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (GlobalVars.UserConfiguration.LauncherStyle)
|
switch (GlobalVars.UserConfiguration.LauncherStyle)
|
||||||
{
|
{
|
||||||
case Settings.Style.Extended:
|
case Settings.Style.Extended:
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ namespace NovetusLauncher
|
||||||
void MainFormLoad(object sender, EventArgs e)
|
void MainFormLoad(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
launcherForm.InitForm();
|
launcherForm.InitForm();
|
||||||
|
CenterToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFormClose(object sender, CancelEventArgs e)
|
void MainFormClose(object sender, CancelEventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ namespace NovetusLauncher
|
||||||
void MainFormLoad(object sender, EventArgs e)
|
void MainFormLoad(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
launcherForm.InitForm();
|
launcherForm.InitForm();
|
||||||
|
CenterToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFormClose(object sender, CancelEventArgs e)
|
void MainFormClose(object sender, CancelEventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -310,20 +310,6 @@ public partial class ItemCreationSDK : Form
|
||||||
|
|
||||||
if (LaunchCharCustom == DialogResult.Yes)
|
if (LaunchCharCustom == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
//https://stackoverflow.com/questions/9029351/close-all-open-forms-except-the-main-menu-in-c-sharp
|
|
||||||
FormCollection fc = Application.OpenForms;
|
|
||||||
|
|
||||||
foreach (Form frm in fc)
|
|
||||||
{
|
|
||||||
//iterate through
|
|
||||||
if (frm.Name == "CharacterCustomizationExtended" ||
|
|
||||||
frm.Name == "CharacterCustomizationCompact")
|
|
||||||
{
|
|
||||||
frm.Close();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GlobalFuncs.LaunchCharacterCustomization();
|
GlobalFuncs.LaunchCharacterCustomization();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -45,7 +40,7 @@ public partial class ItemCreationSDKColorMenu : Form
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void ItemCreationSDKColorMenu_Load(object sender, EventArgs e)
|
private void ItemCreationSDKColorMenu_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (GlobalFuncs.HasColorsChanged())
|
if (GlobalFuncs.HasColorsChanged())
|
||||||
{
|
{
|
||||||
|
|
@ -60,10 +55,7 @@ public partial class ItemCreationSDKColorMenu : Form
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string oldTitle = Text;
|
PartColorLoader.AddPartColorsToListView(GlobalVars.PartColorList, colorMenu, 48, true);
|
||||||
Text = "Please Wait...";
|
|
||||||
await PartColorLoader.AddPartColorsToListView(GlobalVars.PartColorList, colorMenu, 32, true);
|
|
||||||
Text = oldTitle;
|
|
||||||
CenterToScreen();
|
CenterToScreen();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName);
|
GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName);
|
||||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||||
|
GlobalVars.ColorsLoaded = GlobalFuncs.InitColors();
|
||||||
if (args.Length == 0)
|
if (args.Length == 0)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ namespace NovetusURI
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||||
|
GlobalVars.ColorsLoaded = GlobalFuncs.InitColors();
|
||||||
if (args.Length == 0)
|
if (args.Length == 0)
|
||||||
{
|
{
|
||||||
Application.Run(new InstallForm());
|
Application.Run(new InstallForm());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue