Fixes for stability

This commit is contained in:
Bitl 2020-07-03 12:28:24 -07:00
parent 3db81dfb32
commit cba4774347
2 changed files with 237 additions and 191 deletions

View File

@ -349,7 +349,6 @@ namespace NovetusLauncher
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage4"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage4"])//your specific tabname
{ {
//faces //faces
panel3.Location = new Point(110, 359);
listBox1.Items.Clear(); listBox1.Items.Clear();
listBox2.Items.Clear(); listBox2.Items.Clear();
listBox3.Items.Clear(); listBox3.Items.Clear();
@ -359,6 +358,8 @@ namespace NovetusLauncher
listBox8.Items.Clear(); listBox8.Items.Clear();
listBox9.Items.Clear(); listBox9.Items.Clear();
try
{
if (Directory.Exists(GlobalVars.tshirtdir)) if (Directory.Exists(GlobalVars.tshirtdir))
{ {
DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.tshirtdir); DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.tshirtdir);
@ -387,10 +388,15 @@ namespace NovetusLauncher
} }
} }
} }
catch (Exception)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.tshirtdir + @"\\NoTShirt.png");
pictureBox5.Image = icon1;
}
}
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage5"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage5"])//your specific tabname
{ {
//faces //faces
panel3.Location = new Point(110, 359);
listBox1.Items.Clear(); listBox1.Items.Clear();
listBox2.Items.Clear(); listBox2.Items.Clear();
listBox3.Items.Clear(); listBox3.Items.Clear();
@ -400,6 +406,8 @@ namespace NovetusLauncher
listBox8.Items.Clear(); listBox8.Items.Clear();
listBox9.Items.Clear(); listBox9.Items.Clear();
try
{
if (Directory.Exists(GlobalVars.shirtdir)) if (Directory.Exists(GlobalVars.shirtdir))
{ {
DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.shirtdir); DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.shirtdir);
@ -428,10 +436,15 @@ namespace NovetusLauncher
} }
} }
} }
catch (Exception)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.shirtdir + @"\\NoShirt.png");
pictureBox6.Image = icon1;
}
}
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage6"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage6"])//your specific tabname
{ {
//faces //faces
panel3.Location = new Point(110, 359);
listBox1.Items.Clear(); listBox1.Items.Clear();
listBox2.Items.Clear(); listBox2.Items.Clear();
listBox3.Items.Clear(); listBox3.Items.Clear();
@ -441,6 +454,8 @@ namespace NovetusLauncher
listBox8.Items.Clear(); listBox8.Items.Clear();
listBox9.Items.Clear(); listBox9.Items.Clear();
try
{
if (Directory.Exists(GlobalVars.pantsdir)) if (Directory.Exists(GlobalVars.pantsdir))
{ {
DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.pantsdir); DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.pantsdir);
@ -469,6 +484,12 @@ namespace NovetusLauncher
} }
} }
} }
catch (Exception)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.pantsdir + @"\\NoPants.png");
pictureBox7.Image = icon1;
}
}
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage8"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage8"])//your specific tabname
{ {
//faces //faces
@ -1868,6 +1889,8 @@ namespace NovetusLauncher
Custom_Shirt_URL = "http://www.roblox.com/asset/?id="; Custom_Shirt_URL = "http://www.roblox.com/asset/?id=";
break; break;
} }
GlobalVars.Custom_Shirt_Offline = Custom_Shirt_URL + textBox11.Text;
} }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
@ -1881,6 +1904,8 @@ namespace NovetusLauncher
Custom_Pants_URL = "http://www.roblox.com/asset/?id="; Custom_Pants_URL = "http://www.roblox.com/asset/?id=";
break; break;
} }
GlobalVars.Custom_Pants_Offline = Custom_Pants_URL + textBox13.Text;
} }
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e) private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
@ -1894,6 +1919,8 @@ namespace NovetusLauncher
Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id="; Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id=";
break; break;
} }
GlobalVars.Custom_T_Shirt_Offline = Custom_T_Shirt_URL + textBox12.Text;
} }
} }
} }

View File

