That folder wasn't supposed to get checked in. Thanks Github for Windows.
|
@ -1,121 +0,0 @@
|
|||
using Substrate.Core;
|
||||
using Substrate.Nbt;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
public class DataNodeOld
|
||||
{
|
||||
public DataNodeOld ()
|
||||
{
|
||||
}
|
||||
|
||||
public DataNodeOld (DataNodeOld parent)
|
||||
{
|
||||
Parent = parent;
|
||||
}
|
||||
|
||||
public DataNodeOld Parent { get; set; }
|
||||
|
||||
private bool _modified;
|
||||
public bool Modified
|
||||
{
|
||||
get { return _modified; }
|
||||
set
|
||||
{
|
||||
if (value && Parent != null) {
|
||||
Parent.Modified = value;
|
||||
}
|
||||
_modified = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Expanded { get; set; }
|
||||
}
|
||||
|
||||
public class NbtDataNode : DataNodeOld
|
||||
{
|
||||
public NbtDataNode ()
|
||||
{
|
||||
}
|
||||
|
||||
public NbtDataNode (DataNodeOld parent)
|
||||
: base(parent)
|
||||
{
|
||||
}
|
||||
|
||||
public NbtTree Tree { get; set; }
|
||||
}
|
||||
|
||||
public class RegionChunkData : NbtDataNode
|
||||
{
|
||||
public RegionChunkData (RegionFile file, int x, int z)
|
||||
: this(null, file, x, z)
|
||||
{
|
||||
}
|
||||
|
||||
public RegionChunkData (DataNodeOld parent, RegionFile file, int x, int z)
|
||||
: base(parent)
|
||||
{
|
||||
Region = file;
|
||||
X = x;
|
||||
Z = z;
|
||||
}
|
||||
|
||||
public RegionFile Region { get; private set; }
|
||||
public int X { get; private set; }
|
||||
public int Z { get; private set; }
|
||||
}
|
||||
|
||||
public class RegionData : DataNodeOld
|
||||
{
|
||||
public RegionData (string path)
|
||||
: this(null, path)
|
||||
{
|
||||
}
|
||||
|
||||
public RegionData (DataNodeOld parent, string path)
|
||||
: base(parent)
|
||||
{
|
||||
Path = path;
|
||||
}
|
||||
|
||||
public string Path { get; private set; }
|
||||
}
|
||||
|
||||
public class NbtFileData : NbtDataNode
|
||||
{
|
||||
public NbtFileData (string path, CompressionType cztype)
|
||||
: this(null, path, cztype)
|
||||
{
|
||||
}
|
||||
|
||||
public NbtFileData (DataNodeOld parent, string path, CompressionType cztype)
|
||||
: base(parent)
|
||||
{
|
||||
Path = path;
|
||||
CompressionType = cztype;
|
||||
}
|
||||
|
||||
public string Path { get; private set; }
|
||||
public CompressionType CompressionType { get; private set; }
|
||||
}
|
||||
|
||||
public class DirectoryData : DataNodeOld
|
||||
{
|
||||
public DirectoryData (string path)
|
||||
: this(null, path)
|
||||
{
|
||||
}
|
||||
|
||||
public DirectoryData (DataNodeOld parent, string path)
|
||||
: base(parent)
|
||||
{
|
||||
Path = path;
|
||||
}
|
||||
|
||||
public string Path { get; private set; }
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
public class IconRegistry
|
||||
{
|
||||
private Dictionary<Type, int> _iconRegistry;
|
||||
|
||||
public IconRegistry ()
|
||||
{
|
||||
_iconRegistry = new Dictionary<Type, int>();
|
||||
}
|
||||
|
||||
public int DefaultIcon { get; set; }
|
||||
|
||||
public int Lookup (Type type)
|
||||
{
|
||||
if (_iconRegistry.ContainsKey(type))
|
||||
return _iconRegistry[type];
|
||||
else
|
||||
return DefaultIcon;
|
||||
}
|
||||
|
||||
public void Register (Type type, int iconIndex)
|
||||
{
|
||||
_iconRegistry[type] = iconIndex;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array/>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>dead_bush.icns</string>
|
||||
</array>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>jaquadro.NBTExplorer</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>NBTExplorer</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.3</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (C) 2011 by Justin Aquadro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,29 +0,0 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
public partial class AppDelegate : NSApplicationDelegate
|
||||
{
|
||||
MainWindowController mainWindowController;
|
||||
|
||||
public AppDelegate ()
|
||||
{
|
||||
}
|
||||
|
||||
public override void FinishedLaunching (NSObject notification)
|
||||
{
|
||||
mainWindowController = new MainWindowController ();
|
||||
mainWindowController.Window.MakeKeyAndOrderFront (this);
|
||||
}
|
||||
|
||||
partial void ActionRename (NSObject sender)
|
||||
{
|
||||
mainWindowController.Window.ActionEditValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
27
NBTExplorerMac/Mac/AppDelegate.designer.cs
generated
|
@ -1,27 +0,0 @@
|
|||
// WARNING
|
||||
//
|
||||
// This file has been generated automatically by MonoDevelop to store outlets and
|
||||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using MonoMac.Foundation;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
[Register ("AppDelegate")]
|
||||
partial class AppDelegate
|
||||
{
|
||||
[Action ("ActionRename:")]
|
||||
partial void ActionRename (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionEditValue:")]
|
||||
partial void ActionEditValue (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionDelete:")]
|
||||
partial void ActionDelete (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public partial class EditValue : MonoMac.AppKit.NSWindow
|
||||
{
|
||||
public enum DialogResult
|
||||
{
|
||||
OK,
|
||||
Cancel,
|
||||
}
|
||||
|
||||
private TagNode _tag;
|
||||
private DialogResult _result;
|
||||
|
||||
#region Constructors
|
||||
|
||||
// Called when created from unmanaged code
|
||||
public EditValue (IntPtr handle) : base (handle)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Called when created directly from a XIB file
|
||||
[Export ("initWithCoder:")]
|
||||
public EditValue (NSCoder coder) : base (coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
public EditValue (TagNode tag)
|
||||
{
|
||||
Initialize ();
|
||||
|
||||
_tag = tag;
|
||||
|
||||
if (tag == null) {
|
||||
_result = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
_valueField.StringValue = _tag.ToString();
|
||||
}
|
||||
|
||||
// Shared initialization code
|
||||
void Initialize ()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public TagNode NodeTag
|
||||
{
|
||||
get { return _tag; }
|
||||
}
|
||||
|
||||
public DialogResult Result
|
||||
{
|
||||
get { return _result; }
|
||||
}
|
||||
|
||||
/*private TagNode _tag;
|
||||
|
||||
public EditValue (TagNode tag)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_tag = tag;
|
||||
|
||||
if (tag == null) {
|
||||
DialogResult = DialogResult.Abort;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
textBox1.Text = _tag.ToString();
|
||||
}
|
||||
|
||||
public TagNode NodeTag
|
||||
{
|
||||
get { return _tag; }
|
||||
}
|
||||
|
||||
private void Apply ()
|
||||
{
|
||||
if (ValidateInput()) {
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private bool ValidateInput ()
|
||||
{
|
||||
return ValidateValueInput();
|
||||
}
|
||||
|
||||
private bool ValidateValueInput ()
|
||||
{
|
||||
try {
|
||||
switch (_tag.GetTagType()) {
|
||||
case TagType.TAG_BYTE:
|
||||
_tag.ToTagByte().Data = unchecked((byte)sbyte.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;
|
||||
}
|
||||
|
||||
private void _buttonOK_Click (object sender, EventArgs e)
|
||||
{
|
||||
Apply();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
31
NBTExplorerMac/Mac/EditValue.designer.cs
generated
|
@ -1,31 +0,0 @@
|
|||
// WARNING
|
||||
//
|
||||
// This file has been generated automatically by MonoDevelop to store outlets and
|
||||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using MonoMac.Foundation;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
[Register ("EditValue")]
|
||||
partial class EditValue
|
||||
{
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSTextField _valueField { get; set; }
|
||||
|
||||
[Action ("ActionOK:")]
|
||||
partial void ActionOK (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionCancel:")]
|
||||
partial void ActionCancel (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
if (_valueField != null) {
|
||||
_valueField.Dispose ();
|
||||
_valueField = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,390 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1080</int>
|
||||
<string key="IBDocument.SystemVersion">12B2080</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
|
||||
<string key="IBDocument.AppKitVersion">1187</string>
|
||||
<string key="IBDocument.HIToolboxVersion">624.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">2844</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSButton</string>
|
||||
<string>NSButtonCell</string>
|
||||
<string>NSCustomObject</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSTextFieldCell</string>
|
||||
<string>NSView</string>
|
||||
<string>NSWindowTemplate</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSCustomObject" id="1001">
|
||||
<string key="NSClassName">EditValue</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1003">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1004">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="661050917">
|
||||
<int key="NSWindowStyleMask">3</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{131, 86}, {262, 91}}</string>
|
||||
<int key="NSWTFlags">611844096</int>
|
||||
<string key="NSWindowTitle">Edit Value...</string>
|
||||
<string key="NSWindowClass">EditValue</string>
|
||||
<nil key="NSViewClass"/>
|
||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||
<object class="NSView" key="NSWindowView" id="1068206745">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTextField" id="922648809">
|
||||
<reference key="NSNextResponder" ref="1068206745"/>
|
||||
<int key="NSvFlags">266</int>
|
||||
<string key="NSFrame">{{20, 49}, {222, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1068206745"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="321744782">
|
||||
<int key="NSCellFlags">-1804599231</int>
|
||||
<int key="NSCellFlags2">272630848</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport" id="1011941154">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="922648809"/>
|
||||
<bool key="NSDrawsBackground">YES</bool>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textBackgroundColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSButton" id="134334418">
|
||||
<reference key="NSNextResponder" ref="1068206745"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{166, 13}, {82, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1068206745"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="524484320">
|
||||
<int key="NSCellFlags">67108864</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">OK</string>
|
||||
<reference key="NSSupport" ref="1011941154"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="134334418"/>
|
||||
<int key="NSButtonFlags">-2038284288</int>
|
||||
<int key="NSButtonFlags2">129</int>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSButton" id="862679276">
|
||||
<reference key="NSNextResponder" ref="1068206745"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{84, 13}, {82, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1068206745"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="980603739">
|
||||
<int key="NSCellFlags">67108864</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">Cancel</string>
|
||||
<reference key="NSSupport" ref="1011941154"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="862679276"/>
|
||||
<int key="NSButtonFlags">-2038284288</int>
|
||||
<int key="NSButtonFlags2">129</int>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{262, 91}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1600, 1178}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_valueField</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="922648809"/>
|
||||
</object>
|
||||
<int key="connectionID">9</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionOK:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="134334418"/>
|
||||
</object>
|
||||
<int key="connectionID">10</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionCancel:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="862679276"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1001"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1003"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1004"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="661050917"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="1068206745"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">2</int>
|
||||
<reference key="object" ref="1068206745"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="922648809"/>
|
||||
<reference ref="134334418"/>
|
||||
<reference ref="862679276"/>
|
||||
</object>
|
||||
<reference key="parent" ref="661050917"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="922648809"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="321744782"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1068206745"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="321744782"/>
|
||||
<reference key="parent" ref="922648809"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="134334418"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="524484320"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1068206745"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="524484320"/>
|
||||
<reference key="parent" ref="134334418"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="862679276"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="980603739"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1068206745"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="980603739"/>
|
||||
<reference key="parent" ref="862679276"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>1.IBPluginDependency</string>
|
||||
<string>1.IBWindowTemplateEditedContentRect</string>
|
||||
<string>1.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
<string>4.IBPluginDependency</string>
|
||||
<string>5.IBPluginDependency</string>
|
||||
<string>6.IBPluginDependency</string>
|
||||
<string>7.IBPluginDependency</string>
|
||||
<string>8.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{361, 348}, {602, 342}}</string>
|
||||
<boolean value="YES"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">11</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">EditValue</string>
|
||||
<string key="superclassName">NSWindow</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionCancel:</string>
|
||||
<string>ActionOK:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionCancel:</string>
|
||||
<string>ActionOK:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionCancel:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionOK:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">_valueField</string>
|
||||
<string key="NS.object.0">NSTextField</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">_valueField</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">_valueField</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/EditValue.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
|
@ -1,32 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MonoMac.AppKit;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public class IconRegistry
|
||||
{
|
||||
private Dictionary<Type, NSImage> _iconRegistry;
|
||||
|
||||
public IconRegistry ()
|
||||
{
|
||||
_iconRegistry = new Dictionary<Type, NSImage>();
|
||||
}
|
||||
|
||||
public NSImage DefaultIcon { get; set; }
|
||||
|
||||
public NSImage Lookup (Type type)
|
||||
{
|
||||
if (_iconRegistry.ContainsKey(type))
|
||||
return _iconRegistry[type];
|
||||
else
|
||||
return DefaultIcon;
|
||||
}
|
||||
|
||||
public void Register (Type type, NSImage icon)
|
||||
{
|
||||
_iconRegistry[type] = icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,210 +0,0 @@
|
|||
using System;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.CoreGraphics;
|
||||
using System.Drawing;
|
||||
using MonoMac.ObjCRuntime;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
[Register("ImageAndTextCell")]
|
||||
public class ImageAndTextCell : NSTextFieldCell
|
||||
{
|
||||
private NSImage _image;
|
||||
private bool _copyCalled;
|
||||
private bool _disposeCalled;
|
||||
private bool _deallocCalled;
|
||||
private bool _drawCalled;
|
||||
|
||||
public ImageAndTextCell ()
|
||||
{
|
||||
}
|
||||
|
||||
public ImageAndTextCell (IntPtr handle)
|
||||
: base(handle)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// Called when created directly from a XIB file
|
||||
[Export ("initWithCoder:")]
|
||||
public ImageAndTextCell (NSCoder coder)
|
||||
: base (coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
private void Initialize ()
|
||||
{
|
||||
LineBreakMode = NSLineBreakMode.TruncatingTail;
|
||||
Selectable = true;
|
||||
}
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
//if (_image != null)
|
||||
// _image.Dispose();
|
||||
|
||||
//if (_noDispose)
|
||||
// Handle = IntPtr.Zero;
|
||||
_disposeCalled = true;
|
||||
|
||||
base.Dispose (disposing);
|
||||
}
|
||||
|
||||
/*[Export("copyWithZone:")]
|
||||
public virtual NSObject CopyWithZone(IntPtr zone) {
|
||||
ImageAndTextCell cell = new ImageAndTextCell() {
|
||||
Title = Title,
|
||||
Image = Image,
|
||||
};
|
||||
cell._noDispose = true;
|
||||
return cell;
|
||||
}*/
|
||||
|
||||
static List<ImageAndTextCell> _refPool = new List<ImageAndTextCell>();
|
||||
|
||||
//static IntPtr selRetain = Selector.GetHandle ("retain");
|
||||
//static IntPtr selAutoRelease = Selector.GetHandle("autorelease");
|
||||
//static IntPtr selRelease = Selector.GetHandle("release");
|
||||
//static IntPtr selCopyWithZone = Selector.GetHandle("copyWithZone:");
|
||||
|
||||
[Export("copyWithZone:")]
|
||||
public NSObject CopyWithZone (IntPtr zone)
|
||||
{
|
||||
//IntPtr copy = Messaging.IntPtr_objc_msgSendSuper_IntPtr(SuperHandle, selCopyWithZone, zone);
|
||||
//var cloned = new ImageAndTextCell(copy);
|
||||
//cloned.Title = Title;
|
||||
//cloned.Image = Image;
|
||||
|
||||
var cloned = new ImageAndTextCell {
|
||||
Title = Title,
|
||||
Image = Image,
|
||||
};
|
||||
cloned._copyCalled = true;
|
||||
|
||||
_refPool.Add(cloned);
|
||||
|
||||
//Messaging.void_objc_msgSend (cloned.Handle, selRetain);
|
||||
return cloned;
|
||||
}
|
||||
|
||||
//static IntPtr selDealloc = Selector.GetHandle("dealloc");
|
||||
|
||||
[Export("dealloc")]
|
||||
public void Dealloc ()
|
||||
{
|
||||
_deallocCalled = true;
|
||||
_refPool.Remove(this);
|
||||
|
||||
//Messaging.void_objc_msgSendSuper(SuperHandle, selDealloc);
|
||||
}
|
||||
|
||||
public new NSImage Image
|
||||
{
|
||||
get { return _image; }
|
||||
set { _image = value; }
|
||||
}
|
||||
|
||||
public override RectangleF ImageRectForBounds (RectangleF theRect)
|
||||
{
|
||||
if (_image != null) {
|
||||
PointF origin = new PointF(theRect.X + 3, theRect.Y + (float)Math.Ceiling((theRect.Height - _image.Size.Height) / 2));
|
||||
return new RectangleF(origin, _image.Size);
|
||||
}
|
||||
else
|
||||
return RectangleF.Empty;
|
||||
}
|
||||
|
||||
public override RectangleF TitleRectForBounds (RectangleF theRect)
|
||||
{
|
||||
if (_image != null) {
|
||||
PointF origin = new PointF(theRect.X + 3 + _image.Size.Width, theRect.Y);
|
||||
SizeF size = new SizeF(theRect.Width - 3 - _image.Size.Width, theRect.Height);
|
||||
return new RectangleF(origin, size);
|
||||
}
|
||||
else
|
||||
return base.TitleRectForBounds(theRect);
|
||||
}
|
||||
|
||||
public override void EditWithFrame (RectangleF aRect, NSView inView, NSText editor, NSObject delegateObject, NSEvent theEvent)
|
||||
{
|
||||
RectangleF textFrame, imageFrame;
|
||||
aRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out textFrame);
|
||||
base.EditWithFrame(textFrame, inView, editor, delegateObject, theEvent);
|
||||
}
|
||||
|
||||
public override void SelectWithFrame (RectangleF aRect, NSView inView, NSText editor, NSObject delegateObject, int selStart, int selLength)
|
||||
{
|
||||
RectangleF textFrame, imageFrame;
|
||||
aRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out textFrame);
|
||||
base.SelectWithFrame(textFrame, inView, editor, delegateObject, selStart, selLength);
|
||||
}
|
||||
|
||||
public override void DrawWithFrame (RectangleF cellFrame, NSView inView)
|
||||
{
|
||||
Assert (!_deallocCalled, "DrawWithFrame: Dealloc was called on object");
|
||||
Assert (!_disposeCalled, "DrawWithFrame: Dispose was called on object");
|
||||
|
||||
_drawCalled = true;
|
||||
if (_image != null) {
|
||||
RectangleF imageFrame;
|
||||
cellFrame.Divide (3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out cellFrame);
|
||||
|
||||
if (DrawsBackground) {
|
||||
BackgroundColor.Set ();
|
||||
NSGraphics.RectFill (imageFrame);
|
||||
}
|
||||
|
||||
imageFrame.X += 3;
|
||||
imageFrame.Size = _image.Size;
|
||||
|
||||
//if (inView.IsFlipped) {
|
||||
// imageFrame.Y += (float)Math.Ceiling((cellFrame.Height + imageFrame.Height) / 2);
|
||||
//}
|
||||
//else {
|
||||
imageFrame.Y += (float)Math.Ceiling ((cellFrame.Height - imageFrame.Height) / 2);
|
||||
//}
|
||||
|
||||
_image.Draw (imageFrame, new RectangleF (PointF.Empty, _image.Size), NSCompositingOperation.SourceOver, 1f, true, null);
|
||||
}
|
||||
|
||||
base.DrawWithFrame (cellFrame, inView);
|
||||
}
|
||||
|
||||
public override SizeF CellSize
|
||||
{
|
||||
get {
|
||||
if (_image != null)
|
||||
return new SizeF(base.CellSize.Width + 3 + _image.Size.Width, base.CellSize.Height);
|
||||
else
|
||||
return new SizeF(base.CellSize.Width + 3, base.CellSize.Height);
|
||||
}
|
||||
}
|
||||
|
||||
public override NSCellHit HitTest (NSEvent forEvent, RectangleF inRect, NSView ofView)
|
||||
{
|
||||
PointF point = ofView.ConvertPointFromView (forEvent.LocationInWindow, null);
|
||||
|
||||
if (_image != null) {
|
||||
RectangleF imageFrame;
|
||||
inRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out inRect);
|
||||
|
||||
imageFrame.X += 3;
|
||||
imageFrame.Size = _image.Size;
|
||||
if (ofView.MouseinRect(point, imageFrame))
|
||||
return NSCellHit.ContentArea;
|
||||
}
|
||||
|
||||
return base.HitTest (forEvent, inRect, ofView);
|
||||
}
|
||||
|
||||
private void Assert (bool condition, string message)
|
||||
{
|
||||
if (!condition)
|
||||
throw new Exception("Assert failed: " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,952 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1080</int>
|
||||
<string key="IBDocument.SystemVersion">12B2080</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
|
||||
<string key="IBDocument.AppKitVersion">1187</string>
|
||||
<string key="IBDocument.HIToolboxVersion">624.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">2844</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSCustomObject</string>
|
||||
<string>NSMenu</string>
|
||||
<string>NSMenuItem</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSCustomObject" id="1021">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1014">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1050">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSMenu" id="649796088">
|
||||
<string key="NSTitle">AMainMenu</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="694149608">
|
||||
<reference key="NSMenu" ref="649796088"/>
|
||||
<string key="NSTitle">NBTExplorer</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<object class="NSCustomResource" key="NSOnImage" id="35465992">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuCheckmark</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="NSMixedImage" id="502551668">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuMixedState</string>
|
||||
</object>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="110575045">
|
||||
<string key="NSTitle">NBTExplorer</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="238522557">
|
||||
<reference key="NSMenu" ref="110575045"/>
|
||||
<string key="NSTitle">About NBTExplorer</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="304266470">
|
||||
<reference key="NSMenu" ref="110575045"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="632727374">
|
||||
<reference key="NSMenu" ref="110575045"/>
|
||||
<string key="NSTitle">Quit NBTExplorer</string>
|
||||
<string key="NSKeyEquiv">q</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSName">_NSAppleMenu</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="379814623">
|
||||
<reference key="NSMenu" ref="649796088"/>
|
||||
<string key="NSTitle">File</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="720053764">
|
||||
<string key="NSTitle">File</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="722745758">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string key="NSTitle">Open…</string>
|
||||
<string key="NSKeyEquiv">o</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="827642748">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string key="NSTitle">Open Folder...</string>
|
||||
<string key="NSKeyEquiv">O</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="692639359">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string key="NSTitle">Open Minecraft Save Folder</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="425164168">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="1023925487">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string key="NSTitle">Save</string>
|
||||
<string key="NSKeyEquiv">s</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="101205509">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="1025936716">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string key="NSTitle">Recent Files</string>
|
||||
<string key="NSKeyEquiv">R</string>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="1065607017">
|
||||
<string key="NSTitle">Recent Files</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<string key="NSName">_NSRecentDocumentsMenu</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="71035967">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string key="NSTitle">Recent Folders</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="154866312">
|
||||
<string key="NSTitle">Recent Folders</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="952259628">
|
||||
<reference key="NSMenu" ref="649796088"/>
|
||||
<string key="NSTitle">Edit</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="789758025">
|
||||
<string key="NSTitle">Edit</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="296257095">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Cut</string>
|
||||
<string key="NSKeyEquiv">x</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="860595796">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Copy</string>
|
||||
<string key="NSKeyEquiv">c</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="29853731">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Paste</string>
|
||||
<string key="NSKeyEquiv">v</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="212016141">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="978707231">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Rename</string>
|
||||
<string key="NSKeyEquiv">r</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="386478888">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Edit Value</string>
|
||||
<string key="NSKeyEquiv">e</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="437104165">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Delete</string>
|
||||
<string key="NSKeyEquiv"></string>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="695807658">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="713722761">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Find...</string>
|
||||
<string key="NSKeyEquiv">f</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="406540956">
|
||||
<reference key="NSMenu" ref="789758025"/>
|
||||
<string key="NSTitle">Find Next</string>
|
||||
<string key="NSKeyEquiv"></string>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="586577488">
|
||||
<reference key="NSMenu" ref="649796088"/>
|
||||
<string key="NSTitle">View</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
<string key="NSAction">submenuAction:</string>
|
||||
<object class="NSMenu" key="NSSubmenu" id="466310130">
|
||||
<string key="NSTitle">View</string>
|
||||
<object class="NSMutableArray" key="NSMenuItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="102151532">
|
||||
<reference key="NSMenu" ref="466310130"/>
|
||||
<string key="NSTitle">Show Toolbar</string>
|
||||
<string key="NSKeyEquiv">t</string>
|
||||
<int key="NSKeyEquivModMask">1572864</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="237841660">
|
||||
<reference key="NSMenu" ref="466310130"/>
|
||||
<string key="NSTitle">Customize Toolbar…</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="713487014">
|
||||
<reference key="NSMenu" ref="649796088"/>
|
||||
<string key="NSTitle">Window</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="448692316">
|
||||
<reference key="NSMenu" ref="649796088"/>
|
||||
<string key="NSTitle">Help</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="35465992"/>
|
||||
<reference key="NSMixedImage" ref="502551668"/>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSName">_NSMainMenu</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="755631768">
|
||||
<string key="NSClassName">NSFontManager</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="947627720">
|
||||
<string key="NSClassName">AppDelegate</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">terminate:</string>
|
||||
<reference key="source" ref="1050"/>
|
||||
<reference key="destination" ref="632727374"/>
|
||||
</object>
|
||||
<int key="connectionID">449</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">orderFrontStandardAboutPanel:</string>
|
||||
<reference key="source" ref="1021"/>
|
||||
<reference key="destination" ref="238522557"/>
|
||||
</object>
|
||||
<int key="connectionID">142</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="1021"/>
|
||||
<reference key="destination" ref="947627720"/>
|
||||
</object>
|
||||
<int key="connectionID">534</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">copy:</string>
|
||||
<reference key="source" ref="1014"/>
|
||||
<reference key="destination" ref="860595796"/>
|
||||
</object>
|
||||
<int key="connectionID">224</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">paste:</string>
|
||||
<reference key="source" ref="1014"/>
|
||||
<reference key="destination" ref="29853731"/>
|
||||
</object>
|
||||
<int key="connectionID">226</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">cut:</string>
|
||||
<reference key="source" ref="1014"/>
|
||||
<reference key="destination" ref="296257095"/>
|
||||
</object>
|
||||
<int key="connectionID">228</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">saveDocument:</string>
|
||||
<reference key="source" ref="1014"/>
|
||||
<reference key="destination" ref="1023925487"/>
|
||||
</object>
|
||||
<int key="connectionID">362</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">runToolbarCustomizationPalette:</string>
|
||||
<reference key="source" ref="1014"/>
|
||||
<reference key="destination" ref="237841660"/>
|
||||
</object>
|
||||
<int key="connectionID">365</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">toggleToolbarShown:</string>
|
||||
<reference key="source" ref="1014"/>
|
||||
<reference key="destination" ref="102151532"/>
|
||||
</object>
|
||||
<int key="connectionID">366</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">openDocument:</string>
|
||||
<reference key="source" ref="1014"/>
|
||||
<reference key="destination" ref="722745758"/>
|
||||
</object>
|
||||
<int key="connectionID">374</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionEditValue:</string>
|
||||
<reference key="source" ref="947627720"/>
|
||||
<reference key="destination" ref="386478888"/>
|
||||
</object>
|
||||
<int key="connectionID">546</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionRename:</string>
|
||||
<reference key="source" ref="947627720"/>
|
||||
<reference key="destination" ref="978707231"/>
|
||||
</object>
|
||||
<int key="connectionID">547</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionDelete:</string>
|
||||
<reference key="source" ref="947627720"/>
|
||||
<reference key="destination" ref="437104165"/>
|
||||
</object>
|
||||
<int key="connectionID">548</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1048"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1021"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1014"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1050"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">29</int>
|
||||
<reference key="object" ref="649796088"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="713487014"/>
|
||||
<reference ref="694149608"/>
|
||||
<reference ref="952259628"/>
|
||||
<reference ref="379814623"/>
|
||||
<reference ref="586577488"/>
|
||||
<reference ref="448692316"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">19</int>
|
||||
<reference key="object" ref="713487014"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="parent" ref="649796088"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">56</int>
|
||||
<reference key="object" ref="694149608"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="110575045"/>
|
||||
</object>
|
||||
<reference key="parent" ref="649796088"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">217</int>
|
||||
<reference key="object" ref="952259628"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="789758025"/>
|
||||
</object>
|
||||
<reference key="parent" ref="649796088"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">83</int>
|
||||
<reference key="object" ref="379814623"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="720053764"/>
|
||||
</object>
|
||||
<reference key="parent" ref="649796088"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">81</int>
|
||||
<reference key="object" ref="720053764"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="1023925487"/>
|
||||
<reference ref="722745758"/>
|
||||
<reference ref="425164168"/>
|
||||
<reference ref="827642748"/>
|
||||
<reference ref="1025936716"/>
|
||||
<reference ref="101205509"/>
|
||||
<reference ref="71035967"/>
|
||||
<reference ref="692639359"/>
|
||||
</object>
|
||||
<reference key="parent" ref="379814623"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">75</int>
|
||||
<reference key="object" ref="1023925487"/>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">72</int>
|
||||
<reference key="object" ref="722745758"/>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">124</int>
|
||||
<reference key="object" ref="1025936716"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="1065607017"/>
|
||||
</object>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">79</int>
|
||||
<reference key="object" ref="425164168"/>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">125</int>
|
||||
<reference key="object" ref="1065607017"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="parent" ref="1025936716"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">205</int>
|
||||
<reference key="object" ref="789758025"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="437104165"/>
|
||||
<reference ref="296257095"/>
|
||||
<reference ref="29853731"/>
|
||||
<reference ref="860595796"/>
|
||||
<reference ref="212016141"/>
|
||||
<reference ref="978707231"/>
|
||||
<reference ref="386478888"/>
|
||||
<reference ref="695807658"/>
|
||||
<reference ref="713722761"/>
|
||||
<reference ref="406540956"/>
|
||||
</object>
|
||||
<reference key="parent" ref="952259628"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">202</int>
|
||||
<reference key="object" ref="437104165"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">214</int>
|
||||
<reference key="object" ref="212016141"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">199</int>
|
||||
<reference key="object" ref="296257095"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">203</int>
|
||||
<reference key="object" ref="29853731"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">197</int>
|
||||
<reference key="object" ref="860595796"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">57</int>
|
||||
<reference key="object" ref="110575045"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="238522557"/>
|
||||
<reference ref="632727374"/>
|
||||
<reference ref="304266470"/>
|
||||
</object>
|
||||
<reference key="parent" ref="694149608"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">58</int>
|
||||
<reference key="object" ref="238522557"/>
|
||||
<reference key="parent" ref="110575045"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">136</int>
|
||||
<reference key="object" ref="632727374"/>
|
||||
<reference key="parent" ref="110575045"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">236</int>
|
||||
<reference key="object" ref="304266470"/>
|
||||
<reference key="parent" ref="110575045"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">295</int>
|
||||
<reference key="object" ref="586577488"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="466310130"/>
|
||||
</object>
|
||||
<reference key="parent" ref="649796088"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">296</int>
|
||||
<reference key="object" ref="466310130"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="102151532"/>
|
||||
<reference ref="237841660"/>
|
||||
</object>
|
||||
<reference key="parent" ref="586577488"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">297</int>
|
||||
<reference key="object" ref="102151532"/>
|
||||
<reference key="parent" ref="466310130"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">298</int>
|
||||
<reference key="object" ref="237841660"/>
|
||||
<reference key="parent" ref="466310130"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">420</int>
|
||||
<reference key="object" ref="755631768"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">490</int>
|
||||
<reference key="object" ref="448692316"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="parent" ref="649796088"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">533</int>
|
||||
<reference key="object" ref="947627720"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">535</int>
|
||||
<reference key="object" ref="978707231"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">536</int>
|
||||
<reference key="object" ref="386478888"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">537</int>
|
||||
<reference key="object" ref="827642748"/>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">538</int>
|
||||
<reference key="object" ref="101205509"/>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">539</int>
|
||||
<reference key="object" ref="71035967"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="154866312"/>
|
||||
</object>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">540</int>
|
||||
<reference key="object" ref="154866312"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="parent" ref="71035967"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">542</int>
|
||||
<reference key="object" ref="692639359"/>
|
||||
<reference key="parent" ref="720053764"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">543</int>
|
||||
<reference key="object" ref="695807658"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">544</int>
|
||||
<reference key="object" ref="713722761"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">545</int>
|
||||
<reference key="object" ref="406540956"/>
|
||||
<reference key="parent" ref="789758025"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>124.IBPluginDependency</string>
|
||||
<string>125.IBPluginDependency</string>
|
||||
<string>136.IBPluginDependency</string>
|
||||
<string>19.IBPluginDependency</string>
|
||||
<string>197.IBPluginDependency</string>
|
||||
<string>199.IBPluginDependency</string>
|
||||
<string>202.IBPluginDependency</string>
|
||||
<string>203.IBPluginDependency</string>
|
||||
<string>205.IBPluginDependency</string>
|
||||
<string>214.IBPluginDependency</string>
|
||||
<string>217.IBPluginDependency</string>
|
||||
<string>236.IBPluginDependency</string>
|
||||
<string>29.IBPluginDependency</string>
|
||||
<string>295.IBPluginDependency</string>
|
||||
<string>296.IBPluginDependency</string>
|
||||
<string>297.IBPluginDependency</string>
|
||||
<string>298.IBPluginDependency</string>
|
||||
<string>420.IBPluginDependency</string>
|
||||
<string>490.IBPluginDependency</string>
|
||||
<string>533.IBPluginDependency</string>
|
||||
<string>535.IBPluginDependency</string>
|
||||
<string>536.IBPluginDependency</string>
|
||||
<string>537.IBPluginDependency</string>
|
||||
<string>538.IBPluginDependency</string>
|
||||
<string>539.IBPluginDependency</string>
|
||||
<string>540.IBPluginDependency</string>
|
||||
<string>542.IBPluginDependency</string>
|
||||
<string>543.IBPluginDependency</string>
|
||||
<string>544.IBPluginDependency</string>
|
||||
<string>545.IBPluginDependency</string>
|
||||
<string>56.IBPluginDependency</string>
|
||||
<string>57.IBPluginDependency</string>
|
||||
<string>58.IBPluginDependency</string>
|
||||
<string>72.IBPluginDependency</string>
|
||||
<string>75.IBPluginDependency</string>
|
||||
<string>79.IBPluginDependency</string>
|
||||
<string>81.IBPluginDependency</string>
|
||||
<string>83.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">548</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">AppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionDelete:</string>
|
||||
<string>ActionEditValue:</string>
|
||||
<string>ActionRename:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionDelete:</string>
|
||||
<string>ActionEditValue:</string>
|
||||
<string>ActionRename:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionDelete:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionEditValue:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionRename:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/AppDelegate.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSMenuCheckmark</string>
|
||||
<string>NSMenuMixedState</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>{11, 11}</string>
|
||||
<string>{10, 3}</string>
|
||||
</object>
|
||||
</object>
|
||||
</data>
|
||||
</archive>
|
|
@ -1,318 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using NBTExplorer.Mac;
|
||||
using System.IO;
|
||||
using NBTExplorer.Model;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
public partial class MainWindow : MonoMac.AppKit.NSWindow
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
// Called when created from unmanaged code
|
||||
public MainWindow (IntPtr handle) : base (handle)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Called when created directly from a XIB file
|
||||
[Export ("initWithCoder:")]
|
||||
public MainWindow (NSCoder coder) : base (coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Shared initialization code
|
||||
void Initialize ()
|
||||
{
|
||||
InitializeIconRegistry();
|
||||
}
|
||||
|
||||
private NBTExplorer.Mac.IconRegistry _iconRegistry;
|
||||
|
||||
private void InitializeIconRegistry ()
|
||||
{
|
||||
_iconRegistry = new NBTExplorer.Mac.IconRegistry();
|
||||
_iconRegistry.DefaultIcon = NSImage.ImageNamed("question-white.png");
|
||||
|
||||
_iconRegistry.Register(typeof(TagByteDataNode), NSImage.ImageNamed("document-attribute-b.png"));
|
||||
_iconRegistry.Register(typeof(TagShortDataNode), NSImage.ImageNamed("document-attribute-s.png"));
|
||||
_iconRegistry.Register(typeof(TagIntDataNode), NSImage.ImageNamed("document-attribute-i.png"));
|
||||
_iconRegistry.Register(typeof(TagLongDataNode), NSImage.ImageNamed("document-attribute-l.png"));
|
||||
_iconRegistry.Register(typeof(TagFloatDataNode), NSImage.ImageNamed("document-attribute-f.png"));
|
||||
_iconRegistry.Register(typeof(TagDoubleDataNode), NSImage.ImageNamed("document-attribute-d.png"));
|
||||
_iconRegistry.Register(typeof(TagByteArrayDataNode), NSImage.ImageNamed("edit-code.png"));
|
||||
_iconRegistry.Register(typeof(TagStringDataNode), NSImage.ImageNamed("edit-small-caps.png"));
|
||||
_iconRegistry.Register(typeof(TagListDataNode), NSImage.ImageNamed("edit-list.png"));
|
||||
_iconRegistry.Register(typeof(TagCompoundDataNode), NSImage.ImageNamed("box.png"));
|
||||
_iconRegistry.Register(typeof(RegionChunkDataNode), NSImage.ImageNamed("wooden-box.png"));
|
||||
_iconRegistry.Register(typeof(DirectoryDataNode), NSImage.ImageNamed("folder-open"));
|
||||
_iconRegistry.Register(typeof(RegionFileDataNode), NSImage.ImageNamed("block.png"));
|
||||
_iconRegistry.Register(typeof(CubicRegionDataNode), NSImage.ImageNamed("block.png"));
|
||||
_iconRegistry.Register(typeof(NbtFileDataNode), NSImage.ImageNamed("wooden-box.png"));
|
||||
_iconRegistry.Register(typeof(TagIntArrayDataNode), NSImage.ImageNamed("edit-code-i.png"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TreeDataSource _dataSource;
|
||||
|
||||
public override void AwakeFromNib ()
|
||||
{
|
||||
base.AwakeFromNib ();
|
||||
|
||||
_dataSource = new TreeDataSource();
|
||||
_mainOutlineView.DataSource = _dataSource;
|
||||
_mainOutlineView.Delegate = new MyDelegate(this);
|
||||
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
if (args.Length > 2) {
|
||||
string[] paths = new string[args.Length - 1];
|
||||
Array.Copy(args, 1, paths, 0, paths.Length);
|
||||
OpenPaths(paths);
|
||||
}
|
||||
else {
|
||||
OpenMinecraftDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
public class MyDelegate : NSOutlineViewDelegate
|
||||
{
|
||||
private MainWindow _main;
|
||||
|
||||
public MyDelegate (MainWindow main)
|
||||
{
|
||||
_main = main;
|
||||
}
|
||||
|
||||
public override void ItemWillExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay);
|
||||
_main.ExpandNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemDidExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemWillCollapse (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
if (node.Data.NodeDisplay == "saves") // The root node
|
||||
Console.WriteLine ("Uh-oh...");
|
||||
Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemDidCollapse (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
_main.CollapseNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override void WillDisplayCell (NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item)
|
||||
{
|
||||
ImageAndTextCell c = cell as ImageAndTextCell;
|
||||
TreeDataNode node = item as TreeDataNode;
|
||||
|
||||
c.Title = node.CombinedName;
|
||||
c.Image = _main._iconRegistry.Lookup(node.Data.GetType());
|
||||
//c.StringValue = node.Name;
|
||||
//throw new System.NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#region Actions
|
||||
|
||||
partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender)
|
||||
{
|
||||
OpenFolder ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private string _openFolderPath = null;
|
||||
|
||||
private void OpenFolder ()
|
||||
{
|
||||
NSOpenPanel opanel = new NSOpenPanel ();
|
||||
opanel.CanChooseDirectories = true;
|
||||
opanel.CanChooseFiles = false;
|
||||
|
||||
if (_openFolderPath != null)
|
||||
opanel.DirectoryUrl = new NSUrl (_openFolderPath, true);
|
||||
|
||||
if (opanel.RunModal () == (int)NSPanelButtonType.Ok) {
|
||||
_openFolderPath = opanel.DirectoryUrl.AbsoluteString;
|
||||
OpenPaths(new string[] { opanel.DirectoryUrl.Path });
|
||||
}
|
||||
|
||||
//UpdateUI();
|
||||
}
|
||||
|
||||
private void OpenMinecraftDirectory ()
|
||||
{
|
||||
try {
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
|
||||
path = Path.Combine(path, "Library", "Application Support");
|
||||
path = Path.Combine(path, "minecraft", "saves");
|
||||
|
||||
if (!Directory.Exists(path)) {
|
||||
path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
|
||||
}
|
||||
|
||||
OpenPaths(new string[] { path });
|
||||
}
|
||||
catch (Exception e) {
|
||||
//NSAlert.WithMessage("Could not open default Minecraft save directory", "OK", null, null, null).RunModal();
|
||||
Console.WriteLine(e.Message);
|
||||
|
||||
try {
|
||||
OpenPaths(new string[] { Directory.GetCurrentDirectory() });
|
||||
}
|
||||
catch (Exception) {
|
||||
//MessageBox.Show("Could not open current directory, this tool is probably not compatible with your platform.");
|
||||
Console.WriteLine(e.Message);
|
||||
NSApplication.SharedApplication.Terminate(this);
|
||||
}
|
||||
}
|
||||
|
||||
//UpdateUI();
|
||||
}
|
||||
|
||||
private void OpenPaths (string[] paths)
|
||||
{
|
||||
_dataSource.Nodes.Clear ();
|
||||
_mainOutlineView.ReloadData ();
|
||||
|
||||
foreach (string path in paths) {
|
||||
if (Directory.Exists (path)) {
|
||||
DirectoryDataNode node = new DirectoryDataNode (path);
|
||||
_dataSource.Nodes.Add (new TreeDataNode (node));
|
||||
|
||||
// AddPathToHistory(Settings.Default.RecentDirectories, path);
|
||||
} else if (File.Exists (path)) {
|
||||
DataNode node = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (_dataSource.Nodes.Count > 0) {
|
||||
_mainOutlineView.ExpandItem(_dataSource.Nodes[0]);
|
||||
}
|
||||
|
||||
_mainOutlineView.ReloadData();
|
||||
|
||||
// UpdateUI();
|
||||
// UpdateOpenMenu();
|
||||
|
||||
/*_nodeTree.Nodes.Clear();
|
||||
|
||||
foreach (string path in paths) {
|
||||
if (Directory.Exists(path)) {
|
||||
DirectoryDataNode node = new DirectoryDataNode(path);
|
||||
_nodeTree.Nodes.Add(CreateUnexpandedNode(node));
|
||||
|
||||
AddPathToHistory(Settings.Default.RecentDirectories, path);
|
||||
}
|
||||
else if (File.Exists(path)) {
|
||||
DataNode node = null;
|
||||
foreach (var item in FileTypeRegistry.RegisteredTypes) {
|
||||
if (item.Value.NamePatternTest(path))
|
||||
node = item.Value.NodeCreate(path);
|
||||
}
|
||||
|
||||
if (node != null) {
|
||||
_nodeTree.Nodes.Add(CreateUnexpandedNode(node));
|
||||
AddPathToHistory(Settings.Default.RecentFiles, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_nodeTree.Nodes.Count > 0) {
|
||||
_nodeTree.Nodes[0].Expand();
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
UpdateOpenMenu();*/
|
||||
}
|
||||
|
||||
private void ExpandNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null || node.IsExpanded)
|
||||
return;
|
||||
|
||||
Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay);
|
||||
|
||||
node.IsExpanded = true;
|
||||
node.Nodes.Clear ();
|
||||
|
||||
DataNode backNode = node.Data;
|
||||
if (!backNode.IsExpanded) {
|
||||
backNode.Expand ();
|
||||
}
|
||||
|
||||
foreach (DataNode child in backNode.Nodes) {
|
||||
if (child != null) {
|
||||
node.Nodes.Add (new TreeDataNode (child));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CollapseNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null || !node.IsExpanded)
|
||||
return;
|
||||
|
||||
/*Console.WriteLine("Collapse Node: " + node.Data.NodeDisplay);
|
||||
|
||||
DataNode backNode = node.Data;
|
||||
if (backNode.IsModified)
|
||||
return;
|
||||
|
||||
backNode.Collapse();
|
||||
|
||||
node.IsExpanded = false;
|
||||
node.Nodes.Clear();*/
|
||||
}
|
||||
|
||||
public void ActionEditValue ()
|
||||
{
|
||||
TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
|
||||
if (node != null)
|
||||
EditNode(node);
|
||||
}
|
||||
|
||||
private void EditNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
if (!node.Data.CanEditNode)
|
||||
return;
|
||||
|
||||
//NBTExplorer.Mac.EditValue form = new NBTExplorer.Mac.EditValue(node.Data);
|
||||
|
||||
|
||||
//if (node.Data.EditNode()) {
|
||||
//node.Text = dataNode.NodeDisplay;
|
||||
//UpdateUI(dataNode);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
72
NBTExplorerMac/Mac/MainWindow.designer.cs
generated
|
@ -1,72 +0,0 @@
|
|||
// WARNING
|
||||
//
|
||||
// This file has been generated automatically by MonoDevelop to store outlets and
|
||||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using MonoMac.Foundation;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
[Register ("MainWindow")]
|
||||
partial class MainWindow
|
||||
{
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSToolbar _toolbar { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSToolbarItem _toolbarOpenFolder { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSToolbarItem _toolbarSave { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSScrollView _mainScrollView { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; }
|
||||
|
||||
[Action ("ActionOpenFolder:")]
|
||||
partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionSave:")]
|
||||
partial void ActionSave (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
if (_toolbar != null) {
|
||||
_toolbar.Dispose ();
|
||||
_toolbar = null;
|
||||
}
|
||||
|
||||
if (_toolbarOpenFolder != null) {
|
||||
_toolbarOpenFolder.Dispose ();
|
||||
_toolbarOpenFolder = null;
|
||||
}
|
||||
|
||||
if (_toolbarSave != null) {
|
||||
_toolbarSave.Dispose ();
|
||||
_toolbarSave = null;
|
||||
}
|
||||
|
||||
if (_mainScrollView != null) {
|
||||
_mainScrollView.Dispose ();
|
||||
_mainScrollView = null;
|
||||
}
|
||||
|
||||
if (_mainOutlineView != null) {
|
||||
_mainOutlineView.Dispose ();
|
||||
_mainOutlineView = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Register ("MainWindowController")]
|
||||
partial class MainWindowController
|
||||
{
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,788 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1080</int>
|
||||
<string key="IBDocument.SystemVersion">12B2080</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
|
||||
<string key="IBDocument.AppKitVersion">1187</string>
|
||||
<string key="IBDocument.HIToolboxVersion">624.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">2844</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>IBCustomCell</string>
|
||||
<string>NSCustomObject</string>
|
||||
<string>NSOutlineView</string>
|
||||
<string>NSScrollView</string>
|
||||
<string>NSScroller</string>
|
||||
<string>NSTableColumn</string>
|
||||
<string>NSToolbar</string>
|
||||
<string>NSToolbarFlexibleSpaceItem</string>
|
||||
<string>NSToolbarItem</string>
|
||||
<string>NSToolbarSpaceItem</string>
|
||||
<string>NSUserDefaultsController</string>
|
||||
<string>NSView</string>
|
||||
<string>NSWindowTemplate</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSCustomObject" id="1001">
|
||||
<string key="NSClassName">MainWindowController</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1003">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1004">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="748157544">
|
||||
<int key="NSWindowStyleMask">15</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{131, 74}, {776, 558}}</string>
|
||||
<int key="NSWTFlags">611844096</int>
|
||||
<string key="NSWindowTitle">NBTExplorer</string>
|
||||
<string key="NSWindowClass">MainWindow</string>
|
||||
<object class="NSToolbar" key="NSViewClass" id="919098349">
|
||||
<object class="NSMutableString" key="NSToolbarIdentifier">
|
||||
<characters key="NS.bytes">A9746BAB-CAB3-4A72-9A03-237662FA7440</characters>
|
||||
</object>
|
||||
<nil key="NSToolbarDelegate"/>
|
||||
<bool key="NSToolbarPrefersToBeShown">YES</bool>
|
||||
<bool key="NSToolbarShowsBaselineSeparator">YES</bool>
|
||||
<bool key="NSToolbarAllowsUserCustomization">YES</bool>
|
||||
<bool key="NSToolbarAutosavesConfiguration">YES</bool>
|
||||
<int key="NSToolbarDisplayMode">1</int>
|
||||
<int key="NSToolbarSizeMode">2</int>
|
||||
<object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>0156226B-2E18-4406-BBE6-7C88F62B4E27</string>
|
||||
<string>B62CA8DD-7D49-4BF3-B4AB-417078852D8B</string>
|
||||
<string>NSToolbarFlexibleSpaceItem</string>
|
||||
<string>NSToolbarSpaceItem</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSToolbarItem" id="994350550">
|
||||
<object class="NSMutableString" key="NSToolbarItemIdentifier">
|
||||
<characters key="NS.bytes">0156226B-2E18-4406-BBE6-7C88F62B4E27</characters>
|
||||
</object>
|
||||
<string key="NSToolbarItemLabel">Open</string>
|
||||
<string key="NSToolbarItemPaletteLabel">Open</string>
|
||||
<string key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<object class="NSCustomResource" key="NSToolbarItemImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">folder-open-24</string>
|
||||
</object>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{0, 0}</string>
|
||||
<string key="NSToolbarItemMaxSize">{0, 0}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
</object>
|
||||
<object class="NSToolbarItem" id="386220062">
|
||||
<object class="NSMutableString" key="NSToolbarItemIdentifier">
|
||||
<characters key="NS.bytes">B62CA8DD-7D49-4BF3-B4AB-417078852D8B</characters>
|
||||
</object>
|
||||
<string key="NSToolbarItemLabel">Save</string>
|
||||
<string key="NSToolbarItemPaletteLabel">Save</string>
|
||||
<string key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<object class="NSCustomResource" key="NSToolbarItemImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">disk-24</string>
|
||||
</object>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{0, 0}</string>
|
||||
<string key="NSToolbarItemMaxSize">{0, 0}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
</object>
|
||||
<object class="NSToolbarFlexibleSpaceItem" id="767736573">
|
||||
<string key="NSToolbarItemIdentifier">NSToolbarFlexibleSpaceItem</string>
|
||||
<string key="NSToolbarItemLabel"/>
|
||||
<string key="NSToolbarItemPaletteLabel">Flexible Space</string>
|
||||
<nil key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<nil key="NSToolbarItemImage"/>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{1, 5}</string>
|
||||
<string key="NSToolbarItemMaxSize">{20000, 32}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
<object class="NSMenuItem" key="NSToolbarItemMenuFormRepresentation">
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<object class="NSCustomResource" key="NSOnImage" id="295458021">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuCheckmark</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="NSMixedImage" id="707498796">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuMixedState</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSToolbarSpaceItem" id="367445820">
|
||||
<string key="NSToolbarItemIdentifier">NSToolbarSpaceItem</string>
|
||||
<string key="NSToolbarItemLabel"/>
|
||||
<string key="NSToolbarItemPaletteLabel">Space</string>
|
||||
<nil key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<nil key="NSToolbarItemImage"/>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{32, 5}</string>
|
||||
<string key="NSToolbarItemMaxSize">{32, 32}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
<object class="NSMenuItem" key="NSToolbarItemMenuFormRepresentation">
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="295458021"/>
|
||||
<reference key="NSMixedImage" ref="707498796"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSArray" key="NSToolbarIBAllowedItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="367445820"/>
|
||||
<reference ref="767736573"/>
|
||||
<reference ref="994350550"/>
|
||||
<reference ref="386220062"/>
|
||||
</object>
|
||||
<object class="NSArray" key="NSToolbarIBDefaultItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="994350550"/>
|
||||
<reference ref="386220062"/>
|
||||
<reference ref="767736573"/>
|
||||
</object>
|
||||
<object class="NSArray" key="NSToolbarIBSelectableItems" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||
<object class="NSView" key="NSWindowView" id="312036702">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSScrollView" id="595155248">
|
||||
<reference key="NSNextResponder" ref="312036702"/>
|
||||
<int key="NSvFlags">286</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSClipView" id="704700639">
|
||||
<reference key="NSNextResponder" ref="595155248"/>
|
||||
<int key="NSvFlags">2304</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSOutlineView" id="26648463">
|
||||
<reference key="NSNextResponder" ref="704700639"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<string key="NSFrameSize">{776, 558}</string>
|
||||
<reference key="NSSuperview" ref="704700639"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="720194609"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:13</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<bool key="NSControlAllowsExpansionToolTips">YES</bool>
|
||||
<object class="_NSCornerView" key="NSCornerView">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{224, 0}, {16, 17}}</string>
|
||||
<reference key="NSNextKeyView" ref="704700639"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:18</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="NSTableColumns">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTableColumn" id="728960727">
|
||||
<double key="NSWidth">773</double>
|
||||
<double key="NSMinWidth">16</double>
|
||||
<double key="NSMaxWidth">1000</double>
|
||||
<object class="NSTableHeaderCell" key="NSHeaderCell">
|
||||
<int key="NSCellFlags">75497536</int>
|
||||
<int key="NSCellFlags2">2048</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">11</double>
|
||||
<int key="NSfFlags">3100</int>
|
||||
</object>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">headerTextColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBCustomCell" key="NSDataCell" id="925144048">
|
||||
<int key="NSCellFlags">0</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<reference key="NSControlView" ref="26648463"/>
|
||||
</object>
|
||||
<int key="NSResizingMask">3</int>
|
||||
<bool key="NSIsResizeable">YES</bool>
|
||||
<bool key="NSIsEditable">YES</bool>
|
||||
<reference key="NSTableView" ref="26648463"/>
|
||||
</object>
|
||||
</object>
|
||||
<double key="NSIntercellSpacingWidth">3</double>
|
||||
<double key="NSIntercellSpacingHeight">2</double>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="NSGridColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">gridColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<double key="NSRowHeight">17</double>
|
||||
<int key="NSTvFlags">306184192</int>
|
||||
<reference key="NSDelegate"/>
|
||||
<reference key="NSDataSource"/>
|
||||
<int key="NSColumnAutoresizingStyle">0</int>
|
||||
<int key="NSDraggingSourceMaskForLocal">15</int>
|
||||
<int key="NSDraggingSourceMaskForNonLocal">0</int>
|
||||
<bool key="NSAllowsTypeSelect">YES</bool>
|
||||
<int key="NSTableViewDraggingDestinationStyle">0</int>
|
||||
<int key="NSTableViewGroupRowStyle">1</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{1, 1}, {776, 558}}</string>
|
||||
<reference key="NSSuperview" ref="595155248"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="26648463"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:11</string>
|
||||
<reference key="NSDocView" ref="26648463"/>
|
||||
<object class="NSColor" key="NSBGColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlBackgroundColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<int key="NScvFlags">4</int>
|
||||
</object>
|
||||
<object class="NSScroller" id="720194609">
|
||||
<reference key="NSNextResponder" ref="595155248"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
|
||||
<reference key="NSSuperview" ref="595155248"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="927451524"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:58</string>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<reference key="NSTarget" ref="595155248"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.99821109123434704</double>
|
||||
</object>
|
||||
<object class="NSScroller" id="927451524">
|
||||
<reference key="NSNextResponder" ref="595155248"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{1, 544}, {776, 15}}</string>
|
||||
<reference key="NSSuperview" ref="595155248"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:60</string>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSsFlags">1</int>
|
||||
<reference key="NSTarget" ref="595155248"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.99871299871299868</double>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{-1, -1}, {778, 560}}</string>
|
||||
<reference key="NSSuperview" ref="312036702"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="704700639"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<int key="NSsFlags">133682</int>
|
||||
<reference key="NSVScroller" ref="720194609"/>
|
||||
<reference key="NSHScroller" ref="927451524"/>
|
||||
<reference key="NSContentView" ref="704700639"/>
|
||||
<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
|
||||
<double key="NSMinMagnification">0.25</double>
|
||||
<double key="NSMaxMagnification">4</double>
|
||||
<double key="NSMagnification">1</double>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{776, 558}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="595155248"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1600, 1178}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSUserDefaultsController" id="28353509">
|
||||
<bool key="NSSharedInstance">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">window</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="748157544"/>
|
||||
</object>
|
||||
<int key="connectionID">6</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_mainScrollView</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="595155248"/>
|
||||
</object>
|
||||
<int key="connectionID">36</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_mainOutlineView</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="26648463"/>
|
||||
</object>
|
||||
<int key="connectionID">37</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_toolbar</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="919098349"/>
|
||||
</object>
|
||||
<int key="connectionID">38</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_toolbarOpenFolder</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="994350550"/>
|
||||
</object>
|
||||
<int key="connectionID">39</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_toolbarSave</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="386220062"/>
|
||||
</object>
|
||||
<int key="connectionID">40</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionOpenFolder:</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="994350550"/>
|
||||
</object>
|
||||
<int key="connectionID">41</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionSave:</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="386220062"/>
|
||||
</object>
|
||||
<int key="connectionID">42</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1001"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1003"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1004"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">2</int>
|
||||
<reference key="object" ref="748157544"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="312036702"/>
|
||||
<reference ref="919098349"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="312036702"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="595155248"/>
|
||||
</object>
|
||||
<reference key="parent" ref="748157544"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">14</int>
|
||||
<reference key="object" ref="919098349"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="367445820"/>
|
||||
<reference ref="767736573"/>
|
||||
<reference ref="994350550"/>
|
||||
<reference ref="386220062"/>
|
||||
</object>
|
||||
<reference key="parent" ref="748157544"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">15</int>
|
||||
<reference key="object" ref="367445820"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">18</int>
|
||||
<reference key="object" ref="767736573"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">20</int>
|
||||
<reference key="object" ref="994350550"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">21</int>
|
||||
<reference key="object" ref="386220062"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">22</int>
|
||||
<reference key="object" ref="595155248"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="26648463"/>
|
||||
<reference ref="927451524"/>
|
||||
<reference ref="720194609"/>
|
||||
</object>
|
||||
<reference key="parent" ref="312036702"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">23</int>
|
||||
<reference key="object" ref="26648463"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="728960727"/>
|
||||
</object>
|
||||
<reference key="parent" ref="595155248"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">24</int>
|
||||
<reference key="object" ref="927451524"/>
|
||||
<reference key="parent" ref="595155248"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">26</int>
|
||||
<reference key="object" ref="720194609"/>
|
||||
<reference key="parent" ref="595155248"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">27</int>
|
||||
<reference key="object" ref="728960727"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="925144048"/>
|
||||
</object>
|
||||
<reference key="parent" ref="26648463"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">44</int>
|
||||
<reference key="object" ref="28353509"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">71</int>
|
||||
<reference key="object" ref="925144048"/>
|
||||
<reference key="parent" ref="728960727"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>14.IBPluginDependency</string>
|
||||
<string>15.IBPluginDependency</string>
|
||||
<string>18.IBPluginDependency</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>2.IBWindowTemplateEditedContentRect</string>
|
||||
<string>2.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>20.IBPluginDependency</string>
|
||||
<string>20.designableToolbarItemIdentifier</string>
|
||||
<string>21.IBPluginDependency</string>
|
||||
<string>21.designableToolbarItemIdentifier</string>
|
||||
<string>22.IBPluginDependency</string>
|
||||
<string>23.IBPluginDependency</string>
|
||||
<string>24.IBPluginDependency</string>
|
||||
<string>26.IBPluginDependency</string>
|
||||
<string>27.IBPluginDependency</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
<string>44.IBPluginDependency</string>
|
||||
<string>71.CustomClassName</string>
|
||||
<string>71.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{319, 371}, {606, 354}}</string>
|
||||
<boolean value="YES"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>ToolbarOpen</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>ToolbarSave</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>ImageAndTextCell</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">71</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ImageAndTextCell</string>
|
||||
<string key="superclassName">NSTextFieldCell</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ImageAndTextCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MainWindow</string>
|
||||
<string key="superclassName">NSWindow</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionOpenFolder:</string>
|
||||
<string>ActionSave:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionOpenFolder:</string>
|
||||
<string>ActionSave:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionOpenFolder:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionSave:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>_mainOutlineView</string>
|
||||
<string>_mainScrollView</string>
|
||||
<string>_toolbar</string>
|
||||
<string>_toolbarOpenFolder</string>
|
||||
<string>_toolbarSave</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSOutlineView</string>
|
||||
<string>NSScrollView</string>
|
||||
<string>NSToolbar</string>
|
||||
<string>NSToolbarItem</string>
|
||||
<string>NSToolbarItem</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>_mainOutlineView</string>
|
||||
<string>_mainScrollView</string>
|
||||
<string>_toolbar</string>
|
||||
<string>_toolbarOpenFolder</string>
|
||||
<string>_toolbarSave</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_mainOutlineView</string>
|
||||
<string key="candidateClassName">NSOutlineView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_mainScrollView</string>
|
||||
<string key="candidateClassName">NSScrollView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_toolbar</string>
|
||||
<string key="candidateClassName">NSToolbar</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_toolbarOpenFolder</string>
|
||||
<string key="candidateClassName">NSToolbarItem</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_toolbarSave</string>
|
||||
<string key="candidateClassName">NSToolbarItem</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MainWindow.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MainWindowController</string>
|
||||
<string key="superclassName">NSWindowController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MainWindowController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSMenuCheckmark</string>
|
||||
<string>NSMenuMixedState</string>
|
||||
<string>disk-24</string>
|
||||
<string>folder-open-24</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>{11, 11}</string>
|
||||
<string>{10, 3}</string>
|
||||
<string>{24, 24}</string>
|
||||
<string>{24, 24}</string>
|
||||
</object>
|
||||
</object>
|
||||
</data>
|
||||
<classes>
|
||||
<class name="IBCustomCell">
|
||||
<fallbacks>
|
||||
<name>NSCell</name>
|
||||
</fallbacks>
|
||||
</class>
|
||||
</classes>
|
||||
</archive>
|
|
@ -1,48 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
public partial class MainWindowController : MonoMac.AppKit.NSWindowController
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
// Called when created from unmanaged code
|
||||
public MainWindowController (IntPtr handle) : base (handle)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Called when created directly from a XIB file
|
||||
[Export ("initWithCoder:")]
|
||||
public MainWindowController (NSCoder coder) : base (coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Call to load from the XIB/NIB file
|
||||
public MainWindowController () : base ("MainWindow")
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Shared initialization code
|
||||
void Initialize ()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//strongly typed window accessor
|
||||
public new MainWindow Window {
|
||||
get {
|
||||
return (MainWindow)base.Window;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace NBTExplorer.Mac.Test
|
||||
{
|
||||
public partial class MainWindow : MonoMac.AppKit.NSWindow
|
||||
{
|
||||
// ...
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; }
|
||||
|
||||
private TreeDataSource _dataSource;
|
||||
|
||||
public override void AwakeFromNib ()
|
||||
{
|
||||
base.AwakeFromNib ();
|
||||
|
||||
_dataSource = new TreeDataSource();
|
||||
_mainOutlineView.DataSource = _dataSource;
|
||||
_mainOutlineView.Delegate = new MyDelegate(this);
|
||||
}
|
||||
|
||||
public class MyDelegate : NSOutlineViewDelegate
|
||||
{
|
||||
private MainWindow _main;
|
||||
|
||||
public MyDelegate (MainWindow main)
|
||||
{
|
||||
_main = main;
|
||||
}
|
||||
|
||||
public override void ItemWillExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay);
|
||||
_main.ExpandNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemDidExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemWillCollapse (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
if (node.Data.NodeDisplay == "saves") // The root node
|
||||
Console.WriteLine ("Uh-oh...");
|
||||
Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
private void ExpandNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null || node.IsExpanded)
|
||||
return;
|
||||
|
||||
Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay);
|
||||
|
||||
node.IsExpanded = true;
|
||||
node.Nodes.Clear ();
|
||||
|
||||
DataNode backNode = node.Data;
|
||||
if (!backNode.IsExpanded) {
|
||||
backNode.Expand ();
|
||||
}
|
||||
|
||||
foreach (DataNode child in backNode.Nodes) {
|
||||
if (child != null) {
|
||||
node.Nodes.Add (new TreeDataNode (child));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TreeDataSource : NSOutlineViewDataSource
|
||||
{
|
||||
private List<TreeDataNode> _nodes;
|
||||
|
||||
public TreeDataSource ()
|
||||
{
|
||||
_nodes = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _nodes; }
|
||||
}
|
||||
|
||||
public override int GetChildrenCount (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
if (item is TreeDataNode) {
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
return nodeItem.Nodes.Count;
|
||||
}
|
||||
|
||||
return _nodes.Count;
|
||||
}
|
||||
|
||||
public override NSObject GetObjectValue (NSOutlineView outlineView, NSTableColumn forTableColumn, NSObject byItem)
|
||||
{
|
||||
TreeDataNode nodeItem = byItem as TreeDataNode;
|
||||
if (nodeItem == null)
|
||||
return null;
|
||||
|
||||
return (NSString)nodeItem.CombinedName;
|
||||
}
|
||||
|
||||
public override NSObject GetChild (NSOutlineView outlineView, int childIndex, NSObject ofItem)
|
||||
{
|
||||
TreeDataNode nodeItem = ofItem as TreeDataNode;
|
||||
if (nodeItem != null) {
|
||||
return nodeItem.Nodes [childIndex];
|
||||
}
|
||||
|
||||
return Nodes[childIndex];
|
||||
}
|
||||
|
||||
public override bool ItemExpandable (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
if (nodeItem != null)
|
||||
return nodeItem.HasChildren;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class TreeDataNode : NSObject
|
||||
{
|
||||
private DataNode _dataNode;
|
||||
private List<TreeDataNode> _children;
|
||||
private bool _expanded;
|
||||
|
||||
public TreeDataNode (DataNode node)
|
||||
{
|
||||
_dataNode = node;
|
||||
_children = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public DataNode Data
|
||||
{
|
||||
get { return _dataNode; }
|
||||
}
|
||||
|
||||
public string CombinedName
|
||||
{
|
||||
get { return _dataNode.NodeDisplay; }
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get { return _expanded; }
|
||||
set { _expanded = value; }
|
||||
}
|
||||
|
||||
public bool HasChildren
|
||||
{
|
||||
get { return _children.Count > 0 || _dataNode.HasUnexpandedChildren; }
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _children; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
using System;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using NBTExplorer.Model;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public class TreeDataNode : NSObject
|
||||
{
|
||||
private DataNode _dataNode;
|
||||
private List<TreeDataNode> _children;
|
||||
private bool _expanded;
|
||||
|
||||
public TreeDataNode (DataNode node)
|
||||
{
|
||||
_dataNode = node;
|
||||
_children = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public DataNode Data
|
||||
{
|
||||
get { return _dataNode; }
|
||||
}
|
||||
|
||||
public string CombinedName
|
||||
{
|
||||
get { return _dataNode.NodeDisplay; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return _dataNode.NodeName; }
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get { return _expanded; }
|
||||
set { _expanded = value; }
|
||||
}
|
||||
|
||||
public bool HasChildren
|
||||
{
|
||||
get { return _children.Count > 0 || _dataNode.HasUnexpandedChildren; }
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _children; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.Foundation;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public class TreeDataSource : NSOutlineViewDataSource
|
||||
{
|
||||
private List<TreeDataNode> _nodes;
|
||||
|
||||
public TreeDataSource ()
|
||||
{
|
||||
_nodes = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _nodes; }
|
||||
}
|
||||
|
||||
public override int GetChildrenCount (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
if (item is TreeDataNode) {
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
return nodeItem.Nodes.Count;
|
||||
}
|
||||
|
||||
return _nodes.Count;
|
||||
}
|
||||
|
||||
public override NSObject GetObjectValue (NSOutlineView outlineView, NSTableColumn forTableColumn, NSObject byItem)
|
||||
{
|
||||
TreeDataNode nodeItem = byItem as TreeDataNode;
|
||||
if (nodeItem == null)
|
||||
return null;
|
||||
|
||||
return (NSString)nodeItem.CombinedName;
|
||||
}
|
||||
|
||||
public override NSObject GetChild (NSOutlineView outlineView, int childIndex, NSObject ofItem)
|
||||
{
|
||||
TreeDataNode nodeItem = ofItem as TreeDataNode;
|
||||
if (nodeItem != null) {
|
||||
return nodeItem.Nodes [childIndex];
|
||||
}
|
||||
|
||||
return Nodes[childIndex];
|
||||
}
|
||||
|
||||
public override bool ItemExpandable (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
if (nodeItem != null)
|
||||
return nodeItem.HasChildren;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
718
NBTExplorerMac/MainForm.Designer.cs
generated
|
@ -1,718 +0,0 @@
|
|||
namespace NBTExplorer
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemOpen = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemOpenFolder = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemOpenMinecraftSaveFolder = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this._menuItemSave = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this._menuItemExit = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemCut = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemCopy = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemPaste = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this._menuItemRename = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemEditValue = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemDelete = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemFind = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemFindNext = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemAbout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._nodeTree = new System.Windows.Forms.TreeView();
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this._buttonOpen = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonOpenFolder = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonSave = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this._buttonCut = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonCopy = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonPaste = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this._buttonRename = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonEdit = 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._buttonAddTagShort = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagInt = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagLong = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagFloat = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagDouble = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagByteArray = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagIntArray = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagString = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagList = new System.Windows.Forms.ToolStripButton();
|
||||
this._buttonAddTagCompound = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this._buttonFindNext = new System.Windows.Forms.ToolStripButton();
|
||||
this.BottomToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.TopToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.RightToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.LeftToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.ContentPanel = new System.Windows.Forms.ToolStripContentPanel();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.testToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemRecentFiles = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._menuItemRecentFolders = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.editToolStripMenuItem,
|
||||
this.searchToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(619, 24);
|
||||
this.menuStrip1.TabIndex = 0;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this._menuItemOpen,
|
||||
this._menuItemOpenFolder,
|
||||
this._menuItemOpenMinecraftSaveFolder,
|
||||
this.toolStripSeparator3,
|
||||
this._menuItemSave,
|
||||
this.toolStripSeparator4,
|
||||
this._menuItemRecentFiles,
|
||||
this._menuItemRecentFolders,
|
||||
this.toolStripSeparator8,
|
||||
this._menuItemExit});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// _menuItemOpen
|
||||
//
|
||||
this._menuItemOpen.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemOpen.Image")));
|
||||
this._menuItemOpen.Name = "_menuItemOpen";
|
||||
this._menuItemOpen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this._menuItemOpen.Size = new System.Drawing.Size(223, 22);
|
||||
this._menuItemOpen.Text = "&Open...";
|
||||
//
|
||||
// _menuItemOpenFolder
|
||||
//
|
||||
this._menuItemOpenFolder.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemOpenFolder.Image")));
|
||||
this._menuItemOpenFolder.Name = "_menuItemOpenFolder";
|
||||
this._menuItemOpenFolder.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||
| System.Windows.Forms.Keys.O)));
|
||||
this._menuItemOpenFolder.Size = new System.Drawing.Size(223, 22);
|
||||
this._menuItemOpenFolder.Text = "Open &Folder...";
|
||||
//
|
||||
// _menuItemOpenMinecraftSaveFolder
|
||||
//
|
||||
this._menuItemOpenMinecraftSaveFolder.Name = "_menuItemOpenMinecraftSaveFolder";
|
||||
this._menuItemOpenMinecraftSaveFolder.Size = new System.Drawing.Size(223, 22);
|
||||
this._menuItemOpenMinecraftSaveFolder.Text = "Open &Minecraft Save Folder";
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(220, 6);
|
||||
//
|
||||
// _menuItemSave
|
||||
//
|
||||
this._menuItemSave.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemSave.Image")));
|
||||
this._menuItemSave.Name = "_menuItemSave";
|
||||
this._menuItemSave.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||
this._menuItemSave.Size = new System.Drawing.Size(223, 22);
|
||||
this._menuItemSave.Text = "&Save";
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(220, 6);
|
||||
//
|
||||
// _menuItemExit
|
||||
//
|
||||
this._menuItemExit.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemExit.Image")));
|
||||
this._menuItemExit.Name = "_menuItemExit";
|
||||
this._menuItemExit.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
||||
this._menuItemExit.Size = new System.Drawing.Size(223, 22);
|
||||
this._menuItemExit.Text = "E&xit";
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this._menuItemCut,
|
||||
this._menuItemCopy,
|
||||
this._menuItemPaste,
|
||||
this.toolStripSeparator7,
|
||||
this._menuItemRename,
|
||||
this._menuItemEditValue,
|
||||
this._menuItemDelete});
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||
this.editToolStripMenuItem.Text = "&Edit";
|
||||
//
|
||||
// _menuItemCut
|
||||
//
|
||||
this._menuItemCut.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemCut.Image")));
|
||||
this._menuItemCut.Name = "_menuItemCut";
|
||||
this._menuItemCut.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
|
||||
this._menuItemCut.Size = new System.Drawing.Size(166, 22);
|
||||
this._menuItemCut.Text = "Cu&t";
|
||||
//
|
||||
// _menuItemCopy
|
||||
//
|
||||
this._menuItemCopy.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemCopy.Image")));
|
||||
this._menuItemCopy.Name = "_menuItemCopy";
|
||||
this._menuItemCopy.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
|
||||
this._menuItemCopy.Size = new System.Drawing.Size(166, 22);
|
||||
this._menuItemCopy.Text = "&Copy";
|
||||
//
|
||||
// _menuItemPaste
|
||||
//
|
||||
this._menuItemPaste.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemPaste.Image")));
|
||||
this._menuItemPaste.Name = "_menuItemPaste";
|
||||
this._menuItemPaste.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
|
||||
this._menuItemPaste.Size = new System.Drawing.Size(166, 22);
|
||||
this._menuItemPaste.Text = "&Paste";
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
this.toolStripSeparator7.Size = new System.Drawing.Size(163, 6);
|
||||
//
|
||||
// _menuItemRename
|
||||
//
|
||||
this._menuItemRename.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemRename.Image")));
|
||||
this._menuItemRename.Name = "_menuItemRename";
|
||||
this._menuItemRename.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
|
||||
this._menuItemRename.Size = new System.Drawing.Size(166, 22);
|
||||
this._menuItemRename.Text = "&Rename";
|
||||
//
|
||||
// _menuItemEditValue
|
||||
//
|
||||
this._menuItemEditValue.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemEditValue.Image")));
|
||||
this._menuItemEditValue.Name = "_menuItemEditValue";
|
||||
this._menuItemEditValue.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
||||
this._menuItemEditValue.Size = new System.Drawing.Size(166, 22);
|
||||
this._menuItemEditValue.Text = "&Edit Value";
|
||||
//
|
||||
// _menuItemDelete
|
||||
//
|
||||
this._menuItemDelete.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemDelete.Image")));
|
||||
this._menuItemDelete.Name = "_menuItemDelete";
|
||||
this._menuItemDelete.ShortcutKeys = System.Windows.Forms.Keys.Delete;
|
||||
this._menuItemDelete.Size = new System.Drawing.Size(166, 22);
|
||||
this._menuItemDelete.Text = "&Delete";
|
||||
//
|
||||
// searchToolStripMenuItem
|
||||
//
|
||||
this.searchToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this._menuItemFind,
|
||||
this._menuItemFindNext});
|
||||
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(54, 20);
|
||||
this.searchToolStripMenuItem.Text = "&Search";
|
||||
//
|
||||
// _menuItemFind
|
||||
//
|
||||
this._menuItemFind.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemFind.Image")));
|
||||
this._menuItemFind.Name = "_menuItemFind";
|
||||
this._menuItemFind.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
|
||||
this._menuItemFind.Size = new System.Drawing.Size(146, 22);
|
||||
this._menuItemFind.Text = "Find...";
|
||||
//
|
||||
// _menuItemFindNext
|
||||
//
|
||||
this._menuItemFindNext.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemFindNext.Image")));
|
||||
this._menuItemFindNext.Name = "_menuItemFindNext";
|
||||
this._menuItemFindNext.ShortcutKeys = System.Windows.Forms.Keys.F3;
|
||||
this._menuItemFindNext.Size = new System.Drawing.Size(146, 22);
|
||||
this._menuItemFindNext.Text = "Find Next";
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this._menuItemAbout});
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "&Help";
|
||||
//
|
||||
// _menuItemAbout
|
||||
//
|
||||
this._menuItemAbout.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemAbout.Image")));
|
||||
this._menuItemAbout.Name = "_menuItemAbout";
|
||||
this._menuItemAbout.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||
this._menuItemAbout.Size = new System.Drawing.Size(126, 22);
|
||||
this._menuItemAbout.Text = "&About";
|
||||
//
|
||||
// _nodeTree
|
||||
//
|
||||
this._nodeTree.AllowDrop = true;
|
||||
this._nodeTree.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._nodeTree.ImageIndex = 0;
|
||||
this._nodeTree.ImageList = this.imageList1;
|
||||
this._nodeTree.ItemHeight = 18;
|
||||
this._nodeTree.Location = new System.Drawing.Point(0, 49);
|
||||
this._nodeTree.Margin = new System.Windows.Forms.Padding(0);
|
||||
this._nodeTree.Name = "_nodeTree";
|
||||
this._nodeTree.SelectedImageIndex = 0;
|
||||
this._nodeTree.Size = new System.Drawing.Size(619, 374);
|
||||
this._nodeTree.TabIndex = 0;
|
||||
//
|
||||
// imageList1
|
||||
//
|
||||
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageList1.Images.SetKeyName(0, "document-attribute-b.png");
|
||||
this.imageList1.Images.SetKeyName(1, "document-attribute-s.png");
|
||||
this.imageList1.Images.SetKeyName(2, "document-attribute-i.png");
|
||||
this.imageList1.Images.SetKeyName(3, "document-attribute-l.png");
|
||||
this.imageList1.Images.SetKeyName(4, "document-attribute-f.png");
|
||||
this.imageList1.Images.SetKeyName(5, "document-attribute-d.png");
|
||||
this.imageList1.Images.SetKeyName(6, "edit-code.png");
|
||||
this.imageList1.Images.SetKeyName(7, "edit-small-caps.png");
|
||||
this.imageList1.Images.SetKeyName(8, "edit-list.png");
|
||||
this.imageList1.Images.SetKeyName(9, "box.png");
|
||||
this.imageList1.Images.SetKeyName(10, "folder.png");
|
||||
this.imageList1.Images.SetKeyName(11, "block.png");
|
||||
this.imageList1.Images.SetKeyName(12, "wooden-box.png");
|
||||
this.imageList1.Images.SetKeyName(13, "map.png");
|
||||
this.imageList1.Images.SetKeyName(14, "edit-code-i.png");
|
||||
this.imageList1.Images.SetKeyName(15, "question-white.png");
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this._buttonOpen,
|
||||
this._buttonOpenFolder,
|
||||
this._buttonSave,
|
||||
this.toolStripSeparator1,
|
||||
this._buttonCut,
|
||||
this._buttonCopy,
|
||||
this._buttonPaste,
|
||||
this.toolStripSeparator6,
|
||||
this._buttonRename,
|
||||
this._buttonEdit,
|
||||
this._buttonDelete,
|
||||
this.toolStripSeparator2,
|
||||
this._buttonAddTagByte,
|
||||
this._buttonAddTagShort,
|
||||
this._buttonAddTagInt,
|
||||
this._buttonAddTagLong,
|
||||
this._buttonAddTagFloat,
|
||||
this._buttonAddTagDouble,
|
||||
this._buttonAddTagByteArray,
|
||||
this._buttonAddTagIntArray,
|
||||
this._buttonAddTagString,
|
||||
this._buttonAddTagList,
|
||||
this._buttonAddTagCompound,
|
||||
this.toolStripSeparator5,
|
||||
this._buttonFindNext});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(619, 25);
|
||||
this.toolStrip1.Stretch = true;
|
||||
this.toolStrip1.TabIndex = 0;
|
||||
//
|
||||
// _buttonOpen
|
||||
//
|
||||
this._buttonOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonOpen.Image = ((System.Drawing.Image)(resources.GetObject("_buttonOpen.Image")));
|
||||
this._buttonOpen.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonOpen.Name = "_buttonOpen";
|
||||
this._buttonOpen.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonOpen.Text = "Open NBT Data Source";
|
||||
//
|
||||
// _buttonOpenFolder
|
||||
//
|
||||
this._buttonOpenFolder.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonOpenFolder.Image = ((System.Drawing.Image)(resources.GetObject("_buttonOpenFolder.Image")));
|
||||
this._buttonOpenFolder.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonOpenFolder.Name = "_buttonOpenFolder";
|
||||
this._buttonOpenFolder.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonOpenFolder.Text = "Open Folder";
|
||||
//
|
||||
// _buttonSave
|
||||
//
|
||||
this._buttonSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonSave.Image = ((System.Drawing.Image)(resources.GetObject("_buttonSave.Image")));
|
||||
this._buttonSave.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonSave.Name = "_buttonSave";
|
||||
this._buttonSave.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonSave.Text = "Save All Modified Tags";
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// _buttonCut
|
||||
//
|
||||
this._buttonCut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonCut.Image = ((System.Drawing.Image)(resources.GetObject("_buttonCut.Image")));
|
||||
this._buttonCut.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonCut.Name = "_buttonCut";
|
||||
this._buttonCut.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonCut.Text = "Cut";
|
||||
//
|
||||
// _buttonCopy
|
||||
//
|
||||
this._buttonCopy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonCopy.Image = ((System.Drawing.Image)(resources.GetObject("_buttonCopy.Image")));
|
||||
this._buttonCopy.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonCopy.Name = "_buttonCopy";
|
||||
this._buttonCopy.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonCopy.Text = "Copy";
|
||||
//
|
||||
// _buttonPaste
|
||||
//
|
||||
this._buttonPaste.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonPaste.Image = ((System.Drawing.Image)(resources.GetObject("_buttonPaste.Image")));
|
||||
this._buttonPaste.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonPaste.Name = "_buttonPaste";
|
||||
this._buttonPaste.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonPaste.Text = "Paste";
|
||||
//
|
||||
// toolStripSeparator6
|
||||
//
|
||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||
this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// _buttonRename
|
||||
//
|
||||
this._buttonRename.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonRename.Image = ((System.Drawing.Image)(resources.GetObject("_buttonRename.Image")));
|
||||
this._buttonRename.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonRename.Name = "_buttonRename";
|
||||
this._buttonRename.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonRename.Text = "Rename Tag";
|
||||
//
|
||||
// _buttonEdit
|
||||
//
|
||||
this._buttonEdit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonEdit.Image = ((System.Drawing.Image)(resources.GetObject("_buttonEdit.Image")));
|
||||
this._buttonEdit.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonEdit.Name = "_buttonEdit";
|
||||
this._buttonEdit.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonEdit.Text = "Edit Tag Value";
|
||||
//
|
||||
// _buttonDelete
|
||||
//
|
||||
this._buttonDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonDelete.Image = ((System.Drawing.Image)(resources.GetObject("_buttonDelete.Image")));
|
||||
this._buttonDelete.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonDelete.Name = "_buttonDelete";
|
||||
this._buttonDelete.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonDelete.Text = "Delete Tag";
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// _buttonAddTagByte
|
||||
//
|
||||
this._buttonAddTagByte.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagByte.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagByte.Image")));
|
||||
this._buttonAddTagByte.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagByte.Name = "_buttonAddTagByte";
|
||||
this._buttonAddTagByte.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagByte.Text = "Add Byte Tag";
|
||||
//
|
||||
// _buttonAddTagShort
|
||||
//
|
||||
this._buttonAddTagShort.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagShort.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagShort.Image")));
|
||||
this._buttonAddTagShort.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagShort.Name = "_buttonAddTagShort";
|
||||
this._buttonAddTagShort.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagShort.Text = "Add Short Tag";
|
||||
//
|
||||
// _buttonAddTagInt
|
||||
//
|
||||
this._buttonAddTagInt.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagInt.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagInt.Image")));
|
||||
this._buttonAddTagInt.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagInt.Name = "_buttonAddTagInt";
|
||||
this._buttonAddTagInt.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagInt.Text = "Add Int Tag";
|
||||
//
|
||||
// _buttonAddTagLong
|
||||
//
|
||||
this._buttonAddTagLong.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagLong.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagLong.Image")));
|
||||
this._buttonAddTagLong.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagLong.Name = "_buttonAddTagLong";
|
||||
this._buttonAddTagLong.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagLong.Text = "Add Long Tag";
|
||||
//
|
||||
// _buttonAddTagFloat
|
||||
//
|
||||
this._buttonAddTagFloat.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagFloat.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagFloat.Image")));
|
||||
this._buttonAddTagFloat.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagFloat.Name = "_buttonAddTagFloat";
|
||||
this._buttonAddTagFloat.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagFloat.Text = "Add Float Tag";
|
||||
//
|
||||
// _buttonAddTagDouble
|
||||
//
|
||||
this._buttonAddTagDouble.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagDouble.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagDouble.Image")));
|
||||
this._buttonAddTagDouble.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagDouble.Name = "_buttonAddTagDouble";
|
||||
this._buttonAddTagDouble.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagDouble.Text = "Add Double Tag";
|
||||
//
|
||||
// _buttonAddTagByteArray
|
||||
//
|
||||
this._buttonAddTagByteArray.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagByteArray.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagByteArray.Image")));
|
||||
this._buttonAddTagByteArray.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagByteArray.Name = "_buttonAddTagByteArray";
|
||||
this._buttonAddTagByteArray.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagByteArray.Text = "Add Byte Array Tag";
|
||||
//
|
||||
// _buttonAddTagIntArray
|
||||
//
|
||||
this._buttonAddTagIntArray.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagIntArray.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagIntArray.Image")));
|
||||
this._buttonAddTagIntArray.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this._buttonAddTagIntArray.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagIntArray.Name = "_buttonAddTagIntArray";
|
||||
this._buttonAddTagIntArray.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagIntArray.Text = "Add Int Array Tag";
|
||||
//
|
||||
// _buttonAddTagString
|
||||
//
|
||||
this._buttonAddTagString.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagString.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagString.Image")));
|
||||
this._buttonAddTagString.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagString.Name = "_buttonAddTagString";
|
||||
this._buttonAddTagString.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagString.Text = "Add String Tag";
|
||||
//
|
||||
// _buttonAddTagList
|
||||
//
|
||||
this._buttonAddTagList.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagList.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagList.Image")));
|
||||
this._buttonAddTagList.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagList.Name = "_buttonAddTagList";
|
||||
this._buttonAddTagList.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagList.Text = "Add List Tag";
|
||||
//
|
||||
// _buttonAddTagCompound
|
||||
//
|
||||
this._buttonAddTagCompound.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonAddTagCompound.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagCompound.Image")));
|
||||
this._buttonAddTagCompound.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonAddTagCompound.Name = "_buttonAddTagCompound";
|
||||
this._buttonAddTagCompound.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonAddTagCompound.Text = "Add Compound Tag";
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// _buttonFindNext
|
||||
//
|
||||
this._buttonFindNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this._buttonFindNext.Image = ((System.Drawing.Image)(resources.GetObject("_buttonFindNext.Image")));
|
||||
this._buttonFindNext.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this._buttonFindNext.Name = "_buttonFindNext";
|
||||
this._buttonFindNext.Size = new System.Drawing.Size(23, 22);
|
||||
this._buttonFindNext.Text = "Find / Find Next";
|
||||
//
|
||||
// BottomToolStripPanel
|
||||
//
|
||||
this.BottomToolStripPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.BottomToolStripPanel.Name = "BottomToolStripPanel";
|
||||
this.BottomToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.BottomToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
|
||||
this.BottomToolStripPanel.Size = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// TopToolStripPanel
|
||||
//
|
||||
this.TopToolStripPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.TopToolStripPanel.Name = "TopToolStripPanel";
|
||||
this.TopToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.TopToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
|
||||
this.TopToolStripPanel.Size = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// RightToolStripPanel
|
||||
//
|
||||
this.RightToolStripPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.RightToolStripPanel.Name = "RightToolStripPanel";
|
||||
this.RightToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.RightToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
|
||||
this.RightToolStripPanel.Size = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// LeftToolStripPanel
|
||||
//
|
||||
this.LeftToolStripPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.LeftToolStripPanel.Name = "LeftToolStripPanel";
|
||||
this.LeftToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.LeftToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
|
||||
this.LeftToolStripPanel.Size = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// ContentPanel
|
||||
//
|
||||
this.ContentPanel.Size = new System.Drawing.Size(562, 376);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.testToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(97, 26);
|
||||
//
|
||||
// testToolStripMenuItem
|
||||
//
|
||||
this.testToolStripMenuItem.Name = "testToolStripMenuItem";
|
||||
this.testToolStripMenuItem.Size = new System.Drawing.Size(96, 22);
|
||||
this.testToolStripMenuItem.Text = "Test";
|
||||
//
|
||||
// _menuItemRecentFiles
|
||||
//
|
||||
this._menuItemRecentFiles.Name = "_menuItemRecentFiles";
|
||||
this._menuItemRecentFiles.Size = new System.Drawing.Size(223, 22);
|
||||
this._menuItemRecentFiles.Text = "Recent Files";
|
||||
//
|
||||
// _menuItemRecentFolders
|
||||
//
|
||||
this._menuItemRecentFolders.Name = "_menuItemRecentFolders";
|
||||
this._menuItemRecentFolders.Size = new System.Drawing.Size(223, 22);
|
||||
this._menuItemRecentFolders.Text = "Recent Folders";
|
||||
//
|
||||
// toolStripSeparator8
|
||||
//
|
||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
||||
this.toolStripSeparator8.Size = new System.Drawing.Size(220, 6);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(619, 423);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this._nodeTree);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "MainForm";
|
||||
this.Text = "NBTExplorer";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem searchToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.TreeView _nodeTree;
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripButton _buttonOpen;
|
||||
private System.Windows.Forms.ToolStripButton _buttonSave;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripButton _buttonRename;
|
||||
private System.Windows.Forms.ToolStripButton _buttonEdit;
|
||||
private System.Windows.Forms.ToolStripButton _buttonDelete;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagByte;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagShort;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagInt;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagLong;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagFloat;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagDouble;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagByteArray;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagList;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagCompound;
|
||||
private System.Windows.Forms.ImageList imageList1;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagString;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemAbout;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemOpen;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemOpenFolder;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemSave;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemExit;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemFind;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemFindNext;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
private System.Windows.Forms.ToolStripButton _buttonFindNext;
|
||||
private System.Windows.Forms.ToolStripButton _buttonOpenFolder;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemOpenMinecraftSaveFolder;
|
||||
private System.Windows.Forms.ToolStripPanel BottomToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripPanel TopToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripPanel RightToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripPanel LeftToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripContentPanel ContentPanel;
|
||||
private System.Windows.Forms.ToolStripButton _buttonAddTagIntArray;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemCut;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemCopy;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemPaste;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemRename;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemEditValue;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemDelete;
|
||||
private System.Windows.Forms.ToolStripButton _buttonCut;
|
||||
private System.Windows.Forms.ToolStripButton _buttonCopy;
|
||||
private System.Windows.Forms.ToolStripButton _buttonPaste;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemRecentFiles;
|
||||
private System.Windows.Forms.ToolStripMenuItem _menuItemRecentFolders;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,983 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using NBTExplorer.Forms;
|
||||
using NBTExplorer.Model;
|
||||
using Substrate.Nbt;
|
||||
using NBTExplorer.Properties;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private static Dictionary<TagType, int> _tagIconIndex;
|
||||
|
||||
private IconRegistry _iconRegistry;
|
||||
|
||||
private string _openFolderPath = null;
|
||||
|
||||
static MainForm ()
|
||||
{
|
||||
try {
|
||||
_tagIconIndex = new Dictionary<TagType, int>();
|
||||
_tagIconIndex[TagType.TAG_BYTE] = 0;
|
||||
_tagIconIndex[TagType.TAG_SHORT] = 1;
|
||||
_tagIconIndex[TagType.TAG_INT] = 2;
|
||||
_tagIconIndex[TagType.TAG_LONG] = 3;
|
||||
_tagIconIndex[TagType.TAG_FLOAT] = 4;
|
||||
_tagIconIndex[TagType.TAG_DOUBLE] = 5;
|
||||
_tagIconIndex[TagType.TAG_BYTE_ARRAY] = 6;
|
||||
_tagIconIndex[TagType.TAG_STRING] = 7;
|
||||
_tagIconIndex[TagType.TAG_LIST] = 8;
|
||||
_tagIconIndex[TagType.TAG_COMPOUND] = 9;
|
||||
_tagIconIndex[TagType.TAG_INT_ARRAY] = 14;
|
||||
}
|
||||
catch (Exception e) {
|
||||
//Program.StaticInitFailure(e);
|
||||
}
|
||||
}
|
||||
|
||||
public MainForm ()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitializeIconRegistry();
|
||||
|
||||
FormClosing += MainForm_Closing;
|
||||
|
||||
_nodeTree.BeforeExpand += _nodeTree_BeforeExpand;
|
||||
_nodeTree.AfterCollapse += _nodeTree_AfterCollapse;
|
||||
_nodeTree.AfterSelect += _nodeTree_AfterSelect;
|
||||
_nodeTree.NodeMouseDoubleClick += _nodeTree_NodeMouseDoubleClick;
|
||||
_nodeTree.NodeMouseClick += _nodeTree_NodeMouseClick;
|
||||
_nodeTree.DragEnter += _nodeTree_DragEnter;
|
||||
_nodeTree.DragDrop += _nodeTree_DragDrop;
|
||||
|
||||
_buttonOpen.Click += _buttonOpen_Click;
|
||||
_buttonOpenFolder.Click += _buttonOpenFolder_Click;
|
||||
_buttonSave.Click += _buttonSave_Click;
|
||||
_buttonEdit.Click += _buttonEdit_Click;
|
||||
_buttonRename.Click += _buttonRename_Click;
|
||||
_buttonDelete.Click += _buttonDelete_Click;
|
||||
_buttonCopy.Click += _buttonCopy_Click;
|
||||
_buttonCut.Click += _buttonCut_Click;
|
||||
_buttonPaste.Click += _buttonPaste_Click;
|
||||
_buttonAddTagByte.Click += _buttonAddTagByte_Click;
|
||||
_buttonAddTagByteArray.Click += _buttonAddTagByteArray_Click;
|
||||
_buttonAddTagCompound.Click += _buttonAddTagCompound_Click;
|
||||
_buttonAddTagDouble.Click += _buttonAddTagDouble_Click;
|
||||
_buttonAddTagFloat.Click += _buttonAddTagFloat_Click;
|
||||
_buttonAddTagInt.Click += _buttonAddTagInt_Click;
|
||||
_buttonAddTagIntArray.Click += _buttonAddTagIntArray_Click;
|
||||
_buttonAddTagList.Click += _buttonAddTagList_Click;
|
||||
_buttonAddTagLong.Click += _buttonAddTagLong_Click;
|
||||
_buttonAddTagShort.Click += _buttonAddTagShort_Click;
|
||||
_buttonAddTagString.Click += _buttonAddTagString_Click;
|
||||
_buttonFindNext.Click += _buttonFindNext_Click;
|
||||
|
||||
_menuItemOpen.Click += _menuItemOpen_Click;
|
||||
_menuItemOpenFolder.Click += _menuItemOpenFolder_Click;
|
||||
_menuItemOpenMinecraftSaveFolder.Click += _menuItemOpenMinecraftSaveFolder_Click;
|
||||
_menuItemSave.Click += _menuItemSave_Click;
|
||||
_menuItemExit.Click += _menuItemExit_Click;
|
||||
_menuItemEditValue.Click += _menuItemEditValue_Click;
|
||||
_menuItemRename.Click += _menuItemRename_Click;
|
||||
_menuItemDelete.Click += _menuItemDelete_Click;
|
||||
_menuItemCopy.Click += _menuItemCopy_Click;
|
||||
_menuItemCut.Click += _menuItemCut_Click;
|
||||
_menuItemPaste.Click += _menuItemPaste_Click;
|
||||
_menuItemFind.Click += _menuItemFind_Click;
|
||||
_menuItemFindNext.Click += _menuItemFindNext_Click;
|
||||
_menuItemAbout.Click += _menuItemAbout_Click;
|
||||
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
if (args.Length > 1) {
|
||||
string[] paths = new string[args.Length - 1];
|
||||
Array.Copy(args, 1, paths, 0, paths.Length);
|
||||
OpenPaths(paths);
|
||||
}
|
||||
else {
|
||||
OpenMinecraftDirectory();
|
||||
}
|
||||
|
||||
UpdateOpenMenu();
|
||||
}
|
||||
|
||||
private void InitializeIconRegistry ()
|
||||
{
|
||||
_iconRegistry = new IconRegistry();
|
||||
_iconRegistry.DefaultIcon = 15;
|
||||
|
||||
_iconRegistry.Register(typeof(TagByteDataNode), 0);
|
||||
_iconRegistry.Register(typeof(TagShortDataNode), 1);
|
||||
_iconRegistry.Register(typeof(TagIntDataNode), 2);
|
||||
_iconRegistry.Register(typeof(TagLongDataNode), 3);
|
||||
_iconRegistry.Register(typeof(TagFloatDataNode), 4);
|
||||
_iconRegistry.Register(typeof(TagDoubleDataNode), 5);
|
||||
_iconRegistry.Register(typeof(TagByteArrayDataNode), 6);
|
||||
_iconRegistry.Register(typeof(TagStringDataNode), 7);
|
||||
_iconRegistry.Register(typeof(TagListDataNode), 8);
|
||||
_iconRegistry.Register(typeof(TagCompoundDataNode), 9);
|
||||
_iconRegistry.Register(typeof(RegionChunkDataNode), 9);
|
||||
_iconRegistry.Register(typeof(DirectoryDataNode), 10);
|
||||
_iconRegistry.Register(typeof(RegionFileDataNode), 11);
|
||||
_iconRegistry.Register(typeof(CubicRegionDataNode), 11);
|
||||
_iconRegistry.Register(typeof(NbtFileDataNode), 12);
|
||||
_iconRegistry.Register(typeof(TagIntArrayDataNode), 14);
|
||||
}
|
||||
|
||||
private void OpenFile ()
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.RestoreDirectory = true;
|
||||
ofd.Multiselect = true;
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.OK) {
|
||||
OpenPaths(ofd.FileNames);
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private void OpenFolder ()
|
||||
{
|
||||
FolderBrowserDialog ofd = new FolderBrowserDialog();
|
||||
if (_openFolderPath != null)
|
||||
ofd.SelectedPath = _openFolderPath;
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.OK) {
|
||||
_openFolderPath = ofd.SelectedPath;
|
||||
OpenPaths(new string[] { ofd.SelectedPath });
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private void OpenPaths (string[] paths)
|
||||
{
|
||||
_nodeTree.Nodes.Clear();
|
||||
|
||||
foreach (string path in paths) {
|
||||
if (Directory.Exists(path)) {
|
||||
DirectoryDataNode node = new DirectoryDataNode(path);
|
||||
_nodeTree.Nodes.Add(CreateUnexpandedNode(node));
|
||||
|
||||
AddPathToHistory(Settings.Default.RecentDirectories, path);
|
||||
}
|
||||
else if (File.Exists(path)) {
|
||||
DataNode node = null;
|
||||
foreach (var item in FileTypeRegistry.RegisteredTypes) {
|
||||
if (item.Value.NamePatternTest(path))
|
||||
node = item.Value.NodeCreate(path);
|
||||
}
|
||||
|
||||
if (node != null) {
|
||||
_nodeTree.Nodes.Add(CreateUnexpandedNode(node));
|
||||
AddPathToHistory(Settings.Default.RecentFiles, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_nodeTree.Nodes.Count > 0) {
|
||||
_nodeTree.Nodes[0].Expand();
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
UpdateOpenMenu();
|
||||
}
|
||||
|
||||
private void OpenMinecraftDirectory ()
|
||||
{
|
||||
try {
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
path = Path.Combine(path, ".minecraft");
|
||||
path = Path.Combine(path, "saves");
|
||||
|
||||
if (!Directory.Exists(path)) {
|
||||
path = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);
|
||||
}
|
||||
|
||||
OpenPaths(new string[] { path });
|
||||
}
|
||||
catch (Exception e) {
|
||||
MessageBox.Show("Could not open default Minecraft save directory");
|
||||
Console.WriteLine(e.Message);
|
||||
|
||||
try {
|
||||
OpenPaths(new string[] { Directory.GetCurrentDirectory() });
|
||||
}
|
||||
catch (Exception) {
|
||||
MessageBox.Show("Could not open current directory, this tool is probably not compatible with your platform.");
|
||||
Console.WriteLine(e.Message);
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private TreeNode CreateUnexpandedNode (DataNode node)
|
||||
{
|
||||
TreeNode frontNode = new TreeNode(node.NodeDisplay);
|
||||
frontNode.ImageIndex = _iconRegistry.Lookup(node.GetType());
|
||||
frontNode.SelectedImageIndex = frontNode.ImageIndex;
|
||||
frontNode.Tag = node;
|
||||
frontNode.ContextMenuStrip = BuildNodeContextMenu(node);
|
||||
|
||||
if (node.HasUnexpandedChildren || node.Nodes.Count > 0)
|
||||
frontNode.Nodes.Add(new TreeNode());
|
||||
|
||||
return frontNode;
|
||||
}
|
||||
|
||||
private ContextMenuStrip BuildNodeContextMenu (DataNode node)
|
||||
{
|
||||
if (node == null)
|
||||
return null;
|
||||
|
||||
ContextMenuStrip menu = new ContextMenuStrip();
|
||||
|
||||
if (node.CanReoderNode) {
|
||||
ToolStripMenuItem itemUp = new ToolStripMenuItem("Move &Up", Properties.Resources.ArrowUp, _contextMoveUp_Click);
|
||||
ToolStripMenuItem itemDn = new ToolStripMenuItem("Move &Down", Properties.Resources.ArrowDown, _contextMoveDown_Click);
|
||||
|
||||
itemUp.Enabled = node.CanMoveNodeUp;
|
||||
itemDn.Enabled = node.CanMoveNodeDown;
|
||||
|
||||
menu.Items.Add(itemUp);
|
||||
menu.Items.Add(itemDn);
|
||||
}
|
||||
|
||||
return (menu.Items.Count > 0) ? menu : null;
|
||||
}
|
||||
|
||||
private void _contextMoveUp_Click (object sender, EventArgs e)
|
||||
{
|
||||
TreeNode frontNode = _nodeTree.SelectedNode;
|
||||
if (frontNode == null)
|
||||
return;
|
||||
|
||||
DataNode node = frontNode.Tag as DataNode;
|
||||
if (node == null || !node.CanMoveNodeUp)
|
||||
return;
|
||||
|
||||
node.ChangeRelativePosition(-1);
|
||||
RefreshChildNodes(frontNode.Parent, node.Parent);
|
||||
}
|
||||
|
||||
private void _contextMoveDown_Click (object sender, EventArgs e)
|
||||
{
|
||||
TreeNode frontNode = _nodeTree.SelectedNode;
|
||||
if (frontNode == null)
|
||||
return;
|
||||
|
||||
DataNode node = frontNode.Tag as DataNode;
|
||||
if (node == null || !node.CanMoveNodeDown)
|
||||
return;
|
||||
|
||||
node.ChangeRelativePosition(1);
|
||||
RefreshChildNodes(frontNode.Parent, node.Parent);
|
||||
}
|
||||
|
||||
private void ExpandNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
if (node.IsExpanded)
|
||||
return;
|
||||
|
||||
node.Nodes.Clear();
|
||||
|
||||
DataNode backNode = node.Tag as DataNode;
|
||||
if (!backNode.IsExpanded)
|
||||
backNode.Expand();
|
||||
|
||||
foreach (DataNode child in backNode.Nodes)
|
||||
node.Nodes.Add(CreateUnexpandedNode(child));
|
||||
}
|
||||
|
||||
private void CollapseNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode backNode = node.Tag as DataNode;
|
||||
if (backNode.IsModified)
|
||||
return;
|
||||
|
||||
backNode.Collapse();
|
||||
|
||||
node.Nodes.Clear();
|
||||
if (backNode.HasUnexpandedChildren)
|
||||
node.Nodes.Add(new TreeNode());
|
||||
}
|
||||
|
||||
private void CreateNode (TreeNode node, TagType type)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanCreateTag(type))
|
||||
return;
|
||||
|
||||
if (dataNode.CreateNode(type)) {
|
||||
node.Text = dataNode.NodeDisplay;
|
||||
RefreshChildNodes(node, dataNode);
|
||||
UpdateUI(dataNode);
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshChildNodes (TreeNode node, DataNode dataNode)
|
||||
{
|
||||
Dictionary<DataNode, TreeNode> currentNodes = new Dictionary<DataNode, TreeNode>();
|
||||
foreach (TreeNode child in node.Nodes) {
|
||||
if (child.Tag is DataNode)
|
||||
currentNodes.Add(child.Tag as DataNode, child);
|
||||
}
|
||||
|
||||
node.Nodes.Clear();
|
||||
foreach (DataNode child in dataNode.Nodes) {
|
||||
if (!currentNodes.ContainsKey(child))
|
||||
node.Nodes.Add(CreateUnexpandedNode(child));
|
||||
else
|
||||
node.Nodes.Add(currentNodes[child]);
|
||||
}
|
||||
|
||||
foreach (TreeNode child in node.Nodes)
|
||||
child.ContextMenuStrip = BuildNodeContextMenu(child.Tag as DataNode);
|
||||
|
||||
if (node.Nodes.Count == 0 && dataNode.HasUnexpandedChildren) {
|
||||
ExpandNode(node);
|
||||
node.Expand();
|
||||
}
|
||||
}
|
||||
|
||||
private void EditNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanEditNode)
|
||||
return;
|
||||
|
||||
if (dataNode.EditNode()) {
|
||||
node.Text = dataNode.NodeDisplay;
|
||||
UpdateUI(dataNode);
|
||||
}
|
||||
}
|
||||
|
||||
private void RenameNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanRenameNode)
|
||||
return;
|
||||
|
||||
if (dataNode.RenameNode()) {
|
||||
node.Text = dataNode.NodeDisplay;
|
||||
UpdateUI(dataNode);
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanDeleteNode)
|
||||
return;
|
||||
|
||||
if (dataNode.DeleteNode()) {
|
||||
UpdateUI(node.Parent.Tag as DataNode);
|
||||
UpdateNodeText(node.Parent);
|
||||
node.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void CopyNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanCopyNode)
|
||||
return;
|
||||
|
||||
dataNode.CopyNode();
|
||||
}
|
||||
|
||||
private void CutNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanCutNode)
|
||||
return;
|
||||
|
||||
if (dataNode.CutNode()) {
|
||||
UpdateUI(node.Parent.Tag as DataNode);
|
||||
UpdateNodeText(node.Parent);
|
||||
node.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void PasteNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanPasteIntoNode)
|
||||
return;
|
||||
|
||||
if (dataNode.PasteNode()) {
|
||||
node.Text = dataNode.NodeDisplay;
|
||||
RefreshChildNodes(node, dataNode);
|
||||
UpdateUI(dataNode);
|
||||
}
|
||||
}
|
||||
|
||||
private void Save ()
|
||||
{
|
||||
foreach (TreeNode node in _nodeTree.Nodes) {
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (dataNode != null)
|
||||
dataNode.Save();
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private bool ConfirmExit ()
|
||||
{
|
||||
if (CheckModifications()) {
|
||||
if (MessageBox.Show("You currently have unsaved changes. Close anyway?", "Unsaved Changes", MessageBoxButtons.OKCancel) != DialogResult.OK)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private CancelSearchForm _searchForm;
|
||||
private SearchState _searchState;
|
||||
|
||||
private void SearchNode (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (!dataNode.CanSearchNode)
|
||||
return;
|
||||
|
||||
Find form = new Find();
|
||||
if (form.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
_searchState = new SearchState() {
|
||||
RootNode = dataNode,
|
||||
SearchName = form.NameToken,
|
||||
SearchValue = form.ValueToken,
|
||||
DiscoverCallback = SearchDiscoveryCallback,
|
||||
CollapseCallback = SearchCollapseCallback,
|
||||
EndCallback = SearchEndCallback,
|
||||
};
|
||||
|
||||
SearchNextNode();
|
||||
}
|
||||
|
||||
private void SearchNextNode ()
|
||||
{
|
||||
if (_searchState == null)
|
||||
return;
|
||||
|
||||
SearchWorker worker = new SearchWorker(_searchState, this);
|
||||
|
||||
Thread t = new Thread(new ThreadStart(worker.Run));
|
||||
t.IsBackground = true;
|
||||
t.Start();
|
||||
|
||||
_searchForm = new CancelSearchForm();
|
||||
if (_searchForm.ShowDialog(this) == DialogResult.Cancel) {
|
||||
worker.Cancel();
|
||||
_searchState = null;
|
||||
}
|
||||
|
||||
t.Join();
|
||||
}
|
||||
|
||||
private void SearchDiscoveryCallback (DataNode node)
|
||||
{
|
||||
_nodeTree.SelectedNode = FindFrontNode(node);
|
||||
|
||||
if (_searchForm != null) {
|
||||
_searchForm.DialogResult = DialogResult.OK;
|
||||
_searchForm = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchCollapseCallback (DataNode node)
|
||||
{
|
||||
CollapseBelow(node);
|
||||
}
|
||||
|
||||
private void SearchEndCallback (DataNode node)
|
||||
{
|
||||
_searchForm.DialogResult = DialogResult.OK;
|
||||
_searchForm = null;
|
||||
|
||||
MessageBox.Show("End of results");
|
||||
}
|
||||
|
||||
private TreeNode GetRootFromDataNodePath (DataNode node, out Stack<DataNode> hierarchy)
|
||||
{
|
||||
hierarchy = new Stack<DataNode>();
|
||||
while (node != null) {
|
||||
hierarchy.Push(node);
|
||||
node = node.Parent;
|
||||
}
|
||||
|
||||
DataNode rootDataNode = hierarchy.Pop();
|
||||
TreeNode frontNode = null;
|
||||
foreach (TreeNode child in _nodeTree.Nodes) {
|
||||
if (child.Tag == rootDataNode)
|
||||
frontNode = child;
|
||||
}
|
||||
|
||||
return frontNode;
|
||||
}
|
||||
|
||||
private TreeNode FindFrontNode (DataNode node)
|
||||
{
|
||||
Stack<DataNode> hierarchy;
|
||||
TreeNode frontNode = GetRootFromDataNodePath(node, out hierarchy);
|
||||
|
||||
if (frontNode == null)
|
||||
return null;
|
||||
|
||||
while (hierarchy.Count > 0) {
|
||||
if (!frontNode.IsExpanded) {
|
||||
frontNode.Nodes.Add(new TreeNode());
|
||||
frontNode.Expand();
|
||||
}
|
||||
|
||||
DataNode childData = hierarchy.Pop();
|
||||
foreach (TreeNode childFront in frontNode.Nodes) {
|
||||
if (childFront.Tag == childData) {
|
||||
frontNode = childFront;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return frontNode;
|
||||
}
|
||||
|
||||
private void CollapseBelow (DataNode node)
|
||||
{
|
||||
Stack<DataNode> hierarchy;
|
||||
TreeNode frontNode = GetRootFromDataNodePath(node, out hierarchy);
|
||||
|
||||
if (frontNode == null)
|
||||
return;
|
||||
|
||||
while (hierarchy.Count > 0) {
|
||||
if (!frontNode.IsExpanded)
|
||||
return;
|
||||
|
||||
DataNode childData = hierarchy.Pop();
|
||||
foreach (TreeNode childFront in frontNode.Nodes) {
|
||||
if (childFront.Tag == childData) {
|
||||
frontNode = childFront;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (frontNode.IsExpanded)
|
||||
frontNode.Collapse();
|
||||
}
|
||||
|
||||
private void UpdateNodeText (TreeNode node)
|
||||
{
|
||||
if (node == null || !(node.Tag is DataNode))
|
||||
return;
|
||||
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
node.Text = dataNode.NodeDisplay;
|
||||
}
|
||||
|
||||
private bool CheckModifications ()
|
||||
{
|
||||
foreach (TreeNode node in _nodeTree.Nodes) {
|
||||
DataNode dataNode = node.Tag as DataNode;
|
||||
if (dataNode != null && dataNode.IsModified)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void UpdateUI ()
|
||||
{
|
||||
TreeNode selected = _nodeTree.SelectedNode;
|
||||
if (selected != null && selected.Tag is DataNode) {
|
||||
UpdateUI(selected.Tag as DataNode);
|
||||
}
|
||||
else {
|
||||
_buttonSave.Enabled = CheckModifications();
|
||||
_buttonFindNext.Enabled = false;
|
||||
|
||||
_menuItemSave.Enabled = _buttonSave.Enabled;
|
||||
_menuItemFind.Enabled = false;
|
||||
_menuItemFindNext.Enabled = _searchState != null;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateUI (DataNode node)
|
||||
{
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
_buttonAddTagByte.Enabled = node.CanCreateTag(TagType.TAG_BYTE);
|
||||
_buttonAddTagByteArray.Enabled = node.CanCreateTag(TagType.TAG_BYTE_ARRAY);
|
||||
_buttonAddTagCompound.Enabled = node.CanCreateTag(TagType.TAG_COMPOUND);
|
||||
_buttonAddTagDouble.Enabled = node.CanCreateTag(TagType.TAG_DOUBLE);
|
||||
_buttonAddTagFloat.Enabled = node.CanCreateTag(TagType.TAG_FLOAT);
|
||||
_buttonAddTagInt.Enabled = node.CanCreateTag(TagType.TAG_INT);
|
||||
_buttonAddTagIntArray.Enabled = node.CanCreateTag(TagType.TAG_INT_ARRAY);
|
||||
_buttonAddTagList.Enabled = node.CanCreateTag(TagType.TAG_LIST);
|
||||
_buttonAddTagLong.Enabled = node.CanCreateTag(TagType.TAG_LONG);
|
||||
_buttonAddTagShort.Enabled = node.CanCreateTag(TagType.TAG_SHORT);
|
||||
_buttonAddTagString.Enabled = node.CanCreateTag(TagType.TAG_STRING);
|
||||
|
||||
_buttonSave.Enabled = CheckModifications();
|
||||
_buttonCopy.Enabled = node.CanCopyNode;
|
||||
_buttonCut.Enabled = node.CanCutNode;
|
||||
_buttonDelete.Enabled = node.CanDeleteNode;
|
||||
_buttonEdit.Enabled = node.CanEditNode;
|
||||
_buttonFindNext.Enabled = node.CanSearchNode || _searchState != null;
|
||||
_buttonPaste.Enabled = node.CanPasteIntoNode;
|
||||
_buttonRename.Enabled = node.CanRenameNode;
|
||||
|
||||
_menuItemSave.Enabled = _buttonSave.Enabled;
|
||||
_menuItemCopy.Enabled = node.CanCopyNode;
|
||||
_menuItemCut.Enabled = node.CanCutNode;
|
||||
_menuItemDelete.Enabled = node.CanDeleteNode;
|
||||
_menuItemEditValue.Enabled = node.CanEditNode;
|
||||
_menuItemFind.Enabled = node.CanSearchNode;
|
||||
_menuItemPaste.Enabled = node.CanPasteIntoNode;
|
||||
_menuItemRename.Enabled = node.CanRenameNode;
|
||||
_menuItemFind.Enabled = node.CanSearchNode;
|
||||
_menuItemFindNext.Enabled = _searchState != null;
|
||||
}
|
||||
|
||||
private void UpdateOpenMenu ()
|
||||
{
|
||||
try {
|
||||
if (Settings.Default.RecentDirectories == null)
|
||||
Settings.Default.RecentDirectories = new StringCollection();
|
||||
if (Settings.Default.RecentFiles == null)
|
||||
Settings.Default.RecentFiles = new StringCollection();
|
||||
}
|
||||
catch {
|
||||
return;
|
||||
}
|
||||
|
||||
_menuItemRecentFolders.DropDown = BuildRecentEntriesDropDown(Settings.Default.RecentDirectories);
|
||||
_menuItemRecentFiles.DropDown = BuildRecentEntriesDropDown(Settings.Default.RecentFiles);
|
||||
}
|
||||
|
||||
private ToolStripDropDown BuildRecentEntriesDropDown (StringCollection list)
|
||||
{
|
||||
if (list == null || list.Count == 0)
|
||||
return new ToolStripDropDown();
|
||||
|
||||
ToolStripDropDown menu = new ToolStripDropDown();
|
||||
foreach (string entry in list) {
|
||||
ToolStripMenuItem item = new ToolStripMenuItem("&" + (menu.Items.Count + 1) + " " + entry);
|
||||
item.Tag = entry;
|
||||
item.Click += _menuItemRecentPaths_Click;
|
||||
|
||||
menu.Items.Add(item);
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
private void AddPathToHistory (StringCollection list, string entry)
|
||||
{
|
||||
foreach (string item in list) {
|
||||
if (item == entry) {
|
||||
list.Remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (list.Count >= 5)
|
||||
list.RemoveAt(list.Count - 1);
|
||||
|
||||
list.Insert(0, entry);
|
||||
}
|
||||
|
||||
#region Event Handlers
|
||||
|
||||
private void MainForm_Closing (object sender, CancelEventArgs e)
|
||||
{
|
||||
Settings.Default.RecentFiles = Settings.Default.RecentFiles;
|
||||
Settings.Default.Save();
|
||||
if (!ConfirmExit())
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
#region TreeView Event Handlers
|
||||
|
||||
private void _nodeTree_BeforeExpand (object sender, TreeViewCancelEventArgs e)
|
||||
{
|
||||
ExpandNode(e.Node);
|
||||
}
|
||||
|
||||
private void _nodeTree_AfterCollapse (object sender, TreeViewEventArgs e)
|
||||
{
|
||||
CollapseNode(e.Node);
|
||||
}
|
||||
|
||||
private void _nodeTree_AfterSelect (object sender, TreeViewEventArgs e)
|
||||
{
|
||||
if (e.Node != null)
|
||||
UpdateUI(e.Node.Tag as DataNode);
|
||||
}
|
||||
|
||||
private void _nodeTree_NodeMouseDoubleClick (object sender, TreeNodeMouseClickEventArgs e)
|
||||
{
|
||||
EditNode(e.Node);
|
||||
}
|
||||
|
||||
private void _nodeTree_NodeMouseClick (object sender, TreeNodeMouseClickEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right)
|
||||
_nodeTree.SelectedNode = e.Node;
|
||||
}
|
||||
|
||||
private void _nodeTree_DragDrop (object sender, DragEventArgs e)
|
||||
{
|
||||
OpenPaths((string[])e.Data.GetData(DataFormats.FileDrop));
|
||||
}
|
||||
|
||||
private void _nodeTree_DragEnter (object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Toolstrip Event Handlers
|
||||
|
||||
private void _buttonOpen_Click (object sender, EventArgs e)
|
||||
{
|
||||
OpenFile();
|
||||
}
|
||||
|
||||
private void _buttonOpenFolder_Click (object sender, EventArgs e)
|
||||
{
|
||||
OpenFolder();
|
||||
}
|
||||
|
||||
private void _buttonSave_Click (object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
}
|
||||
|
||||
private void _buttonEdit_Click (object sender, EventArgs e)
|
||||
{
|
||||
EditNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _buttonRename_Click (object sender, EventArgs e)
|
||||
{
|
||||
RenameNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _buttonDelete_Click (object sender, EventArgs e)
|
||||
{
|
||||
DeleteNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _buttonCopy_Click (object sernder, EventArgs e)
|
||||
{
|
||||
CopyNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _buttonCut_Click (object sernder, EventArgs e)
|
||||
{
|
||||
CutNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _buttonPaste_Click (object sernder, EventArgs e)
|
||||
{
|
||||
PasteNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _buttonAddTagByteArray_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_BYTE_ARRAY);
|
||||
}
|
||||
|
||||
private void _buttonAddTagByte_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_BYTE);
|
||||
}
|
||||
|
||||
private void _buttonAddTagCompound_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_COMPOUND);
|
||||
}
|
||||
|
||||
private void _buttonAddTagDouble_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_DOUBLE);
|
||||
}
|
||||
|
||||
private void _buttonAddTagFloat_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_FLOAT);
|
||||
}
|
||||
|
||||
private void _buttonAddTagInt_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_INT);
|
||||
}
|
||||
|
||||
private void _buttonAddTagIntArray_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_INT_ARRAY);
|
||||
}
|
||||
|
||||
private void _buttonAddTagList_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_LIST);
|
||||
}
|
||||
|
||||
private void _buttonAddTagLong_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_LONG);
|
||||
}
|
||||
|
||||
private void _buttonAddTagShort_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_SHORT);
|
||||
}
|
||||
|
||||
private void _buttonAddTagString_Click (object sender, EventArgs e)
|
||||
{
|
||||
CreateNode(_nodeTree.SelectedNode, TagType.TAG_STRING);
|
||||
}
|
||||
|
||||
private void _buttonFindNext_Click (object sender, EventArgs e)
|
||||
{
|
||||
if (_searchState != null)
|
||||
SearchNextNode();
|
||||
else
|
||||
SearchNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Menu Event Handlers
|
||||
|
||||
private void _menuItemOpen_Click (object sender, EventArgs e)
|
||||
{
|
||||
OpenFile();
|
||||
}
|
||||
|
||||
private void _menuItemOpenFolder_Click (object sender, EventArgs e)
|
||||
{
|
||||
OpenFolder();
|
||||
}
|
||||
|
||||
private void _menuItemOpenMinecraftSaveFolder_Click (object sender, EventArgs e)
|
||||
{
|
||||
OpenMinecraftDirectory();
|
||||
}
|
||||
|
||||
private void _menuItemSave_Click (object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
}
|
||||
|
||||
private void _menuItemExit_Click (object sender, EventArgs e)
|
||||
{
|
||||
Settings.Default.Save();
|
||||
Close();
|
||||
}
|
||||
|
||||
private void _menuItemEditValue_Click (object sender, EventArgs e)
|
||||
{
|
||||
EditNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _menuItemRename_Click (object sender, EventArgs e)
|
||||
{
|
||||
RenameNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _menuItemDelete_Click (object sender, EventArgs e)
|
||||
{
|
||||
DeleteNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _menuItemCopy_Click (object sender, EventArgs e)
|
||||
{
|
||||
CopyNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _menuItemCut_Click (object sender, EventArgs e)
|
||||
{
|
||||
CutNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _menuItemPaste_Click (object sender, EventArgs e)
|
||||
{
|
||||
PasteNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _menuItemFind_Click (object sender, EventArgs e)
|
||||
{
|
||||
SearchNode(_nodeTree.SelectedNode);
|
||||
}
|
||||
|
||||
private void _menuItemFindNext_Click (object sender, EventArgs e)
|
||||
{
|
||||
SearchNextNode();
|
||||
}
|
||||
|
||||
private void _menuItemAbout_Click (object sender, EventArgs e)
|
||||
{
|
||||
new About().ShowDialog();
|
||||
}
|
||||
|
||||
private void _menuItemRecentPaths_Click (object sender, EventArgs e)
|
||||
{
|
||||
ToolStripMenuItem item = sender as ToolStripMenuItem;
|
||||
if (item == null || !(item.Tag is string))
|
||||
return;
|
||||
|
||||
OpenPaths(new string[] { item.Tag as string });
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class CompoundTagContainer : INamedTagContainer
|
||||
{
|
||||
private TagNodeCompound _tag;
|
||||
|
||||
public CompoundTagContainer (TagNodeCompound tag)
|
||||
{
|
||||
_tag = tag;
|
||||
}
|
||||
|
||||
public int TagCount
|
||||
{
|
||||
get { return _tag.Count; }
|
||||
}
|
||||
|
||||
public IEnumerable<string> TagNamesInUse
|
||||
{
|
||||
get { return _tag.Keys; }
|
||||
}
|
||||
|
||||
public string GetTagName (TagNode tag)
|
||||
{
|
||||
foreach (String name in _tag.Keys)
|
||||
if (_tag[name] == tag)
|
||||
return name;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool AddTag (TagNode tag, string name)
|
||||
{
|
||||
if (_tag.ContainsKey(name))
|
||||
return false;
|
||||
|
||||
_tag.Add(name, tag);
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool RenameTag (TagNode tag, string name)
|
||||
{
|
||||
if (_tag.ContainsKey(name))
|
||||
return false;
|
||||
|
||||
string oldName = GetTagName(tag);
|
||||
_tag.Remove(oldName);
|
||||
_tag.Add(name, tag);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool DeleteTag (TagNode tag)
|
||||
{
|
||||
foreach (String name in _tag.Keys)
|
||||
if (_tag[name] == tag)
|
||||
return _tag.Remove(name);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class CubicRegionDataNode : DataNode
|
||||
{
|
||||
private string _path;
|
||||
private CubicRegionFile _region;
|
||||
|
||||
private static Regex _namePattern = new Regex(@"^r2(\.-?\d+){3}\.(mcr|mca)$");
|
||||
|
||||
private CubicRegionDataNode (string path)
|
||||
{
|
||||
_path = path;
|
||||
}
|
||||
|
||||
public static CubicRegionDataNode TryCreateFrom (string path)
|
||||
{
|
||||
return new CubicRegionDataNode(path);
|
||||
}
|
||||
|
||||
public static bool SupportedNamePattern (string path)
|
||||
{
|
||||
path = Path.GetFileName(path);
|
||||
return _namePattern.IsMatch(path);
|
||||
}
|
||||
|
||||
protected override NodeCapabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return NodeCapabilities.Search;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HasUnexpandedChildren
|
||||
{
|
||||
get { return !IsExpanded; }
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return Path.GetFileName(_path); }
|
||||
}
|
||||
|
||||
protected override void ExpandCore ()
|
||||
{
|
||||
try {
|
||||
if (_region == null)
|
||||
_region = new CubicRegionFile(_path);
|
||||
|
||||
for (int x = 0; x < 32; x++) {
|
||||
for (int z = 0; z < 32; z++) {
|
||||
if (_region.HasChunk(x, z)) {
|
||||
Nodes.Add(new RegionChunkDataNode(_region, x, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
MessageBox.Show("Not a valid cubic region file.", "Read Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ReleaseCore ()
|
||||
{
|
||||
if (_region != null)
|
||||
_region.Close();
|
||||
_region = null;
|
||||
Nodes.Clear();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
using Substrate.Core;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class CubicRegionFile : RegionFile
|
||||
{
|
||||
private const int _sectorBytes = 256;
|
||||
private static byte[] _emptySector = new byte[_sectorBytes];
|
||||
|
||||
public CubicRegionFile (string path)
|
||||
: base(path)
|
||||
{ }
|
||||
|
||||
protected override int SectorBytes
|
||||
{
|
||||
get { return _sectorBytes; }
|
||||
}
|
||||
|
||||
protected override byte[] EmptySector
|
||||
{
|
||||
get { return _emptySector; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,215 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class DataNode
|
||||
{
|
||||
private DataNode _parent;
|
||||
private DataNodeCollection _children;
|
||||
|
||||
private bool _expanded;
|
||||
private bool _modified;
|
||||
|
||||
public DataNode ()
|
||||
{
|
||||
_children = new DataNodeCollection(this);
|
||||
}
|
||||
|
||||
public DataNode Parent
|
||||
{
|
||||
get { return _parent; }
|
||||
internal set { _parent = value; }
|
||||
}
|
||||
|
||||
public DataNodeCollection Nodes
|
||||
{
|
||||
get { return _children; }
|
||||
}
|
||||
|
||||
public bool IsModified
|
||||
{
|
||||
get { return _modified; }
|
||||
set
|
||||
{
|
||||
if (value && Parent != null)
|
||||
Parent.IsModified = value;
|
||||
_modified = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get { return _expanded; }
|
||||
private set { _expanded = value; }
|
||||
}
|
||||
|
||||
public void Expand ()
|
||||
{
|
||||
if (!IsExpanded) {
|
||||
ExpandCore();
|
||||
IsExpanded = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void ExpandCore () { }
|
||||
|
||||
public void Collapse ()
|
||||
{
|
||||
if (IsExpanded && !IsModified) {
|
||||
Release();
|
||||
IsExpanded = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void Release ()
|
||||
{
|
||||
foreach (DataNode node in Nodes)
|
||||
node.Release();
|
||||
|
||||
ReleaseCore();
|
||||
IsExpanded = false;
|
||||
}
|
||||
|
||||
protected virtual void ReleaseCore ()
|
||||
{
|
||||
Nodes.Clear();
|
||||
}
|
||||
|
||||
public void Save ()
|
||||
{
|
||||
foreach (DataNode node in Nodes)
|
||||
if (node.IsModified)
|
||||
node.Save();
|
||||
|
||||
SaveCore();
|
||||
IsModified = false;
|
||||
}
|
||||
|
||||
protected virtual void SaveCore ()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual string NodeName
|
||||
{
|
||||
get { return ""; }
|
||||
}
|
||||
|
||||
public virtual string NodeDisplay
|
||||
{
|
||||
get { return ""; }
|
||||
}
|
||||
|
||||
public virtual bool HasUnexpandedChildren
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#region Capabilities
|
||||
|
||||
protected virtual NodeCapabilities Capabilities
|
||||
{
|
||||
get { return NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanRenameNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.Rename) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanEditNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.Edit) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanDeleteNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.Delete) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanCopyNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.Copy) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanCutNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.Cut) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanPasteIntoNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.PasteInto) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanSearchNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.Search) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanReoderNode
|
||||
{
|
||||
get { return (Capabilities & NodeCapabilities.Reorder) != NodeCapabilities.None; }
|
||||
}
|
||||
|
||||
public virtual bool CanMoveNodeUp
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public virtual bool CanMoveNodeDown
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public virtual bool CanCreateTag (TagType type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Operations
|
||||
|
||||
public virtual bool CreateNode (TagType type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool RenameNode ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool EditNode ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool DeleteNode ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool CopyNode ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool CutNode ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool PasteNode ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool ChangeRelativePosition (int offset)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class DataNodeCollection : IList<DataNode>
|
||||
{
|
||||
private List<DataNode> _nodes;
|
||||
private DataNode _parent;
|
||||
|
||||
internal DataNodeCollection (DataNode parent)
|
||||
{
|
||||
_parent = parent;
|
||||
_nodes = new List<DataNode>();
|
||||
}
|
||||
|
||||
public int IndexOf (DataNode item)
|
||||
{
|
||||
return _nodes.IndexOf(item);
|
||||
}
|
||||
|
||||
public void Insert (int index, DataNode item)
|
||||
{
|
||||
if (item == null)
|
||||
throw new ArgumentNullException("item");
|
||||
if (item.Parent != null)
|
||||
throw new ArgumentException("The item is already assigned to another DataNode.");
|
||||
|
||||
item.Parent = _parent;
|
||||
|
||||
_nodes.Insert(index, item);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
if (index < 0 || index >= _nodes.Count)
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
|
||||
DataNode node = _nodes[index];
|
||||
node.Parent = null;
|
||||
|
||||
_nodes.RemoveAt(index);
|
||||
}
|
||||
|
||||
DataNode IList<DataNode>.this[int index]
|
||||
{
|
||||
get { return _nodes[index]; }
|
||||
set
|
||||
{
|
||||
if (index < 0 || index > _nodes.Count)
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
if (value == null)
|
||||
throw new ArgumentNullException("item");
|
||||
if (value.Parent != null)
|
||||
throw new ArgumentException("The item is already assigned to another DataNode.");
|
||||
|
||||
_nodes[index].Parent = null;
|
||||
_nodes[index] = value;
|
||||
_nodes[index].Parent = _parent;
|
||||
}
|
||||
}
|
||||
|
||||
public void Add (DataNode item)
|
||||
{
|
||||
if (item == null)
|
||||
throw new ArgumentNullException("item");
|
||||
if (item.Parent != null)
|
||||
throw new ArgumentException("The item is already assigned to another DataNode.");
|
||||
|
||||
item.Parent = _parent;
|
||||
|
||||
_nodes.Add(item);
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
foreach (DataNode node in _nodes)
|
||||
node.Parent = null;
|
||||
|
||||
_nodes.Clear();
|
||||
}
|
||||
|
||||
public bool Contains (DataNode item)
|
||||
{
|
||||
return _nodes.Contains(item);
|
||||
}
|
||||
|
||||
public void CopyTo (DataNode[] array, int arrayIndex)
|
||||
{
|
||||
_nodes.CopyTo(array, arrayIndex);
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return _nodes.Count; }
|
||||
}
|
||||
|
||||
bool ICollection<DataNode>.IsReadOnly
|
||||
{
|
||||
get { return (_nodes as IList<DataNode>).IsReadOnly; }
|
||||
}
|
||||
|
||||
public bool Remove (DataNode item)
|
||||
{
|
||||
if (_nodes.Contains(item))
|
||||
item.Parent = null;
|
||||
|
||||
return _nodes.Remove(item);
|
||||
}
|
||||
|
||||
public IEnumerator<DataNode> GetEnumerator ()
|
||||
{
|
||||
return _nodes.GetEnumerator();
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
|
||||
{
|
||||
return _nodes.GetEnumerator();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
using System.IO;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class DirectoryDataNode : DataNode
|
||||
{
|
||||
private string _path;
|
||||
|
||||
public DirectoryDataNode (string path)
|
||||
{
|
||||
_path = path;
|
||||
}
|
||||
|
||||
protected override NodeCapabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return NodeCapabilities.Search;
|
||||
}
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return Path.GetFileName(_path); }
|
||||
}
|
||||
|
||||
public override bool HasUnexpandedChildren
|
||||
{
|
||||
get { return !IsExpanded; }
|
||||
}
|
||||
|
||||
protected override void ExpandCore ()
|
||||
{
|
||||
foreach (string dirpath in Directory.GetDirectories(_path)) {
|
||||
Nodes.Add(new DirectoryDataNode(dirpath));
|
||||
}
|
||||
|
||||
foreach (string filepath in Directory.GetFiles(_path)) {
|
||||
DataNode node = null;
|
||||
foreach (var item in FileTypeRegistry.RegisteredTypes) {
|
||||
if (item.Value.NamePatternTest(filepath))
|
||||
node = item.Value.NodeCreate(filepath);
|
||||
}
|
||||
|
||||
if (node != null)
|
||||
Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ReleaseCore ()
|
||||
{
|
||||
Nodes.Clear();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public delegate bool NamePatternTestFunc (string path);
|
||||
public delegate DataNode NodeCreateFunc (string path);
|
||||
|
||||
public class FileTypeRecord
|
||||
{
|
||||
public NamePatternTestFunc NamePatternTest { get; set; }
|
||||
public NodeCreateFunc NodeCreate { get; set; }
|
||||
}
|
||||
|
||||
public class FileTypeRegistry
|
||||
{
|
||||
private static Dictionary<Type, FileTypeRecord> _registry = new Dictionary<Type, FileTypeRecord>();
|
||||
|
||||
public static FileTypeRecord Lookup (Type type)
|
||||
{
|
||||
if (_registry.ContainsKey(type))
|
||||
return _registry[type];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void Register (Type type, FileTypeRecord record)
|
||||
{
|
||||
_registry[type] = record;
|
||||
}
|
||||
|
||||
public static void Register<T> (FileTypeRecord record)
|
||||
{
|
||||
Register(typeof(T), record);
|
||||
}
|
||||
|
||||
public static IEnumerable<KeyValuePair<Type, FileTypeRecord>> RegisteredTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (var item in _registry)
|
||||
yield return item;
|
||||
}
|
||||
}
|
||||
|
||||
static FileTypeRegistry ()
|
||||
{
|
||||
try {
|
||||
Register<NbtFileDataNode>(new FileTypeRecord() {
|
||||
NamePatternTest = NbtFileDataNode.SupportedNamePattern,
|
||||
NodeCreate = NbtFileDataNode.TryCreateFrom,
|
||||
});
|
||||
|
||||
Register<RegionFileDataNode>(new FileTypeRecord() {
|
||||
NamePatternTest = RegionFileDataNode.SupportedNamePattern,
|
||||
NodeCreate = RegionFileDataNode.TryCreateFrom,
|
||||
});
|
||||
|
||||
Register<CubicRegionDataNode>(new FileTypeRecord() {
|
||||
NamePatternTest = CubicRegionDataNode.SupportedNamePattern,
|
||||
NodeCreate = CubicRegionDataNode.TryCreateFrom,
|
||||
});
|
||||
}
|
||||
catch (Exception e) {
|
||||
//Program.StaticInitFailure(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class ListTagContainer : IOrderedTagContainer
|
||||
{
|
||||
private TagNodeList _tag;
|
||||
|
||||
public ListTagContainer (TagNodeList tag)
|
||||
{
|
||||
_tag = tag;
|
||||
}
|
||||
|
||||
public int TagCount
|
||||
{
|
||||
get { return _tag.Count; }
|
||||
}
|
||||
|
||||
public bool DeleteTag (TagNode tag)
|
||||
{
|
||||
return _tag.Remove(tag);
|
||||
}
|
||||
|
||||
public int GetTagIndex (TagNode tag)
|
||||
{
|
||||
return _tag.IndexOf(tag);
|
||||
}
|
||||
|
||||
public bool InsertTag (TagNode tag, int index)
|
||||
{
|
||||
if (index < 0 || index > _tag.Count)
|
||||
return false;
|
||||
|
||||
_tag.Insert(index, tag);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
using System.IO;
|
||||
using Substrate.Core;
|
||||
using Substrate.Nbt;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class NbtFileDataNode : DataNode, IMetaTagContainer
|
||||
{
|
||||
private NbtTree _tree;
|
||||
private string _path;
|
||||
private CompressionType _compressionType;
|
||||
|
||||
private CompoundTagContainer _container;
|
||||
|
||||
private static Regex _namePattern = new Regex(@"\.(dat|nbt|schematic)$");
|
||||
|
||||
private NbtFileDataNode (string path, CompressionType compressionType)
|
||||
{
|
||||
_path = path;
|
||||
_compressionType = compressionType;
|
||||
_container = new CompoundTagContainer(new TagNodeCompound());
|
||||
}
|
||||
|
||||
public static NbtFileDataNode TryCreateFrom (string path)
|
||||
{
|
||||
return TryCreateFrom(path, CompressionType.GZip)
|
||||
?? TryCreateFrom(path, CompressionType.None);
|
||||
}
|
||||
|
||||
private static NbtFileDataNode TryCreateFrom (string path, CompressionType compressionType)
|
||||
{
|
||||
try {
|
||||
NBTFile file = new NBTFile(path);
|
||||
NbtTree tree = new NbtTree();
|
||||
tree.ReadFrom(file.GetDataInputStream(compressionType));
|
||||
|
||||
if (tree.Root == null)
|
||||
return null;
|
||||
|
||||
return new NbtFileDataNode(path, compressionType);
|
||||
}
|
||||
catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool SupportedNamePattern (string path)
|
||||
{
|
||||
path = Path.GetFileName(path);
|
||||
return _namePattern.IsMatch(path);
|
||||
}
|
||||
|
||||
protected override NodeCapabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return NodeCapabilities.CreateTag
|
||||
| NodeCapabilities.PasteInto
|
||||
| NodeCapabilities.Search;
|
||||
}
|
||||
}
|
||||
|
||||
public override string NodeName
|
||||
{
|
||||
get { return Path.GetFileName(_path); }
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return NodeName; }
|
||||
}
|
||||
|
||||
public override bool HasUnexpandedChildren
|
||||
{
|
||||
get { return !IsExpanded; }
|
||||
}
|
||||
|
||||
protected override void ExpandCore ()
|
||||
{
|
||||
if (_tree == null) {
|
||||
NBTFile file = new NBTFile(_path);
|
||||
_tree = new NbtTree();
|
||||
_tree.ReadFrom(file.GetDataInputStream(_compressionType));
|
||||
|
||||
if (_tree.Root != null)
|
||||
_container = new CompoundTagContainer(_tree.Root);
|
||||
}
|
||||
|
||||
foreach (TagNode tag in _tree.Root.Values) {
|
||||
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
||||
if (node != null)
|
||||
Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ReleaseCore ()
|
||||
{
|
||||
_tree = null;
|
||||
Nodes.Clear();
|
||||
}
|
||||
|
||||
protected override void SaveCore ()
|
||||
{
|
||||
NBTFile file = new NBTFile(_path);
|
||||
using (Stream str = file.GetDataOutputStream(_compressionType)) {
|
||||
_tree.WriteTo(str);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsNamedContainer
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public bool IsOrderedContainer
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public INamedTagContainer NamedTagContainer
|
||||
{
|
||||
get { return _container; }
|
||||
}
|
||||
|
||||
public IOrderedTagContainer OrderedTagContainer
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public int TagCount
|
||||
{
|
||||
get { return _container.TagCount; }
|
||||
}
|
||||
|
||||
public bool DeleteTag (TagNode tag)
|
||||
{
|
||||
return _container.DeleteTag(tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
[Flags]
|
||||
public enum NodeCapabilities
|
||||
{
|
||||
None = 0,
|
||||
Cut = 0x1,
|
||||
Copy = 0x2,
|
||||
PasteInto = 0x4,
|
||||
Rename = 0x8,
|
||||
Edit = 0x10,
|
||||
Delete = 0x20,
|
||||
CreateTag = 0x40,
|
||||
Search = 0x80,
|
||||
Reorder = 0x100,
|
||||
}
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
using Substrate.Core;
|
||||
using Substrate.Nbt;
|
||||
using System.IO;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class RegionChunkDataNode : DataNode, IMetaTagContainer
|
||||
{
|
||||
private RegionFile _regionFile;
|
||||
private NbtTree _tree;
|
||||
private int _x;
|
||||
private int _z;
|
||||
|
||||
private CompoundTagContainer _container;
|
||||
|
||||
public RegionChunkDataNode (RegionFile regionFile, int x, int z)
|
||||
{
|
||||
_regionFile = regionFile;
|
||||
_x = x;
|
||||
_z = z;
|
||||
_container = new CompoundTagContainer(new TagNodeCompound());
|
||||
}
|
||||
|
||||
protected override NodeCapabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return NodeCapabilities.CreateTag
|
||||
| NodeCapabilities.PasteInto
|
||||
| NodeCapabilities.Search;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HasUnexpandedChildren
|
||||
{
|
||||
get { return !IsExpanded; }
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return "Chunk [" + _x + ", " + _z + "]"; }
|
||||
}
|
||||
|
||||
protected override void ExpandCore ()
|
||||
{
|
||||
if (_tree == null) {
|
||||
_tree = new NbtTree();
|
||||
_tree.ReadFrom(_regionFile.GetChunkDataInputStream(_x, _z));
|
||||
|
||||
if (_tree.Root != null)
|
||||
_container = new CompoundTagContainer(_tree.Root);
|
||||
}
|
||||
|
||||
foreach (TagNode tag in _tree.Root.Values) {
|
||||
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
||||
if (node != null)
|
||||
Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ReleaseCore ()
|
||||
{
|
||||
_tree = null;
|
||||
Nodes.Clear();
|
||||
}
|
||||
|
||||
protected override void SaveCore ()
|
||||
{
|
||||
using (Stream str = _regionFile.GetChunkDataOutputStream(_x, _z)) {
|
||||
_tree.WriteTo(str);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsNamedContainer
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public bool IsOrderedContainer
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public INamedTagContainer NamedTagContainer
|
||||
{
|
||||
get { return _container; }
|
||||
}
|
||||
|
||||
public IOrderedTagContainer OrderedTagContainer
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public int TagCount
|
||||
{
|
||||
get { return _container.TagCount; }
|
||||
}
|
||||
|
||||
public bool DeleteTag (TagNode tag)
|
||||
{
|
||||
return _container.DeleteTag(tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Substrate.Core;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class RegionFileDataNode : DataNode
|
||||
{
|
||||
private string _path;
|
||||
private RegionFile _region;
|
||||
|
||||
private static Regex _namePattern = new Regex(@"^r(\.-?\d+){2}\.(mcr|mca)$");
|
||||
|
||||
private RegionFileDataNode (string path)
|
||||
{
|
||||
_path = path;
|
||||
}
|
||||
|
||||
public static RegionFileDataNode TryCreateFrom (string path)
|
||||
{
|
||||
return new RegionFileDataNode(path);
|
||||
}
|
||||
|
||||
public static bool SupportedNamePattern (string path)
|
||||
{
|
||||
path = Path.GetFileName(path);
|
||||
return _namePattern.IsMatch(path);
|
||||
}
|
||||
|
||||
protected override NodeCapabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return NodeCapabilities.Search;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HasUnexpandedChildren
|
||||
{
|
||||
get { return !IsExpanded; }
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return Path.GetFileName(_path); }
|
||||
}
|
||||
|
||||
protected override void ExpandCore ()
|
||||
{
|
||||
try {
|
||||
if (_region == null)
|
||||
_region = new RegionFile(_path);
|
||||
|
||||
for (int x = 0; x < 32; x++) {
|
||||
for (int z = 0; z < 32; z++) {
|
||||
if (_region.HasChunk(x, z)) {
|
||||
Nodes.Add(new RegionChunkDataNode(_region, x, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
MessageBox.Show("Not a valid region file.", "Read Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ReleaseCore ()
|
||||
{
|
||||
if (_region != null)
|
||||
_region.Close();
|
||||
_region = null;
|
||||
Nodes.Clear();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
using System;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagByteArrayDataNode : TagDataNode
|
||||
{
|
||||
public TagByteArrayDataNode (TagNodeByteArray tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
protected new TagNodeByteArray Tag
|
||||
{
|
||||
get { return base.Tag as TagNodeByteArray; }
|
||||
}
|
||||
|
||||
public override bool CanEditNode
|
||||
{
|
||||
get { return !IsMono(); }
|
||||
}
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditByteHexValue(Tag);
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return NodeDisplayPrefix + Tag.Data.Length + " bytes"; }
|
||||
}
|
||||
|
||||
private bool IsMono ()
|
||||
{
|
||||
return Type.GetType("Mono.Runtime") != null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagByteDataNode : TagDataNode
|
||||
{
|
||||
public TagByteDataNode (TagNodeByte tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
protected new TagNodeByte Tag
|
||||
{
|
||||
get { return base.Tag as TagNodeByte; }
|
||||
}
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditScalarValue(Tag);
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return NodeDisplayPrefix + unchecked((sbyte)Tag.Data).ToString(); }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagCompoundDataNode : TagDataNode.Container
|
||||
{
|
||||
private CompoundTagContainer _container;
|
||||
|
||||
public TagCompoundDataNode (TagNodeCompound tag)
|
||||
: base(tag)
|
||||
{
|
||||
_container = new CompoundTagContainer(tag);
|
||||
}
|
||||
|
||||
protected new TagNodeCompound Tag
|
||||
{
|
||||
get { return base.Tag as TagNodeCompound; }
|
||||
}
|
||||
|
||||
protected override void ExpandCore ()
|
||||
{
|
||||
var list = new SortedList<TagKey, TagNode>();
|
||||
foreach (var item in Tag) {
|
||||
list.Add(new TagKey(item.Key, item.Value.GetTagType()), item.Value);
|
||||
}
|
||||
|
||||
foreach (var item in list) {
|
||||
TagDataNode node = TagDataNode.CreateFromTag(item.Value);
|
||||
if (node != null)
|
||||
Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanCreateTag (TagType type)
|
||||
{
|
||||
return Enum.IsDefined(typeof(TagType), type) && type != TagType.TAG_END;
|
||||
}
|
||||
|
||||
public override bool CanPasteIntoNode
|
||||
{
|
||||
get { return NbtClipboardData.ContainsData; }
|
||||
}
|
||||
|
||||
public override bool CreateNode (TagType type)
|
||||
{
|
||||
if (!CanCreateTag(type))
|
||||
return false;
|
||||
|
||||
CreateNodeForm form = new CreateNodeForm(type, true);
|
||||
form.InvalidNames.AddRange(_container.TagNamesInUse);
|
||||
|
||||
if (form.ShowDialog() == DialogResult.OK) {
|
||||
AddTag(form.TagNode, form.TagName);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PasteNode ()
|
||||
{
|
||||
if (!CanPasteIntoNode)
|
||||
return false;
|
||||
|
||||
NbtClipboardData clipboard = NbtClipboardData.CopyFromClipboard();
|
||||
if (clipboard.Node == null)
|
||||
return false;
|
||||
|
||||
string name = clipboard.Name;
|
||||
if (String.IsNullOrEmpty(name))
|
||||
name = "UNNAMED";
|
||||
|
||||
AddTag(clipboard.Node, MakeUniqueName(name));
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool IsNamedContainer
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override INamedTagContainer NamedTagContainer
|
||||
{
|
||||
get { return _container; }
|
||||
}
|
||||
|
||||
public override int TagCount
|
||||
{
|
||||
get { return _container.TagCount; }
|
||||
}
|
||||
|
||||
public override bool DeleteTag (TagNode tag)
|
||||
{
|
||||
return _container.DeleteTag(tag);
|
||||
}
|
||||
|
||||
private void AddTag (TagNode tag, string name)
|
||||
{
|
||||
_container.AddTag(tag, name);
|
||||
IsModified = true;
|
||||
|
||||
if (IsExpanded) {
|
||||
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
||||
if (node != null)
|
||||
Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
private string MakeUniqueName (string name)
|
||||
{
|
||||
List<string> names = new List<string>(_container.TagNamesInUse);
|
||||
if (!names.Contains(name))
|
||||
return name;
|
||||
|
||||
int index = 1;
|
||||
while (names.Contains(MakeCandidateName(name, index)))
|
||||
index++;
|
||||
|
||||
return MakeCandidateName(name, index);
|
||||
}
|
||||
|
||||
private string MakeCandidateName (string name, int index)
|
||||
{
|
||||
return name + " (Copy " + index + ")";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public interface ITagContainer
|
||||
{
|
||||
int TagCount { get; }
|
||||
|
||||
bool DeleteTag (TagNode tag);
|
||||
}
|
||||
|
||||
public interface IMetaTagContainer : ITagContainer
|
||||
{
|
||||
bool IsNamedContainer { get; }
|
||||
bool IsOrderedContainer { get; }
|
||||
|
||||
INamedTagContainer NamedTagContainer { get; }
|
||||
IOrderedTagContainer OrderedTagContainer { get; }
|
||||
}
|
||||
|
||||
public interface INamedTagContainer : ITagContainer
|
||||
{
|
||||
IEnumerable<string> TagNamesInUse { get; }
|
||||
|
||||
string GetTagName (TagNode tag);
|
||||
bool AddTag (TagNode tag, string name);
|
||||
bool RenameTag (TagNode tag, string name);
|
||||
}
|
||||
|
||||
public interface IOrderedTagContainer : ITagContainer
|
||||
{
|
||||
int GetTagIndex (TagNode tag);
|
||||
bool InsertTag (TagNode tag, int index);
|
||||
}
|
||||
}
|
|
@ -1,344 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public abstract class TagDataNode : DataNode
|
||||
{
|
||||
public abstract class Container : TagDataNode, IMetaTagContainer
|
||||
{
|
||||
protected Container (TagNode tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
#region ITagContainer
|
||||
|
||||
public virtual int TagCount
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public virtual bool IsNamedContainer
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public virtual bool IsOrderedContainer
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public virtual INamedTagContainer NamedTagContainer
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public virtual IOrderedTagContainer OrderedTagContainer
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public virtual bool DeleteTag (TagNode tag)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override NodeCapabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return NodeCapabilities.Copy
|
||||
| NodeCapabilities.CreateTag
|
||||
| NodeCapabilities.Cut
|
||||
| NodeCapabilities.Delete
|
||||
| NodeCapabilities.PasteInto
|
||||
| (TagParent.IsNamedContainer ? NodeCapabilities.Rename : NodeCapabilities.None)
|
||||
| (TagParent.IsOrderedContainer ? NodeCapabilities.Reorder : NodeCapabilities.None)
|
||||
| NodeCapabilities.Search;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HasUnexpandedChildren
|
||||
{
|
||||
get { return !IsExpanded && TagCount > 0; }
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return NodeDisplayPrefix + TagCount + ((TagCount == 1) ? " entry" : " entries"); }
|
||||
}
|
||||
}
|
||||
|
||||
private static Dictionary<TagType, Type> _tagRegistry;
|
||||
|
||||
static TagDataNode ()
|
||||
{
|
||||
_tagRegistry = new Dictionary<TagType, Type>();
|
||||
_tagRegistry[TagType.TAG_BYTE] = typeof(TagByteDataNode);
|
||||
_tagRegistry[TagType.TAG_BYTE_ARRAY] = typeof(TagByteArrayDataNode);
|
||||
_tagRegistry[TagType.TAG_COMPOUND] = typeof(TagCompoundDataNode);
|
||||
_tagRegistry[TagType.TAG_DOUBLE] = typeof(TagDoubleDataNode);
|
||||
_tagRegistry[TagType.TAG_FLOAT] = typeof(TagFloatDataNode);
|
||||
_tagRegistry[TagType.TAG_INT] = typeof(TagIntDataNode);
|
||||
_tagRegistry[TagType.TAG_INT_ARRAY] = typeof(TagIntArrayDataNode);
|
||||
_tagRegistry[TagType.TAG_LIST] = typeof(TagListDataNode);
|
||||
_tagRegistry[TagType.TAG_LONG] = typeof(TagLongDataNode);
|
||||
_tagRegistry[TagType.TAG_SHORT] = typeof(TagShortDataNode);
|
||||
_tagRegistry[TagType.TAG_STRING] = typeof(TagStringDataNode);
|
||||
}
|
||||
|
||||
static public TagDataNode CreateFromTag (TagNode tag)
|
||||
{
|
||||
if (tag == null || !_tagRegistry.ContainsKey(tag.GetTagType()))
|
||||
return null;
|
||||
|
||||
return Activator.CreateInstance(_tagRegistry[tag.GetTagType()], tag) as TagDataNode;
|
||||
}
|
||||
|
||||
static public TagNode DefaultTag (TagType type)
|
||||
{
|
||||
switch (type) {
|
||||
case TagType.TAG_BYTE:
|
||||
return new TagNodeByte(0);
|
||||
case TagType.TAG_BYTE_ARRAY:
|
||||
return new TagNodeByteArray(new byte[0]);
|
||||
case TagType.TAG_COMPOUND:
|
||||
return new TagNodeCompound();
|
||||
case TagType.TAG_DOUBLE:
|
||||
return new TagNodeDouble(0);
|
||||
case TagType.TAG_FLOAT:
|
||||
return new TagNodeFloat(0);
|
||||
case TagType.TAG_INT:
|
||||
return new TagNodeInt(0);
|
||||
case TagType.TAG_INT_ARRAY:
|
||||
return new TagNodeIntArray(new int[0]);
|
||||
case TagType.TAG_LIST:
|
||||
return new TagNodeList(TagType.TAG_BYTE);
|
||||
case TagType.TAG_LONG:
|
||||
return new TagNodeLong(0);
|
||||
case TagType.TAG_SHORT:
|
||||
return new TagNodeShort(0);
|
||||
case TagType.TAG_STRING:
|
||||
return new TagNodeString("");
|
||||
default:
|
||||
return new TagNodeByte(0);
|
||||
}
|
||||
}
|
||||
|
||||
private TagNode _tag;
|
||||
|
||||
protected TagDataNode (TagNode tag)
|
||||
{
|
||||
_tag = tag;
|
||||
}
|
||||
|
||||
protected IMetaTagContainer TagParent
|
||||
{
|
||||
get { return base.Parent as IMetaTagContainer; }
|
||||
}
|
||||
|
||||
protected TagNode Tag
|
||||
{
|
||||
get { return _tag; }
|
||||
set
|
||||
{
|
||||
if (_tag.GetTagType() == value.GetTagType())
|
||||
_tag = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected override NodeCapabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return NodeCapabilities.Copy
|
||||
| NodeCapabilities.Cut
|
||||
| NodeCapabilities.Delete
|
||||
| NodeCapabilities.Edit
|
||||
| (TagParent.IsNamedContainer ? NodeCapabilities.Rename : NodeCapabilities.None)
|
||||
| (TagParent.IsOrderedContainer ? NodeCapabilities.Reorder : NodeCapabilities.None);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanMoveNodeUp
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TagParent.IsOrderedContainer)
|
||||
return TagParent.OrderedTagContainer.GetTagIndex(Tag) > 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanMoveNodeDown
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TagParent.IsOrderedContainer)
|
||||
return TagParent.OrderedTagContainer.GetTagIndex(Tag) < (TagParent.TagCount - 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override string NodeName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TagParent == null || !TagParent.IsNamedContainer)
|
||||
return null;
|
||||
|
||||
return TagParent.NamedTagContainer.GetTagName(Tag);
|
||||
}
|
||||
}
|
||||
|
||||
protected string NodeDisplayPrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
string name = NodeName;
|
||||
return String.IsNullOrEmpty(name) ? "" : name + ": ";
|
||||
}
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return NodeDisplayPrefix + Tag.ToString(); }
|
||||
}
|
||||
|
||||
public override bool DeleteNode ()
|
||||
{
|
||||
if (CanDeleteNode) {
|
||||
TagParent.DeleteTag(Tag);
|
||||
return Parent.Nodes.Remove(this);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool RenameNode ()
|
||||
{
|
||||
if (CanRenameNode && TagParent.IsNamedContainer) {
|
||||
EditName form = new EditName(TagParent.NamedTagContainer.GetTagName(Tag));
|
||||
form.InvalidNames.AddRange(TagParent.NamedTagContainer.TagNamesInUse);
|
||||
if (form.ShowDialog() == DialogResult.OK && form.IsModified) {
|
||||
if (TagParent.NamedTagContainer.RenameTag(Tag, form.TagName)) {
|
||||
IsModified = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CopyNode ()
|
||||
{
|
||||
if (CanCopyNode) {
|
||||
NbtClipboardData clip = new NbtClipboardData(NodeName, Tag);
|
||||
clip.CopyToClipboard();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CutNode ()
|
||||
{
|
||||
if (CanCutNode) {
|
||||
NbtClipboardData clip = new NbtClipboardData(NodeName, Tag);
|
||||
clip.CopyToClipboard();
|
||||
|
||||
TagParent.DeleteTag(Tag);
|
||||
Parent.Nodes.Remove(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool ChangeRelativePosition (int offset)
|
||||
{
|
||||
if (CanReoderNode) {
|
||||
int curIndex = TagParent.OrderedTagContainer.GetTagIndex(Tag);
|
||||
int newIndex = curIndex + offset;
|
||||
|
||||
if (newIndex < 0 || newIndex >= TagParent.OrderedTagContainer.TagCount)
|
||||
return false;
|
||||
|
||||
TagParent.OrderedTagContainer.DeleteTag(Tag);
|
||||
TagParent.OrderedTagContainer.InsertTag(Tag, newIndex);
|
||||
|
||||
DataNode parent = Parent;
|
||||
parent.Nodes.Remove(this);
|
||||
parent.Nodes.Insert(newIndex, this);
|
||||
parent.IsModified = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool EditScalarValue (TagNode tag)
|
||||
{
|
||||
EditValue form = new EditValue(tag);
|
||||
if (form.ShowDialog() == DialogResult.OK) {
|
||||
IsModified = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool EditStringValue (TagNode tag)
|
||||
{
|
||||
EditString form = new EditString(tag.ToTagString().Data);
|
||||
if (form.ShowDialog() == DialogResult.OK) {
|
||||
tag.ToTagString().Data = form.StringValue;
|
||||
|
||||
IsModified = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool EditByteHexValue (TagNode tag)
|
||||
{
|
||||
HexEditor form = new HexEditor(NodeName, tag.ToTagByteArray().Data, 1);
|
||||
if (form.ShowDialog() == DialogResult.OK && form.Modified) {
|
||||
Array.Copy(form.Data, tag.ToTagByteArray().Data, tag.ToTagByteArray().Length);
|
||||
|
||||
IsModified = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool EditIntHexValue (TagNode tag)
|
||||
{
|
||||
TagNodeIntArray iatag = tag.ToTagIntArray();
|
||||
byte[] data = new byte[iatag.Length * 4];
|
||||
for (int i = 0; i < iatag.Length; i++) {
|
||||
byte[] buf = BitConverter.GetBytes(iatag.Data[i]);
|
||||
Array.Copy(buf, 0, data, 4 * i, 4);
|
||||
}
|
||||
|
||||
HexEditor form = new HexEditor(NodeName, data, 4);
|
||||
if (form.ShowDialog() == DialogResult.OK && form.Modified) {
|
||||
for (int i = 0; i < iatag.Length; i++) {
|
||||
iatag.Data[i] = BitConverter.ToInt32(form.Data, i * 4);
|
||||
}
|
||||
|
||||
IsModified = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagDoubleDataNode : TagDataNode
|
||||
{
|
||||
public TagDoubleDataNode (TagNodeDouble tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditScalarValue(Tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagFloatDataNode : TagDataNode
|
||||
{
|
||||
public TagFloatDataNode (TagNodeFloat tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditScalarValue(Tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
using System;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagIntArrayDataNode : TagDataNode
|
||||
{
|
||||
public TagIntArrayDataNode (TagNodeIntArray tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
protected new TagNodeIntArray Tag
|
||||
{
|
||||
get { return base.Tag as TagNodeIntArray; }
|
||||
}
|
||||
|
||||
public override bool CanEditNode
|
||||
{
|
||||
get { return !IsMono(); }
|
||||
}
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditIntHexValue(Tag);
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return NodeDisplayPrefix + Tag.Data.Length + " integers"; }
|
||||
}
|
||||
|
||||
private bool IsMono ()
|
||||
{
|
||||
return Type.GetType("Mono.Runtime") != null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagIntDataNode : TagDataNode
|
||||
{
|
||||
public TagIntDataNode (TagNodeInt tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditScalarValue(Tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
using System;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagListDataNode : TagDataNode.Container
|
||||
{
|
||||
private ListTagContainer _container;
|
||||
|
||||
public TagListDataNode (TagNodeList tag)
|
||||
: base(tag)
|
||||
{
|
||||
_container = new ListTagContainer(tag);
|
||||
}
|
||||
|
||||
protected new TagNodeList Tag
|
||||
{
|
||||
get { return base.Tag as TagNodeList; }
|
||||
set { base.Tag = value; }
|
||||
}
|
||||
|
||||
protected override void ExpandCore ()
|
||||
{
|
||||
foreach (TagNode tag in Tag) {
|
||||
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
||||
if (node != null)
|
||||
Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanCreateTag (TagType type)
|
||||
{
|
||||
if (Tag.Count > 0)
|
||||
return Tag.ValueType == type;
|
||||
else
|
||||
return Enum.IsDefined(typeof(TagType), type) && type != TagType.TAG_END;
|
||||
}
|
||||
|
||||
public override bool CanPasteIntoNode
|
||||
{
|
||||
get
|
||||
{
|
||||
if (NbtClipboardData.ContainsData) {
|
||||
TagNode node = NbtClipboardData.CopyFromClipboard().Node;
|
||||
if (node != null && node.GetTagType() == Tag.ValueType)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CreateNode (TagType type)
|
||||
{
|
||||
if (!CanCreateTag(type))
|
||||
return false;
|
||||
|
||||
if (Tag.Count == 0) {
|
||||
Tag.ChangeValueType(type);
|
||||
}
|
||||
|
||||
AppendTag(TagDataNode.DefaultTag(type));
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool PasteNode ()
|
||||
{
|
||||
if (!CanPasteIntoNode)
|
||||
return false;
|
||||
|
||||
NbtClipboardData clipboard = NbtClipboardData.CopyFromClipboard();
|
||||
if (clipboard.Node == null)
|
||||
return false;
|
||||
|
||||
AppendTag(clipboard.Node);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool IsOrderedContainer
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override IOrderedTagContainer OrderedTagContainer
|
||||
{
|
||||
get { return _container; }
|
||||
}
|
||||
|
||||
public override int TagCount
|
||||
{
|
||||
get { return _container.TagCount; }
|
||||
}
|
||||
|
||||
public override bool DeleteTag (TagNode tag)
|
||||
{
|
||||
return _container.DeleteTag(tag);
|
||||
}
|
||||
|
||||
private void AppendTag (TagNode tag)
|
||||
{
|
||||
_container.InsertTag(tag, _container.TagCount);
|
||||
IsModified = true;
|
||||
|
||||
if (IsExpanded) {
|
||||
TagDataNode node = TagDataNode.CreateFromTag(tag);
|
||||
if (node != null)
|
||||
Nodes.Add(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagLongDataNode : TagDataNode
|
||||
{
|
||||
public TagLongDataNode (TagNodeLong tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditScalarValue(Tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagShortDataNode : TagDataNode
|
||||
{
|
||||
public TagShortDataNode (TagNodeShort tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditScalarValue(Tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
public class TagStringDataNode : TagDataNode
|
||||
{
|
||||
public TagStringDataNode (TagNodeString tag)
|
||||
: base(tag)
|
||||
{ }
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditStringValue(Tag);
|
||||
}
|
||||
|
||||
public override string NodeDisplay
|
||||
{
|
||||
get { return NodeDisplayPrefix + Tag.ToString().Replace('\n', (char)0x00B6); }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,266 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.0</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{01F9A296-C477-4CBF-A0D0-41E697048257}</ProjectGuid>
|
||||
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>NBTExplorer</RootNamespace>
|
||||
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
|
||||
<AssemblyName>NBTExplorer</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnablePackageSigning>False</EnablePackageSigning>
|
||||
<IncludeMonoRuntime>False</IncludeMonoRuntime>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<EnableCodeSigning>False</EnableCodeSigning>
|
||||
<CreatePackage>False</CreatePackage>
|
||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
||||
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnablePackageSigning>False</EnablePackageSigning>
|
||||
<IncludeMonoRuntime>True</IncludeMonoRuntime>
|
||||
<LinkMode>Full</LinkMode>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<EnableCodeSigning>False</EnableCodeSigning>
|
||||
<CreatePackage>False</CreatePackage>
|
||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
||||
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
|
||||
<IncludeMonoRuntime>True</IncludeMonoRuntime>
|
||||
<LinkMode>Full</LinkMode>
|
||||
<EnablePackageSigning>True</EnablePackageSigning>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<EnableCodeSigning>True</EnableCodeSigning>
|
||||
<CreatePackage>True</CreatePackage>
|
||||
<CodeSigningKey>3rd Party Mac Developer Application</CodeSigningKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="Substrate">
|
||||
<HintPath>..\..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
<None Include="app.config" />
|
||||
<None Include="forms\About.resources" />
|
||||
<None Include="forms\About.resx" />
|
||||
<None Include="forms\CancelSearchForm.resources" />
|
||||
<None Include="forms\CancelSearchForm.resx" />
|
||||
<None Include="forms\CreateNode.resources" />
|
||||
<None Include="forms\CreateNode.resx" />
|
||||
<None Include="forms\EditHex.resources" />
|
||||
<None Include="forms\EditHex.resx" />
|
||||
<None Include="forms\EditName.resources" />
|
||||
<None Include="forms\EditName.resx" />
|
||||
<None Include="forms\EditString.resources" />
|
||||
<None Include="forms\EditString.resx" />
|
||||
<None Include="forms\EditValue.resources" />
|
||||
<None Include="forms\EditValue.resx" />
|
||||
<None Include="forms\Find.resources" />
|
||||
<None Include="forms\Find.resx" />
|
||||
<None Include="Properties\Resources.resources" />
|
||||
<None Include="Properties\Resources.resx" />
|
||||
<None Include="Properties\Settings.settings" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\HexBox.bmp" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\HexBox.resources" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\HexBox.resx" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\Properties\Resources.resx" />
|
||||
<None Include="LICENSE.txt" />
|
||||
<None Include="MainForm.resources" />
|
||||
<None Include="MainForm.resx" />
|
||||
<None Include="dead_bush.ico" />
|
||||
<None Include="dead_bush.icns" />
|
||||
<None Include="Mac\Scratch.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Model\" />
|
||||
<Folder Include="forms\" />
|
||||
<Folder Include="Properties\" />
|
||||
<Folder Include="Resources\" />
|
||||
<Folder Include="Vendor\" />
|
||||
<Folder Include="Mac\" />
|
||||
<Folder Include="Resources\24\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\CompoundTagContainer.cs" />
|
||||
<Compile Include="Model\CubicRegionDataNode.cs" />
|
||||
<Compile Include="Model\CubicRegionFile.cs" />
|
||||
<Compile Include="Model\DataNode.cs" />
|
||||
<Compile Include="Model\DataNodeCollection.cs" />
|
||||
<Compile Include="Model\DirectoryDataNode.cs" />
|
||||
<Compile Include="Model\FileTypeRegistry.cs" />
|
||||
<Compile Include="Model\ListTagContainer.cs" />
|
||||
<Compile Include="Model\NbtFileDataNode.cs" />
|
||||
<Compile Include="Model\NodeCapabilities.cs" />
|
||||
<Compile Include="Model\RegionChunkDataNode.cs" />
|
||||
<Compile Include="Model\RegionFileDataNode.cs" />
|
||||
<Compile Include="Model\TagByteArrayDataNode.cs" />
|
||||
<Compile Include="Model\TagByteDataNode.cs" />
|
||||
<Compile Include="Model\TagCompoundDataNode.cs" />
|
||||
<Compile Include="Model\TagContainerInterface.cs" />
|
||||
<Compile Include="Model\TagDataNode.cs" />
|
||||
<Compile Include="Model\TagDoubleDataNode.cs" />
|
||||
<Compile Include="Model\TagFloatDataNode.cs" />
|
||||
<Compile Include="Model\TagIntArrayDataNode.cs" />
|
||||
<Compile Include="Model\TagIntDataNode.cs" />
|
||||
<Compile Include="Model\TagListDataNode.cs" />
|
||||
<Compile Include="Model\TagLongDataNode.cs" />
|
||||
<Compile Include="Model\TagShortDataNode.cs" />
|
||||
<Compile Include="Model\TagStringDataNode.cs" />
|
||||
<Compile Include="forms\About.Designer.cs" />
|
||||
<Compile Include="forms\About.cs" />
|
||||
<Compile Include="forms\CancelSearchForm.Designer.cs" />
|
||||
<Compile Include="forms\CancelSearchForm.cs" />
|
||||
<Compile Include="forms\CreateNode.Designer.cs" />
|
||||
<Compile Include="forms\CreateNode.cs" />
|
||||
<Compile Include="forms\EditHex.Designer.cs" />
|
||||
<Compile Include="forms\EditHex.cs" />
|
||||
<Compile Include="forms\EditName.Designer.cs" />
|
||||
<Compile Include="forms\EditName.cs" />
|
||||
<Compile Include="forms\EditString.Designer.cs" />
|
||||
<Compile Include="forms\EditString.cs" />
|
||||
<Compile Include="forms\EditValue.Designer.cs" />
|
||||
<Compile Include="forms\EditValue.cs" />
|
||||
<Compile Include="forms\Find.Designer.cs" />
|
||||
<Compile Include="forms\Find.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\BuiltInContextMenu.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\ByteCharConverters.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\ByteCollection.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\BytePositionInfo.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DataBlock.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DataMap.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DynamicByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DynamicFileByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\FileByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\FileDataBlock.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\HexBox.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\HexCasing.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\IByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\MemoryDataBlock.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\NativeMethods.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\Util.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\Properties\Resources.Designer.cs" />
|
||||
<Compile Include="DataNode.cs" />
|
||||
<Compile Include="IconRegistry.cs" />
|
||||
<Compile Include="MainForm.Designer.cs" />
|
||||
<Compile Include="MainForm.cs" />
|
||||
<Compile Include="NbtClipboardData.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="SearchWorker.cs" />
|
||||
<Compile Include="TagKey.cs" />
|
||||
<Compile Include="Mac\MainWindow.cs" />
|
||||
<Compile Include="Mac\MainWindowController.cs" />
|
||||
<Compile Include="Mac\MainWindow.designer.cs">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Mac\AppDelegate.cs" />
|
||||
<Compile Include="Mac\AppDelegate.designer.cs">
|
||||
<DependentUpon>AppDelegate.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Mac\TreeDataNode.cs" />
|
||||
<Compile Include="Mac\TreeDataSource.cs" />
|
||||
<Compile Include="Mac\ImageAndTextCell.cs" />
|
||||
<Compile Include="Mac\IconRegistry.cs" />
|
||||
<Compile Include="Mac\EditValue.cs" />
|
||||
<Compile Include="Mac\EditValue.designer.cs">
|
||||
<DependentUpon>EditValue.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Dead_Bush.png" />
|
||||
<BundleResource Include="Resources\arrow-090.png" />
|
||||
<BundleResource Include="Resources\arrow-270.png" />
|
||||
<BundleResource Include="Resources\binocular--arrow.png" />
|
||||
<BundleResource Include="Resources\binocular.png" />
|
||||
<BundleResource Include="Resources\clipboard-paste.png" />
|
||||
<BundleResource Include="Resources\cross.png" />
|
||||
<BundleResource Include="Resources\disk--pencil.png" />
|
||||
<BundleResource Include="Resources\disk.png" />
|
||||
<BundleResource Include="Resources\document-attribute-b.png" />
|
||||
<BundleResource Include="Resources\document-attribute-i.png" />
|
||||
<BundleResource Include="Resources\document-copy.png" />
|
||||
<BundleResource Include="Resources\door.png" />
|
||||
<BundleResource Include="Resources\edit-code-b.png" />
|
||||
<BundleResource Include="Resources\edit-code-i.png" />
|
||||
<BundleResource Include="Resources\edit-code.png" />
|
||||
<BundleResource Include="Resources\folder-open-document.png" />
|
||||
<BundleResource Include="Resources\folder-open.png" />
|
||||
<BundleResource Include="Resources\information-frame.png" />
|
||||
<BundleResource Include="Resources\pencil.png" />
|
||||
<BundleResource Include="Resources\question-frame.png" />
|
||||
<BundleResource Include="Resources\question-white.png" />
|
||||
<BundleResource Include="Resources\scissors.png" />
|
||||
<BundleResource Include="Resources\selection-input.png" />
|
||||
<BundleResource Include="Resources\24\cross.png" />
|
||||
<BundleResource Include="Resources\24\document-b.png" />
|
||||
<BundleResource Include="Resources\24\document-d.png" />
|
||||
<BundleResource Include="Resources\24\document-f.png" />
|
||||
<BundleResource Include="Resources\24\document-i.png" />
|
||||
<BundleResource Include="Resources\24\document-l.png" />
|
||||
<BundleResource Include="Resources\24\document-s.png" />
|
||||
<BundleResource Include="Resources\24\document.png" />
|
||||
<BundleResource Include="Resources\24\edit-code-i.png" />
|
||||
<BundleResource Include="Resources\24\edit-code.png" />
|
||||
<BundleResource Include="Resources\24\edit-list.png" />
|
||||
<BundleResource Include="Resources\24\edit-smallcaps.png" />
|
||||
<BundleResource Include="Resources\24\pencil.png" />
|
||||
<BundleResource Include="Resources\24\scissors.png" />
|
||||
<BundleResource Include="Resources\24\selection-input.png" />
|
||||
<BundleResource Include="Resources\24\box-24.png" />
|
||||
<BundleResource Include="Resources\folder-open-24.png" />
|
||||
<BundleResource Include="Resources\disk-24.png" />
|
||||
<BundleResource Include="Resources\block.png" />
|
||||
<BundleResource Include="Resources\box.png" />
|
||||
<BundleResource Include="Resources\document-attribute-d.png" />
|
||||
<BundleResource Include="Resources\document-attribute-f.png" />
|
||||
<BundleResource Include="Resources\document-attribute-l.png" />
|
||||
<BundleResource Include="Resources\document-attribute-s.png" />
|
||||
<BundleResource Include="Resources\edit-list.png" />
|
||||
<BundleResource Include="Resources\edit-small-caps.png" />
|
||||
<BundleResource Include="Resources\wooden-box.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="Mac\MainWindow.xib" />
|
||||
<InterfaceDefinition Include="Mac\MainMenu.xib" />
|
||||
<InterfaceDefinition Include="Mac\EditValue.xib" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,62 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
[Serializable]
|
||||
public class NbtClipboardData
|
||||
{
|
||||
public string Name;
|
||||
|
||||
private byte[] _data;
|
||||
|
||||
[NonSerialized]
|
||||
public TagNode Node;
|
||||
|
||||
public NbtClipboardData (String name, TagNode node)
|
||||
{
|
||||
Name = name;
|
||||
|
||||
TagNodeCompound root = new TagNodeCompound();
|
||||
root.Add("root", node);
|
||||
NbtTree tree = new NbtTree(root);
|
||||
|
||||
using (MemoryStream ms = new MemoryStream()) {
|
||||
tree.WriteTo(ms);
|
||||
_data = new byte[ms.Length];
|
||||
Array.Copy(ms.GetBuffer(), _data, ms.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ContainsData
|
||||
{
|
||||
get { return Clipboard.ContainsData(typeof(NbtClipboardData).FullName); }
|
||||
}
|
||||
|
||||
public void CopyToClipboard ()
|
||||
{
|
||||
Clipboard.SetData(typeof(NbtClipboardData).FullName, this);
|
||||
}
|
||||
|
||||
public static NbtClipboardData CopyFromClipboard ()
|
||||
{
|
||||
NbtClipboardData clip = Clipboard.GetData(typeof(NbtClipboardData).FullName) as NbtClipboardData;
|
||||
if (clip == null)
|
||||
return null;
|
||||
|
||||
NbtTree tree = new NbtTree();
|
||||
using (MemoryStream ms = new MemoryStream(clip._data)) {
|
||||
tree.ReadFrom(ms);
|
||||
}
|
||||
|
||||
TagNodeCompound root = tree.Root;
|
||||
if (root == null || !root.ContainsKey("root"))
|
||||
return null;
|
||||
|
||||
clip.Node = root["root"];
|
||||
return clip;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
//[STAThread]
|
||||
static void Main (string[] args)
|
||||
{
|
||||
NSApplication.Init ();
|
||||
NSApplication.Main (args);
|
||||
|
||||
//Application.EnableVisualStyles();
|
||||
//Application.SetCompatibleTextRenderingDefault(false);
|
||||
///Application.Run(new MainForm());
|
||||
}
|
||||
|
||||
/*public static void StaticInitFailure (Exception e)
|
||||
{
|
||||
Console.WriteLine("Static Initialization Failure:");
|
||||
|
||||
Exception original = e;
|
||||
while (e != null) {
|
||||
Console.WriteLine(e.Message);
|
||||
Console.WriteLine(e.StackTrace);
|
||||
e = e.InnerException;
|
||||
}
|
||||
|
||||
MessageBox.Show("Application failed during static initialization: " + original.Message);
|
||||
Application.Exit();
|
||||
}*/
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NBTExplorer")]
|
||||
[assembly: AssemblyDescription("Graphical editor for most NBT data sources. NBT is used by Minecraft.")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NBTExplorer")]
|
||||
[assembly: AssemblyCopyright("Copyright © Justin Aquadro 2011-2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("11f3587a-6155-499e-b7b5-ebd48fdca479")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.0.2.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.2.0")]
|
77
NBTExplorerMac/Properties/Resources.Designer.cs
generated
|
@ -1,77 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.269
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NBTExplorer.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NBTExplorer.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap ArrowDown {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ArrowDown", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap ArrowUp {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ArrowUp", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,127 +0,0 @@
|
|||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ArrowDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow-270.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ArrowUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow-090.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
48
NBTExplorerMac/Properties/Settings.Designer.cs
generated
|
@ -1,48 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.269
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NBTExplorer.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
public global::System.Collections.Specialized.StringCollection RecentFiles {
|
||||
get {
|
||||
return ((global::System.Collections.Specialized.StringCollection)(this["RecentFiles"]));
|
||||
}
|
||||
set {
|
||||
this["RecentFiles"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
public global::System.Collections.Specialized.StringCollection RecentDirectories {
|
||||
get {
|
||||
return ((global::System.Collections.Specialized.StringCollection)(this["RecentDirectories"]));
|
||||
}
|
||||
set {
|
||||
this["RecentDirectories"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="NBTExplorer.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="RecentFiles" Type="System.Collections.Specialized.StringCollection" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="RecentDirectories" Type="System.Collections.Specialized.StringCollection" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
Before Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 624 B |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 630 B |
Before Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 685 B |
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 566 B |
Before Width: | Height: | Size: 587 B |
Before Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 677 B |