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()
|
||||
{
|
||||
PartColorList = PartColorLoader.GetPartColors();
|
||||
|
||||
for (int i = 0; i < PartColorList.Length; i++)
|
||||
try
|
||||
{
|
||||
string[] rgbValues = PartColorList[i].ColorRGB.Replace(" ", "").Split(',');
|
||||
PartColorList[i].ColorObject = Color.FromArgb(Convert.ToInt32(rgbValues[0]), Convert.ToInt32(rgbValues[1]), Convert.ToInt32(rgbValues[2]));
|
||||
if (File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.PartColorXMLName))
|
||||
{
|
||||
PartColorList = PartColorLoader.GetPartColors();
|
||||
PartColorListConv = new List<PartColor>();
|
||||
PartColorListConv.AddRange(PartColorList);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Failure;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
goto Failure;
|
||||
}
|
||||
|
||||
PartColorListConv = new List<PartColor>();
|
||||
PartColorListConv.AddRange(PartColorList);
|
||||
Failure:
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#region Usings
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#region Usings
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
#endregion
|
||||
|
||||
|
|
@ -11,6 +13,7 @@ public class PartColor
|
|||
public string ColorName;
|
||||
public int ColorID;
|
||||
public string ColorRGB;
|
||||
[XmlIgnore]
|
||||
public Color ColorObject;
|
||||
}
|
||||
|
||||
|
|
@ -34,6 +37,12 @@ public class PartColorLoader
|
|||
colors = (PartColors)serializer.Deserialize(fs);
|
||||
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;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,15 +13,16 @@ using System.Xml;
|
|||
#region SDKApps
|
||||
enum SDKApps
|
||||
{
|
||||
ClientSDK = 0,
|
||||
AssetSDK = 1,
|
||||
ItemCreationSDK = 2,
|
||||
ClientScriptDoc = 3,
|
||||
SplashTester = 4,
|
||||
ScriptGenerator = 5,
|
||||
LegacyPlaceConverter = 6,
|
||||
DiogenesEditor = 7,
|
||||
ClientScriptTester = 8
|
||||
ClientSDK,
|
||||
AssetSDK,
|
||||
ItemCreationSDK,
|
||||
ClientScriptDoc,
|
||||
SplashTester,
|
||||
ScriptGenerator,
|
||||
LegacyPlaceConverter,
|
||||
DiogenesEditor,
|
||||
ClientScriptTester,
|
||||
XMLContentEditor
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -1164,32 +1165,5 @@ class SDKFuncs
|
|||
}
|
||||
}
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
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));
|
||||
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));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
|
|
@ -87,7 +89,8 @@
|
|||
listViewItem6,
|
||||
listViewItem7,
|
||||
listViewItem8,
|
||||
listViewItem9});
|
||||
listViewItem9,
|
||||
listViewItem10});
|
||||
this.listView1.Location = new System.Drawing.Point(12, 70);
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.Size = new System.Drawing.Size(260, 229);
|
||||
|
|
@ -115,6 +118,7 @@
|
|||
this.imageList1.Images.SetKeyName(6, "ROBLOXLegacyPlaceConverter.png");
|
||||
this.imageList1.Images.SetKeyName(7, "ROBLOXScriptGenerator.png");
|
||||
this.imageList1.Images.SetKeyName(8, "splash.png");
|
||||
this.imageList1.Images.SetKeyName(9, "XMLContentEditor.png");
|
||||
//
|
||||
// NovetusSDK
|
||||
//
|
||||
|
|
@ -129,8 +133,8 @@
|
|||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "NovetusSDK";
|
||||
this.Text = "Novetus SDK";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Novetus SDK";
|
||||
this.Closing += new System.ComponentModel.CancelEventHandler(this.NovetusSDK_Close);
|
||||
this.Load += new System.EventHandler(this.NovetusSDK_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public partial class NovetusSDK : Form
|
|||
#region Functions
|
||||
public static void LaunchSDKAppByIndex(int index)
|
||||
{
|
||||
SDKApps selectedApp = SDKFuncs.GetSDKAppForIndex(index);
|
||||
SDKApps selectedApp = (SDKApps)index;
|
||||
|
||||
switch (selectedApp)
|
||||
{
|
||||
|
|
@ -96,6 +96,10 @@ public partial class NovetusSDK : Form
|
|||
GlobalFuncs.LaunchRBXClient("ClientScriptTester", ScriptType.Client, false, false, null);
|
||||
#endif
|
||||
break;
|
||||
case SDKApps.XMLContentEditor:
|
||||
XMLContentEditor xml = new XMLContentEditor();
|
||||
xml.Show();
|
||||
break;
|
||||
default:
|
||||
ClientinfoEditor cie = new ClientinfoEditor();
|
||||
cie.Show();
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@
|
|||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEA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BAgABgAEBAgABgAEB
|
||||
AgABwAEBAgABwAEBAQABAQHAAQECAAHAAQEBAAEBAcADAAHAAYMBAAEBAcADAAHBAYMB8AEBAcADAAHD
|
||||
AYMB8AEDAcADAAL/AfABAwHAAwAE/wHAAQAC/ws=
|
||||
</value>
|
||||
</data>
|
||||
<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.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Windows.Forms.ListViewItem;
|
||||
#endregion
|
||||
|
||||
namespace NovetusLauncher
|
||||
|
|
@ -58,7 +57,7 @@ namespace NovetusLauncher
|
|||
{
|
||||
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);
|
||||
|
||||
ServerListView.Items.Add(serverItem);
|
||||
|
|
|
|||
|
|
@ -219,6 +219,12 @@
|
|||
<Compile Include="Forms\SDK\SplashTester.Designer.cs">
|
||||
<DependentUpon>SplashTester.cs</DependentUpon>
|
||||
</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">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
|
@ -281,6 +287,9 @@
|
|||
<EmbeddedResource Include="Forms\SDK\SplashTester.resx">
|
||||
<DependentUpon>SplashTester.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SDK\XMLContentEditor.resx">
|
||||
<DependentUpon>XMLContentEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ServerBrowser.resx">
|
||||
<DependentUpon>ServerBrowser.cs</DependentUpon>
|
||||
</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