@ -14,6 +14,7 @@ using System.Diagnostics;
using System.ComponentModel; using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
using NovetusFuncs; using NovetusFuncs;
using System.Linq.Expressions;
namespace NovetusLauncher namespace NovetusLauncher
{ {
@ -150,10 +151,6 @@ namespace NovetusLauncher
textBox11.Text = GlobalVars.Custom_T_Shirt_Offline.Replace("http://www.roblox.com/asset/?id=", "").Replace("http://finobe.com/asset/?id=", ""); textBox11.Text = GlobalVars.Custom_T_Shirt_Offline.Replace("http://www.roblox.com/asset/?id=", "").Replace("http://finobe.com/asset/?id=", "");
} }
else
{
comboBox2.SelectedItem = "Roblox";
}
if (GlobalVars.Custom_Shirt_Offline.Contains("http://")) if (GlobalVars.Custom_Shirt_Offline.Contains("http://"))
{ {
@ -168,10 +165,6 @@ namespace NovetusLauncher
textBox12.Text = GlobalVars.Custom_Shirt_Offline.Replace("http://www.roblox.com/asset/?id=", "").Replace("http://finobe.com/asset/?id=", ""); textBox12.Text = GlobalVars.Custom_Shirt_Offline.Replace("http://www.roblox.com/asset/?id=", "").Replace("http://finobe.com/asset/?id=", "");
} }
else
{
comboBox1.SelectedItem = "Roblox";
}
if (GlobalVars.Custom_Pants_Offline.Contains("http://")) if (GlobalVars.Custom_Pants_Offline.Contains("http://"))
{ {
@ -186,10 +179,6 @@ namespace NovetusLauncher
textBox13.Text = GlobalVars.Custom_Pants_Offline.Replace("http://www.roblox.com/asset/?id=", "").Replace("http://finobe.com/asset/?id=", ""); textBox13.Text = GlobalVars.Custom_Pants_Offline.Replace("http://www.roblox.com/asset/?id=", "").Replace("http://finobe.com/asset/?id=", "");
} }
else
{
comboBox3.SelectedItem = "Roblox";
}
//discord //discord
LauncherFuncs.UpdateRichPresence(LauncherFuncs.LauncherState.InCustomization, GlobalVars.Map); LauncherFuncs.UpdateRichPresence(LauncherFuncs.LauncherState.InCustomization, GlobalVars.Map);
@ -351,6 +340,8 @@ namespace NovetusLauncher
listBox8.Items.Clear(); listBox8.Items.Clear();
listBox9.Items.Clear(); listBox9.Items.Clear();
try
{
if (Directory.Exists(GlobalVars.tshirtdir)) if (Directory.Exists(GlobalVars.tshirtdir))
{ {
DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.tshirtdir); DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.tshirtdir);
@ -379,6 +370,12 @@ namespace NovetusLauncher
} }
} }
} }
catch (Exception)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.tshirtdir + @"\\NoTShirt.png");
pictureBox5.Image = icon1;
}
}
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage5"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage5"])//your specific tabname
{ {
//faces //faces
@ -391,6 +388,8 @@ namespace NovetusLauncher
listBox8.Items.Clear(); listBox8.Items.Clear();
listBox9.Items.Clear(); listBox9.Items.Clear();
try
{
if (Directory.Exists(GlobalVars.shirtdir)) if (Directory.Exists(GlobalVars.shirtdir))
{ {
DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.shirtdir); DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.shirtdir);
@ -419,6 +418,12 @@ namespace NovetusLauncher
} }
} }
} }
catch(Exception)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.shirtdir + @"\\NoShirt.png");
pictureBox6.Image = icon1;
}
}
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage6"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage6"])//your specific tabname
{ {
//faces //faces
@ -431,6 +436,8 @@ namespace NovetusLauncher
listBox8.Items.Clear(); listBox8.Items.Clear();
listBox9.Items.Clear(); listBox9.Items.Clear();
try
{
if (Directory.Exists(GlobalVars.pantsdir)) if (Directory.Exists(GlobalVars.pantsdir))
{ {
DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.pantsdir); DirectoryInfo dinfo = new DirectoryInfo(GlobalVars.pantsdir);
@ -458,6 +465,12 @@ namespace NovetusLauncher
textBox9.Text = GlobalVars.Custom_Pants_Offline; textBox9.Text = GlobalVars.Custom_Pants_Offline;
} }
} }
}
catch (Exception)
{
Image icon1 = LauncherFuncs.LoadImage(GlobalVars.pantsdir + @"\\NoPants.png");
pictureBox7.Image = icon1;
}
} }
else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage8"])//your specific tabname else if (tabControl1.SelectedTab == tabControl1.TabPages["tabPage8"])//your specific tabname
{ {
@ -1856,6 +1869,8 @@ namespace NovetusLauncher
Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id="; Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id=";
break; break;
} }
GlobalVars.Custom_T_Shirt_Offline = Custom_T_Shirt_URL + textBox11.Text;
} }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
@ -1869,6 +1884,8 @@ namespace NovetusLauncher
Custom_Shirt_URL = "http://www.roblox.com/asset/?id="; Custom_Shirt_URL = "http://www.roblox.com/asset/?id=";
break; break;
} }
GlobalVars.Custom_Shirt_Offline = Custom_Shirt_URL + textBox12.Text;
} }
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e) private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
@ -1882,6 +1899,8 @@ namespace NovetusLauncher
Custom_Pants_URL = "http://www.roblox.com/asset/?id="; Custom_Pants_URL = "http://www.roblox.com/asset/?id=";
break; break;
} }
GlobalVars.Custom_Pants_Offline = Custom_Pants_URL + textBox13.Text;
} }
} }
} }