Worth Every Penny !

This commit is contained in:
Bitl 2020-04-09 18:26:58 -07:00
parent eafbbc7406
commit 65177e9611
13 changed files with 230 additions and 185 deletions

View File

@ -70,10 +70,6 @@
<HintPath>..\packages\DotNetZip.1.11.0\lib\net20\DotNetZip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
@ -105,10 +101,7 @@
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
<Private>True</Private>

View File

@ -170,9 +170,9 @@ namespace NovetusCMD
static void ReadClientValues(string ClientName)
{
string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
if (!File.Exists(clientpath))
string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
if (!File.Exists(clientpath))
{
ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2);
GlobalVars.SelectedClient = GlobalVars.DefaultClient;
@ -224,6 +224,7 @@ namespace NovetusCMD
Console.Title = "Novetus " + GlobalVars.Version + " CMD";
ConsolePrint("NovetusCMD version " + GlobalVars.Version + " loaded.", 1);
ConsolePrint("Novetus path: " + GlobalVars.BasePath, 1);
if (args.Length == 0)
{

View File

@ -14,6 +14,8 @@ using System.Diagnostics;
using System.IO.Compression;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
public static class RichTextBoxExtensions
{
@ -173,4 +175,29 @@ public static class FormExt
// The zero parameter means to enable. 0xF060 is SC_CLOSE.
EnableMenuItem(GetSystemMenu(form.Handle, false), 0xF060, 0);
}
}
//https://stackoverflow.com/questions/9031537/really-simple-encryption-with-c-sharp-and-symmetricalgorithm
public static class StringUtil
{
private static byte[] key = new byte[8] { 1, 2, 3, 4, 5, 6, 7, 8 };
private static byte[] iv = new byte[8] { 1, 2, 3, 4, 5, 6, 7, 8 };
public static string Crypt(this string text)
{
SymmetricAlgorithm algorithm = DES.Create();
ICryptoTransform transform = algorithm.CreateEncryptor(key, iv);
byte[] inputbuffer = Encoding.Unicode.GetBytes(text);
byte[] outputBuffer = transform.TransformFinalBlock(inputbuffer, 0, inputbuffer.Length);
return Convert.ToBase64String(outputBuffer);
}
public static string Decrypt(this string text)
{
SymmetricAlgorithm algorithm = DES.Create();
ICryptoTransform transform = algorithm.CreateDecryptor(key, iv);
byte[] inputbuffer = Convert.FromBase64String(text);
byte[] outputBuffer = transform.TransformFinalBlock(inputbuffer, 0, inputbuffer.Length);
return Encoding.Unicode.GetString(outputBuffer);
}
}

View File

@ -31,7 +31,7 @@ public static class GlobalVars
public static readonly string BasePath = RootPath.Replace(@"\", @"\\");
public static readonly string DataPath = BasePath + @"\\shareddata";
public static readonly string ConfigDir = BasePath + @"\\config";
public static readonly string ConfigDirData = ConfigDir + @"\\data";
public static readonly string ConfigDirData = BasePathLauncher + @"\\data";
public static readonly string ClientDir = BasePath + @"\\clients";
public static readonly string MapsDir = BasePath + @"\\maps";
public static readonly string MapsDirBase = "maps";

View File

@ -41,20 +41,39 @@ public class SecurityFuncs
{
return RandomString(20);
}
public static string Base64Decode(string base64EncodedData)
//not really base64 anymore >:) plz change before release to use the newer format
public static string Base64Decode(string base64EncodedData, int format = 0)
{
var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}
public static string Base64Encode(string plainText)
{
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
return System.Convert.ToBase64String(plainTextBytes);
}
public static bool IsBase64String(string s)
if (format == 0)
{
var base64EncodedBytes = Convert.FromBase64String(base64EncodedData);
return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}
else if (format == 1)
{
return base64EncodedData.Decrypt();
}
return "";
}
public static string Base64Encode(string plainText, int format = 0)
{
if (format == 0)
{
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
return Convert.ToBase64String(plainTextBytes);
}
else if (format == 1)
{
return plainText.Crypt();
}
return "";
}
public static bool IsBase64String(string s)
{
s = s.Trim();
return (s.Length % 4 == 0) && Regex.IsMatch(s, @"^[a-zA-Z0-9\+/]*={0,3}$", RegexOptions.None);

View File

@ -34,7 +34,7 @@ namespace NovetusLauncher
InitColors();
Size = new Size(681, 347);
Size = new Size(671, 337);
panel2.Size = new Size(568, 302);
//

View File

@ -65,9 +65,6 @@ namespace NovetusLauncher
this.button28 = new System.Windows.Forms.Button();
this.button34 = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.button35 = new System.Windows.Forms.Button();
this.tabControl1 = new TabControlWithoutHeader();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.label24 = new System.Windows.Forms.Label();
@ -139,18 +136,17 @@ namespace NovetusLauncher
this.button9 = new System.Windows.Forms.Button();
this.button26 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.richTextBox3 = new System.Windows.Forms.RichTextBox();
this.label10 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.button35 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
@ -164,6 +160,8 @@ namespace NovetusLauncher
this.tabPage8.SuspendLayout();
this.tabPage5.SuspendLayout();
this.panel5.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.SuspendLayout();
//
// button25
@ -454,47 +452,6 @@ namespace NovetusLauncher
this.panel2.Size = new System.Drawing.Size(646, 311);
this.panel2.TabIndex = 61;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel3.Controls.Add(this.pictureBox2);
this.panel3.Controls.Add(this.textBox2);
this.panel3.Controls.Add(this.textBox5);
this.panel3.Controls.Add(this.button4);
this.panel3.Controls.Add(this.label16);
this.panel3.Controls.Add(this.label15);
this.panel3.Controls.Add(this.label12);
this.panel3.Controls.Add(this.label13);
this.panel3.Location = new System.Drawing.Point(1, 4);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(229, 69);
this.panel3.TabIndex = 62;
//
// panel4
//
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel4.Controls.Add(this.button35);
this.panel4.Controls.Add(this.button34);
this.panel4.Controls.Add(this.button21);
this.panel4.Controls.Add(this.button8);
this.panel4.Controls.Add(this.button3);
this.panel4.Controls.Add(this.button25);
this.panel4.Location = new System.Drawing.Point(236, 41);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(501, 32);
this.panel4.TabIndex = 63;
//
// button35
//
this.button35.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button35.Location = new System.Drawing.Point(113, 3);
this.button35.Name = "button35";
this.button35.Size = new System.Drawing.Size(41, 20);
this.button35.TabIndex = 61;
this.button35.Text = "Studio";
this.button35.UseVisualStyleBackColor = true;
this.button35.Click += new System.EventHandler(this.button35_Click);
//
// tabControl1
//
this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom;
@ -1140,8 +1097,6 @@ namespace NovetusLauncher
// tabPage5
//
this.tabPage5.Controls.Add(this.panel5);
this.tabPage5.Controls.Add(this.label6);
this.tabPage5.Controls.Add(this.label5);
this.tabPage5.Controls.Add(this.richTextBox3);
this.tabPage5.Controls.Add(this.label10);
this.tabPage5.Controls.Add(this.label18);
@ -1338,32 +1293,14 @@ namespace NovetusLauncher
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.Button5Click);
//
// label6
//
this.label6.Location = new System.Drawing.Point(364, 7);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(106, 15);
this.label6.TabIndex = 46;
this.label6.Text = "Current Path:";
this.label6.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label5
//
this.label5.Location = new System.Drawing.Point(209, 23);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(413, 36);
this.label5.TabIndex = 45;
this.label5.Text = "path lol";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// richTextBox3
//
this.richTextBox3.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.richTextBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox3.Location = new System.Drawing.Point(209, 62);
this.richTextBox3.Location = new System.Drawing.Point(209, 4);
this.richTextBox3.Name = "richTextBox3";
this.richTextBox3.ReadOnly = true;
this.richTextBox3.Size = new System.Drawing.Size(413, 161);
this.richTextBox3.Size = new System.Drawing.Size(413, 219);
this.richTextBox3.TabIndex = 60;
this.richTextBox3.Text = "credits text";
//
@ -1403,6 +1340,47 @@ namespace NovetusLauncher
this.label7.Text = "PROJECT STARLIGHT";
this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel3.Controls.Add(this.pictureBox2);
this.panel3.Controls.Add(this.textBox2);
this.panel3.Controls.Add(this.textBox5);
this.panel3.Controls.Add(this.button4);
this.panel3.Controls.Add(this.label16);
this.panel3.Controls.Add(this.label15);
this.panel3.Controls.Add(this.label12);
this.panel3.Controls.Add(this.label13);
this.panel3.Location = new System.Drawing.Point(1, 4);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(229, 69);
this.panel3.TabIndex = 62;
//
// panel4
//
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel4.Controls.Add(this.button35);
this.panel4.Controls.Add(this.button34);
this.panel4.Controls.Add(this.button21);
this.panel4.Controls.Add(this.button8);
this.panel4.Controls.Add(this.button3);
this.panel4.Controls.Add(this.button25);
this.panel4.Location = new System.Drawing.Point(236, 41);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(501, 32);
this.panel4.TabIndex = 63;
//
// button35
//
this.button35.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button35.Location = new System.Drawing.Point(113, 3);
this.button35.Name = "button35";
this.button35.Size = new System.Drawing.Size(41, 20);
this.button35.TabIndex = 61;
this.button35.Text = "Studio";
this.button35.UseVisualStyleBackColor = true;
this.button35.Click += new System.EventHandler(this.button35_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1429,9 +1407,6 @@ namespace NovetusLauncher
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel4.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
@ -1450,6 +1425,9 @@ namespace NovetusLauncher
this.tabPage5.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel4.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -1517,8 +1495,6 @@ namespace NovetusLauncher
private System.Windows.Forms.Button button3;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;

View File

@ -34,7 +34,7 @@ namespace NovetusLauncher
//
InitializeComponent();
Size = new Size(755, 387);
Size = new Size(745, 377);
panel2.Size = new Size(646, 272);
//
@ -433,41 +433,43 @@ namespace NovetusLauncher
GlobalVars.MapPathSnip = GlobalVars.MapsDirBase + @"\\" + GlobalVars.DefaultMap;
this.Text = "Novetus " + GlobalVars.Version;
ConsolePrint("Novetus version " + GlobalVars.Version + " loaded. Initializing config.", 4);
if (File.Exists("changelog.txt"))
ConsolePrint("Novetus path: " + GlobalVars.BasePath, 4);
if (File.Exists(GlobalVars.RootPath + "\\changelog.txt"))
{
richTextBox2.Text = File.ReadAllText("changelog.txt");
richTextBox2.Text = File.ReadAllText(GlobalVars.RootPath + "\\changelog.txt");
}
else
{
ConsolePrint("ERROR - changelog.txt not found.", 2);
ConsolePrint("ERROR - " + GlobalVars.RootPath + "\\changelog.txt not found.", 2);
}
if (File.Exists("credits.txt"))
if (File.Exists(GlobalVars.RootPath + "\\credits.txt"))
{
richTextBox3.Text = File.ReadAllText("credits.txt");
richTextBox3.Text = File.ReadAllText(GlobalVars.RootPath + "\\credits.txt");
}
else
{
ConsolePrint("ERROR - credits.txt not found.", 2);
ConsolePrint("ERROR - " + GlobalVars.RootPath + "\\credits.txt not found.", 2);
}
if (!File.Exists(GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigName))
{
ConsolePrint("WARNING - " + GlobalVars.ConfigName + " not found. Creating one with default values.", 5);
ConsolePrint("WARNING - " + GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigName + " not found. Creating one with default values.", 5);
WriteConfigValues();
}
if (!File.Exists(GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigNameCustomization))
{
ConsolePrint("WARNING - " + GlobalVars.ConfigNameCustomization + " not found. Creating one with default values.", 5);
ConsolePrint("WARNING - " + GlobalVars.ConfigDir + "\\" + GlobalVars.ConfigNameCustomization + " not found. Creating one with default values.", 5);
WriteCustomizationValues();
}
if (!File.Exists(GlobalVars.ConfigDir + "\\servers.txt"))
{
ConsolePrint("WARNING - servers.txt not found. Creating empty file.", 5);
ConsolePrint("WARNING - " + GlobalVars.ConfigDir + "\\servers.txt not found. Creating empty file.", 5);
File.Create(GlobalVars.ConfigDir + "\\servers.txt").Dispose();
}
if (!File.Exists(GlobalVars.ConfigDir + "\\ports.txt"))
{
ConsolePrint("WARNING - ports.txt not found. Creating empty file.", 5);
ConsolePrint("WARNING - " + GlobalVars.ConfigDir + "\\ports.txt not found. Creating empty file.", 5);
File.Create(GlobalVars.ConfigDir + "\\ports.txt").Dispose();
}
@ -496,7 +498,6 @@ namespace NovetusLauncher
Directory.CreateDirectory(GlobalVars.AssetCacheDirScripts);
}
label5.Text = GlobalVars.BasePath;
label8.Text = Application.ProductVersion;
GlobalVars.important = SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location);
label11.Text = GlobalVars.Version;
@ -598,9 +599,9 @@ namespace NovetusLauncher
void ReadClientValues(string ClientName)
{
string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
if (!File.Exists(clientpath))
string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
if (!File.Exists(clientpath))
{
ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2);
MessageBox.Show("No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.","Novetus - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);

View File

@ -87,10 +87,7 @@
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
<Private>True</Private>

View File

@ -124,6 +124,7 @@ namespace NovetusLauncher
this.extrawsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hat4dToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hat4wsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.charappToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.nameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.idToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tripcodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -132,13 +133,13 @@ namespace NovetusLauncher
this.debuggingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.donothingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.argsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.documentationToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.charappToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.documentationToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.saveAsTextFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
@ -290,7 +291,8 @@ namespace NovetusLauncher
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newToolStripMenuItem,
this.loadToolStripMenuItem,
this.saveToolStripMenuItem});
this.saveToolStripMenuItem,
this.saveAsTextFileToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
@ -298,21 +300,21 @@ namespace NovetusLauncher
// newToolStripMenuItem
//
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.newToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.newToolStripMenuItem.Text = "New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.NewToolStripMenuItemClick);
//
// loadToolStripMenuItem
//
this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
this.loadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.loadToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.loadToolStripMenuItem.Text = "Load";
this.loadToolStripMenuItem.Click += new System.EventHandler(this.LoadToolStripMenuItemClick);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.SaveToolStripMenuItemClick);
//
@ -341,35 +343,35 @@ namespace NovetusLauncher
// clientToolStripMenuItem
//
this.clientToolStripMenuItem.Name = "clientToolStripMenuItem";
this.clientToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.clientToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.clientToolStripMenuItem.Text = "<client>";
this.clientToolStripMenuItem.Click += new System.EventHandler(this.clientToolStripMenuItem_Click);
//
// serverToolStripMenuItem
//
this.serverToolStripMenuItem.Name = "serverToolStripMenuItem";
this.serverToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.serverToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.serverToolStripMenuItem.Text = "<server>";
this.serverToolStripMenuItem.Click += new System.EventHandler(this.serverToolStripMenuItem_Click);
//
// soloToolStripMenuItem
//
this.soloToolStripMenuItem.Name = "soloToolStripMenuItem";
this.soloToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.soloToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.soloToolStripMenuItem.Text = "<solo>";
this.soloToolStripMenuItem.Click += new System.EventHandler(this.soloToolStripMenuItem_Click);
//
// studioToolStripMenuItem
//
this.studioToolStripMenuItem.Name = "studioToolStripMenuItem";
this.studioToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.studioToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.studioToolStripMenuItem.Text = "<studio>";
this.studioToolStripMenuItem.Click += new System.EventHandler(this.studioToolStripMenuItem_Click);
//
// no3dToolStripMenuItem
//
this.no3dToolStripMenuItem.Name = "no3dToolStripMenuItem";
this.no3dToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.no3dToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.no3dToolStripMenuItem.Text = "<no3d>";
this.no3dToolStripMenuItem.Click += new System.EventHandler(this.no3dToolStripMenuItem_Click);
//
@ -396,7 +398,7 @@ namespace NovetusLauncher
this.portToolStripMenuItem,
this.portToolStripMenuItem1});
this.generalToolStripMenuItem.Name = "generalToolStripMenuItem";
this.generalToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.generalToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.generalToolStripMenuItem.Text = "General";
//
// mapfileToolStripMenuItem
@ -446,7 +448,7 @@ namespace NovetusLauncher
this.serverToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.limitToolStripMenuItem});
this.serverToolStripMenuItem1.Name = "serverToolStripMenuItem1";
this.serverToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
this.serverToolStripMenuItem1.Size = new System.Drawing.Size(133, 22);
this.serverToolStripMenuItem1.Text = "Server";
//
// limitToolStripMenuItem
@ -465,7 +467,7 @@ namespace NovetusLauncher
this.md5scriptdToolStripMenuItem,
this.md5exedToolStripMenuItem});
this.securityToolStripMenuItem.Name = "securityToolStripMenuItem";
this.securityToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.securityToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.securityToolStripMenuItem.Text = "Security";
//
// md5launcherToolStripMenuItem
@ -513,7 +515,7 @@ namespace NovetusLauncher
this.iconeToolStripMenuItem,
this.iconToolStripMenuItem});
this.playerToolStripMenuItem.Name = "playerToolStripMenuItem";
this.playerToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.playerToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.playerToolStripMenuItem.Text = "Player";
//
// customizationToolStripMenuItem
@ -529,7 +531,7 @@ namespace NovetusLauncher
this.extraToolStripMenuItem,
this.charappToolStripMenuItem});
this.customizationToolStripMenuItem.Name = "customizationToolStripMenuItem";
this.customizationToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.customizationToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.customizationToolStripMenuItem.Text = "Customization";
//
// bodyColorsToolStripMenuItem
@ -542,48 +544,48 @@ namespace NovetusLauncher
this.rarmcolorToolStripMenuItem,
this.rlegcolorToolStripMenuItem});
this.bodyColorsToolStripMenuItem.Name = "bodyColorsToolStripMenuItem";
this.bodyColorsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.bodyColorsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.bodyColorsToolStripMenuItem.Text = "Body Colors";
//
// headcolorToolStripMenuItem
//
this.headcolorToolStripMenuItem.Name = "headcolorToolStripMenuItem";
this.headcolorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.headcolorToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.headcolorToolStripMenuItem.Text = "%headcolor%";
this.headcolorToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// torsocolorToolStripMenuItem
//
this.torsocolorToolStripMenuItem.Name = "torsocolorToolStripMenuItem";
this.torsocolorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.torsocolorToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.torsocolorToolStripMenuItem.Text = "%torsocolor%";
this.torsocolorToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// larmcolorToolStripMenuItem
//
this.larmcolorToolStripMenuItem.Name = "larmcolorToolStripMenuItem";
this.larmcolorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.larmcolorToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.larmcolorToolStripMenuItem.Text = "%larmcolor%";
this.larmcolorToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// llegcolorToolStripMenuItem
//
this.llegcolorToolStripMenuItem.Name = "llegcolorToolStripMenuItem";
this.llegcolorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.llegcolorToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.llegcolorToolStripMenuItem.Text = "%llegcolor%";
this.llegcolorToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// rarmcolorToolStripMenuItem
//
this.rarmcolorToolStripMenuItem.Name = "rarmcolorToolStripMenuItem";
this.rarmcolorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.rarmcolorToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.rarmcolorToolStripMenuItem.Text = "%rarmcolor%";
this.rarmcolorToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// rlegcolorToolStripMenuItem
//
this.rlegcolorToolStripMenuItem.Name = "rlegcolorToolStripMenuItem";
this.rlegcolorToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.rlegcolorToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.rlegcolorToolStripMenuItem.Text = "%rlegcolor%";
this.rlegcolorToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
@ -600,69 +602,69 @@ namespace NovetusLauncher
this.hat2wsToolStripMenuItem,
this.hat3wsToolStripMenuItem});
this.hatsToolStripMenuItem.Name = "hatsToolStripMenuItem";
this.hatsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hatsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.hatsToolStripMenuItem.Text = "Hats";
//
// hat1ToolStripMenuItem
//
this.hat1ToolStripMenuItem.Name = "hat1ToolStripMenuItem";
this.hat1ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat1ToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat1ToolStripMenuItem.Text = "%hat1%";
this.hat1ToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat2ToolStripMenuItem
//
this.hat2ToolStripMenuItem.Name = "hat2ToolStripMenuItem";
this.hat2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat2ToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat2ToolStripMenuItem.Text = "%hat2%";
this.hat2ToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat3ToolStripMenuItem
//
this.hat3ToolStripMenuItem.Name = "hat3ToolStripMenuItem";
this.hat3ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat3ToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat3ToolStripMenuItem.Text = "%hat3%";
this.hat3ToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat1dToolStripMenuItem
//
this.hat1dToolStripMenuItem.Name = "hat1dToolStripMenuItem";
this.hat1dToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat1dToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat1dToolStripMenuItem.Text = "%hat1d%";
this.hat1dToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat2dToolStripMenuItem
//
this.hat2dToolStripMenuItem.Name = "hat2dToolStripMenuItem";
this.hat2dToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat2dToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat2dToolStripMenuItem.Text = "%hat2d%";
this.hat2dToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat3dToolStripMenuItem
//
this.hat3dToolStripMenuItem.Name = "hat3dToolStripMenuItem";
this.hat3dToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat3dToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat3dToolStripMenuItem.Text = "%hat3d%";
this.hat3dToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat1wsToolStripMenuItem
//
this.hat1wsToolStripMenuItem.Name = "hat1wsToolStripMenuItem";
this.hat1wsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat1wsToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat1wsToolStripMenuItem.Text = "%hat1ws%";
this.hat1wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat2wsToolStripMenuItem
//
this.hat2wsToolStripMenuItem.Name = "hat2wsToolStripMenuItem";
this.hat2wsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat2wsToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat2wsToolStripMenuItem.Text = "%hat2ws%";
this.hat2wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// hat3wsToolStripMenuItem
//
this.hat3wsToolStripMenuItem.Name = "hat3wsToolStripMenuItem";
this.hat3wsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.hat3wsToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
this.hat3wsToolStripMenuItem.Text = "%hat3ws%";
this.hat3wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
@ -673,7 +675,7 @@ namespace NovetusLauncher
this.facedToolStripMenuItem,
this.facewsToolStripMenuItem});
this.facesToolStripMenuItem.Name = "facesToolStripMenuItem";
this.facesToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.facesToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.facesToolStripMenuItem.Text = "Faces";
//
// faceToolStripMenuItem
@ -704,7 +706,7 @@ namespace NovetusLauncher
this.headdToolStripMenuItem,
this.headwsToolStripMenuItem});
this.headsToolStripMenuItem.Name = "headsToolStripMenuItem";
this.headsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.headsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.headsToolStripMenuItem.Text = "Heads";
//
// headToolStripMenuItem
@ -735,7 +737,7 @@ namespace NovetusLauncher
this.tshirtdToolStripMenuItem,
this.tshirtwsToolStripMenuItem});
this.tShirtsToolStripMenuItem.Name = "tShirtsToolStripMenuItem";
this.tShirtsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.tShirtsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.tShirtsToolStripMenuItem.Text = "T-Shirts";
//
// tshirtToolStripMenuItem
@ -766,7 +768,7 @@ namespace NovetusLauncher
this.shirtdToolStripMenuItem,
this.shirtwsToolStripMenuItem});
this.shirtsToolStripMenuItem.Name = "shirtsToolStripMenuItem";
this.shirtsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.shirtsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.shirtsToolStripMenuItem.Text = "Shirts";
//
// shirtToolStripMenuItem
@ -797,7 +799,7 @@ namespace NovetusLauncher
this.pantsdToolStripMenuItem,
this.pantswsToolStripMenuItem});
this.pantsToolStripMenuItem.Name = "pantsToolStripMenuItem";
this.pantsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.pantsToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.pantsToolStripMenuItem.Text = "Pants";
//
// pantsToolStripMenuItem1
@ -830,7 +832,7 @@ namespace NovetusLauncher
this.hat4dToolStripMenuItem,
this.hat4wsToolStripMenuItem});
this.extraToolStripMenuItem.Name = "extraToolStripMenuItem";
this.extraToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.extraToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.extraToolStripMenuItem.Text = "Extra";
//
// extraToolStripMenuItem1
@ -868,38 +870,45 @@ namespace NovetusLauncher
this.hat4wsToolStripMenuItem.Text = "%hat4ws%";
this.hat4wsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// charappToolStripMenuItem
//
this.charappToolStripMenuItem.Name = "charappToolStripMenuItem";
this.charappToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.charappToolStripMenuItem.Text = "%charapp%";
this.charappToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// nameToolStripMenuItem
//
this.nameToolStripMenuItem.Name = "nameToolStripMenuItem";
this.nameToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.nameToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.nameToolStripMenuItem.Text = "%name%";
this.nameToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// idToolStripMenuItem
//
this.idToolStripMenuItem.Name = "idToolStripMenuItem";
this.idToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.idToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.idToolStripMenuItem.Text = "%id%";
this.idToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// tripcodeToolStripMenuItem
//
this.tripcodeToolStripMenuItem.Name = "tripcodeToolStripMenuItem";
this.tripcodeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.tripcodeToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.tripcodeToolStripMenuItem.Text = "%tripcode%";
this.tripcodeToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// iconeToolStripMenuItem
//
this.iconeToolStripMenuItem.Name = "iconeToolStripMenuItem";
this.iconeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.iconeToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.iconeToolStripMenuItem.Text = "%icone%";
this.iconeToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// iconToolStripMenuItem
//
this.iconToolStripMenuItem.Name = "iconToolStripMenuItem";
this.iconToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.iconToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.iconToolStripMenuItem.Text = "%icon%";
this.iconToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
@ -908,7 +917,7 @@ namespace NovetusLauncher
this.debuggingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.donothingToolStripMenuItem});
this.debuggingToolStripMenuItem.Name = "debuggingToolStripMenuItem";
this.debuggingToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.debuggingToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.debuggingToolStripMenuItem.Text = "Debugging";
//
// donothingToolStripMenuItem
@ -921,10 +930,17 @@ namespace NovetusLauncher
// argsToolStripMenuItem
//
this.argsToolStripMenuItem.Name = "argsToolStripMenuItem";
this.argsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.argsToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.argsToolStripMenuItem.Text = "%args%";
this.argsToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// documentationToolStripMenuItem1
//
this.documentationToolStripMenuItem1.Name = "documentationToolStripMenuItem1";
this.documentationToolStripMenuItem1.Size = new System.Drawing.Size(157, 22);
this.documentationToolStripMenuItem1.Text = "Documentation";
this.documentationToolStripMenuItem1.Click += new System.EventHandler(this.documentationToolStripMenuItem_Click);
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(309, 204);
@ -970,19 +986,12 @@ namespace NovetusLauncher
this.label7.TabIndex = 28;
this.label7.Text = "Warning (if needed)";
//
// charappToolStripMenuItem
// saveAsTextFileToolStripMenuItem
//
this.charappToolStripMenuItem.Name = "charappToolStripMenuItem";
this.charappToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.charappToolStripMenuItem.Text = "%charapp%";
this.charappToolStripMenuItem.Click += new System.EventHandler(this.variableToolStripMenuItem_Click);
//
// documentationToolStripMenuItem1
//
this.documentationToolStripMenuItem1.Name = "documentationToolStripMenuItem1";
this.documentationToolStripMenuItem1.Size = new System.Drawing.Size(157, 22);
this.documentationToolStripMenuItem1.Text = "Documentation";
this.documentationToolStripMenuItem1.Click += new System.EventHandler(this.documentationToolStripMenuItem_Click);
this.saveAsTextFileToolStripMenuItem.Name = "saveAsTextFileToolStripMenuItem";
this.saveAsTextFileToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.saveAsTextFileToolStripMenuItem.Text = "Save as Text File";
this.saveAsTextFileToolStripMenuItem.Click += new System.EventHandler(this.saveAsTextFileToolStripMenuItem_Click);
//
// ClientinfoEditor
//
@ -1125,5 +1134,6 @@ namespace NovetusLauncher
private System.Windows.Forms.ToolStripMenuItem donothingToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem charappToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem documentationToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem saveAsTextFileToolStripMenuItem;
}
}

