Added the XML Content editor for editing content providers and partcolors
This commit is contained in:
parent
62efe92937
commit
d20eafc621
|
|
@ -43,16 +43,28 @@ class CharacterCustomizationShared
|
||||||
|
|
||||||
public void InitColors()
|
public void InitColors()
|
||||||
{
|
{
|
||||||
PartColorList = PartColorLoader.GetPartColors();
|
try
|
||||||
|
|
||||||
for (int i = 0; i < PartColorList.Length; i++)
|
|
||||||
{
|
{
|
||||||
string[] rgbValues = PartColorList[i].ColorRGB.Replace(" ", "").Split(',');
|
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName))
|
||||||
PartColorList[i].ColorObject = Color.FromArgb(Convert.ToInt32(rgbValues[0]), Convert.ToInt32(rgbValues[1]), Convert.ToInt32(rgbValues[2]));
|
{
|
||||||
|
PartColorList = PartColorLoader.GetPartColors();
|
||||||
|
PartColorListConv = new List<PartColor>();
|
||||||
|
PartColorListConv.AddRange(PartColorList);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
goto Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
PartColorListConv = new List<PartColor>();
|
Failure:
|
||||||
PartColorListConv.AddRange(PartColorList);
|
MessageBox.Show("The part colors cannot be loaded. The character customization menu will now close.", "Novetus - Cannot load part colors.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
Parent.Close();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -11,6 +13,7 @@ public class PartColor
|
||||||
public string ColorName;
|
public string ColorName;
|
||||||
public int ColorID;
|
public int ColorID;
|
||||||
public string ColorRGB;
|
public string ColorRGB;
|
||||||
|
[XmlIgnore]
|
||||||
public Color ColorObject;
|
public Color ColorObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,6 +37,12 @@ public class PartColorLoader
|
||||||
colors = (PartColors)serializer.Deserialize(fs);
|
colors = (PartColors)serializer.Deserialize(fs);
|
||||||
fs.Close();
|
fs.Close();
|
||||||
|
|
||||||
|
for (int i = 0; i < colors.ColorList.Length; i++)
|
||||||
|
{
|
||||||
|
string[] rgbValues = colors.ColorList[i].ColorRGB.Replace(" ", "").Split(',');
|
||||||
|
colors.ColorList[i].ColorObject = Color.FromArgb(Convert.ToInt32(rgbValues[0]), Convert.ToInt32(rgbValues[1]), Convert.ToInt32(rgbValues[2]));
|
||||||
|
}
|
||||||
|
|
||||||
return colors.ColorList;
|
return colors.ColorList;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,16 @@ using System.Xml;
|
||||||
#region SDKApps
|
#region SDKApps
|
||||||
enum SDKApps
|
enum SDKApps
|
||||||
{
|
{
|
||||||
ClientSDK = 0,
|
ClientSDK,
|
||||||
AssetSDK = 1,
|
AssetSDK,
|
||||||
ItemCreationSDK = 2,
|
ItemCreationSDK,
|
||||||
ClientScriptDoc = 3,
|
ClientScriptDoc,
|
||||||
SplashTester = 4,
|
SplashTester,
|
||||||
ScriptGenerator = 5,
|
ScriptGenerator,
|
||||||
LegacyPlaceConverter = 6,
|
LegacyPlaceConverter,
|
||||||
DiogenesEditor = 7,
|
DiogenesEditor,
|
||||||
ClientScriptTester = 8
|
ClientScriptTester,
|
||||||
|
XMLContentEditor
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -1164,32 +1165,5 @@ class SDKFuncs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region SDK Launcher
|
|
||||||
public static SDKApps GetSDKAppForIndex(int index)
|
|
||||||
{
|
|
||||||
switch (index)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
return SDKApps.AssetSDK;
|
|
||||||
case 2:
|
|
||||||
return SDKApps.ItemCreationSDK;
|
|
||||||
case 3:
|
|
||||||
return SDKApps.ClientScriptDoc;
|
|
||||||
case 4:
|
|
||||||
return SDKApps.SplashTester;
|
|
||||||
case 5:
|
|
||||||
return SDKApps.ScriptGenerator;
|
|
||||||
case 6:
|
|
||||||
return SDKApps.LegacyPlaceConverter;
|
|
||||||
case 7:
|
|
||||||
return SDKApps.DiogenesEditor;
|
|
||||||
case 8:
|
|
||||||
return SDKApps.ClientScriptTester;
|
|
||||||
default:
|
|
||||||
return SDKApps.ClientSDK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@
|
||||||
"Diogenes Editor"}, "Diogenes.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
|
"Diogenes Editor"}, "Diogenes.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
|
||||||
System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem(new string[] {
|
System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem(new string[] {
|
||||||
"ClientScript Tester"}, "ClientScriptTester.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
|
"ClientScript Tester"}, "ClientScriptTester.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
|
||||||
|
System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem(new string[] {
|
||||||
|
"XML Content Editor"}, 9, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NovetusSDK));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NovetusSDK));
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||||
|
|
@ -87,7 +89,8 @@
|
||||||
listViewItem6,
|
listViewItem6,
|
||||||
listViewItem7,
|
listViewItem7,
|
||||||
listViewItem8,
|
listViewItem8,
|
||||||
listViewItem9});
|
listViewItem9,
|
||||||
|
listViewItem10});
|
||||||
this.listView1.Location = new System.Drawing.Point(12, 70);
|
this.listView1.Location = new System.Drawing.Point(12, 70);
|
||||||
this.listView1.Name = "listView1";
|
this.listView1.Name = "listView1";
|
||||||
this.listView1.Size = new System.Drawing.Size(260, 229);
|
this.listView1.Size = new System.Drawing.Size(260, 229);
|
||||||
|
|
@ -115,6 +118,7 @@
|
||||||
this.imageList1.Images.SetKeyName(6, "ROBLOXLegacyPlaceConverter.png");
|
this.imageList1.Images.SetKeyName(6, "ROBLOXLegacyPlaceConverter.png");
|
||||||
this.imageList1.Images.SetKeyName(7, "ROBLOXScriptGenerator.png");
|
this.imageList1.Images.SetKeyName(7, "ROBLOXScriptGenerator.png");
|
||||||
this.imageList1.Images.SetKeyName(8, "splash.png");
|
this.imageList1.Images.SetKeyName(8, "splash.png");
|
||||||
|
this.imageList1.Images.SetKeyName(9, "XMLContentEditor.png");
|
||||||
//
|
//
|
||||||
// NovetusSDK
|
// NovetusSDK
|
||||||
//
|
//
|
||||||
|
|
@ -129,8 +133,8 @@
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.Name = "NovetusSDK";
|
this.Name = "NovetusSDK";
|
||||||
this.Text = "Novetus SDK";
|
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "Novetus SDK";
|
||||||
this.Closing += new System.ComponentModel.CancelEventHandler(this.NovetusSDK_Close);
|
this.Closing += new System.ComponentModel.CancelEventHandler(this.NovetusSDK_Close);
|
||||||
this.Load += new System.EventHandler(this.NovetusSDK_Load);
|
this.Load += new System.EventHandler(this.NovetusSDK_Load);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public partial class NovetusSDK : Form
|
||||||
#region Functions
|
#region Functions
|
||||||
public static void LaunchSDKAppByIndex(int index)
|
public static void LaunchSDKAppByIndex(int index)
|
||||||
{
|
{
|
||||||
SDKApps selectedApp = SDKFuncs.GetSDKAppForIndex(index);
|
SDKApps selectedApp = (SDKApps)index;
|
||||||
|
|
||||||
switch (selectedApp)
|
switch (selectedApp)
|
||||||
{
|
{
|
||||||
|
|
@ -96,6 +96,10 @@ public partial class NovetusSDK : Form
|
||||||
GlobalFuncs.LaunchRBXClient("ClientScriptTester", ScriptType.Client, false, false, null);
|
GlobalFuncs.LaunchRBXClient("ClientScriptTester", ScriptType.Client, false, false, null);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
case SDKApps.XMLContentEditor:
|
||||||
|
XMLContentEditor xml = new XMLContentEditor();
|
||||||
|
xml.Show();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ClientinfoEditor cie = new ClientinfoEditor();
|
ClientinfoEditor cie = new ClientinfoEditor();
|
||||||
cie.Show();
|
cie.Show();
|
||||||
|
|
|
||||||
|
|
@ -124,8 +124,8 @@
|
||||||
<value>
|
<value>
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB0
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAU
|
||||||
EgAAAk1TRnQBSQFMAgEBCQEAARgBAAEIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
EwAAAk1TRnQBSQFMAgEBCgEAARABAAEQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAATADAAEBAQABCAYAAQw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IAAYABAwMAAQMCAAGAAQMDAAEBAgABgAEBAgABgAEB
|
||||||
AYABAwMAAQECAAGAAQECAAGAAQECAAHAAQECAAHAAQEBAAEBAcABAQIAAcABAQEAAQEBwAMAAcABgwEA
|
AgABwAEBAgABwAEBAQABAQHAAQECAAHAAQEBAAEBAcADAAHAAYMBAAEBAcADAAHBAYMB8AEBAcADAAHD
|
||||||
AQEBwAMAAcEBgwHwAQEBwAMAAcMBgwHwAQMBwAMAAv8B8AEDAcADAAT/AcABAAL/Cw==
|
AYMB8AEDAcADAAL/AfABAwHAAwAE/wHAAQAC/ws=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,137 @@
|
||||||
|
partial class XMLContentEditor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XMLContentEditor));
|
||||||
|
this.XMLStrip = new System.Windows.Forms.MenuStrip();
|
||||||
|
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.contentProvidersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.partColorsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.XMLView = new System.Windows.Forms.DataGridView();
|
||||||
|
this.XMLStrip.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.XMLView)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// XMLStrip
|
||||||
|
//
|
||||||
|
this.XMLStrip.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.XMLStrip.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.XMLStrip.Dock = System.Windows.Forms.DockStyle.None;
|
||||||
|
this.XMLStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.fileToolStripMenuItem});
|
||||||
|
this.XMLStrip.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.XMLStrip.Name = "XMLStrip";
|
||||||
|
this.XMLStrip.Size = new System.Drawing.Size(45, 24);
|
||||||
|
this.XMLStrip.TabIndex = 29;
|
||||||
|
this.XMLStrip.Text = "menuStrip1";
|
||||||
|
//
|
||||||
|
// fileToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.loadToolStripMenuItem,
|
||||||
|
this.saveToolStripMenuItem});
|
||||||
|
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||||
|
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||||
|
this.fileToolStripMenuItem.Text = "File";
|
||||||
|
//
|
||||||
|
// loadToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.loadToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.contentProvidersToolStripMenuItem,
|
||||||
|
this.partColorsToolStripMenuItem});
|
||||||
|
this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
|
||||||
|
this.loadToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
|
||||||
|
this.loadToolStripMenuItem.Text = "Load";
|
||||||
|
//
|
||||||
|
// contentProvidersToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.contentProvidersToolStripMenuItem.Name = "contentProvidersToolStripMenuItem";
|
||||||
|
this.contentProvidersToolStripMenuItem.Size = new System.Drawing.Size(169, 22);
|
||||||
|
this.contentProvidersToolStripMenuItem.Text = "Content Providers";
|
||||||
|
this.contentProvidersToolStripMenuItem.Click += new System.EventHandler(this.contentProvidersToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// partColorsToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.partColorsToolStripMenuItem.Name = "partColorsToolStripMenuItem";
|
||||||
|
this.partColorsToolStripMenuItem.Size = new System.Drawing.Size(169, 22);
|
||||||
|
this.partColorsToolStripMenuItem.Text = "Part Colors";
|
||||||
|
this.partColorsToolStripMenuItem.Click += new System.EventHandler(this.partColorsToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// saveToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||||
|
this.saveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
|
this.saveToolStripMenuItem.Text = "Save";
|
||||||
|
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// XMLView
|
||||||
|
//
|
||||||
|
this.XMLView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.XMLView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
|
this.XMLView.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
|
||||||
|
this.XMLView.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
|
this.XMLView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
|
this.XMLView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
this.XMLView.Location = new System.Drawing.Point(0, 24);
|
||||||
|
this.XMLView.Name = "XMLView";
|
||||||
|
this.XMLView.Size = new System.Drawing.Size(800, 426);
|
||||||
|
this.XMLView.TabIndex = 30;
|
||||||
|
//
|
||||||
|
// XMLContentEditor
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
this.Controls.Add(this.XMLView);
|
||||||
|
this.Controls.Add(this.XMLStrip);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MinimumSize = new System.Drawing.Size(340, 210);
|
||||||
|
this.Name = "XMLContentEditor";
|
||||||
|
this.Text = "XML Content Editor";
|
||||||
|
this.XMLStrip.ResumeLayout(false);
|
||||||
|
this.XMLStrip.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.XMLView)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private System.Windows.Forms.MenuStrip XMLStrip;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem contentProvidersToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem partColorsToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.DataGridView XMLView;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,222 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
|
enum XMLContentType
|
||||||
|
{
|
||||||
|
ContentProviders,
|
||||||
|
PartColors
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial class XMLContentEditor : Form
|
||||||
|
{
|
||||||
|
public PartColor[] PartColorList;
|
||||||
|
public Provider[] contentProviders;
|
||||||
|
List<object> loaderList = new List<object>();
|
||||||
|
XMLContentType ListType;
|
||||||
|
|
||||||
|
public XMLContentEditor()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadXML(XMLContentType type)
|
||||||
|
{
|
||||||
|
loaderList.Clear();
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case XMLContentType.ContentProviders:
|
||||||
|
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ContentProviderXMLName))
|
||||||
|
{
|
||||||
|
contentProviders = OnlineClothing.GetContentProviders();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Cannot load the Content Provider list because the Content Provider XML file does not exist", "XML Content Editor - Content Provider Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
loaderList.AddRange(contentProviders);
|
||||||
|
break;
|
||||||
|
case XMLContentType.PartColors:
|
||||||
|
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName))
|
||||||
|
{
|
||||||
|
PartColorList = PartColorLoader.GetPartColors();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Cannot load the Part Color list because the Part Color XML file does not exist", "XML Content Editor - Part Color Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
loaderList.AddRange(PartColorList);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
XMLView.Rows.Clear();
|
||||||
|
XMLView.Columns.Clear();
|
||||||
|
|
||||||
|
if (loaderList.Count > 0)
|
||||||
|
{
|
||||||
|
if (loaderList.OfType<Provider>().Any())
|
||||||
|
{
|
||||||
|
XMLView.ColumnCount = 3;
|
||||||
|
XMLView.Columns[0].Name = "Name";
|
||||||
|
XMLView.Columns[1].Name = "URL";
|
||||||
|
XMLView.Columns[2].Name = "Icon File";
|
||||||
|
ListType = XMLContentType.ContentProviders;
|
||||||
|
}
|
||||||
|
else if (loaderList.OfType<PartColor>().Any())
|
||||||
|
{
|
||||||
|
XMLView.ColumnCount = 3;
|
||||||
|
XMLView.Columns[0].Name = "Name";
|
||||||
|
XMLView.Columns[1].Name = "ID";
|
||||||
|
XMLView.Columns[2].Name = "RGB Value";
|
||||||
|
ListType = XMLContentType.PartColors;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var obj in loaderList)
|
||||||
|
{
|
||||||
|
if (obj is Provider)
|
||||||
|
{
|
||||||
|
Provider pro = obj as Provider;
|
||||||
|
string[] providerRow = new string[] { pro.Name, pro.URL, pro.Icon };
|
||||||
|
XMLView.Rows.Add(providerRow);
|
||||||
|
}
|
||||||
|
else if (obj is PartColor)
|
||||||
|
{
|
||||||
|
PartColor pc = obj as PartColor;
|
||||||
|
string[] partColorRow = new string[] { pc.ColorName, pc.ColorID.ToString(), pc.ColorRGB };
|
||||||
|
XMLView.Rows.Add(partColorRow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Unable to load XML file information because no information exists in the XML file.", "XML Content Editor - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//this is completely fucking dumb.
|
||||||
|
private string GenerateComment(string add)
|
||||||
|
{
|
||||||
|
return "Novetus reads through this file in order to grab " + add + " for the Avatar Customization.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void contentProvidersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadXML(XMLContentType.ContentProviders);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void partColorsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadXML(XMLContentType.PartColors);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
List<Provider> providerList = new List<Provider>();
|
||||||
|
List<PartColor> partColorList = new List<PartColor>();
|
||||||
|
|
||||||
|
foreach (DataGridViewRow data in XMLView.Rows)
|
||||||
|
{
|
||||||
|
if (data.IsNewRow) continue;
|
||||||
|
|
||||||
|
//https://stackoverflow.com/questions/8255186/how-to-check-empty-and-null-cells-in-datagridview-using-c-sharp
|
||||||
|
for (int i = 0; i < data.Cells.Count; i++)
|
||||||
|
{
|
||||||
|
if (data.Cells[i].Value == null || data.Cells[i].Value == DBNull.Value || string.IsNullOrWhiteSpace(data.Cells[i].Value.ToString()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (ListType)
|
||||||
|
{
|
||||||
|
case XMLContentType.ContentProviders:
|
||||||
|
Provider pro = new Provider();
|
||||||
|
pro.Name = data.Cells[0].Value.ToString();
|
||||||
|
pro.URL = data.Cells[1].Value.ToString();
|
||||||
|
pro.Icon = data.Cells[2].Value.ToString();
|
||||||
|
providerList.Add(pro);
|
||||||
|
break;
|
||||||
|
case XMLContentType.PartColors:
|
||||||
|
PartColor pc = new PartColor();
|
||||||
|
pc.ColorName = data.Cells[0].Value.ToString();
|
||||||
|
pc.ColorID = Convert.ToInt32(data.Cells[1].Value);
|
||||||
|
pc.ColorRGB = data.Cells[2].Value.ToString();
|
||||||
|
partColorList.Add(pc);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//https://stackoverflow.com/questions/2129414/how-to-insert-xml-comments-in-xml-serialization
|
||||||
|
switch (ListType)
|
||||||
|
{
|
||||||
|
case XMLContentType.ContentProviders:
|
||||||
|
ContentProviders providers = new ContentProviders();
|
||||||
|
providers.Providers = providerList.ToArray();
|
||||||
|
|
||||||
|
XmlSerializer ser = new XmlSerializer(typeof(ContentProviders));
|
||||||
|
|
||||||
|
using (FileStream fs = new FileStream(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ContentProviderXMLName, FileMode.Create))
|
||||||
|
{
|
||||||
|
XmlWriter writer = XmlWriter.Create(fs, new XmlWriterSettings { Indent = true });
|
||||||
|
writer.WriteStartDocument();
|
||||||
|
writer.WriteComment(GenerateComment("content providers"));
|
||||||
|
ser.Serialize(writer, providers);
|
||||||
|
writer.WriteEndDocument();
|
||||||
|
writer.Flush();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case XMLContentType.PartColors:
|
||||||
|
PartColors partColors = new PartColors();
|
||||||
|
partColors.ColorList = partColorList.ToArray();
|
||||||
|
|
||||||
|
XmlSerializer ser2 = new XmlSerializer(typeof(PartColors));
|
||||||
|
|
||||||
|
using (FileStream fs = new FileStream(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName, FileMode.Create))
|
||||||
|
{
|
||||||
|
XmlWriter writer = XmlWriter.Create(fs, new XmlWriterSettings { Indent = true });
|
||||||
|
writer.WriteStartDocument();
|
||||||
|
writer.WriteComment(GenerateComment("part colors"));
|
||||||
|
ser2.Serialize(writer, partColors);
|
||||||
|
writer.WriteEndDocument();
|
||||||
|
writer.Flush();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
providerList.Clear();
|
||||||
|
partColorList.Clear();
|
||||||
|
|
||||||
|
string fileName = "";
|
||||||
|
switch (ListType)
|
||||||
|
{
|
||||||
|
case XMLContentType.ContentProviders:
|
||||||
|
fileName = GlobalPaths.ContentProviderXMLName;
|
||||||
|
break;
|
||||||
|
case XMLContentType.PartColors:
|
||||||
|
fileName = GlobalPaths.PartColorXMLName;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(fileName + " has been saved! The list will now reload.", "XML Content Editor - File Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
LoadXML(ListType);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -6,7 +6,6 @@ using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using static System.Windows.Forms.ListViewItem;
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace NovetusLauncher
|
namespace NovetusLauncher
|
||||||
|
|
@ -58,7 +57,7 @@ namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
var serverItem = new ListViewItem(server.ServerName);
|
var serverItem = new ListViewItem(server.ServerName);
|
||||||
|
|
||||||
var serverClient = new ListViewSubItem(serverItem, server.ServerClient);
|
var serverClient = new ListViewItem.ListViewSubItem(serverItem, server.ServerClient);
|
||||||
serverItem.SubItems.Add(serverClient);
|
serverItem.SubItems.Add(serverClient);
|
||||||
|
|
||||||
ServerListView.Items.Add(serverItem);
|
ServerListView.Items.Add(serverItem);
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,12 @@
|
||||||
<Compile Include="Forms\SDK\SplashTester.Designer.cs">
|
<Compile Include="Forms\SDK\SplashTester.Designer.cs">
|
||||||
<DependentUpon>SplashTester.cs</DependentUpon>
|
<DependentUpon>SplashTester.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\SDK\XMLContentEditor.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\SDK\XMLContentEditor.Designer.cs">
|
||||||
|
<DependentUpon>XMLContentEditor.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\ServerBrowser.cs">
|
<Compile Include="Forms\ServerBrowser.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
@ -281,6 +287,9 @@
|
||||||
<EmbeddedResource Include="Forms\SDK\SplashTester.resx">
|
<EmbeddedResource Include="Forms\SDK\SplashTester.resx">
|
||||||
<DependentUpon>SplashTester.cs</DependentUpon>
|
<DependentUpon>SplashTester.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\SDK\XMLContentEditor.resx">
|
||||||
|
<DependentUpon>XMLContentEditor.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\ServerBrowser.resx">
|
<EmbeddedResource Include="Forms\ServerBrowser.resx">
|
||||||
<DependentUpon>ServerBrowser.cs</DependentUpon>
|
<DependentUpon>ServerBrowser.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 535 B |
Loading…
Reference in New Issue