more code cleaning + color presets
This commit is contained in:
parent
2b13a5d291
commit
817d35cd06
Binary file not shown.
|
|
@ -14,7 +14,7 @@ using static NovetusCMD.CommandLineArguments;
|
|||
|
||||
namespace NovetusCMD
|
||||
{
|
||||
class Program
|
||||
public static class Program
|
||||
{
|
||||
public static void InitUPnP()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,4 +82,29 @@ public static class ZipArchiveExtensions
|
|||
file.ExtractToFile(completeFileName, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//credit to code4life
|
||||
public static class ArrayHelper
|
||||
{
|
||||
public static object FindInDimensions(this object[,] target,
|
||||
object searchTerm)
|
||||
{
|
||||
object result = null;
|
||||
var rowLowerLimit = target.GetLowerBound(0);
|
||||
var rowUpperLimit = target.GetUpperBound(0);
|
||||
|
||||
var colLowerLimit = target.GetLowerBound(1);
|
||||
var colUpperLimit = target.GetUpperBound(1);
|
||||
|
||||
for (int row = rowLowerLimit; row < rowUpperLimit; row++)
|
||||
{
|
||||
for (int col = colLowerLimit; col < colUpperLimit; col++)
|
||||
{
|
||||
// you could do the search here...
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -9,8 +9,7 @@ using System.Drawing.Imaging;
|
|||
public class IconLoader
|
||||
{
|
||||
private OpenFileDialog openFileDialog1;
|
||||
public string installOutcome = "";
|
||||
private string extradir = GlobalVars.CustomPlayerDir + "\\custom";
|
||||
private string installOutcome = "";
|
||||
|
||||
public IconLoader()
|
||||
{
|
||||
|
|
@ -22,6 +21,16 @@ public class IconLoader
|
|||
};
|
||||
}
|
||||
|
||||
public void setInstallOutcome(string text)
|
||||
{
|
||||
installOutcome = text;
|
||||
}
|
||||
|
||||
public string getInstallOutcome()
|
||||
{
|
||||
return installOutcome;
|
||||
}
|
||||
|
||||
public void LoadImage()
|
||||
{
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
|
|
@ -30,7 +39,7 @@ public class IconLoader
|
|||
{
|
||||
using (Stream str = openFileDialog1.OpenFile())
|
||||
{
|
||||
using (Stream output = new FileStream(extradir + "\\icons\\" + GlobalVars.PlayerName + ".png", FileMode.Create))
|
||||
using (Stream output = new FileStream(GlobalVars.extradir + "\\icons\\" + GlobalVars.PlayerName + ".png", FileMode.Create))
|
||||
{
|
||||
byte[] buffer = new byte[32 * 1024];
|
||||
int read;
|
||||
|
|
|
|||
|
|
@ -141,103 +141,4 @@ public class ScriptGenerator
|
|||
string[] convertedList = list.ToArray();
|
||||
File.WriteAllLines(GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptGenName + ".lua", convertedList);
|
||||
}
|
||||
|
||||
// using this for a possible 2006 preset feature??
|
||||
|
||||
/*
|
||||
public static string GeneratePlayerColorPresetString(int preset)
|
||||
{
|
||||
int HeadColor = 0;
|
||||
int TorsoColor = 0;
|
||||
int LArmColor = 0;
|
||||
int RArmColor = 0;
|
||||
int LLegColor = 0;
|
||||
int RLegColor = 0;
|
||||
|
||||
if (preset == 1)
|
||||
{
|
||||
HeadColor = 24;
|
||||
TorsoColor = 194;
|
||||
LArmColor = 24;
|
||||
RArmColor = 24;
|
||||
LLegColor = 119;
|
||||
RLegColor = 119;
|
||||
}
|
||||
else if (preset == 2)
|
||||
{
|
||||
HeadColor = 24;
|
||||
TorsoColor = 22;
|
||||
LArmColor = 24;
|
||||
RArmColor = 24;
|
||||
LLegColor = 9;
|
||||
RLegColor = 9;
|
||||
}
|
||||
else if (preset == 3)
|
||||
{
|
||||
HeadColor = 24;
|
||||
TorsoColor = 23;
|
||||
LArmColor = 24;
|
||||
RArmColor = 24;
|
||||
LLegColor = 119;
|
||||
RLegColor = 119;
|
||||
}
|
||||
else if (preset == 4)
|
||||
{
|
||||
HeadColor = 24;
|
||||
TorsoColor = 22;
|
||||
LArmColor = 24;
|
||||
RArmColor = 24;
|
||||
LLegColor = 119;
|
||||
RLegColor = 119;
|
||||
}
|
||||
else if (preset == 5)
|
||||
{
|
||||
HeadColor = 24;
|
||||
TorsoColor = 11;
|
||||
LArmColor = 24;
|
||||
RArmColor = 24;
|
||||
LLegColor = 119;
|
||||
RLegColor = 119;
|
||||
}
|
||||
else if (preset == 6)
|
||||
{
|
||||
HeadColor = 38;
|
||||
TorsoColor = 194;
|
||||
LArmColor = 38;
|
||||
RArmColor = 38;
|
||||
LLegColor = 119;
|
||||
RLegColor = 119;
|
||||
}
|
||||
else if (preset == 7)
|
||||
{
|
||||
HeadColor = 128;
|
||||
TorsoColor = 119;
|
||||
LArmColor = 128;
|
||||
RArmColor = 128;
|
||||
LLegColor = 119;
|
||||
RLegColor = 119;
|
||||
}
|
||||
else if (preset == 8)
|
||||
{
|
||||
HeadColor = 9;
|
||||
TorsoColor = 194;
|
||||
LArmColor = 9;
|
||||
RArmColor = 9;
|
||||
LLegColor = 119;
|
||||
RLegColor = 119;
|
||||
}
|
||||
|
||||
string output = MultiLine(
|
||||
"--Color Settings",
|
||||
"HeadColorID = " + HeadColor,
|
||||
"TorsoColorID = " + TorsoColor,
|
||||
"LeftArmColorID = " + LArmColor,
|
||||
"RightArmColorID = " + RArmColor,
|
||||
"LeftLegColorID = " + LLegColor,
|
||||
"RightLegColorID = " + RLegColor
|
||||
);
|
||||
|
||||
return output;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
@ -142,6 +142,15 @@ 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.button62 = new System.Windows.Forms.Button();
|
||||
this.button63 = new System.Windows.Forms.Button();
|
||||
this.button64 = new System.Windows.Forms.Button();
|
||||
this.button65 = new System.Windows.Forms.Button();
|
||||
this.button66 = new System.Windows.Forms.Button();
|
||||
this.button67 = new System.Windows.Forms.Button();
|
||||
this.button68 = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
|
|
@ -168,6 +177,7 @@ namespace NovetusLauncher
|
|||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
|
||||
this.tabPage7.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tabControl1
|
||||
|
|
@ -191,6 +201,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.groupBox3);
|
||||
this.tabPage1.Controls.Add(this.groupBox2);
|
||||
this.tabPage1.Controls.Add(this.groupBox1);
|
||||
this.tabPage1.Controls.Add(this.button39);
|
||||
|
|
@ -683,7 +694,7 @@ namespace NovetusLauncher
|
|||
//
|
||||
this.button39.Location = new System.Drawing.Point(174, 182);
|
||||
this.button39.Name = "button39";
|
||||
this.button39.Size = new System.Drawing.Size(137, 49);
|
||||
this.button39.Size = new System.Drawing.Size(89, 49);
|
||||
this.button39.TabIndex = 48;
|
||||
this.button39.Text = "Randomize Colors";
|
||||
this.button39.UseVisualStyleBackColor = true;
|
||||
|
|
@ -691,9 +702,9 @@ namespace NovetusLauncher
|
|||
//
|
||||
// button40
|
||||
//
|
||||
this.button40.Location = new System.Drawing.Point(314, 182);
|
||||
this.button40.Location = new System.Drawing.Point(264, 182);
|
||||
this.button40.Name = "button40";
|
||||
this.button40.Size = new System.Drawing.Size(147, 49);
|
||||
this.button40.Size = new System.Drawing.Size(90, 49);
|
||||
this.button40.TabIndex = 47;
|
||||
this.button40.Text = "Reset Colors";
|
||||
this.button40.UseVisualStyleBackColor = true;
|
||||
|
|
@ -1332,6 +1343,103 @@ namespace NovetusLauncher
|
|||
this.button52.UseVisualStyleBackColor = true;
|
||||
this.button52.Click += new System.EventHandler(this.Button52Click);
|
||||
//
|
||||
// button61
|
||||
//
|
||||
this.button61.Location = new System.Drawing.Point(6, 16);
|
||||
this.button61.Name = "button61";
|
||||
this.button61.Size = new System.Drawing.Size(24, 23);
|
||||
this.button61.TabIndex = 51;
|
||||
this.button61.Text = "1";
|
||||
this.button61.UseVisualStyleBackColor = true;
|
||||
this.button61.Click += new System.EventHandler(this.button61_Click);
|
||||
//
|
||||
// button62
|
||||
//
|
||||
this.button62.Location = new System.Drawing.Point(31, 16);
|
||||
this.button62.Name = "button62";
|
||||
this.button62.Size = new System.Drawing.Size(24, 23);
|
||||
this.button62.TabIndex = 52;
|
||||
this.button62.Text = "2";
|
||||
this.button62.UseVisualStyleBackColor = true;
|
||||
this.button62.Click += new System.EventHandler(this.button62_Click);
|
||||
//
|
||||
// button63
|
||||
//
|
||||
this.button63.Location = new System.Drawing.Point(56, 16);
|
||||
this.button63.Name = "button63";
|
||||
this.button63.Size = new System.Drawing.Size(24, 23);
|
||||
this.button63.TabIndex = 53;
|
||||
this.button63.Text = "3";
|
||||
this.button63.UseVisualStyleBackColor = true;
|
||||
this.button63.Click += new System.EventHandler(this.button63_Click);
|
||||
//
|
||||
// button64
|
||||
//
|
||||
this.button64.Location = new System.Drawing.Point(81, 16);
|
||||
this.button64.Name = "button64";
|
||||
this.button64.Size = new System.Drawing.Size(24, 23);
|
||||
this.button64.TabIndex = 54;
|
||||
this.button64.Text = "4";
|
||||
this.button64.UseVisualStyleBackColor = true;
|
||||
this.button64.Click += new System.EventHandler(this.button64_Click);
|
||||
//
|
||||
// button65
|
||||
//
|
||||
this.button65.Location = new System.Drawing.Point(81, 42);
|
||||
this.button65.Name = "button65";
|
||||
this.button65.Size = new System.Drawing.Size(24, 23);
|
||||
this.button65.TabIndex = 58;
|
||||
this.button65.Text = "8";
|
||||
this.button65.UseVisualStyleBackColor = true;
|
||||
this.button65.Click += new System.EventHandler(this.button65_Click);
|
||||
//
|
||||
// button66
|
||||
//
|
||||
this.button66.Location = new System.Drawing.Point(56, 42);
|
||||
this.button66.Name = "button66";
|
||||
this.button66.Size = new System.Drawing.Size(24, 23);
|
||||
this.button66.TabIndex = 57;
|
||||
this.button66.Text = "7";
|
||||
this.button66.UseVisualStyleBackColor = true;
|
||||
this.button66.Click += new System.EventHandler(this.button66_Click);
|
||||
//
|
||||
// button67
|
||||
//
|
||||
this.button67.Location = new System.Drawing.Point(31, 42);
|
||||
this.button67.Name = "button67";
|
||||
this.button67.Size = new System.Drawing.Size(24, 23);
|
||||
this.button67.TabIndex = 56;
|
||||
this.button67.Text = "6";
|
||||
this.button67.UseVisualStyleBackColor = true;
|
||||
this.button67.Click += new System.EventHandler(this.button67_Click);
|
||||
//
|
||||
// button68
|
||||
//
|
||||
this.button68.Location = new System.Drawing.Point(6, 42);
|
||||
this.button68.Name = "button68";
|
||||
this.button68.Size = new System.Drawing.Size(24, 23);
|
||||
this.button68.TabIndex = 55;
|
||||
this.button68.Text = "5";
|
||||
this.button68.UseVisualStyleBackColor = true;
|
||||
this.button68.Click += new System.EventHandler(this.button68_Click);
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.button61);
|
||||
this.groupBox3.Controls.Add(this.button65);
|
||||
this.groupBox3.Controls.Add(this.button62);
|
||||
this.groupBox3.Controls.Add(this.button66);
|
||||
this.groupBox3.Controls.Add(this.button63);
|
||||
this.groupBox3.Controls.Add(this.button67);
|
||||
this.groupBox3.Controls.Add(this.button64);
|
||||
this.groupBox3.Controls.Add(this.button68);
|
||||
this.groupBox3.Location = new System.Drawing.Point(355, 163);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(109, 68);
|
||||
this.groupBox3.TabIndex = 60;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "\'06 Color Presets";
|
||||
//
|
||||
// CharacterCustomization
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
@ -1373,6 +1481,7 @@ namespace NovetusLauncher
|
|||
this.tabPage7.ResumeLayout(false);
|
||||
this.tabPage7.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
@ -1481,5 +1590,14 @@ namespace NovetusLauncher
|
|||
private System.Windows.Forms.Button button60;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.PictureBox pictureBox10;
|
||||
private System.Windows.Forms.Button button62;
|
||||
private System.Windows.Forms.Button button61;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Button button65;
|
||||
private System.Windows.Forms.Button button66;
|
||||
private System.Windows.Forms.Button button63;
|
||||
private System.Windows.Forms.Button button67;
|
||||
private System.Windows.Forms.Button button64;
|
||||
private System.Windows.Forms.Button button68;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,12 @@ namespace NovetusLauncher
|
|||
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
ColorArray = new string[32, 2] {
|
||||
|
||||
/// <summary>
|
||||
///ColorArray[index, 0] = id (string)
|
||||
///ColorArray[index, 1] = button color (string)
|
||||
/// </summary>
|
||||
ColorArray = new string[32, 2] {
|
||||
{ "1", button7.BackColor.ToString() },
|
||||
{ "208", button8.BackColor.ToString() },
|
||||
{ "194", button9.BackColor.ToString() },
|
||||
|
|
@ -752,229 +756,237 @@ namespace NovetusLauncher
|
|||
button6.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_LeftLegColor);
|
||||
}
|
||||
}
|
||||
|
||||
void Button7Click(object sender, EventArgs e)
|
||||
|
||||
void ChangeColorOfPart(string part, int ColorID, Color ButtonColor)
|
||||
{
|
||||
if (part == "Head")
|
||||
{
|
||||
GlobalVars.HeadColorID = ColorID;
|
||||
GlobalVars.ColorMenu_HeadColor = ButtonColor.ToString();
|
||||
button1.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_HeadColor);
|
||||
}
|
||||
else if (part == "Torso")
|
||||
{
|
||||
GlobalVars.TorsoColorID = ColorID;
|
||||
GlobalVars.ColorMenu_TorsoColor = ButtonColor.ToString();
|
||||
button2.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_TorsoColor);
|
||||
}
|
||||
else if (part == "Right Arm")
|
||||
{
|
||||
GlobalVars.RightArmColorID = ColorID;
|
||||
GlobalVars.ColorMenu_RightArmColor = ButtonColor.ToString();
|
||||
button3.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_RightArmColor);
|
||||
}
|
||||
else if (part == "Left Arm")
|
||||
{
|
||||
GlobalVars.LeftArmColorID = ColorID;
|
||||
GlobalVars.ColorMenu_LeftArmColor = ButtonColor.ToString();
|
||||
button4.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_LeftArmColor);
|
||||
}
|
||||
else if (part == "Right Leg")
|
||||
{
|
||||
GlobalVars.RightLegColorID = ColorID;
|
||||
GlobalVars.ColorMenu_RightLegColor = ButtonColor.ToString();
|
||||
button5.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_RightLegColor);
|
||||
}
|
||||
else if (part == "Left Leg")
|
||||
{
|
||||
GlobalVars.LeftLegColorID = ColorID;
|
||||
GlobalVars.ColorMenu_LeftLegColor = ButtonColor.ToString();
|
||||
button6.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_LeftLegColor);
|
||||
}
|
||||
}
|
||||
|
||||
void Button7Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button7.BackColor;
|
||||
int colorID = 1;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(1, ButtonColor);
|
||||
}
|
||||
|
||||
void Button8Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button8.BackColor;
|
||||
int colorID = 208;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(208, ButtonColor);
|
||||
}
|
||||
|
||||
void Button9Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button9.BackColor;
|
||||
int colorID = 194;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(194, ButtonColor);
|
||||
}
|
||||
|
||||
void Button10Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button10.BackColor;
|
||||
int colorID = 199;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(199, ButtonColor);
|
||||
}
|
||||
|
||||
void Button14Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button14.BackColor;
|
||||
int colorID = 26;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(26, ButtonColor);
|
||||
}
|
||||
|
||||
void Button13Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button13.BackColor;
|
||||
int colorID = 21;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(21, ButtonColor);
|
||||
}
|
||||
|
||||
void Button12Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button12.BackColor;
|
||||
int colorID = 24;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(24, ButtonColor);
|
||||
}
|
||||
|
||||
void Button11Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button11.BackColor;
|
||||
int colorID = 226;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(226, ButtonColor);
|
||||
}
|
||||
|
||||
void Button18Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button18.BackColor;
|
||||
int colorID = 23;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(23, ButtonColor);
|
||||
}
|
||||
|
||||
void Button17Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button17.BackColor;
|
||||
int colorID = 107;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(107, ButtonColor);
|
||||
}
|
||||
|
||||
void Button16Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button16.BackColor;
|
||||
int colorID = 102;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(102, ButtonColor);
|
||||
}
|
||||
|
||||
void Button15Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button15.BackColor;
|
||||
int colorID = 11;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(11, ButtonColor);
|
||||
}
|
||||
|
||||
void Button22Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button22.BackColor;
|
||||
int colorID = 45;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(45, ButtonColor);
|
||||
}
|
||||
|
||||
void Button21Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button21.BackColor;
|
||||
int colorID = 135;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(135, ButtonColor);
|
||||
}
|
||||
|
||||
void Button20Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button20.BackColor;
|
||||
int colorID = 106;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(106, ButtonColor);
|
||||
}
|
||||
|
||||
void Button19Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button19.BackColor;
|
||||
int colorID = 105;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(105, ButtonColor);
|
||||
}
|
||||
|
||||
void Button26Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button26.BackColor;
|
||||
int colorID = 141;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(141, ButtonColor);
|
||||
}
|
||||
|
||||
void Button25Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button25.BackColor;
|
||||
int colorID = 28;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(28, ButtonColor);
|
||||
}
|
||||
|
||||
void Button24Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button24.BackColor;
|
||||
int colorID = 37;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(37, ButtonColor);
|
||||
}
|
||||
|
||||
void Button23Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button23.BackColor;
|
||||
int colorID = 119;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(119, ButtonColor);
|
||||
}
|
||||
|
||||
void Button30Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button30.BackColor;
|
||||
int colorID = 29;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(29, ButtonColor);
|
||||
}
|
||||
|
||||
void Button29Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button29.BackColor;
|
||||
int colorID = 151;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(151, ButtonColor);
|
||||
}
|
||||
|
||||
void Button28Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button28.BackColor;
|
||||
int colorID = 38;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(38, ButtonColor);
|
||||
}
|
||||
|
||||
void Button27Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button27.BackColor;
|
||||
int colorID = 192;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(192, ButtonColor);
|
||||
}
|
||||
|
||||
void Button34Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button34.BackColor;
|
||||
int colorID = 104;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(104, ButtonColor);
|
||||
}
|
||||
|
||||
void Button33Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button33.BackColor;
|
||||
int colorID = 9;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(9, ButtonColor);
|
||||
}
|
||||
|
||||
void Button32Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button32.BackColor;
|
||||
int colorID = 101;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(101, ButtonColor);
|
||||
}
|
||||
|
||||
void Button31Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button31.BackColor;
|
||||
int colorID = 5;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(5, ButtonColor);
|
||||
}
|
||||
|
||||
void Button38Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button38.BackColor;
|
||||
int colorID = 153;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(153, ButtonColor);
|
||||
}
|
||||
|
||||
void Button37Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button37.BackColor;
|
||||
int colorID = 217;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(217, ButtonColor);
|
||||
}
|
||||
|
||||
void Button36Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button36.BackColor;
|
||||
int colorID = 18;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(18, ButtonColor);
|
||||
}
|
||||
|
||||
void Button35Click(object sender, EventArgs e)
|
||||
{
|
||||
Color ButtonColor = button35.BackColor;
|
||||
int colorID = 125;
|
||||
ChangeColorOfPart(colorID, ButtonColor);
|
||||
ChangeColorOfPart(125, ButtonColor);
|
||||
}
|
||||
|
||||
void Button39Click(object sender, EventArgs e)
|
||||
|
|
@ -987,40 +999,28 @@ namespace NovetusLauncher
|
|||
RandomColor = rand.Next(ColorArray.GetLength(0));
|
||||
if (i == 1)
|
||||
{
|
||||
GlobalVars.HeadColorID = Convert.ToInt32(ColorArray[RandomColor, 0]);
|
||||
GlobalVars.ColorMenu_HeadColor = ColorArray[RandomColor, 1];
|
||||
button1.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_HeadColor);
|
||||
ChangeColorOfPart("Head", Convert.ToInt32(ColorArray[RandomColor, 0]), ConvertStringtoColor(ColorArray[RandomColor, 1]));
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
GlobalVars.TorsoColorID = Convert.ToInt32(ColorArray[RandomColor, 0]);
|
||||
GlobalVars.ColorMenu_TorsoColor = ColorArray[RandomColor, 1];
|
||||
button2.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_TorsoColor);
|
||||
ChangeColorOfPart("Torso", Convert.ToInt32(ColorArray[RandomColor, 0]), ConvertStringtoColor(ColorArray[RandomColor, 1]));
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
GlobalVars.RightArmColorID = Convert.ToInt32(ColorArray[RandomColor, 0]);
|
||||
GlobalVars.ColorMenu_RightArmColor = ColorArray[RandomColor, 1];
|
||||
button3.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_RightArmColor);
|
||||
}
|
||||
ChangeColorOfPart("Left Arm", Convert.ToInt32(ColorArray[RandomColor, 0]), ConvertStringtoColor(ColorArray[RandomColor, 1]));
|
||||
}
|
||||
else if (i == 4)
|
||||
{
|
||||
GlobalVars.LeftArmColorID = Convert.ToInt32(ColorArray[RandomColor, 0]);
|
||||
GlobalVars.ColorMenu_LeftArmColor = ColorArray[RandomColor, 1];
|
||||
button4.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_LeftArmColor);
|
||||
}
|
||||
ChangeColorOfPart("Right Arm", Convert.ToInt32(ColorArray[RandomColor, 0]), ConvertStringtoColor(ColorArray[RandomColor, 1]));
|
||||
}
|
||||
else if (i == 5)
|
||||
{
|
||||
GlobalVars.RightLegColorID = Convert.ToInt32(ColorArray[RandomColor, 0]);
|
||||
GlobalVars.ColorMenu_RightLegColor = ColorArray[RandomColor, 1];
|
||||
button5.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_RightLegColor);
|
||||
}
|
||||
ChangeColorOfPart("Left Leg", Convert.ToInt32(ColorArray[RandomColor, 0]), ConvertStringtoColor(ColorArray[RandomColor, 1]));
|
||||
}
|
||||
else if (i == 6)
|
||||
{
|
||||
GlobalVars.LeftLegColorID = Convert.ToInt32(ColorArray[RandomColor, 0]);
|
||||
GlobalVars.ColorMenu_LeftLegColor = ColorArray[RandomColor, 1];
|
||||
button6.BackColor = ConvertStringtoColor(GlobalVars.ColorMenu_LeftLegColor);
|
||||
}
|
||||
ChangeColorOfPart("Right Leg", Convert.ToInt32(ColorArray[RandomColor, 0]), ConvertStringtoColor(ColorArray[RandomColor, 1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1256,9 +1256,9 @@ namespace NovetusLauncher
|
|||
{
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(icon.installOutcome))
|
||||
if (!string.IsNullOrWhiteSpace(icon.getInstallOutcome()))
|
||||
{
|
||||
MessageBox.Show(icon.installOutcome);
|
||||
MessageBox.Show(icon.getInstallOutcome());
|
||||
}
|
||||
|
||||
try
|
||||
|
|
@ -1273,6 +1273,56 @@ namespace NovetusLauncher
|
|||
}
|
||||
}
|
||||
|
||||
public void ApplyPreset(int head, int torso, int larm, int rarm, int lleg, int rleg)
|
||||
{
|
||||
ChangeColorOfPart("Head", head, ConvertStringtoColor(ColorArray[Convert.ToInt32(ColorArray.FindInDimensions(Convert.ToString(head))), 1]));
|
||||
ChangeColorOfPart("Torso", torso, ConvertStringtoColor(ColorArray[Convert.ToInt32(ColorArray.FindInDimensions(Convert.ToString(torso))), 1]));
|
||||
ChangeColorOfPart("Left Arm", larm, ConvertStringtoColor(ColorArray[Convert.ToInt32(ColorArray.FindInDimensions(Convert.ToString(larm))), 1]));
|
||||
ChangeColorOfPart("Right Arm", rarm, ConvertStringtoColor(ColorArray[Convert.ToInt32(ColorArray.FindInDimensions(Convert.ToString(rarm))), 1]));
|
||||
ChangeColorOfPart("Left Leg", lleg, ConvertStringtoColor(ColorArray[Convert.ToInt32(ColorArray.FindInDimensions(Convert.ToString(lleg))), 1]));
|
||||
ChangeColorOfPart("Right Leg", rleg, ConvertStringtoColor(ColorArray[Convert.ToInt32(ColorArray.FindInDimensions(Convert.ToString(rleg))), 1]));
|
||||
}
|
||||
|
||||
private void button61_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(24, 194, 24, 24, 119, 119);
|
||||
}
|
||||
|
||||
private void button62_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(24, 22, 24, 24, 9, 9);
|
||||
}
|
||||
|
||||
private void button63_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(24, 23, 24, 24, 119, 119);
|
||||
}
|
||||
|
||||
private void button64_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(24, 22, 24, 24, 119, 119);
|
||||
}
|
||||
|
||||
private void button68_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(24, 11, 24, 24, 119, 119);
|
||||
}
|
||||
|
||||
private void button67_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(38, 194, 38, 38, 119, 119);
|
||||
}
|
||||
|
||||
private void button66_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(128, 119, 128, 128, 119, 119);
|
||||
}
|
||||
|
||||
private void button65_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyPreset(9, 194, 9, 9, 119, 119);
|
||||
}
|
||||
|
||||
/*
|
||||
private void button61_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue