mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-10 01:46:24 +00:00
Edit, rename, add -- mostly feature complete
This commit is contained in:
parent
a71833d2cb
commit
d885a7d767
14 changed files with 992 additions and 80 deletions
62
EditValue.Designer.cs
generated
Normal file
62
EditValue.Designer.cs
generated
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
namespace NBTPlus
|
||||||
|
{
|
||||||
|
partial class EditValue
|
||||||
|
{
|
||||||
|
/// <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 ()
|
||||||
|
{
|
||||||
|
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// textBox1
|
||||||
|
//
|
||||||
|
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.textBox1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.textBox1.Name = "textBox1";
|
||||||
|
this.textBox1.Size = new System.Drawing.Size(246, 20);
|
||||||
|
this.textBox1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// EditValue
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(246, 20);
|
||||||
|
this.Controls.Add(this.textBox1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "EditValue";
|
||||||
|
this.Text = "Edit Value...";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox textBox1;
|
||||||
|
}
|
||||||
|
}
|
181
EditValue.cs
Normal file
181
EditValue.cs
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Substrate.Nbt;
|
||||||
|
|
||||||
|
namespace NBTPlus
|
||||||
|
{
|
||||||
|
public enum EditValueType
|
||||||
|
{
|
||||||
|
Name,
|
||||||
|
Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial class EditValue : Form
|
||||||
|
{
|
||||||
|
private string _name;
|
||||||
|
private TagNode _tag;
|
||||||
|
private EditValueType _type;
|
||||||
|
|
||||||
|
private List<string> _invalidNames = new List<string>();
|
||||||
|
|
||||||
|
public EditValue (TagNode tag)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
_type = EditValueType.Value;
|
||||||
|
_tag = tag;
|
||||||
|
|
||||||
|
if (tag == null) {
|
||||||
|
DialogResult = DialogResult.Abort;
|
||||||
|
Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetTitle();
|
||||||
|
|
||||||
|
textBox1.Text = _tag.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditValue (string name)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
_type = EditValueType.Name;
|
||||||
|
_name = name ?? "";
|
||||||
|
|
||||||
|
SetTitle();
|
||||||
|
|
||||||
|
textBox1.Text = _name.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string NodeName
|
||||||
|
{
|
||||||
|
get { return _name; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public TagNode NodeTag
|
||||||
|
{
|
||||||
|
get { return _tag; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> InvalidNames
|
||||||
|
{
|
||||||
|
get { return _invalidNames; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetTitle ()
|
||||||
|
{
|
||||||
|
switch (_type) {
|
||||||
|
case EditValueType.Name:
|
||||||
|
base.Text = "Edit Name...";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EditValueType.Value:
|
||||||
|
base.Text = "Edit Value...";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool ValidateInput ()
|
||||||
|
{
|
||||||
|
switch (_type) {
|
||||||
|
case EditValueType.Name:
|
||||||
|
return ValidateNameInput();
|
||||||
|
case EditValueType.Value:
|
||||||
|
return ValidateValueInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool ValidateNameInput ()
|
||||||
|
{
|
||||||
|
string text = textBox1.Text.Trim();
|
||||||
|
if (String.IsNullOrWhiteSpace(text)) {
|
||||||
|
MessageBox.Show("You must provide a nonempty name.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_invalidNames.Contains(text)) {
|
||||||
|
MessageBox.Show("Duplicate name provided.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_name = textBox1.Text.Trim();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool ValidateValueInput ()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
switch (_tag.GetTagType()) {
|
||||||
|
case TagType.TAG_BYTE:
|
||||||
|
_tag.ToTagByte().Data = byte.Parse(textBox1.Text);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagType.TAG_SHORT:
|
||||||
|
_tag.ToTagShort().Data = short.Parse(textBox1.Text);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagType.TAG_INT:
|
||||||
|
_tag.ToTagInt().Data = int.Parse(textBox1.Text);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagType.TAG_LONG:
|
||||||
|
_tag.ToTagLong().Data = long.Parse(textBox1.Text);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagType.TAG_FLOAT:
|
||||||
|
_tag.ToTagFloat().Data = float.Parse(textBox1.Text);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagType.TAG_DOUBLE:
|
||||||
|
_tag.ToTagDouble().Data = double.Parse(textBox1.Text);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TagType.TAG_STRING:
|
||||||
|
_tag.ToTagString().Data = textBox1.Text;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (FormatException) {
|
||||||
|
MessageBox.Show("The value is formatted incorrectly for the given type.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (OverflowException) {
|
||||||
|
MessageBox.Show("The value is outside the acceptable range for the given type.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnKeyDown (KeyEventArgs e)
|
||||||
|
{
|
||||||
|
switch (e.KeyCode) {
|
||||||
|
case Keys.Escape:
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Keys.Enter:
|
||||||
|
if (ValidateInput()) {
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnKeyDown(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
EditValue.resx
Normal file
120
EditValue.resx
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
172
Form1.Designer.cs
generated
172
Form1.Designer.cs
generated
|
@ -31,23 +31,23 @@
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.openFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
|
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
|
||||||
this._nodeTree = new System.Windows.Forms.TreeView();
|
this._nodeTree = new System.Windows.Forms.TreeView();
|
||||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||||
|
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this._nodeContainerContext = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this._buttonOpen = new System.Windows.Forms.ToolStripButton();
|
this._buttonOpen = new System.Windows.Forms.ToolStripButton();
|
||||||
this._buttonSave = new System.Windows.Forms.ToolStripButton();
|
this._buttonSave = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this._buttonRename = new System.Windows.Forms.ToolStripButton();
|
this._buttonRename = new System.Windows.Forms.ToolStripButton();
|
||||||
this._buttonEdit = new System.Windows.Forms.ToolStripButton();
|
this._buttonEdit = new System.Windows.Forms.ToolStripButton();
|
||||||
this._buttonDelete = new System.Windows.Forms.ToolStripButton();
|
this._buttonDelete = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this._buttonAddTagByte = new System.Windows.Forms.ToolStripButton();
|
this._buttonAddTagByte = new System.Windows.Forms.ToolStripButton();
|
||||||
this._buttonAddTagShort = new System.Windows.Forms.ToolStripButton();
|
this._buttonAddTagShort = new System.Windows.Forms.ToolStripButton();
|
||||||
this._buttonAddTagInt = new System.Windows.Forms.ToolStripButton();
|
this._buttonAddTagInt = new System.Windows.Forms.ToolStripButton();
|
||||||
|
@ -58,11 +58,20 @@
|
||||||
this._buttonAddTagString = new System.Windows.Forms.ToolStripButton();
|
this._buttonAddTagString = new System.Windows.Forms.ToolStripButton();
|
||||||
this._buttonAddTagList = new System.Windows.Forms.ToolStripButton();
|
this._buttonAddTagList = new System.Windows.Forms.ToolStripButton();
|
||||||
this._buttonAddTagCompound = new System.Windows.Forms.ToolStripButton();
|
this._buttonAddTagCompound = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.openFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.saveItemAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.openSubTreeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.saveItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
this.toolStripContainer1.ContentPanel.SuspendLayout();
|
this.toolStripContainer1.ContentPanel.SuspendLayout();
|
||||||
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
|
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
|
||||||
this.toolStripContainer1.SuspendLayout();
|
this.toolStripContainer1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
|
this._nodeContainerContext.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
|
@ -82,29 +91,25 @@
|
||||||
//
|
//
|
||||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.openToolStripMenuItem,
|
this.openToolStripMenuItem,
|
||||||
this.openFolderToolStripMenuItem});
|
this.openFolderToolStripMenuItem,
|
||||||
|
this.toolStripSeparator3,
|
||||||
|
this.saveToolStripMenuItem,
|
||||||
|
this.saveItemAsToolStripMenuItem,
|
||||||
|
this.toolStripSeparator4,
|
||||||
|
this.exitToolStripMenuItem});
|
||||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||||
this.fileToolStripMenuItem.Text = "&File";
|
this.fileToolStripMenuItem.Text = "&File";
|
||||||
//
|
//
|
||||||
// openToolStripMenuItem
|
// toolStripSeparator3
|
||||||
//
|
//
|
||||||
this.openToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.folder_open_document;
|
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
this.toolStripSeparator3.Size = new System.Drawing.Size(220, 6);
|
||||||
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
|
||||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
|
||||||
this.openToolStripMenuItem.Text = "&Open...";
|
|
||||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
|
||||||
//
|
//
|
||||||
// openFolderToolStripMenuItem
|
// toolStripSeparator4
|
||||||
//
|
//
|
||||||
this.openFolderToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.folder_open;
|
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||||
this.openFolderToolStripMenuItem.Name = "openFolderToolStripMenuItem";
|
this.toolStripSeparator4.Size = new System.Drawing.Size(220, 6);
|
||||||
this.openFolderToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
|
||||||
| System.Windows.Forms.Keys.O)));
|
|
||||||
this.openFolderToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
|
||||||
this.openFolderToolStripMenuItem.Text = "Open Folder...";
|
|
||||||
this.openFolderToolStripMenuItem.Click += new System.EventHandler(this.openFolderToolStripMenuItem_Click);
|
|
||||||
//
|
//
|
||||||
// editToolStripMenuItem
|
// editToolStripMenuItem
|
||||||
//
|
//
|
||||||
|
@ -126,13 +131,6 @@
|
||||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||||
this.helpToolStripMenuItem.Text = "&Help";
|
this.helpToolStripMenuItem.Text = "&Help";
|
||||||
//
|
//
|
||||||
// aboutToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
|
||||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
|
|
||||||
this.aboutToolStripMenuItem.Text = "&About";
|
|
||||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// toolStripContainer1
|
// toolStripContainer1
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -208,6 +206,24 @@
|
||||||
this.toolStrip1.Stretch = true;
|
this.toolStrip1.Stretch = true;
|
||||||
this.toolStrip1.TabIndex = 0;
|
this.toolStrip1.TabIndex = 0;
|
||||||
//
|
//
|
||||||
|
// toolStripSeparator1
|
||||||
|
//
|
||||||
|
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
|
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// toolStripSeparator2
|
||||||
|
//
|
||||||
|
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||||
|
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// _nodeContainerContext
|
||||||
|
//
|
||||||
|
this._nodeContainerContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.openSubTreeToolStripMenuItem,
|
||||||
|
this.saveItemToolStripMenuItem});
|
||||||
|
this._nodeContainerContext.Name = "contextMenuStrip1";
|
||||||
|
this._nodeContainerContext.Size = new System.Drawing.Size(180, 48);
|
||||||
|
//
|
||||||
// _buttonOpen
|
// _buttonOpen
|
||||||
//
|
//
|
||||||
this._buttonOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
this._buttonOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
@ -228,11 +244,6 @@
|
||||||
this._buttonSave.Text = "Save All Modified Tags";
|
this._buttonSave.Text = "Save All Modified Tags";
|
||||||
this._buttonSave.Click += new System.EventHandler(this._buttonSave_Click);
|
this._buttonSave.Click += new System.EventHandler(this._buttonSave_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator1
|
|
||||||
//
|
|
||||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
|
||||||
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
|
|
||||||
//
|
|
||||||
// _buttonRename
|
// _buttonRename
|
||||||
//
|
//
|
||||||
this._buttonRename.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
this._buttonRename.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
@ -241,6 +252,7 @@
|
||||||
this._buttonRename.Name = "_buttonRename";
|
this._buttonRename.Name = "_buttonRename";
|
||||||
this._buttonRename.Size = new System.Drawing.Size(23, 22);
|
this._buttonRename.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonRename.Text = "Rename Tag";
|
this._buttonRename.Text = "Rename Tag";
|
||||||
|
this._buttonRename.Click += new System.EventHandler(this._buttonRename_Click);
|
||||||
//
|
//
|
||||||
// _buttonEdit
|
// _buttonEdit
|
||||||
//
|
//
|
||||||
|
@ -250,6 +262,7 @@
|
||||||
this._buttonEdit.Name = "_buttonEdit";
|
this._buttonEdit.Name = "_buttonEdit";
|
||||||
this._buttonEdit.Size = new System.Drawing.Size(23, 22);
|
this._buttonEdit.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonEdit.Text = "Edit Tag Value";
|
this._buttonEdit.Text = "Edit Tag Value";
|
||||||
|
this._buttonEdit.Click += new System.EventHandler(this._buttonEdit_Click);
|
||||||
//
|
//
|
||||||
// _buttonDelete
|
// _buttonDelete
|
||||||
//
|
//
|
||||||
|
@ -259,12 +272,7 @@
|
||||||
this._buttonDelete.Name = "_buttonDelete";
|
this._buttonDelete.Name = "_buttonDelete";
|
||||||
this._buttonDelete.Size = new System.Drawing.Size(23, 22);
|
this._buttonDelete.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonDelete.Text = "Delete Tag";
|
this._buttonDelete.Text = "Delete Tag";
|
||||||
this._buttonDelete.Click += new System.EventHandler(this.toolStripButton5_Click);
|
this._buttonDelete.Click += new System.EventHandler(this._buttonDelete_Click);
|
||||||
//
|
|
||||||
// toolStripSeparator2
|
|
||||||
//
|
|
||||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
|
||||||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
|
||||||
//
|
//
|
||||||
// _buttonAddTagByte
|
// _buttonAddTagByte
|
||||||
//
|
//
|
||||||
|
@ -274,6 +282,7 @@
|
||||||
this._buttonAddTagByte.Name = "_buttonAddTagByte";
|
this._buttonAddTagByte.Name = "_buttonAddTagByte";
|
||||||
this._buttonAddTagByte.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagByte.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagByte.Text = "Add Byte Tag";
|
this._buttonAddTagByte.Text = "Add Byte Tag";
|
||||||
|
this._buttonAddTagByte.Click += new System.EventHandler(this._buttonAddTagByte_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagShort
|
// _buttonAddTagShort
|
||||||
//
|
//
|
||||||
|
@ -283,6 +292,7 @@
|
||||||
this._buttonAddTagShort.Name = "_buttonAddTagShort";
|
this._buttonAddTagShort.Name = "_buttonAddTagShort";
|
||||||
this._buttonAddTagShort.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagShort.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagShort.Text = "Add Short Tag";
|
this._buttonAddTagShort.Text = "Add Short Tag";
|
||||||
|
this._buttonAddTagShort.Click += new System.EventHandler(this._buttonAddTagShort_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagInt
|
// _buttonAddTagInt
|
||||||
//
|
//
|
||||||
|
@ -292,6 +302,7 @@
|
||||||
this._buttonAddTagInt.Name = "_buttonAddTagInt";
|
this._buttonAddTagInt.Name = "_buttonAddTagInt";
|
||||||
this._buttonAddTagInt.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagInt.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagInt.Text = "Add Int Tag";
|
this._buttonAddTagInt.Text = "Add Int Tag";
|
||||||
|
this._buttonAddTagInt.Click += new System.EventHandler(this._buttonAddTagInt_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagLong
|
// _buttonAddTagLong
|
||||||
//
|
//
|
||||||
|
@ -301,6 +312,7 @@
|
||||||
this._buttonAddTagLong.Name = "_buttonAddTagLong";
|
this._buttonAddTagLong.Name = "_buttonAddTagLong";
|
||||||
this._buttonAddTagLong.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagLong.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagLong.Text = "Add Long Tag";
|
this._buttonAddTagLong.Text = "Add Long Tag";
|
||||||
|
this._buttonAddTagLong.Click += new System.EventHandler(this._buttonAddTagLong_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagFloat
|
// _buttonAddTagFloat
|
||||||
//
|
//
|
||||||
|
@ -310,6 +322,7 @@
|
||||||
this._buttonAddTagFloat.Name = "_buttonAddTagFloat";
|
this._buttonAddTagFloat.Name = "_buttonAddTagFloat";
|
||||||
this._buttonAddTagFloat.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagFloat.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagFloat.Text = "Add Float Tag";
|
this._buttonAddTagFloat.Text = "Add Float Tag";
|
||||||
|
this._buttonAddTagFloat.Click += new System.EventHandler(this._buttonAddTagFloat_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagDouble
|
// _buttonAddTagDouble
|
||||||
//
|
//
|
||||||
|
@ -319,6 +332,7 @@
|
||||||
this._buttonAddTagDouble.Name = "_buttonAddTagDouble";
|
this._buttonAddTagDouble.Name = "_buttonAddTagDouble";
|
||||||
this._buttonAddTagDouble.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagDouble.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagDouble.Text = "Add Double Tag";
|
this._buttonAddTagDouble.Text = "Add Double Tag";
|
||||||
|
this._buttonAddTagDouble.Click += new System.EventHandler(this._buttonAddTagDouble_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagByteArray
|
// _buttonAddTagByteArray
|
||||||
//
|
//
|
||||||
|
@ -328,6 +342,7 @@
|
||||||
this._buttonAddTagByteArray.Name = "_buttonAddTagByteArray";
|
this._buttonAddTagByteArray.Name = "_buttonAddTagByteArray";
|
||||||
this._buttonAddTagByteArray.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagByteArray.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagByteArray.Text = "Add Byte Array Tag";
|
this._buttonAddTagByteArray.Text = "Add Byte Array Tag";
|
||||||
|
this._buttonAddTagByteArray.Click += new System.EventHandler(this._buttonAddTagByteArray_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagString
|
// _buttonAddTagString
|
||||||
//
|
//
|
||||||
|
@ -337,6 +352,7 @@
|
||||||
this._buttonAddTagString.Name = "_buttonAddTagString";
|
this._buttonAddTagString.Name = "_buttonAddTagString";
|
||||||
this._buttonAddTagString.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagString.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagString.Text = "Add String Tag";
|
this._buttonAddTagString.Text = "Add String Tag";
|
||||||
|
this._buttonAddTagString.Click += new System.EventHandler(this._buttonAddTagString_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagList
|
// _buttonAddTagList
|
||||||
//
|
//
|
||||||
|
@ -346,6 +362,7 @@
|
||||||
this._buttonAddTagList.Name = "_buttonAddTagList";
|
this._buttonAddTagList.Name = "_buttonAddTagList";
|
||||||
this._buttonAddTagList.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagList.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagList.Text = "Add List Tag";
|
this._buttonAddTagList.Text = "Add List Tag";
|
||||||
|
this._buttonAddTagList.Click += new System.EventHandler(this._buttonAddTagList_Click);
|
||||||
//
|
//
|
||||||
// _buttonAddTagCompound
|
// _buttonAddTagCompound
|
||||||
//
|
//
|
||||||
|
@ -355,6 +372,74 @@
|
||||||
this._buttonAddTagCompound.Name = "_buttonAddTagCompound";
|
this._buttonAddTagCompound.Name = "_buttonAddTagCompound";
|
||||||
this._buttonAddTagCompound.Size = new System.Drawing.Size(23, 22);
|
this._buttonAddTagCompound.Size = new System.Drawing.Size(23, 22);
|
||||||
this._buttonAddTagCompound.Text = "Add Compound Tag";
|
this._buttonAddTagCompound.Text = "Add Compound Tag";
|
||||||
|
this._buttonAddTagCompound.Click += new System.EventHandler(this._buttonAddTagCompound_Click);
|
||||||
|
//
|
||||||
|
// openToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.openToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.folder_open_document;
|
||||||
|
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||||
|
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||||
|
this.openToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
||||||
|
this.openToolStripMenuItem.Text = "&Open...";
|
||||||
|
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// openFolderToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.openFolderToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.folder_open;
|
||||||
|
this.openFolderToolStripMenuItem.Name = "openFolderToolStripMenuItem";
|
||||||
|
this.openFolderToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||||
|
| System.Windows.Forms.Keys.O)));
|
||||||
|
this.openFolderToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
||||||
|
this.openFolderToolStripMenuItem.Text = "Open &Folder...";
|
||||||
|
this.openFolderToolStripMenuItem.Click += new System.EventHandler(this.openFolderToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// saveToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.saveToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.disk;
|
||||||
|
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||||
|
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||||
|
this.saveToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
||||||
|
this.saveToolStripMenuItem.Text = "&Save";
|
||||||
|
//
|
||||||
|
// saveItemAsToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.saveItemAsToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.disk__pencil;
|
||||||
|
this.saveItemAsToolStripMenuItem.Name = "saveItemAsToolStripMenuItem";
|
||||||
|
this.saveItemAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||||
|
| System.Windows.Forms.Keys.S)));
|
||||||
|
this.saveItemAsToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
||||||
|
this.saveItemAsToolStripMenuItem.Text = "Save Item &As...";
|
||||||
|
//
|
||||||
|
// exitToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.exitToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.door;
|
||||||
|
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||||
|
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
||||||
|
this.exitToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
||||||
|
this.exitToolStripMenuItem.Text = "E&xit";
|
||||||
|
//
|
||||||
|
// aboutToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.aboutToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.information_frame;
|
||||||
|
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||||
|
this.aboutToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||||
|
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
|
||||||
|
this.aboutToolStripMenuItem.Text = "&About";
|
||||||
|
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// openSubTreeToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.openSubTreeToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.folder_open;
|
||||||
|
this.openSubTreeToolStripMenuItem.Name = "openSubTreeToolStripMenuItem";
|
||||||
|
this.openSubTreeToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
|
||||||
|
this.openSubTreeToolStripMenuItem.Text = "Open Node As Root";
|
||||||
|
//
|
||||||
|
// saveItemToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.saveItemToolStripMenuItem.Image = global::NBTPlus.Properties.Resources.disk;
|
||||||
|
this.saveItemToolStripMenuItem.Name = "saveItemToolStripMenuItem";
|
||||||
|
this.saveItemToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
|
||||||
|
this.saveItemToolStripMenuItem.Text = "Save Node";
|
||||||
//
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
|
@ -375,6 +460,7 @@
|
||||||
this.toolStripContainer1.PerformLayout();
|
this.toolStripContainer1.PerformLayout();
|
||||||
this.toolStrip1.ResumeLayout(false);
|
this.toolStrip1.ResumeLayout(false);
|
||||||
this.toolStrip1.PerformLayout();
|
this.toolStrip1.PerformLayout();
|
||||||
|
this._nodeContainerContext.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -411,6 +497,14 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem openFolderToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem openFolderToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip _nodeContainerContext;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem openSubTreeToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saveItemToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saveItemAsToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
426
Form1.cs
426
Form1.cs
|
@ -23,6 +23,8 @@ namespace NBTPlus
|
||||||
_nodeTree.BeforeExpand += NodeExpand;
|
_nodeTree.BeforeExpand += NodeExpand;
|
||||||
_nodeTree.AfterCollapse += NodeCollapse;
|
_nodeTree.AfterCollapse += NodeCollapse;
|
||||||
_nodeTree.AfterSelect += NodeSelected;
|
_nodeTree.AfterSelect += NodeSelected;
|
||||||
|
_nodeTree.NodeMouseClick += NodeClicked;
|
||||||
|
_nodeTree.NodeMouseDoubleClick += NodeDoubleClicked;
|
||||||
|
|
||||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||||
path = Path.Combine(path, ".minecraft");
|
path = Path.Combine(path, ".minecraft");
|
||||||
|
@ -72,12 +74,26 @@ namespace NBTPlus
|
||||||
|
|
||||||
private TreeNode NodeFromTag (TagNode tag, string name)
|
private TreeNode NodeFromTag (TagNode tag, string name)
|
||||||
{
|
{
|
||||||
string text = String.IsNullOrEmpty(name) ? "" : name + ": ";
|
|
||||||
|
|
||||||
TreeNode node = new TreeNode();
|
TreeNode node = new TreeNode();
|
||||||
node.ImageIndex = _tagIconIndex[tag.GetTagType()];
|
node.ImageIndex = _tagIconIndex[tag.GetTagType()];
|
||||||
node.SelectedImageIndex = _tagIconIndex[tag.GetTagType()];
|
node.SelectedImageIndex = _tagIconIndex[tag.GetTagType()];
|
||||||
node.Tag = tag;
|
node.Tag = tag;
|
||||||
|
node.Text = GetNodeText(name, tag);
|
||||||
|
|
||||||
|
if (tag.GetTagType() == TagType.TAG_LIST) {
|
||||||
|
PopulateNodeFromTag(node, tag.ToTagList());
|
||||||
|
}
|
||||||
|
else if (tag.GetTagType() == TagType.TAG_COMPOUND) {
|
||||||
|
PopulateNodeFromTag(node, tag.ToTagCompound());
|
||||||
|
}
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTagNodeText (TagNode tag)
|
||||||
|
{
|
||||||
|
if (tag == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
switch (tag.GetTagType()) {
|
switch (tag.GetTagType()) {
|
||||||
case TagType.TAG_BYTE:
|
case TagType.TAG_BYTE:
|
||||||
|
@ -87,25 +103,46 @@ namespace NBTPlus
|
||||||
case TagType.TAG_FLOAT:
|
case TagType.TAG_FLOAT:
|
||||||
case TagType.TAG_DOUBLE:
|
case TagType.TAG_DOUBLE:
|
||||||
case TagType.TAG_STRING:
|
case TagType.TAG_STRING:
|
||||||
node.Text = text + tag.ToString();
|
return tag.ToString();
|
||||||
break;
|
|
||||||
|
|
||||||
case TagType.TAG_BYTE_ARRAY:
|
case TagType.TAG_BYTE_ARRAY:
|
||||||
node.Text = text + tag.ToTagByteArray().Length + " bytes";
|
return tag.ToTagByteArray().Length + " bytes";
|
||||||
break;
|
|
||||||
|
|
||||||
case TagType.TAG_LIST:
|
case TagType.TAG_LIST:
|
||||||
node.Text = text + tag.ToTagList().Count + " entries";
|
return tag.ToTagList().Count + " entries";
|
||||||
PopulateNodeFromTag(node, tag.ToTagList());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TagType.TAG_COMPOUND:
|
case TagType.TAG_COMPOUND:
|
||||||
node.Text = text + tag.ToTagCompound().Count + " entries";
|
return tag.ToTagCompound().Count + " entries";
|
||||||
PopulateNodeFromTag(node, tag.ToTagCompound());
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return node;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetNodeText (string name, string value)
|
||||||
|
{
|
||||||
|
name = String.IsNullOrEmpty(name) ? "" : name + ": ";
|
||||||
|
value = value ?? "";
|
||||||
|
|
||||||
|
return name + value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetNodeText (string name, TagNode tag)
|
||||||
|
{
|
||||||
|
return GetNodeText(name, GetTagNodeText(tag));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetNodeText (TreeNode node)
|
||||||
|
{
|
||||||
|
return GetNodeText(GetTagNodeName(node), GetTagNodeText(node));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTagNodeText (TreeNode node)
|
||||||
|
{
|
||||||
|
TagNode tag = GetTagNode(node);
|
||||||
|
if (tag == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return GetTagNodeText(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PopulateNodeFromTag (TreeNode node, TagNodeList list)
|
private void PopulateNodeFromTag (TreeNode node, TagNodeList list)
|
||||||
|
@ -156,7 +193,9 @@ namespace NBTPlus
|
||||||
for (int x = 0; x < 32; x++) {
|
for (int x = 0; x < 32; x++) {
|
||||||
for (int y = 0; y < 32; y++) {
|
for (int y = 0; y < 32; y++) {
|
||||||
if (rf.HasChunk(x, y)) {
|
if (rf.HasChunk(x, y)) {
|
||||||
node.Nodes.Add(CreateLazyChunk(rf, x, y));
|
TreeNode child = CreateLazyChunk(rf, x, y);
|
||||||
|
node.Nodes.Add(child);
|
||||||
|
LinkDataNodeParent(child, node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,14 +370,32 @@ namespace NBTPlus
|
||||||
UpdateToolbar();
|
UpdateToolbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void NodeClicked (object sender, TreeNodeMouseClickEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void NodeDoubleClicked (object sender, TreeNodeMouseClickEventArgs e)
|
||||||
|
{
|
||||||
|
EditNodeValue(_nodeTree.SelectedNode);
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateToolbar ()
|
private void UpdateToolbar ()
|
||||||
{
|
{
|
||||||
TreeNode node = _nodeTree.SelectedNode;
|
TreeNode node = _nodeTree.SelectedNode;
|
||||||
TagNode tag = node.Tag as TagNode;
|
TagNode tag = node.Tag as TagNode;
|
||||||
|
|
||||||
_buttonRename.Enabled = tag != null;
|
if (tag == null && node.Tag is NbtDataNode) {
|
||||||
_buttonDelete.Enabled = tag != null;
|
NbtDataNode data = node.Tag as NbtDataNode;
|
||||||
|
if (data.Tree != null)
|
||||||
|
tag = data.Tree.Root;
|
||||||
|
}
|
||||||
|
|
||||||
|
_buttonRename.Enabled = tag != null && node.Tag is TagNode;
|
||||||
|
_buttonDelete.Enabled = tag != null && node.Tag is TagNode;
|
||||||
_buttonEdit.Enabled = tag != null
|
_buttonEdit.Enabled = tag != null
|
||||||
|
&& node.Tag is TagNode
|
||||||
|
&& tag.GetTagType() != TagType.TAG_BYTE_ARRAY
|
||||||
&& tag.GetTagType() != TagType.TAG_COMPOUND
|
&& tag.GetTagType() != TagType.TAG_COMPOUND
|
||||||
&& tag.GetTagType() != TagType.TAG_LIST;
|
&& tag.GetTagType() != TagType.TAG_LIST;
|
||||||
|
|
||||||
|
@ -427,7 +484,9 @@ namespace NBTPlus
|
||||||
public void TryLoadFile (TreeNodeCollection parent, string path)
|
public void TryLoadFile (TreeNodeCollection parent, string path)
|
||||||
{
|
{
|
||||||
if (Path.GetExtension(path) == ".mcr") {
|
if (Path.GetExtension(path) == ".mcr") {
|
||||||
parent.Add(CreateLazyRegion(path));
|
TreeNode node = CreateLazyRegion(path);
|
||||||
|
parent.Add(node);
|
||||||
|
LinkDataNodeParent(node, node.Parent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,6 +560,9 @@ namespace NBTPlus
|
||||||
if (node.Tag is NbtFileData) {
|
if (node.Tag is NbtFileData) {
|
||||||
SaveNbtFileNode(node);
|
SaveNbtFileNode(node);
|
||||||
}
|
}
|
||||||
|
else if (node.Tag is RegionChunkData) {
|
||||||
|
SaveRegionChunkNode(node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveNbtFileNode (TreeNode node)
|
private void SaveNbtFileNode (TreeNode node)
|
||||||
|
@ -516,6 +578,18 @@ namespace NBTPlus
|
||||||
data.Modified = false;
|
data.Modified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SaveRegionChunkNode (TreeNode node)
|
||||||
|
{
|
||||||
|
RegionChunkData data = node.Tag as RegionChunkData;
|
||||||
|
if (data == null || !data.Modified)
|
||||||
|
return;
|
||||||
|
|
||||||
|
using (Stream str = data.Region.GetChunkDataOutputStream(data.X, data.Z)) {
|
||||||
|
data.Tree.WriteTo(str);
|
||||||
|
}
|
||||||
|
data.Modified = false;
|
||||||
|
}
|
||||||
|
|
||||||
private void aboutToolStripMenuItem_Click (object sender, EventArgs e)
|
private void aboutToolStripMenuItem_Click (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
new About().Show();
|
new About().Show();
|
||||||
|
@ -540,25 +614,43 @@ namespace NBTPlus
|
||||||
OpenFile();
|
OpenFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toolStripButton5_Click (object sender, EventArgs e)
|
private TreeNode BaseNode (TreeNode node)
|
||||||
{
|
{
|
||||||
if (_nodeTree.SelectedNode == null)
|
if (node == null)
|
||||||
return;
|
return null;
|
||||||
|
|
||||||
TreeNode baseNode = _nodeTree.SelectedNode;
|
TreeNode baseNode = node;
|
||||||
while (baseNode.Tag == null || !(baseNode.Tag is DataNode)) {
|
while (baseNode.Tag == null || !(baseNode.Tag is DataNode)) {
|
||||||
baseNode = baseNode.Parent;
|
baseNode = baseNode.Parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return baseNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Tag Deletion
|
||||||
|
|
||||||
|
private void DeleteNode (TreeNode node)
|
||||||
|
{
|
||||||
|
TreeNode baseNode = BaseNode(node);
|
||||||
|
|
||||||
// Can only delete internal NBT nodes
|
// Can only delete internal NBT nodes
|
||||||
if (baseNode == null || baseNode == _nodeTree.SelectedNode)
|
if (baseNode == null || baseNode == node)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
(baseNode.Tag as DataNode).Modified = true;
|
(baseNode.Tag as DataNode).Modified = true;
|
||||||
|
|
||||||
DeleteNodeNbtTag(_nodeTree.SelectedNode);
|
DeleteNodeNbtTag(node);
|
||||||
|
|
||||||
_nodeTree.SelectedNode.Remove();
|
if (node.Parent != null) {
|
||||||
|
node.Parent.Text = GetNodeText(node.Parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
node.Remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonDelete_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DeleteNode(_nodeTree.SelectedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeleteNodeNbtTag (TreeNode node)
|
private void DeleteNodeNbtTag (TreeNode node)
|
||||||
|
@ -604,10 +696,296 @@ namespace NBTPlus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
private void _buttonSave_Click (object sender, EventArgs e)
|
private void _buttonSave_Click (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SaveAll();
|
SaveAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private TagNode GetTagNode (TreeNode node)
|
||||||
|
{
|
||||||
|
if (node == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (node.Tag is TagNode) {
|
||||||
|
return node.Tag as TagNode;
|
||||||
|
}
|
||||||
|
else if (node.Tag is NbtDataNode) {
|
||||||
|
NbtDataNode data = node.Tag as NbtDataNode;
|
||||||
|
if (data == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return data.Tree.Root;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private TagNode GetParentTagNode (TreeNode node)
|
||||||
|
{
|
||||||
|
if (GetTagNode(node) == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return GetTagNode(node.Parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetTagNodeName (TreeNode node)
|
||||||
|
{
|
||||||
|
TagNode tag = GetTagNode(node);
|
||||||
|
if (tag == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
TagNode parentTag = GetTagNode(node.Parent);
|
||||||
|
if (parentTag == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (parentTag.GetTagType() != TagType.TAG_COMPOUND)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
foreach (KeyValuePair<string, TagNode> sub in parentTag.ToTagCompound()) {
|
||||||
|
if (sub.Value == tag)
|
||||||
|
return sub.Key;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool SetTagNodeName (TreeNode node, string name)
|
||||||
|
{
|
||||||
|
TagNode tag = GetTagNode(node);
|
||||||
|
if (tag == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
TagNode parentTag = GetTagNode(node.Parent);
|
||||||
|
if (parentTag == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (parentTag.GetTagType() != TagType.TAG_COMPOUND)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (parentTag.ToTagCompound().ContainsKey(name))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
string oldName = null;
|
||||||
|
foreach (KeyValuePair<string, TagNode> sub in parentTag.ToTagCompound()) {
|
||||||
|
if (sub.Value == tag) {
|
||||||
|
oldName = sub.Key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parentTag.ToTagCompound().Remove(oldName);
|
||||||
|
parentTag.ToTagCompound().Add(name, tag);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditNodeValue (TreeNode node)
|
||||||
|
{
|
||||||
|
if (node == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TagNode tag = GetTagNode(node);
|
||||||
|
if (tag == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (tag.GetTagType() == TagType.TAG_BYTE_ARRAY ||
|
||||||
|
tag.GetTagType() == TagType.TAG_LIST ||
|
||||||
|
tag.GetTagType() == TagType.TAG_COMPOUND)
|
||||||
|
return;
|
||||||
|
|
||||||
|
EditValue form = new EditValue(tag);
|
||||||
|
if (form.ShowDialog() == DialogResult.OK) {
|
||||||
|
TreeNode baseNode = BaseNode(node);
|
||||||
|
if (baseNode != null) {
|
||||||
|
(baseNode.Tag as DataNode).Modified = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
node.Text = GetNodeText(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonEdit_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
EditNodeValue(_nodeTree.SelectedNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditNodeName (TreeNode node)
|
||||||
|
{
|
||||||
|
if (node == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TagNode tag = GetTagNode(node);
|
||||||
|
if (tag == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
string name = GetTagNodeName(node);
|
||||||
|
if (name == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
EditValue form = new EditValue(name);
|
||||||
|
|
||||||
|
TagNode parentTag = GetParentTagNode(node);
|
||||||
|
foreach (string key in parentTag.ToTagCompound().Keys) {
|
||||||
|
form.InvalidNames.Add(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (form.ShowDialog() == DialogResult.OK) {
|
||||||
|
TreeNode baseNode = BaseNode(node);
|
||||||
|
if (baseNode != null) {
|
||||||
|
(baseNode.Tag as DataNode).Modified = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetTagNodeName(node, form.NodeName);
|
||||||
|
node.Text = GetNodeText(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonRename_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
EditNodeName(_nodeTree.SelectedNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddTagToNode (TreeNode node, TagType type)
|
||||||
|
{
|
||||||
|
TagNode tag = GetTagNode(node);
|
||||||
|
if (tag == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (tag.GetTagType() != TagType.TAG_COMPOUND &&
|
||||||
|
tag.GetTagType() != TagType.TAG_LIST)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (tag.GetTagType() == TagType.TAG_LIST &&
|
||||||
|
tag.ToTagList().ValueType != type &&
|
||||||
|
tag.ToTagList().Count > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TagNode newNode = null;
|
||||||
|
switch (type) {
|
||||||
|
case TagType.TAG_BYTE:
|
||||||
|
newNode = new TagNodeByte();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_SHORT:
|
||||||
|
newNode = new TagNodeShort();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_INT:
|
||||||
|
newNode = new TagNodeInt();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_LONG:
|
||||||
|
newNode = new TagNodeLong();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_FLOAT:
|
||||||
|
newNode = new TagNodeFloat();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_DOUBLE:
|
||||||
|
newNode = new TagNodeDouble();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_BYTE_ARRAY:
|
||||||
|
newNode = new TagNodeByteArray();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_STRING:
|
||||||
|
newNode = new TagNodeString();
|
||||||
|
break;
|
||||||
|
case TagType.TAG_LIST:
|
||||||
|
newNode = new TagNodeList(TagType.TAG_BYTE);
|
||||||
|
break;
|
||||||
|
case TagType.TAG_COMPOUND:
|
||||||
|
newNode = new TagNodeCompound();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag is TagNodeCompound) {
|
||||||
|
TagNodeCompound ctag = tag as TagNodeCompound;
|
||||||
|
|
||||||
|
EditValue form = new EditValue("");
|
||||||
|
foreach (string key in ctag.Keys) {
|
||||||
|
form.InvalidNames.Add(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (form.ShowDialog() != DialogResult.OK)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ctag.Add(form.NodeName, newNode);
|
||||||
|
|
||||||
|
TreeNode tnode = NodeFromTag(newNode, form.NodeName);
|
||||||
|
node.Nodes.Add(tnode);
|
||||||
|
|
||||||
|
_nodeTree.SelectedNode = tnode;
|
||||||
|
tnode.Expand();
|
||||||
|
}
|
||||||
|
else if (tag is TagNodeList) {
|
||||||
|
TagNodeList ltag = tag as TagNodeList;
|
||||||
|
if (ltag.ValueType != type)
|
||||||
|
ltag.ChangeValueType(type);
|
||||||
|
|
||||||
|
ltag.Add(newNode);
|
||||||
|
|
||||||
|
TreeNode tnode = NodeFromTag(newNode);
|
||||||
|
node.Nodes.Add(tnode);
|
||||||
|
|
||||||
|
_nodeTree.SelectedNode = tnode;
|
||||||
|
tnode.Expand();
|
||||||
|
}
|
||||||
|
|
||||||
|
node.Text = GetNodeText(node);
|
||||||
|
|
||||||
|
TreeNode baseNode = BaseNode(node);
|
||||||
|
if (baseNode != null) {
|
||||||
|
(baseNode.Tag as DataNode).Modified = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagByte_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_BYTE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagShort_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_SHORT);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagInt_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_INT);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagLong_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_LONG);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagFloat_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_FLOAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagDouble_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_DOUBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagByteArray_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_BYTE_ARRAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagString_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_STRING);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagList_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _buttonAddTagCompound_Click (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddTagToNode(_nodeTree.SelectedNode, TagType.TAG_COMPOUND);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TagKey : IComparable<TagKey>
|
public class TagKey : IComparable<TagKey>
|
||||||
|
|
33
Form1.resx
33
Form1.resx
|
@ -128,7 +128,7 @@
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADW
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADW
|
||||||
LgAAAk1TRnQBSQFMAgEBDgEAASgBAAEoAQABEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
LgAAAk1TRnQBSQFMAgEBDgEAAXABAAFwAQABEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||||
AwABQAMAAQEBAAEYBgABMBIAA/wD+SH4A/kD/AMAA/0D+SH4A/kD/WMAAZYBqQG8AVwBhAGuAVwBhAGu
|
AwABQAMAAQEBAAEYBgABMBIAA/wD+SH4A/kD/AMAA/0D+SH4A/kD/WMAAZYBqQG8AVwBhAGuAVwBhAGu
|
||||||
AVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGu
|
AVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGuAVwBhAGu
|
||||||
AVwBhAGuAZYBqQG8AwACzwHLArkBsAK5AbACuQGwArkBsAK5AbACuQGwArkBsAK5AbACuQGwArkBsAK5
|
AVwBhAGuAZYBqQG8AwACzwHLArkBsAK5AbACuQGwArkBsAK5AbACuQGwArkBsAK5AbACuQGwArkBsAK5
|
||||||
|
@ -337,18 +337,18 @@
|
||||||
<data name="_buttonOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="_buttonOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJ4SURBVDhPjdNNSBRhHMfx59Clt4Md7dBlvUhCXjpIEGGs
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJ5SURBVDhPjdNdSFNhHMfx56Kb3i7scl10M28kIW+6kCDC
|
||||||
HSLFoPYgWAsJhklKLChr5utuSipqrotmVKtZGZqFmQrWEpSKJii2teq2b76t++I67vv663kecmCSoIEv
|
mF1EikF5IViDBMMkJQbKzHyZLiUVXc6hGdU0K0OTMFPBGkGpWIJiqznX3nybc3Oezb3663ke8sBJgg58
|
||||||
83+GmQ/PwAwhf45pLbk+pSUV/xO7d+858TxZS6oEsxbrn65hYzwXwtw9xO2dwMpTaRs9YPfuA75Ukxps
|
Of/ncM6H58A5hPw5ZrTk+rSWVP1P7N6958TzVB2pESxarH28hvWJfAhz95BwdgHLT6Wt94Lduw/4XEs0
|
||||||
vcau9xVCtla4vxbigy4dI+8bJI2OtWCg+njbPuBzNdHEPS8QWzfw4t6XmO6/BYfbjVVBgJ1m9fvxxmhE
|
2HqNXd8rhB06eL8U470+A6PvmiSNjbdhsPZ4+z7gUy2pT2y+QHzNyEv4XmJm4BZcXi9WBAFOmj0QwBuT
|
||||||
Tbl8OFutTpIgxgpSF3P1ILryhMfmiV4l5s1mfDOZsORyYWF1Fd1DQ2BHVklJvgQZv0seRNeeIWx/xGOz
|
CZpKxUiOWp0sQUxVpCHu6UVs+QmPzZN9SsxbLPhmNsPq8WBhZQU9w8NgR3ZZWaEEmbhLHsRWnyHifMRj
|
||||||
8bEC3xcXObLi83GkxWAQS8rIUIu7GC0jTWFnFwKWdh6bxzuv4MfyMkc26SvsIWwn7HXkRUUFIjBcSlqD
|
s+lxLr4vLnJk2e/nSJvRKJacmakWdzFWQVoi7m6EbB08Nk90XcGPpSWObNBX2EPYTtjrKEpKikRgpJzo
|
||||||
1g4I5lYem8f02TBbLBzx7uxIEPv2NtILCgpF4J2K6ALLOvhNTTw2D7dlYslq5chWMChB1gIBnM3Luy0C
|
duydECw6HpvHDTmw2Gwc8QWDEsS5vY2MoqJiEXirIvrQkh4BcwuPzSPtWbDa7RzZ2tmRIKuhEM4WFNwW
|
||||||
AyrSIfxshm++nsfmoeaLsFCAIUIoJEE8dH1GqSwWgb5i0uVfaIB7VsNj82DjBVhtNo4EIhEJ4qfr0zk5
|
gUEV6RR+tsI/38hj83DrRdgowBAhHJYgm3R9RqksFYH+UtIdWGiCd7aex+ah5guwOxwcCUWjEiRA16fz
|
||||||
d0Sgp5AYfHN1cE1X8tjcXy+HzW7nSCgalSACBVIVChUDDtKO6W+QQe8s/ZQny3leuou+++fhcDg4Eo3F
|
8u6IQG8xMfrnGuCZqeaxeaBRAYfTyZFwLCZBBAqk5eaqGHCQdsxwgwz5ZumnPFXJ89Fd9N8/D5fLxZFY
|
||||||
JMgOBU9mZpYxIIEmy5eT9pGmVP/S2/zI5lQlPDM16K09B6fTCQctvruLGC0SjyNMsTCdE9PStJKvUZ9H
|
PC5BghQ8mZVVwYAkmrxQQTpGW9IC1qHC6MZ0NTa/atBXdw5utxsuWmJ3F3FaNJFAhGIROsvS07WSr9FQ
|
||||||
snRKon9emvhxovvSL9XlA7ZDMlnL4eTkuqMpKZq/OyKT3dz3T7ALjbnkVH0OUVddJQ/p8gQt8R8l/Aar
|
QLL1SmJ4Xi77MNlz6Zfq8gHHIbm87XBKSsPR1NT6vzsil9/c90+wC8355FRjHlHXXCUP6fIETfaPkn4D
|
||||||
pl0JhgWsGAAAAABJRU5ErkJggg==
|
qvVdCMceSq0AAAAASUVORK5CYII=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="_buttonSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="_buttonSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
@ -514,11 +514,14 @@
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFySURBVDhPY2CgBthfz8CyP4kl40AiczcM19sxnEHGyHIg
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFySURBVDhPY2CgBthfz8CyP4kl40AiczcM19sxnEHGyHIg
|
||||||
tSA9cLv3xrErn6rWXPp+T+f/d7s7wHh2hikKhomD1IDUgvTADdiVwOx+c4r3EWQDlpc4/ofhJYV2cINB
|
tSA9cLv3xrErn6rWXPp+T+f/d7s7wHh2hikKhomD1IDUgvTADdiVwOx+c4r3EWQDlpc4/ofhJYV2cINB
|
||||||
akBqQXrgBuyIZ8m9vyz7wbPNDf9heEuj338YXlftARcHyYPUgvTADdgawzz157Xlf//fXfUfhu+uKgcy
|
akBqQXrgBuyIZ8m9vyz7wbPNDf9heEuj338YXlftARcHyYPUgvTADdgawzz1w9nlf//fXfUfhu+uKgcy
|
||||||
IfjMzDS4OEgepBakB27A5ijmGT8vzf//+cRUON7dEfofhjc3+KLIgdSC9MAN2BDFPPvbudn/PxyZCMcg
|
IfjMzDS4OEgepBakB27A5ijmGT8vzf//+cRUON7dEfofhjc3+KLIgdSC9MAN2BDFPPvbudn/PxyZCMcg
|
||||||
zavKXcCGLCt2QJEDqQXpgRuwOoJ5/qeT0/6/2d8DxyDNID6MRpYDqQXpgRuwPIx58btD/f9f7monCoPU
|
zavKXcCGLCt2QJEDqQXpgRuwOoJ5/qeT0/6/2d8DxyDNID6MRpYDqQXpgRuwPIx58btD/f9f7monCoPU
|
||||||
gvTADVgSwrjsFTDun25tIgqD1IL0wA2YH8C4+smWxv8PN9QShUFqQXrgBkzxZNzxYF31//trq4jCILUg
|
gvTADVgSwrjsFTDun25tIgqD1IL0wA2YH8C4+smWxv8PN9QShUFqQXrgBkzxZNzxYF31//trq4jCILUg
|
||||||
PTAD5FKNGee1uTAeJQWD9AANkAMZwg/E4kAsRSIG6QHppQwAAIR13ahrUo3PAAAAAElFTkSuQmCC
|
PTAD5FKNGee1uTAeJQWD9AANkAMZwg/E4kAsRSIG6QHppQwAACRX3YQSNn5eAAAAAElFTkSuQmCC
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="_nodeContainerContext.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>347, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
|
@ -58,6 +58,12 @@
|
||||||
<Compile Include="About.Designer.cs">
|
<Compile Include="About.Designer.cs">
|
||||||
<DependentUpon>About.cs</DependentUpon>
|
<DependentUpon>About.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="EditValue.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EditValue.Designer.cs">
|
||||||
|
<DependentUpon>EditValue.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Form1.cs">
|
<Compile Include="Form1.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -69,6 +75,9 @@
|
||||||
<EmbeddedResource Include="About.resx">
|
<EmbeddedResource Include="About.resx">
|
||||||
<DependentUpon>About.cs</DependentUpon>
|
<DependentUpon>About.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="EditValue.resx">
|
||||||
|
<DependentUpon>EditValue.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Form1.resx">
|
<EmbeddedResource Include="Form1.resx">
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
@ -98,6 +107,21 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\folder-open.png" />
|
<None Include="Resources\folder-open.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\disk.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\disk--pencil.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\door.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\question-frame.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\information-frame.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
35
Properties/Resources.Designer.cs
generated
35
Properties/Resources.Designer.cs
generated
|
@ -60,6 +60,27 @@ namespace NBTPlus.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap disk {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("disk", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap disk__pencil {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("disk--pencil", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap door {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("door", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap folder_open {
|
internal static System.Drawing.Bitmap folder_open {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("folder-open", resourceCulture);
|
object obj = ResourceManager.GetObject("folder-open", resourceCulture);
|
||||||
|
@ -73,5 +94,19 @@ namespace NBTPlus.Properties {
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap information_frame {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("information-frame", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap question_frame {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("question-frame", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,10 +118,25 @@
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="folder-open-document" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="question-frame" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\folder-open-document.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\question-frame.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="folder-open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="folder-open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\folder-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\folder-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="disk" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\disk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="folder-open-document" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\folder-open-document.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="disk--pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\disk--pencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="door" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\door.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="information-frame" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\information-frame.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
BIN
Resources/disk--pencil.png
Normal file
BIN
Resources/disk--pencil.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 677 B |
BIN
Resources/disk.png
Normal file
BIN
Resources/disk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 507 B |
BIN
Resources/door.png
Normal file
BIN
Resources/door.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 503 B |
BIN
Resources/information-frame.png
Normal file
BIN
Resources/information-frame.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 898 B |
BIN
Resources/question-frame.png
Normal file
BIN
Resources/question-frame.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 925 B |
Loading…
Reference in a new issue