View File

@ -408,5 +408,32 @@ namespace NovetusLauncher
ToolStripMenuItem senderitem = (ToolStripMenuItem)sender;
AddClientinfoText(senderitem.Text);
}
private void saveAsTextFileToolStripMenuItem_Click(object sender, EventArgs e)
{
using (var sfd = new SaveFileDialog())
{
sfd.Filter = "Text file (*.txt)|*.txt";
sfd.FilterIndex = 2;
sfd.FileName = "clientinfo.txt";
sfd.Title = "Save clientinfo.txt";
if (sfd.ShowDialog() == DialogResult.OK)
{
string[] lines = {
UsesPlayerName.ToString(),
UsesID.ToString(),
Warning.ToString(),
LegacyMode.ToString(),
SelectedClientDesc.ToString(),
FixScriptMapMode.ToString(),
AlreadyHasSecurity.ToString(),
CustomArgs.ToString()
};
File.WriteAllLines(sfd.FileName, lines);
SelectedClientInfoPath = Path.GetDirectoryName(sfd.FileName);
}
}
}
}
}

View File

@ -237,9 +237,9 @@ namespace NovetusLauncher
void ReadClientValues(string ClientName)
{
string clientpath = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + "\\clientinfo.nov";
if (!File.Exists(clientpath))
string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov";
if (!File.Exists(clientpath))
{
MessageBox.Show("No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.","Novetus Launcher - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
GlobalVars.SelectedClient = GlobalVars.DefaultClient;

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\NovetusCMD\packages.config" />
<repository path="..\NovetusLauncher\packages.config" />
<repository path="..\NovetusShared\packages.config" />
</repositories>