finalized 1.0 features

This commit is contained in:
Bitl 2019-10-19 09:25:45 -07:00
parent 0a97916e20
commit b1d9f2fee2
6 changed files with 98 additions and 78 deletions

View File

@ -84,4 +84,8 @@
</ItemGroup>
<Import Project="..\NovetusFuncs\NovetusFuncs.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -3,6 +3,8 @@ using System.IO;
using System.Windows.Forms;
using System.IO.Compression;
using System.Linq;
using System.Drawing;
using System.Drawing.Imaging;
public class IconLoader
{
@ -28,7 +30,18 @@ public class IconLoader
{
using (Stream str = openFileDialog1.OpenFile())
{
CopyStream(openFileDialog1.FileName, extradir + "\\icons\\" + GlobalVars.PlayerName + ".png");
using (Stream output = new FileStream(extradir + "\\icons\\" + GlobalVars.PlayerName + ".png", FileMode.Create))
{
byte[] buffer = new byte[32 * 1024];
int read;
while ((read = str.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
str.Close();
}
installOutcome = "Icon " + openFileDialog1.SafeFileName + " installed!";
@ -39,23 +52,4 @@ public class IconLoader
}
}
}
public static void CopyStream(string inputFilePath, string outputFilePath)
{
int bufferSize = 1024 * 1024;
using (FileStream fileStream = new FileStream(outputFilePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite))
//using (FileStream fs = File.Open(<file-path>, FileMode.Open, FileAccess.Read, FileShare.Read))
{
FileStream fs = new FileStream(inputFilePath, FileMode.Open, FileAccess.ReadWrite);
fileStream.SetLength(fs.Length);
int bytesRead = -1;
byte[] bytes = new byte[bufferSize];
while ((bytesRead = fs.Read(bytes, 0, bufferSize)) > 0)
{
fileStream.Write(bytes, 0, bytesRead);
}
}
}
}

View File

@ -7,6 +7,8 @@
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
public class LauncherFuncs
@ -580,4 +582,23 @@ public class LauncherFuncs
//2147483647 is max id.
GlobalVars.UserID = randomID;
}
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;
}
}

View File

@ -128,6 +128,7 @@ namespace NovetusLauncher
this.pictureBox9 = new System.Windows.Forms.PictureBox();
this.listBox9 = new System.Windows.Forms.ListBox();
this.tabPage7 = new System.Windows.Forms.TabPage();
this.button61 = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.pictureBox10 = new System.Windows.Forms.PictureBox();
this.button60 = new System.Windows.Forms.Button();
@ -142,7 +143,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.button61 = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox2.SuspendLayout();
@ -1191,6 +1191,16 @@ namespace NovetusLauncher
this.tabPage7.Text = "OTHER";
this.tabPage7.UseVisualStyleBackColor = true;
//
// button61
//
this.button61.Location = new System.Drawing.Point(368, 191);
this.button61.Name = "button61";
this.button61.Size = new System.Drawing.Size(92, 42);
this.button61.TabIndex = 13;
this.button61.Text = "Generate Charapp";
this.button61.UseVisualStyleBackColor = true;
this.button61.Click += new System.EventHandler(this.button61_Click);
//
// label8
//
this.label8.Location = new System.Drawing.Point(293, 6);
@ -1205,6 +1215,7 @@ namespace NovetusLauncher
this.pictureBox10.Location = new System.Drawing.Point(294, 37);
this.pictureBox10.Name = "pictureBox10";
this.pictureBox10.Size = new System.Drawing.Size(65, 64);
this.pictureBox10.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox10.TabIndex = 11;
this.pictureBox10.TabStop = false;
//
@ -1333,16 +1344,6 @@ namespace NovetusLauncher
this.button52.UseVisualStyleBackColor = true;
this.button52.Click += new System.EventHandler(this.Button52Click);
//
// button61
//
this.button61.Location = new System.Drawing.Point(368, 191);
this.button61.Name = "button61";
this.button61.Size = new System.Drawing.Size(92, 42);
this.button61.TabIndex = 13;
this.button61.Text = "Generate Charapp";
this.button61.UseVisualStyleBackColor = true;
this.button61.Click += new System.EventHandler(this.button61_Click);
//
// CharacterCustomization
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@ -134,12 +134,12 @@ namespace NovetusLauncher
try
{
Image icon1 = Image.FromFile(extradir + "\\icons\\" + GlobalVars.PlayerName + ".png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\icons\\" + GlobalVars.PlayerName + ".png");
pictureBox10.Image = icon1;
}
catch (Exception)
{
Image icon1 = Image.FromFile(extradir + "\\NoExtra.png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\NoExtra.png");
pictureBox10.Image = icon1;
}
}
@ -174,11 +174,11 @@ namespace NovetusLauncher
listBox1.Enabled = true;
listBox2.Enabled = true;
listBox3.Enabled = true;
Image icon1 = Image.FromFile(hatdir + @"\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + @"\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox1.Image = icon1;
Image icon2 = Image.FromFile(hatdir + @"\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
Image icon2 = LauncherFuncs.LoadImage(hatdir + @"\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox2.Image = icon2;
Image icon3 = Image.FromFile(hatdir + @"\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
Image icon3 = LauncherFuncs.LoadImage(hatdir + @"\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox3.Image = icon3;
}
}
@ -209,7 +209,7 @@ namespace NovetusLauncher
}
listBox4.SelectedItem = GlobalVars.Custom_Face_Offline;
listBox4.Enabled = true;
Image icon1 = Image.FromFile(facedir + @"\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(facedir + @"\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
pictureBox4.Image = icon1;
}
}
@ -240,7 +240,7 @@ namespace NovetusLauncher
}
listBox5.SelectedItem = GlobalVars.Custom_T_Shirt_Offline;
listBox5.Enabled = true;
Image icon1 = Image.FromFile(tshirtdir + @"\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(tshirtdir + @"\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon1;
}
}
@ -271,7 +271,7 @@ namespace NovetusLauncher
}
listBox6.SelectedItem = GlobalVars.Custom_Shirt_Offline;
listBox6.Enabled = true;
Image icon1 = Image.FromFile(shirtdir + @"\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(shirtdir + @"\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox6.Image = icon1;
}
}
@ -302,7 +302,7 @@ namespace NovetusLauncher
}
listBox7.SelectedItem = GlobalVars.Custom_Pants_Offline;
listBox7.Enabled = true;
Image icon1 = Image.FromFile(pantsdir + @"\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(pantsdir + @"\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
pictureBox7.Image = icon1;
}
}
@ -333,7 +333,7 @@ namespace NovetusLauncher
}
listBox8.SelectedItem = GlobalVars.Custom_Head_Offline;
listBox8.Enabled = true;
Image icon1 = Image.FromFile(headdir + @"\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(headdir + @"\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
pictureBox8.Image = icon1;
}
}
@ -391,14 +391,14 @@ namespace NovetusLauncher
listBox9.Enabled = true;
try
{
Image icon1 = Image.FromFile(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
}
catch(Exception)
{
if (Directory.Exists(hatdir))
{
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
}
}
@ -422,7 +422,7 @@ namespace NovetusLauncher
if (Directory.Exists(hatdir))
{
GlobalVars.Custom_Hat1ID_Offline = listBox1.SelectedItem.ToString();
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox1.Image = icon1;
}
}
@ -432,7 +432,7 @@ namespace NovetusLauncher
if (Directory.Exists(hatdir))
{
GlobalVars.Custom_Hat2ID_Offline = listBox2.SelectedItem.ToString();
Image icon2 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
Image icon2 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox2.Image = icon2;
}
}
@ -442,7 +442,7 @@ namespace NovetusLauncher
if (Directory.Exists(hatdir))
{
GlobalVars.Custom_Hat3ID_Offline = listBox3.SelectedItem.ToString();
Image icon3 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
Image icon3 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox3.Image = icon3;
}
}
@ -455,17 +455,17 @@ namespace NovetusLauncher
int randomHat1 = random.Next(listBox1.Items.Count);
listBox1.SelectedItem = listBox1.Items[randomHat1];
GlobalVars.Custom_Hat1ID_Offline = listBox1.SelectedItem.ToString();
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox1.Image = icon1;
int randomHat2 = random.Next(listBox2.Items.Count);
listBox2.SelectedItem = listBox1.Items[randomHat2];
GlobalVars.Custom_Hat2ID_Offline = listBox2.SelectedItem.ToString();
Image icon2 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
Image icon2 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox2.Image = icon2;
int randomHat3 = random.Next(listBox3.Items.Count);
listBox3.SelectedItem = listBox1.Items[randomHat3];
GlobalVars.Custom_Hat3ID_Offline = listBox3.SelectedItem.ToString();
Image icon3 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
Image icon3 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox3.Image = icon3;
}
}
@ -476,15 +476,15 @@ namespace NovetusLauncher
{
listBox1.SelectedItem = "NoHat.rbxm";
GlobalVars.Custom_Hat1ID_Offline = listBox1.SelectedItem.ToString();
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat1ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox1.Image = icon1;
listBox2.SelectedItem = "NoHat.rbxm";
GlobalVars.Custom_Hat2ID_Offline = listBox2.SelectedItem.ToString();
Image icon2 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
Image icon2 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat2ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox2.Image = icon2;
listBox3.SelectedItem = "NoHat.rbxm";
GlobalVars.Custom_Hat3ID_Offline = listBox3.SelectedItem.ToString();
Image icon3 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
Image icon3 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Hat3ID_Offline.Replace(".rbxm", "") + ".png");
pictureBox3.Image = icon3;
}
}
@ -496,7 +496,7 @@ namespace NovetusLauncher
if (Directory.Exists(facedir))
{
GlobalVars.Custom_Face_Offline = listBox4.SelectedItem.ToString();
Image icon1 = Image.FromFile(facedir + "\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(facedir + "\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
pictureBox4.Image = icon1;
}
}
@ -509,7 +509,7 @@ namespace NovetusLauncher
int randomFace1 = random.Next(listBox4.Items.Count);
listBox4.SelectedItem = listBox4.Items[randomFace1];
GlobalVars.Custom_Face_Offline = listBox4.SelectedItem.ToString();
Image icon1 = Image.FromFile(facedir + "\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(facedir + "\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
pictureBox4.Image = icon1;
}
}
@ -520,7 +520,7 @@ namespace NovetusLauncher
{
listBox4.SelectedItem = "DefaultFace.rbxm";
GlobalVars.Custom_Face_Offline = listBox4.SelectedItem.ToString();
Image icon1 = Image.FromFile(facedir + "\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(facedir + "\\" + GlobalVars.Custom_Face_Offline.Replace(".rbxm", "") + ".png");
pictureBox4.Image = icon1;
}
}
@ -532,7 +532,7 @@ namespace NovetusLauncher
if (Directory.Exists(tshirtdir))
{
GlobalVars.Custom_T_Shirt_Offline = listBox5.SelectedItem.ToString();
Image icon1 = Image.FromFile(tshirtdir + "\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(tshirtdir + "\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon1;
}
}
@ -545,7 +545,7 @@ namespace NovetusLauncher
int randomTShirt1 = random.Next(listBox5.Items.Count);
listBox5.SelectedItem = listBox5.Items[randomTShirt1];
GlobalVars.Custom_T_Shirt_Offline = listBox5.SelectedItem.ToString();
Image icon1 = Image.FromFile(tshirtdir + "\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(tshirtdir + "\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon1;
}
}
@ -556,7 +556,7 @@ namespace NovetusLauncher
{
listBox5.SelectedItem = "NoTShirt.rbxm";
GlobalVars.Custom_T_Shirt_Offline = listBox5.SelectedItem.ToString();
Image icon1 = Image.FromFile(tshirtdir + "\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(tshirtdir + "\\" + GlobalVars.Custom_T_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox5.Image = icon1;
}
}
@ -568,7 +568,7 @@ namespace NovetusLauncher
if (Directory.Exists(shirtdir))
{
GlobalVars.Custom_Shirt_Offline = listBox6.SelectedItem.ToString();
Image icon1 = Image.FromFile(shirtdir + "\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(shirtdir + "\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox6.Image = icon1;
}
}
@ -581,7 +581,7 @@ namespace NovetusLauncher
int randomShirt1 = random.Next(listBox6.Items.Count);
listBox6.SelectedItem = listBox6.Items[randomShirt1];
GlobalVars.Custom_Shirt_Offline = listBox6.SelectedItem.ToString();
Image icon1 = Image.FromFile(shirtdir + "\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(shirtdir + "\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox6.Image = icon1;
}
}
@ -592,7 +592,7 @@ namespace NovetusLauncher
{
listBox6.SelectedItem = "NoShirt.rbxm";
GlobalVars.Custom_Shirt_Offline = listBox6.SelectedItem.ToString();
Image icon1 = Image.FromFile(shirtdir + "\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(shirtdir + "\\" + GlobalVars.Custom_Shirt_Offline.Replace(".rbxm", "") + ".png");
pictureBox6.Image = icon1;
}
}
@ -604,7 +604,7 @@ namespace NovetusLauncher
if (Directory.Exists(pantsdir))
{
GlobalVars.Custom_Pants_Offline = listBox7.SelectedItem.ToString();
Image icon1 = Image.FromFile(pantsdir + "\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(pantsdir + "\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
pictureBox7.Image = icon1;
}
}
@ -617,7 +617,7 @@ namespace NovetusLauncher
int randomPants1 = random.Next(listBox7.Items.Count);
listBox7.SelectedItem = listBox7.Items[randomPants1];
GlobalVars.Custom_Pants_Offline = listBox7.SelectedItem.ToString();
Image icon1 = Image.FromFile(pantsdir + "\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(pantsdir + "\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
pictureBox7.Image = icon1;
}
}
@ -628,7 +628,7 @@ namespace NovetusLauncher
{
listBox7.SelectedItem = "NoPants.rbxm";
GlobalVars.Custom_Pants_Offline = listBox7.SelectedItem.ToString();
Image icon1 = Image.FromFile(pantsdir + "\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(pantsdir + "\\" + GlobalVars.Custom_Pants_Offline.Replace(".rbxm", "") + ".png");
pictureBox7.Image = icon1;
}
}
@ -640,7 +640,7 @@ namespace NovetusLauncher
if (Directory.Exists(headdir))
{
GlobalVars.Custom_Head_Offline = listBox8.SelectedItem.ToString();
Image icon1 = Image.FromFile(headdir + "\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(headdir + "\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
pictureBox8.Image = icon1;
}
}
@ -653,7 +653,7 @@ namespace NovetusLauncher
int randomHead1 = random.Next(listBox8.Items.Count);
listBox8.SelectedItem = listBox8.Items[randomHead1];
GlobalVars.Custom_Head_Offline = listBox8.SelectedItem.ToString();
Image icon1 = Image.FromFile(headdir + "\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(headdir + "\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
pictureBox8.Image = icon1;
}
}
@ -664,7 +664,7 @@ namespace NovetusLauncher
{
listBox8.SelectedItem = "DefaultHead.rbxm";
GlobalVars.Custom_Head_Offline = listBox8.SelectedItem.ToString();
Image icon1 = Image.FromFile(headdir + "\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(headdir + "\\" + GlobalVars.Custom_Head_Offline.Replace(".rbxm", "") + ".png");
pictureBox8.Image = icon1;
}
}
@ -1115,7 +1115,7 @@ namespace NovetusLauncher
try
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
@ -1124,7 +1124,7 @@ namespace NovetusLauncher
if (Directory.Exists(hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = true;
}
@ -1142,7 +1142,7 @@ namespace NovetusLauncher
try
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
@ -1151,7 +1151,7 @@ namespace NovetusLauncher
if (Directory.Exists(hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = true;
}
@ -1167,7 +1167,7 @@ namespace NovetusLauncher
try
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
@ -1176,7 +1176,7 @@ namespace NovetusLauncher
if (Directory.Exists(hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = true;
}
@ -1234,7 +1234,7 @@ namespace NovetusLauncher
try
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = false;
}
@ -1243,7 +1243,7 @@ namespace NovetusLauncher
if (Directory.Exists(hatdir))
{
GlobalVars.Custom_Extra = listBox9.SelectedItem.ToString();
Image icon1 = Image.FromFile(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
Image icon1 = LauncherFuncs.LoadImage(hatdir + "\\" + GlobalVars.Custom_Extra.Replace(".rbxm", "") + ".png");
pictureBox9.Image = icon1;
GlobalVars.Custom_Extra_SelectionIsHat = true;
}
@ -1269,12 +1269,12 @@ namespace NovetusLauncher
try
{
Image icon1 = Image.FromFile(extradir + "\\icons\\" + GlobalVars.PlayerName + ".png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\icons\\" + GlobalVars.PlayerName + ".png");
pictureBox10.Image = icon1;
}
catch (Exception)
{
Image icon1 = Image.FromFile(extradir + "\\NoExtra.png");
Image icon1 = LauncherFuncs.LoadImage(extradir + "\\NoExtra.png");
pictureBox10.Image = icon1;
}
}
@ -1302,7 +1302,7 @@ namespace NovetusLauncher
}
else
{
MessageBox.Show("Could not generate charapp. Is are you running Novetus as as administrator and is the webserver running?");
MessageBox.Show("Could not generate charapp. Are you running Novetus as as administrator and is the webserver running?");
textBox1.Text = "";
GlobalVars.CharacterID = "";
}