More updates to Mac UI. Most basic functionality working. Need some refactoring on Windows side for clipboard and search.

This commit is contained in:
Justin Aquadro 2012-11-08 20:11:40 -05:00
parent e503fe2442
commit 16131ae7be
17 changed files with 2085 additions and 243 deletions

View file

@ -81,6 +81,16 @@ namespace NBTExplorer
get { return _menuDelete; }
}
public NSMenuItem MenuMoveUp
{
get { return _menuMoveUp; }
}
public NSMenuItem MenuMoveDown
{
get { return _menuMoveDown; }
}
public NSMenuItem MenuFind
{
get { return _menuFind; }
@ -160,6 +170,71 @@ namespace NBTExplorer
{
mainWindowController.Window.ActionDeleteValue();
}
partial void ActionMoveUp (NSObject sender)
{
mainWindowController.Window.ActionMoveNodeUp();
}
partial void ActionMoveDown (NSObject sender)
{
mainWindowController.Window.ActionMoveNodeDown();
}
partial void ActionInsertByte (NSObject sender)
{
mainWindowController.Window.ActionInsertByteTag();
}
partial void ActionInsertShort (NSObject sender)
{
mainWindowController.Window.ActionInsertShortTag();
}
partial void ActionInsertInt (NSObject sender)
{
mainWindowController.Window.ActionInsertIntTag();
}
partial void ActionInsertLong (NSObject sender)
{
mainWindowController.Window.ActionInsertLongTag();
}
partial void ActionInsertFloat (NSObject sender)
{
mainWindowController.Window.ActionInsertFloatTag();
}
partial void ActionInsertDouble (NSObject sender)
{
mainWindowController.Window.ActionInsertDoubleTag();
}
partial void ActionInsertByteArray (NSObject sender)
{
mainWindowController.Window.ActionInsertByteArrayTag();
}
partial void ActionInsertIntArray (NSObject sender)
{
mainWindowController.Window.ActionInsertIntArrayTag();
}
partial void ActionInsertString (NSObject sender)
{
mainWindowController.Window.ActionInsertStringTag();
}
partial void ActionInsertList (NSObject sender)
{
mainWindowController.Window.ActionInsertListTag();
}
partial void ActionInsertCompound (NSObject sender)
{
mainWindowController.Window.ActionInsertCompoundTag();
}
}
}

View file

@ -47,6 +47,12 @@ namespace NBTExplorer
[Outlet]
MonoMac.AppKit.NSMenuItem _menuDelete { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuMoveUp { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuMoveDown { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuFind { get; set; }
@ -86,6 +92,27 @@ namespace NBTExplorer
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertCompound { get; set; }
[Action ("ActionOpen:")]
partial void ActionOpen (MonoMac.Foundation.NSObject sender);
[Action ("ActionOpenFolder:")]
partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender);
[Action ("ActionOpenMinecraft:")]
partial void ActionOpenMinecraft (MonoMac.Foundation.NSObject sender);
[Action ("ActionSave:")]
partial void ActionSave (MonoMac.Foundation.NSObject sender);
[Action ("ActionCut:")]
partial void ActionCut (MonoMac.Foundation.NSObject sender);
[Action ("ActionCopy:")]
partial void ActionCopy (MonoMac.Foundation.NSObject sender);
[Action ("ActionPaste:")]
partial void ActionPaste (MonoMac.Foundation.NSObject sender);
[Action ("ActionRename:")]
partial void ActionRename (MonoMac.Foundation.NSObject sender);
@ -94,6 +121,51 @@ namespace NBTExplorer
[Action ("ActionDelete:")]
partial void ActionDelete (MonoMac.Foundation.NSObject sender);
[Action ("ActionMoveUp:")]
partial void ActionMoveUp (MonoMac.Foundation.NSObject sender);
[Action ("ActionMoveDown:")]
partial void ActionMoveDown (MonoMac.Foundation.NSObject sender);
[Action ("ActionFind:")]
partial void ActionFind (MonoMac.Foundation.NSObject sender);
[Action ("ActionFindNext:")]
partial void ActionFindNext (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertByte:")]
partial void ActionInsertByte (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertShort:")]
partial void ActionInsertShort (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertInt:")]
partial void ActionInsertInt (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertLong:")]
partial void ActionInsertLong (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertFloat:")]
partial void ActionInsertFloat (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertDouble:")]
partial void ActionInsertDouble (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertByteArray:")]
partial void ActionInsertByteArray (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertIntArray:")]
partial void ActionInsertIntArray (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertString:")]
partial void ActionInsertString (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertList:")]
partial void ActionInsertList (MonoMac.Foundation.NSObject sender);
[Action ("ActionInsertCompound:")]
partial void ActionInsertCompound (MonoMac.Foundation.NSObject sender);
void ReleaseDesignerOutlets ()
{
@ -157,6 +229,16 @@ namespace NBTExplorer
_menuDelete = null;
}
if (_menuMoveUp != null) {
_menuMoveUp.Dispose ();
_menuMoveUp = null;
}
if (_menuMoveDown != null) {
_menuMoveDown.Dispose ();
_menuMoveDown = null;
}
if (_menuFind != null) {
_menuFind.Dispose ();
_menuFind = null;

35
Mac/CreateNodeWindow.cs Normal file
View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
namespace NBTExplorer.Mac
{
public partial class CreateNodeWindow : MonoMac.AppKit.NSWindow
{
#region Constructors
// Called when created from unmanaged code
public CreateNodeWindow (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public CreateNodeWindow (NSCoder coder) : base (coder)
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
#endregion
}
}

64
Mac/CreateNodeWindow.designer.cs generated Normal file
View file

@ -0,0 +1,64 @@
// 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 ("CreateNodeWindowController")]
partial class CreateNodeWindowController
{
[Outlet]
MonoMac.AppKit.NSTextField _nameFieldLabel { get; set; }
[Outlet]
MonoMac.AppKit.NSTextField _sizeFieldLabel { get; set; }
[Outlet]
MonoMac.AppKit.NSTextField _nameField { get; set; }
[Outlet]
MonoMac.AppKit.NSTextField _sizeField { get; set; }
[Action ("ActionOK:")]
partial void ActionOK (MonoMac.Foundation.NSObject sender);
[Action ("ActionCancel:")]
partial void ActionCancel (MonoMac.Foundation.NSObject sender);
void ReleaseDesignerOutlets ()
{
if (_nameFieldLabel != null) {
_nameFieldLabel.Dispose ();
_nameFieldLabel = null;
}
if (_sizeFieldLabel != null) {
_sizeFieldLabel.Dispose ();
_sizeFieldLabel = null;
}
if (_nameField != null) {
_nameField.Dispose ();
_nameField = null;
}
if (_sizeField != null) {
_sizeField.Dispose ();
_sizeField = null;
}
}
}
[Register ("CreateNodeWindow")]
partial class CreateNodeWindow
{
void ReleaseDesignerOutlets ()
{
}
}
}

596
Mac/CreateNodeWindow.xib Normal file
View file

@ -0,0 +1,596 @@
<?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">CreateNodeWindowController</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">1</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 74}, {305, 123}}</string>
<int key="NSWTFlags">611844096</int>
<string key="NSWindowTitle">Create New Tag</string>
<string key="NSWindowClass">CreateNodeWindow</string>
<nil key="NSViewClass"/>
<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="NSTextField" id="360312533">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 83}, {103, 17}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:1535</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="505039246">
<int key="NSCellFlags">68157504</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Name:</string>
<object class="NSFont" key="NSSupport" id="199841518">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<string key="NSCellIdentifier">_NS:1535</string>
<reference key="NSControlView" ref="360312533"/>
<object class="NSColor" key="NSBackgroundColor" id="202010403">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="387490203">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor" id="939937308">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSTextField" id="209666661">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{90, 81}, {195, 22}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="653403669">
<int key="NSCellFlags">-1804599231</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="199841518"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="209666661"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor" id="359797737">
<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" id="231273341">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
<reference key="NSColor" ref="939937308"/>
</object>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSTextField" id="149422125">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{90, 49}, {195, 22}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="992958270">
<int key="NSCellFlags">-1804599231</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="199841518"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="149422125"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="359797737"/>
<reference key="NSTextColor" ref="231273341"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSTextField" id="223470912">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 51}, {80, 17}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:1535</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="549143486">
<int key="NSCellFlags">68157504</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Size:</string>
<reference key="NSSupport" ref="199841518"/>
<string key="NSCellIdentifier">_NS:1535</string>
<reference key="NSControlView" ref="223470912"/>
<reference key="NSBackgroundColor" ref="202010403"/>
<reference key="NSTextColor" ref="387490203"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="94497852">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{209, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="705503568">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">OK</string>
<reference key="NSSupport" ref="199841518"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="94497852"/>
<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="977489034">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{127, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="522179450">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Cancel</string>
<reference key="NSSupport" ref="199841518"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="977489034"/>
<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">{305, 123}</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">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">_nameField</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="209666661"/>
</object>
<int key="connectionID">19</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_sizeField</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="149422125"/>
</object>
<int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionOK:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="94497852"/>
</object>
<int key="connectionID">21</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionCancel:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="977489034"/>
</object>
<int key="connectionID">22</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_nameFieldLabel</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="360312533"/>
</object>
<int key="connectionID">23</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_sizeFieldLabel</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="223470912"/>
</object>
<int key="connectionID">24</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">2</int>
<reference key="object" ref="748157544"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="312036702"/>
</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="223470912"/>
<reference ref="360312533"/>
<reference ref="209666661"/>
<reference ref="149422125"/>
<reference ref="94497852"/>
<reference ref="977489034"/>
</object>
<reference key="parent" ref="748157544"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="360312533"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="505039246"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="505039246"/>
<reference key="parent" ref="360312533"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="209666661"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="653403669"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="653403669"/>
<reference key="parent" ref="209666661"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="223470912"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="549143486"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="549143486"/>
<reference key="parent" ref="223470912"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">13</int>
<reference key="object" ref="149422125"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="992958270"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">14</int>
<reference key="object" ref="992958270"/>
<reference key="parent" ref="149422125"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">15</int>
<reference key="object" ref="94497852"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="705503568"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">16</int>
<reference key="object" ref="705503568"/>
<reference key="parent" ref="94497852"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">17</int>
<reference key="object" ref="977489034"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="522179450"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">18</int>
<reference key="object" ref="522179450"/>
<reference key="parent" ref="977489034"/>
</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>10.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>13.IBPluginDependency</string>
<string>14.IBPluginDependency</string>
<string>15.IBPluginDependency</string>
<string>16.IBPluginDependency</string>
<string>17.IBPluginDependency</string>
<string>18.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>2.IBWindowTemplateEditedContentRect</string>
<string>2.NSWindowTemplate.visibleAtLaunch</string>
<string>3.IBPluginDependency</string>
<string>7.IBPluginDependency</string>
<string>8.IBPluginDependency</string>
<string>9.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>{{319, 371}, {606, 354}}</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>
</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">24</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">CreateNodeWindow</string>
<string key="superclassName">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/CreateNodeWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">CreateNodeWindowController</string>
<string key="superclassName">NSWindowController</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">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_nameField</string>
<string>_nameFieldLabel</string>
<string>_sizeField</string>
<string>_sizeFieldLabel</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSTextField</string>
<string>NSTextField</string>
<string>NSTextField</string>
<string>NSTextField</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>_nameField</string>
<string>_nameFieldLabel</string>
<string>_sizeField</string>
<string>_sizeFieldLabel</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">_nameField</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_nameFieldLabel</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_sizeField</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_sizeFieldLabel</string>
<string key="candidateClassName">NSTextField</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/CreateNodeWindowController.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>

View file

@ -0,0 +1,233 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
using Substrate.Nbt;
namespace NBTExplorer.Mac
{
public partial class CreateNodeWindowController : MonoMac.AppKit.NSWindowController
{
private string _name;
private int _size;
private TagType _type;
private TagNode _tag;
private bool _hasName;
private List<string> _invalidNames = new List<string>();
#region Constructors
// Called when created from unmanaged code
public CreateNodeWindowController (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public CreateNodeWindowController (NSCoder coder) : base (coder)
{
Initialize ();
}
// Call to load from the XIB/NIB file
public CreateNodeWindowController () : base ("CreateNodeWindow")
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
public override void AwakeFromNib ()
{
base.AwakeFromNib ();
SetNameBoxState();
SetSizeBoxState();
}
#endregion
//strongly typed window accessor
public new CreateNodeWindow Window
{
get {
return (CreateNodeWindow)base.Window;
}
}
private void SetNameBoxState ()
{
if (_nameField == null || _nameFieldLabel == null)
return;
if (HasName) {
_nameFieldLabel.Enabled = true;
_nameFieldLabel.TextColor = NSColor.ControlText;
_nameField.Enabled = true;
}
else {
_nameFieldLabel.Enabled = false;
_nameFieldLabel.TextColor = NSColor.DisabledControlText;
_nameField.Enabled = false;
}
}
private void SetSizeBoxState ()
{
if (_sizeField == null || _sizeFieldLabel == null)
return;
if (IsTagSizedType) {
_sizeFieldLabel.Enabled = true;
_sizeFieldLabel.TextColor = NSColor.ControlText;
_sizeField.Enabled = true;
}
else {
_sizeFieldLabel.Enabled = false;
_sizeFieldLabel.TextColor = NSColor.DisabledControlText;
_sizeField.Enabled = false;
}
}
public TagType TagType
{
get { return _type; }
set {
_type = value;
SetSizeBoxState();
}
}
public string TagName
{
get { return _name; }
}
public TagNode TagNode
{
get { return _tag; }
}
public List<string> InvalidNames
{
get { return _invalidNames; }
}
public bool HasName
{
get { return _hasName; }
set
{
_hasName = value;
SetNameBoxState();
}
}
private void Apply ()
{
if (ValidateInput()) {
_tag = CreateTag();
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.OK);
return;
}
}
private TagNode CreateTag ()
{
switch (_type) {
case TagType.TAG_BYTE:
return new TagNodeByte();
case TagType.TAG_BYTE_ARRAY:
return new TagNodeByteArray(new byte[_size]);
case TagType.TAG_COMPOUND:
return new TagNodeCompound();
case TagType.TAG_DOUBLE:
return new TagNodeDouble();
case TagType.TAG_FLOAT:
return new TagNodeFloat();
case TagType.TAG_INT:
return new TagNodeInt();
case TagType.TAG_INT_ARRAY:
return new TagNodeIntArray(new int[_size]);
case TagType.TAG_LIST:
return new TagNodeList(TagType.TAG_BYTE);
case TagType.TAG_LONG:
return new TagNodeLong();
case TagType.TAG_SHORT:
return new TagNodeShort();
case TagType.TAG_STRING:
return new TagNodeString();
default:
return new TagNodeByte();
}
}
private bool ValidateInput ()
{
return ValidateNameInput()
&& ValidateSizeInput();
}
private bool ValidateNameInput ()
{
if (!HasName)
return true;
string text = _nameField.StringValue.Trim();
if (_invalidNames.Contains(text)) {
NSAlert.WithMessage("Duplicate name.", "OK", null, null, "You cannot specify a name already in use by another tag within the same container.").RunModal();
return false;
}
_name = _nameField.StringValue.Trim();
return true;
}
private bool ValidateSizeInput ()
{
if (!IsTagSizedType)
return true;
if (!Int32.TryParse(_sizeField.StringValue.Trim(), out _size)) {
NSAlert.WithMessage("Invalid size.", "OK", null, null, "The size field must be a valid integer value.").RunModal();
return false;
}
_size = Math.Max(0, _size);
return true;
}
private bool IsTagSizedType
{
get
{
switch (_type) {
case TagType.TAG_BYTE_ARRAY:
case TagType.TAG_INT_ARRAY:
return true;
default:
return false;
}
}
}
partial void ActionOK (NSObject sender)
{
Apply ();
}
partial void ActionCancel (NSObject sender)
{
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
}
}
}

View file

@ -40,7 +40,7 @@
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="748157544">
<int key="NSWindowStyleMask">3</int>
<int key="NSWindowStyleMask">1</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 74}, {271, 91}}</string>
<int key="NSWTFlags">611844096</int>

View file

@ -41,7 +41,7 @@
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="748157544">
<int key="NSWindowStyleMask">3</int>
<int key="NSWindowStyleMask">1</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 74}, {380, 190}}</string>
<int key="NSWTFlags">611844096</int>

35
Mac/EditValueWindow.cs Normal file
View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
namespace NBTExplorer.Mac
{
public partial class EditValueWindow : MonoMac.AppKit.NSWindow
{
#region Constructors
// Called when created from unmanaged code
public EditValueWindow (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public EditValueWindow (NSCoder coder) : base (coder)
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
#endregion
}
}

View file

@ -8,8 +8,8 @@ using MonoMac.Foundation;
namespace NBTExplorer.Mac
{
[Register ("EditValue")]
partial class EditValue
[Register ("EditValueWindowController")]
partial class EditValueWindowController
{
[Outlet]
MonoMac.AppKit.NSTextField _valueField { get; set; }
@ -28,4 +28,13 @@ namespace NBTExplorer.Mac
}
}
}
[Register ("EditValueWindow")]
partial class EditValueWindow
{
void ReleaseDesignerOutlets ()
{
}
}
}

View file

@ -31,7 +31,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
<string key="NSClassName">EditValue</string>
<string key="NSClassName">EditValueWindowController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@ -39,39 +39,39 @@
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="661050917">
<int key="NSWindowStyleMask">3</int>
<object class="NSWindowTemplate" id="748157544">
<int key="NSWindowStyleMask">1</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 86}, {262, 91}}</string>
<string key="NSWindowRect">{{131, 74}, {231, 96}}</string>
<int key="NSWTFlags">611844096</int>
<string key="NSWindowTitle">Edit Value...</string>
<string key="NSWindowClass">EditValue</string>
<string key="NSWindowClass">EditValueWindow</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="1068206745">
<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="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"/>
<object class="NSTextField" id="733178028">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{20, 54}, {191, 22}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="321744782">
<object class="NSTextFieldCell" key="NSCell" id="431400224">
<int key="NSCellFlags">-1804599231</int>
<int key="NSCellFlags2">272630848</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport" id="1011941154">
<object class="NSFont" key="NSSupport" id="876329192">
<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"/>
<reference key="NSControlView" ref="733178028"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
@ -94,21 +94,21 @@
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="134334418">
<reference key="NSNextResponder" ref="1068206745"/>
<object class="NSButton" id="291374779">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{166, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="1068206745"/>
<string key="NSFrame">{{135, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="524484320">
<object class="NSButtonCell" key="NSCell" id="1028542745">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">OK</string>
<reference key="NSSupport" ref="1011941154"/>
<reference key="NSSupport" ref="876329192"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="134334418"/>
<reference key="NSControlView" ref="291374779"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
@ -118,21 +118,21 @@
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="862679276">
<reference key="NSNextResponder" ref="1068206745"/>
<object class="NSButton" id="624058021">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{84, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="1068206745"/>
<string key="NSFrame">{{53, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="980603739">
<object class="NSButtonCell" key="NSCell" id="12917674">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Cancel</string>
<reference key="NSSupport" ref="1011941154"/>
<reference key="NSSupport" ref="876329192"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="862679276"/>
<reference key="NSControlView" ref="624058021"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
@ -143,11 +143,11 @@
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
</object>
<string key="NSFrameSize">{262, 91}</string>
<string key="NSFrameSize">{231, 96}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1600, 1178}}</string>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
@ -155,29 +155,37 @@
<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">_valueField</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="922648809"/>
<reference key="destination" ref="733178028"/>
</object>
<int key="connectionID">9</int>
<int key="connectionID">13</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"/>
<reference key="destination" ref="291374779"/>
</object>
<int key="connectionID">10</int>
<int key="connectionID">14</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"/>
<reference key="destination" ref="624058021"/>
</object>
<int key="connectionID">11</int>
<int key="connectionID">15</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@ -210,66 +218,66 @@
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">1</int>
<reference key="object" ref="661050917"/>
<int key="objectID">2</int>
<reference key="object" ref="748157544"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1068206745"/>
<reference ref="312036702"/>
</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"/>
<reference key="object" ref="312036702"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="321744782"/>
<reference ref="733178028"/>
<reference ref="291374779"/>
<reference ref="624058021"/>
</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"/>
<reference key="parent" ref="748157544"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="862679276"/>
<reference key="object" ref="733178028"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="980603739"/>
<reference ref="431400224"/>
</object>
<reference key="parent" ref="1068206745"/>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="980603739"/>
<reference key="parent" ref="862679276"/>
<reference key="object" ref="431400224"/>
<reference key="parent" ref="733178028"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="291374779"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1028542745"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="1028542745"/>
<reference key="parent" ref="291374779"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="624058021"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="12917674"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="12917674"/>
<reference key="parent" ref="624058021"/>
</object>
</object>
</object>
@ -280,16 +288,16 @@
<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>10.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>2.IBWindowTemplateEditedContentRect</string>
<string>2.NSWindowTemplate.visibleAtLaunch</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>
<string>9.IBPluginDependency</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -297,15 +305,15 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{361, 348}, {602, 342}}</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>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">
@ -320,14 +328,22 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">11</int>
<int key="maxID">15</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="className">EditValueWindow</string>
<string key="superclassName">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EditValueWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">EditValueWindowController</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
@ -373,7 +389,7 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EditValue.h</string>
<string key="minorKey">./Classes/EditValueWindowController.h</string>
</object>
</object>
</object>

View file

@ -8,93 +8,69 @@ using Substrate.Nbt;
namespace NBTExplorer.Mac
{
public partial class EditValue : MonoMac.AppKit.NSWindow
public partial class EditValueWindowController : MonoMac.AppKit.NSWindowController
{
private TagNode _tag;
#region Constructors
// Called when created from unmanaged code
public EditValue (IntPtr handle) : base (handle)
public EditValueWindowController (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public EditValue (NSCoder coder) : base (coder)
public EditValueWindowController (NSCoder coder) : base (coder)
{
Initialize ();
}
public EditValue (TagNode tag)
// Call to load from the XIB/NIB file
public EditValueWindowController () : base ("EditValueWindow")
{
Initialize ();
_tag = tag;
if (tag == null) {
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
return;
}
}
// Shared initialization code
void Initialize ()
{
}
#endregion
//strongly typed window accessor
public new EditValueWindow Window
{
get {
return (EditValueWindow)base.Window;
}
}
public override void AwakeFromNib ()
{
base.AwakeFromNib ();
if (_tag != null)
_valueField.StringValue = _tag.ToString();
}
#endregion
public TagNode NodeTag
{
get { return _tag; }
}
partial void ActionOK (MonoMac.Foundation.NSObject sender)
{
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.OK);
}
partial void ActionCancel (MonoMac.Foundation.NSObject sender)
{
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
}
/*private TagNode _tag;
public EditValue (TagNode tag)
{
InitializeComponent();
_tag = tag;
if (tag == null) {
DialogResult = DialogResult.Abort;
Close();
return;
set {
_tag = value;
if (_valueField != null)
_valueField.StringValue = _tag.ToString();
}
textBox1.Text = _tag.ToString();
}
public TagNode NodeTag
{
get { return _tag; }
}
private void Apply ()
{
if (ValidateInput()) {
DialogResult = DialogResult.OK;
Close();
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.OK);
return;
}
}
@ -108,40 +84,40 @@ namespace NBTExplorer.Mac
try {
switch (_tag.GetTagType()) {
case TagType.TAG_BYTE:
_tag.ToTagByte().Data = unchecked((byte)sbyte.Parse(textBox1.Text));
_tag.ToTagByte().Data = unchecked((byte)sbyte.Parse(_valueField.StringValue));
break;
case TagType.TAG_SHORT:
_tag.ToTagShort().Data = short.Parse(textBox1.Text);
_tag.ToTagShort().Data = short.Parse(_valueField.StringValue);
break;
case TagType.TAG_INT:
_tag.ToTagInt().Data = int.Parse(textBox1.Text);
_tag.ToTagInt().Data = int.Parse(_valueField.StringValue);
break;
case TagType.TAG_LONG:
_tag.ToTagLong().Data = long.Parse(textBox1.Text);
_tag.ToTagLong().Data = long.Parse(_valueField.StringValue);
break;
case TagType.TAG_FLOAT:
_tag.ToTagFloat().Data = float.Parse(textBox1.Text);
_tag.ToTagFloat().Data = float.Parse(_valueField.StringValue);
break;
case TagType.TAG_DOUBLE:
_tag.ToTagDouble().Data = double.Parse(textBox1.Text);
_tag.ToTagDouble().Data = double.Parse(_valueField.StringValue);
break;
case TagType.TAG_STRING:
_tag.ToTagString().Data = textBox1.Text;
_tag.ToTagString().Data = _valueField.StringValue;
break;
}
}
catch (FormatException) {
MessageBox.Show("The value is formatted incorrectly for the given type.");
NSAlert.WithMessage("Invalid Format", "OK", null, null, "The value is formatted incorrectly for the given type.").RunModal();
return false;
}
catch (OverflowException) {
MessageBox.Show("The value is outside the acceptable range for the given type.");
NSAlert.WithMessage("Invalid Range", "OK", null, null, "The value is outside the acceptable range for the given type.").RunModal();
return false;
}
catch {
@ -150,11 +126,16 @@ namespace NBTExplorer.Mac
return true;
}
private void _buttonOK_Click (object sender, EventArgs e)
partial void ActionOK (MonoMac.Foundation.NSObject sender)
{
Apply();
}*/
Apply ();
}
partial void ActionCancel (MonoMac.Foundation.NSObject sender)
{
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
}
}
}

View file

@ -7,21 +7,21 @@ namespace NBTExplorer.Mac
{
public static void Register ()
{
//FormRegistry.EditByteArray = EditByteArrayHandler;
FormRegistry.EditByteArray = EditByteArrayHandler;
FormRegistry.EditString = EditStringHandler;
FormRegistry.EditTagScalar = EditTagScalarValueHandler;
FormRegistry.RenameTag = RenameTagHandler;
//FormRegistry.CreateNode = CreateNodeHandler;
FormRegistry.CreateNode = CreateNodeHandler;
FormRegistry.MessageBox = MessageBoxHandler;
}
private static ModalResult RunWindow (NSWindowController controller)
{
NSApplication.SharedApplication.BeginSheet (controller.Window, NSApplication.SharedApplication.MainWindow);
//NSApplication.SharedApplication.BeginSheet (controller.Window, NSApplication.SharedApplication.MainWindow);
int response = NSApplication.SharedApplication.RunModalForWindow (controller.Window);
NSApplication.SharedApplication.EndSheet(controller.Window);
//NSApplication.SharedApplication.EndSheet(controller.Window);
controller.Window.Close();
controller.Window.OrderOut(null);
@ -33,7 +33,7 @@ namespace NBTExplorer.Mac
public static void MessageBoxHandler (string message)
{
NSAlert.WithMessage(message, "OK", null, null, null).RunModal();
NSAlert.WithMessage(message, "OK", null, null, "").RunModal();
}
public static bool EditStringHandler (StringFormData data)
@ -65,45 +65,46 @@ namespace NBTExplorer.Mac
public static bool EditTagScalarValueHandler (TagScalarFormData data)
{
EditValue form = new EditValue(data.Tag);
EditValueWindowController form = new EditValueWindowController () {
NodeTag = data.Tag,
};
NSApplication.SharedApplication.BeginSheet(form, NSApplication.SharedApplication.MainWindow);
NSApplication.SharedApplication.RunModalForWindow(form);
NSApplication.SharedApplication.EndSheet(form);
form.Close ();
form.OrderOut(null);
//if (form.ShowDialog() == DialogResult.OK)
// return true;
//else
if (RunWindow (form) == ModalResult.OK)
return true;
else
return false;
}
/*public static bool EditByteArrayHandler (ByteArrayFormData data)
public static bool EditByteArrayHandler (ByteArrayFormData data)
{
HexEditor form = new HexEditor(data.NodeName, data.Data, data.BytesPerElement);
NSAlert.WithMessage("Not supported.", "OK", null, null, "Array editing is currently not supported in the Mac version of NBTExplorer.").RunModal();
return false;
/*HexEditor form = new HexEditor(data.NodeName, data.Data, data.BytesPerElement);
if (form.ShowDialog() == DialogResult.OK && form.Modified) {
Array.Copy(form.Data, data.Data, data.Data.Length);
return true;
}
else
return false;
return false;*/
}
public static bool CreateNodeHandler (CreateTagFormData data)
{
CreateNodeForm form = new CreateNodeForm(data.TagType, data.HasName);
form.InvalidNames.AddRange(data.RestrictedNames);
if (form.ShowDialog() == DialogResult.OK) {
CreateNodeWindowController form = new CreateNodeWindowController () {
TagType = data.TagType,
HasName = data.HasName,
};
form.InvalidNames.AddRange (data.RestrictedNames);
if (RunWindow (form) == ModalResult.OK) {
data.TagNode = form.TagNode;
data.TagName = form.TagName;
return true;
}
else
return false;
}*/
}
}
}

View file

@ -88,6 +88,7 @@
</object>
</object>
<string key="NSName">_NSAppleMenu</string>
<bool key="NSNoAutoenable">YES</bool>
</object>
</object>
<object class="NSMenuItem" id="379814623">
@ -191,6 +192,7 @@
</object>
</object>
</object>
<bool key="NSNoAutoenable">YES</bool>
</object>
</object>
<object class="NSMenuItem" id="952259628">
@ -280,6 +282,34 @@
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="990986030">
<reference key="NSMenu" ref="789758025"/>
<string key="NSTitle">Move Up</string>
<string key="NSKeyEquiv"></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="678120417">
<reference key="NSMenu" ref="789758025"/>
<string key="NSTitle">Move Down</string>
<string key="NSKeyEquiv"></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="355622212">
<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>
@ -299,6 +329,7 @@
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
<bool key="NSNoAutoenable">YES</bool>
</object>
</object>
<object class="NSMenuItem" id="586577488">
@ -333,6 +364,7 @@
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
<bool key="NSNoAutoenable">YES</bool>
</object>
</object>
<object class="NSMenuItem" id="48785913">
@ -510,6 +542,7 @@
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
<bool key="NSNoAutoenable">YES</bool>
</object>
</object>
</object>
@ -549,38 +582,6 @@
</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>
@ -597,14 +598,6 @@
</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>
@ -821,13 +814,205 @@
</object>
<int key="connectionID">594</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuMoveUp</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="990986030"/>
</object>
<int key="connectionID">599</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuMoveDown</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="678120417"/>
</object>
<int key="connectionID">600</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionMoveUp:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="990986030"/>
</object>
<int key="connectionID">601</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionMoveDown:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="678120417"/>
</object>
<int key="connectionID">602</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionFind:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="713722761"/>
</object>
<int key="connectionID">603</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionFindNext:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="406540956"/>
</object>
<int key="connectionID">604</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionPaste:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="29853731"/>
</object>
<int key="connectionID">605</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionCopy:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="860595796"/>
</object>
<int key="connectionID">606</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionCut:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="296257095"/>
</object>
<int key="connectionID">607</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionOpen:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="722745758"/>
</object>
<int key="connectionID">608</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionOpenFolder:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="827642748"/>
</object>
<int key="connectionID">609</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionOpenMinecraft:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="692639359"/>
</object>
<int key="connectionID">610</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionSave:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="1023925487"/>
</object>
<int key="connectionID">611</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertByte:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="50922073"/>
</object>
<int key="connectionID">612</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertShort:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="911496477"/>
</object>
<int key="connectionID">613</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertInt:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="332264467"/>
</object>
<int key="connectionID">614</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertLong:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="128440236"/>
</object>
<int key="connectionID">615</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertFloat:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="961458250"/>
</object>
<int key="connectionID">616</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertDouble:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="223962722"/>
</object>
<int key="connectionID">617</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertByteArray:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="112366097"/>
</object>
<int key="connectionID">618</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertIntArray:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="93765767"/>
</object>
<int key="connectionID">619</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertString:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="152916859"/>
</object>
<int key="connectionID">620</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertList:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="425841552"/>
</object>
<int key="connectionID">621</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionInsertCompound:</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="352409518"/>
</object>
<int key="connectionID">623</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertCompound</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="352409518"/>
</object>
<int key="connectionID">595</int>
<int key="connectionID">624</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@ -962,6 +1147,9 @@
<reference ref="695807658"/>
<reference ref="713722761"/>
<reference ref="406540956"/>
<reference ref="355622212"/>
<reference ref="990986030"/>
<reference ref="678120417"/>
</object>
<reference key="parent" ref="952259628"/>
</object>
@ -1213,6 +1401,21 @@
<reference key="object" ref="152916859"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">596</int>
<reference key="object" ref="355622212"/>
<reference key="parent" ref="789758025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">597</int>
<reference key="object" ref="990986030"/>
<reference key="parent" ref="789758025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">598</int>
<reference key="object" ref="678120417"/>
<reference key="parent" ref="789758025"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -1269,6 +1472,9 @@
<string>572.IBPluginDependency</string>
<string>573.IBPluginDependency</string>
<string>58.IBPluginDependency</string>
<string>596.IBPluginDependency</string>
<string>597.IBPluginDependency</string>
<string>598.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>75.IBPluginDependency</string>
<string>79.IBPluginDependency</string>
@ -1332,6 +1538,9 @@
<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">
@ -1346,7 +1555,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">595</int>
<int key="maxID">624</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -1358,27 +1567,101 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>ActionCopy:</string>
<string>ActionCut:</string>
<string>ActionDelete:</string>
<string>ActionEditValue:</string>
<string>ActionFind:</string>
<string>ActionFindNext:</string>
<string>ActionInsertByte:</string>
<string>ActionInsertByteArray:</string>
<string>ActionInsertCompound:</string>
<string>ActionInsertDouble:</string>
<string>ActionInsertFloat:</string>
<string>ActionInsertInt:</string>
<string>ActionInsertIntArray:</string>
<string>ActionInsertList:</string>
<string>ActionInsertLong:</string>
<string>ActionInsertShort:</string>
<string>ActionInsertString:</string>
<string>ActionMoveDown:</string>
<string>ActionMoveUp:</string>
<string>ActionOpen:</string>
<string>ActionOpenFolder:</string>
<string>ActionOpenMinecraft:</string>
<string>ActionPaste:</string>
<string>ActionRename:</string>
<string>ActionSave:</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<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>ActionCopy:</string>
<string>ActionCut:</string>
<string>ActionDelete:</string>
<string>ActionEditValue:</string>
<string>ActionFind:</string>
<string>ActionFindNext:</string>
<string>ActionInsertByte:</string>
<string>ActionInsertByteArray:</string>
<string>ActionInsertCompound:</string>
<string>ActionInsertDouble:</string>
<string>ActionInsertFloat:</string>
<string>ActionInsertInt:</string>
<string>ActionInsertIntArray:</string>
<string>ActionInsertList:</string>
<string>ActionInsertLong:</string>
<string>ActionInsertShort:</string>
<string>ActionInsertString:</string>
<string>ActionMoveDown:</string>
<string>ActionMoveUp:</string>
<string>ActionOpen:</string>
<string>ActionOpenFolder:</string>
<string>ActionOpenMinecraft:</string>
<string>ActionPaste:</string>
<string>ActionRename:</string>
<string>ActionSave:</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">ActionCopy:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionCut:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionDelete:</string>
<string key="candidateClassName">id</string>
@ -1387,10 +1670,90 @@
<string key="name">ActionEditValue:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionFind:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionFindNext:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertByte:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertByteArray:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertCompound:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertDouble:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertFloat:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertInt:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertIntArray:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertList:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertLong:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertShort:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionInsertString:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionMoveDown:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionMoveUp:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionOpen:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionOpenFolder:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionOpenMinecraft:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionPaste:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">ActionRename:</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">
@ -1415,6 +1778,8 @@
<string>_menuInsertLong</string>
<string>_menuInsertShort</string>
<string>_menuInsertString</string>
<string>_menuMoveDown</string>
<string>_menuMoveUp</string>
<string>_menuOpen</string>
<string>_menuOpenFolder</string>
<string>_menuOpenMinecraft</string>
@ -1450,6 +1815,8 @@
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
@ -1474,6 +1841,8 @@
<string>_menuInsertLong</string>
<string>_menuInsertShort</string>
<string>_menuInsertString</string>
<string>_menuMoveDown</string>
<string>_menuMoveUp</string>
<string>_menuOpen</string>
<string>_menuOpenFolder</string>
<string>_menuOpenMinecraft</string>
@ -1556,6 +1925,14 @@
<string key="name">_menuInsertString</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuMoveDown</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuMoveUp</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuOpen</string>
<string key="candidateClassName">NSMenuItem</string>

View file

@ -65,7 +65,11 @@ namespace NBTExplorer
public AppDelegate AppDelegate
{
get { return _appDelegate; }
set { _appDelegate = value; }
set
{
_appDelegate = value;
UpdateUI ();
}
}
#endregion
@ -76,6 +80,8 @@ namespace NBTExplorer
{
base.AwakeFromNib ();
NSApplication.SharedApplication.MainMenu.AutoEnablesItems = false;
_dataSource = new TreeDataSource();
_mainOutlineView.DataSource = _dataSource;
_mainOutlineView.Delegate = new MyDelegate(this);
@ -100,6 +106,13 @@ namespace NBTExplorer
_main = main;
}
public override void SelectionDidChange (NSNotification notification)
{
TreeDataNode node = _main.SelectedNode;
if (node != null)
_main.UpdateUI(node.Data);
}
public override void ItemWillExpand (NSNotification notification)
{
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
@ -300,25 +313,131 @@ namespace NBTExplorer
node.Nodes.Clear();*/
}
private void RefreshChildNodes (TreeDataNode node, DataNode dataNode)
{
Dictionary<DataNode, TreeDataNode> currentNodes = new Dictionary<DataNode, TreeDataNode>();
foreach (TreeDataNode child in node.Nodes) {
currentNodes.Add(child.Data, child);
}
node.Nodes.Clear();
foreach (DataNode child in dataNode.Nodes) {
if (!currentNodes.ContainsKey(child))
node.Nodes.Add(new TreeDataNode(child));
else
node.Nodes.Add(currentNodes[child]);
}
//foreach (TreeDataNode child in node.Nodes)
// child.ContextMenuStrip = BuildNodeContextMenu(child.Tag as DataNode);
if (node.Nodes.Count == 0 && dataNode.HasUnexpandedChildren) {
ExpandNode(node);
_mainOutlineView.ExpandItem(node);
//node.Expand();
}
_mainOutlineView.ReloadItem(node, true);
}
private void CreateNode (TreeDataNode node, TagType type)
{
if (node == null)
return;
if (!node.Data.CanCreateTag(type))
return;
if (node.Data.CreateNode(type)) {
//node.Text = dataNode.NodeDisplay;
RefreshChildNodes(node, node.Data);
UpdateUI(node.Data);
}
}
private TreeDataNode SelectedNode
{
get { return _mainOutlineView.ItemAtRow (_mainOutlineView.SelectedRow) as TreeDataNode; }
}
public void ActionEditValue ()
{
TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
if (node != null)
EditNode(node);
EditNode(SelectedNode);
}
public void ActionRenameValue ()
{
TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
if (node != null)
RenameNode(node);
RenameNode(SelectedNode);
}
public void ActionDeleteValue ()
{
TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
if (node != null)
DeleteNode(node);
DeleteNode(SelectedNode);
}
public void ActionMoveNodeUp ()
{
MoveNodeUp(SelectedNode);
}
public void ActionMoveNodeDown ()
{
MoveNodeDown (SelectedNode);
}
public void ActionInsertByteTag ()
{
CreateNode (SelectedNode, TagType.TAG_BYTE);
}
public void ActionInsertShortTag ()
{
CreateNode (SelectedNode, TagType.TAG_SHORT);
}
public void ActionInsertIntTag ()
{
CreateNode (SelectedNode, TagType.TAG_INT);
}
public void ActionInsertLongTag ()
{
CreateNode (SelectedNode, TagType.TAG_LONG);
}
public void ActionInsertFloatTag ()
{
CreateNode (SelectedNode, TagType.TAG_FLOAT);
}
public void ActionInsertDoubleTag ()
{
CreateNode (SelectedNode, TagType.TAG_DOUBLE);
}
public void ActionInsertByteArrayTag ()
{
CreateNode (SelectedNode, TagType.TAG_BYTE_ARRAY);
}
public void ActionInsertIntArrayTag ()
{
CreateNode (SelectedNode, TagType.TAG_INT_ARRAY);
}
public void ActionInsertStringTag ()
{
CreateNode (SelectedNode, TagType.TAG_STRING);
}
public void ActionInsertListTag ()
{
CreateNode (SelectedNode, TagType.TAG_LIST);
}
public void ActionInsertCompoundTag ()
{
CreateNode (SelectedNode, TagType.TAG_COMPOUND);
}
private void EditNode (TreeDataNode node)
@ -367,6 +486,104 @@ namespace NBTExplorer
}
}
private void MoveNodeUp (TreeDataNode node)
{
if (node == null)
return;
if (!node.Data.CanMoveNodeUp)
return;
node.Data.ChangeRelativePosition(-1);
RefreshChildNodes(node.Parent, node.Data.Parent);
}
private void MoveNodeDown (TreeDataNode node)
{
if (node == null)
return;
if (!node.Data.CanMoveNodeDown)
return;
node.Data.ChangeRelativePosition(1);
RefreshChildNodes(node.Parent, node.Data.Parent);
}
/*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 (TreeDataNode node in _dataSource.Nodes) {
if (node.Data != null)
node.Data.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 bool CheckModifications ()
{
foreach (TreeDataNode node in _dataSource.Nodes) {
if (node.Data != null && node.Data.IsModified)
return true;
}
return false;
}
private void UpdateUI ()
{
if (_appDelegate == null)
@ -377,9 +594,13 @@ namespace NBTExplorer
UpdateUI(selected.Data);
}
else {
//_appDelegate.MenuSave.Enabled = CheckModifications();
UpdateUI(new DataNode());
_appDelegate.MenuSave.Enabled = CheckModifications();
_appDelegate.MenuFind.Enabled = false;
//_appDelegate.MenuFindNext.Enabled = _searchState != null;
_toolbarSave.Enabled = _appDelegate.MenuSave.Enabled;
}
}
@ -400,16 +621,68 @@ namespace NBTExplorer
_appDelegate.MenuInsertList.Enabled = node.CanCreateTag(TagType.TAG_LIST);
_appDelegate.MenuInsertCompound.Enabled = node.CanCreateTag(TagType.TAG_COMPOUND);
//_appDelegate.MenuSave.Enabled = CheckModifications();
_appDelegate.MenuSave.Enabled = CheckModifications();
_appDelegate.MenuCopy.Enabled = node.CanCopyNode;
_appDelegate.MenuCut.Enabled = node.CanCutNode;
_appDelegate.MenuPaste.Enabled = node.CanPasteIntoNode;
_appDelegate.MenuDelete.Enabled = node.CanDeleteNode;
_appDelegate.MenuEditValue.Enabled = node.CanEditNode;
_appDelegate.MenuRename.Enabled = node.CanRenameNode;
_appDelegate.MenuMoveUp.Enabled = node.CanMoveNodeUp;
_appDelegate.MenuMoveDown.Enabled = node.CanMoveNodeDown;
_appDelegate.MenuFind.Enabled = node.CanSearchNode;
//_appDelegate.MenuFindNext.Enabled = _searchState != null;
_toolbarSave.Enabled = _appDelegate.MenuSave.Enabled;
}
/*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);
}*/
}
}

View file

@ -14,6 +14,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>IBCustomCell</string>
<string>NSCustomObject</string>
<string>NSMenu</string>
<string>NSMenuItem</string>
<string>NSOutlineView</string>
<string>NSScrollView</string>
<string>NSScroller</string>
@ -320,7 +322,7 @@
<object class="NSScroller" id="720194609">
<reference key="NSNextResponder" ref="595155248"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
<string key="NSFrame">{{762, 1}, {15, 543}}</string>
<reference key="NSSuperview" ref="595155248"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="927451524"/>
@ -328,12 +330,12 @@
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<reference key="NSTarget" ref="595155248"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.99821109123434704</double>
<double key="NSPercent">0.9731182795698925</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>
<string key="NSFrame">{{1, 544}, {761, 15}}</string>
<reference key="NSSuperview" ref="595155248"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:60</string>
@ -341,7 +343,7 @@
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="595155248"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.99871299871299868</double>
<double key="NSPercent">0.98067010309278346</double>
</object>
</object>
<string key="NSFrame">{{-1, -1}, {778, 560}}</string>
@ -368,6 +370,28 @@
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSMenu" id="765672105">
<string key="NSTitle"/>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="285078721">
<reference key="NSMenu" ref="765672105"/>
<string key="NSTitle">Move Up</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="295458021"/>
<reference key="NSMixedImage" ref="707498796"/>
</object>
<object class="NSMenuItem" id="931793253">
<reference key="NSMenu" ref="765672105"/>
<string key="NSTitle">Move Down</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="295458021"/>
<reference key="NSMixedImage" ref="707498796"/>
</object>
</object>
</object>
<object class="NSUserDefaultsController" id="28353509">
<bool key="NSSharedInstance">YES</bool>
</object>
@ -439,6 +463,14 @@
</object>
<int key="connectionID">42</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">menu</string>
<reference key="source" ref="925144048"/>
<reference key="destination" ref="765672105"/>
</object>
<int key="connectionID">77</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -567,6 +599,26 @@
<reference key="object" ref="925144048"/>
<reference key="parent" ref="728960727"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">72</int>
<reference key="object" ref="765672105"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="285078721"/>
<reference ref="931793253"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">73</int>
<reference key="object" ref="285078721"/>
<reference key="parent" ref="765672105"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">74</int>
<reference key="object" ref="931793253"/>
<reference key="parent" ref="765672105"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -595,6 +647,9 @@
<string>44.IBPluginDependency</string>
<string>71.CustomClassName</string>
<string>71.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>73.IBPluginDependency</string>
<string>74.IBPluginDependency</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -620,6 +675,9 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>ImageAndTextCell</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">
@ -634,7 +692,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">71</int>
<int key="maxID">77</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">

View file

@ -158,10 +158,6 @@
<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>
<Compile Include="Model\TagKey.cs" />
<Compile Include="ProgramMac.cs" />
<Compile Include="FormRegistry.cs" />
@ -177,6 +173,16 @@
<Compile Include="Mac\EditNameWindow.designer.cs">
<DependentUpon>EditNameWindow.cs</DependentUpon>
</Compile>
<Compile Include="Mac\CreateNodeWindow.cs" />
<Compile Include="Mac\CreateNodeWindowController.cs" />
<Compile Include="Mac\CreateNodeWindow.designer.cs">
<DependentUpon>CreateNodeWindow.cs</DependentUpon>
</Compile>
<Compile Include="Mac\EditValueWindow.cs" />
<Compile Include="Mac\EditValueWindowController.cs" />
<Compile Include="Mac\EditValueWindow.designer.cs">
<DependentUpon>EditValueWindow.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Dead_Bush.png" />
@ -233,8 +239,9 @@
<ItemGroup>
<InterfaceDefinition Include="Mac\MainWindow.xib" />
<InterfaceDefinition Include="Mac\MainMenu.xib" />
<InterfaceDefinition Include="Mac\EditValue.xib" />
<InterfaceDefinition Include="Mac\EditStringWindow.xib" />
<InterfaceDefinition Include="Mac\EditNameWindow.xib" />
<InterfaceDefinition Include="Mac\CreateNodeWindow.xib" />
<InterfaceDefinition Include="Mac\EditValueWindow.xib" />
</ItemGroup>
</Project>