Progress on port continues. Several working dialogs.

This commit is contained in:
Justin Aquadro 2012-11-07 01:28:58 -05:00
parent 527dacc8ec
commit e503fe2442
37 changed files with 2983 additions and 78 deletions

View file

@ -18,12 +18,148 @@ namespace NBTExplorer
{
mainWindowController = new MainWindowController ();
mainWindowController.Window.MakeKeyAndOrderFront (this);
mainWindowController.Window.AppDelegate = this;
}
public NSMenuItem MenuAbout
{
get { return _menuAbout; }
}
public NSMenuItem MenuQuit
{
get { return _menuQuit; }
}
public NSMenuItem MenuOpen
{
get { return _menuOpen; }
}
public NSMenuItem MenuOpenFolder
{
get { return _menuOpenFolder; }
}
public NSMenuItem MenuOpenMinecraft
{
get { return _menuOpenMinecraft; }
}
public NSMenuItem MenuSave
{
get { return _menuSave; }
}
public NSMenuItem MenuCut
{
get { return _menuCut; }
}
public NSMenuItem MenuCopy
{
get { return _menuCopy; }
}
public NSMenuItem MenuPaste
{
get { return _menuPaste; }
}
public NSMenuItem MenuRename
{
get { return _menuRename; }
}
public NSMenuItem MenuEditValue
{
get { return _menuEditValue; }
}
public NSMenuItem MenuDelete
{
get { return _menuDelete; }
}
public NSMenuItem MenuFind
{
get { return _menuFind; }
}
public NSMenuItem MenuFindNext
{
get { return _menuFindNext; }
}
public NSMenuItem MenuInsertByte
{
get { return _menuInsertByte; }
}
public NSMenuItem MenuInsertShort
{
get { return _menuInsertShort; }
}
public NSMenuItem MenuInsertInt
{
get { return _menuInsertInt; }
}
public NSMenuItem MenuInsertLong
{
get { return _menuInsertLong; }
}
public NSMenuItem MenuInsertFloat
{
get { return _menuInsertFloat; }
}
public NSMenuItem MenuInsertDouble
{
get { return _menuInsertDouble; }
}
public NSMenuItem MenuInsertByteArray
{
get { return _menuInsertByteArray; }
}
public NSMenuItem MenuInsertIntArray
{
get { return _menuInsertIntArray; }
}
public NSMenuItem MenuInsertString
{
get { return _menuInsertString; }
}
public NSMenuItem MenuInsertList
{
get { return _menuInsertList; }
}
public NSMenuItem MenuInsertCompound
{
get { return _menuInsertCompound; }
}
partial void ActionRename (NSObject sender)
{
mainWindowController.Window.ActionRenameValue();
}
partial void ActionEditValue (NSObject sender)
{
mainWindowController.Window.ActionEditValue();
}
partial void ActionDelete (NSObject sender)
{
mainWindowController.Window.ActionDeleteValue();
}
}
}

View file

@ -11,6 +11,81 @@ namespace NBTExplorer
[Register ("AppDelegate")]
partial class AppDelegate
{
[Outlet]
MonoMac.AppKit.NSMenuItem _menuAbout { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuQuit { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuOpen { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuOpenFolder { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuOpenMinecraft { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuSave { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuCut { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuCopy { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuPaste { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuRename { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuEditValue { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuDelete { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuFind { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuFindNext { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertByte { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertShort { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertInt { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertLong { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertFloat { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertDouble { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertByteArray { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertIntArray { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertString { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertList { get; set; }
[Outlet]
MonoMac.AppKit.NSMenuItem _menuInsertCompound { get; set; }
[Action ("ActionRename:")]
partial void ActionRename (MonoMac.Foundation.NSObject sender);
@ -22,6 +97,130 @@ namespace NBTExplorer
void ReleaseDesignerOutlets ()
{
if (_menuAbout != null) {
_menuAbout.Dispose ();
_menuAbout = null;
}
if (_menuQuit != null) {
_menuQuit.Dispose ();
_menuQuit = null;
}
if (_menuOpen != null) {
_menuOpen.Dispose ();
_menuOpen = null;
}
if (_menuOpenFolder != null) {
_menuOpenFolder.Dispose ();
_menuOpenFolder = null;
}
if (_menuOpenMinecraft != null) {
_menuOpenMinecraft.Dispose ();
_menuOpenMinecraft = null;
}
if (_menuSave != null) {
_menuSave.Dispose ();
_menuSave = null;
}
if (_menuCut != null) {
_menuCut.Dispose ();
_menuCut = null;
}
if (_menuCopy != null) {
_menuCopy.Dispose ();
_menuCopy = null;
}
if (_menuPaste != null) {
_menuPaste.Dispose ();
_menuPaste = null;
}
if (_menuRename != null) {
_menuRename.Dispose ();
_menuRename = null;
}
if (_menuEditValue != null) {
_menuEditValue.Dispose ();
_menuEditValue = null;
}
if (_menuDelete != null) {
_menuDelete.Dispose ();
_menuDelete = null;
}
if (_menuFind != null) {
_menuFind.Dispose ();
_menuFind = null;
}
if (_menuFindNext != null) {
_menuFindNext.Dispose ();
_menuFindNext = null;
}
if (_menuInsertByte != null) {
_menuInsertByte.Dispose ();
_menuInsertByte = null;
}
if (_menuInsertShort != null) {
_menuInsertShort.Dispose ();
_menuInsertShort = null;
}
if (_menuInsertInt != null) {
_menuInsertInt.Dispose ();
_menuInsertInt = null;
}
if (_menuInsertLong != null) {
_menuInsertLong.Dispose ();
_menuInsertLong = null;
}
if (_menuInsertFloat != null) {
_menuInsertFloat.Dispose ();
_menuInsertFloat = null;
}
if (_menuInsertDouble != null) {
_menuInsertDouble.Dispose ();
_menuInsertDouble = null;
}
if (_menuInsertByteArray != null) {
_menuInsertByteArray.Dispose ();
_menuInsertByteArray = null;
}
if (_menuInsertIntArray != null) {
_menuInsertIntArray.Dispose ();
_menuInsertIntArray = null;
}
if (_menuInsertString != null) {
_menuInsertString.Dispose ();
_menuInsertString = null;
}
if (_menuInsertList != null) {
_menuInsertList.Dispose ();
_menuInsertList = null;
}
if (_menuInsertCompound != null) {
_menuInsertCompound.Dispose ();
_menuInsertCompound = null;
}
}
}
}

35
Mac/EditNameWindow.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 EditNameWindow : MonoMac.AppKit.NSWindow
{
#region Constructors
// Called when created from unmanaged code
public EditNameWindow (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public EditNameWindow (NSCoder coder) : base (coder)
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
#endregion
}
}

40
Mac/EditNameWindow.designer.cs generated Normal file
View file

@ -0,0 +1,40 @@
// 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 ("EditNameWindowController")]
partial class EditNameWindowController
{
[Outlet]
MonoMac.AppKit.NSTextField _textField { get; set; }
[Action ("OkayAction:")]
partial void OkayAction (MonoMac.Foundation.NSObject sender);
[Action ("CancelAction:")]
partial void CancelAction (MonoMac.Foundation.NSObject sender);
void ReleaseDesignerOutlets ()
{
if (_textField != null) {
_textField.Dispose ();
_textField = null;
}
}
}
[Register ("EditNameWindow")]
partial class EditNameWindow
{
void ReleaseDesignerOutlets ()
{
}
}
}

406
Mac/EditNameWindow.xib Normal file
View file

@ -0,0 +1,406 @@
<?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">EditNameWindowController</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">3</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 74}, {271, 91}}</string>
<int key="NSWTFlags">611844096</int>
<string key="NSWindowTitle">Edit Name...</string>
<string key="NSWindowClass">EditNameWindow</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="582786782">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{20, 49}, {231, 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="100808871">
<int key="NSCellFlags">-1804599231</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport" id="915727066">
<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="582786782"/>
<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="864639067">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{175, 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="113528151">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">OK</string>
<reference key="NSSupport" ref="915727066"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="864639067"/>
<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="298536757">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{93, 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="902014562">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Cancel</string>
<reference key="NSSupport" ref="915727066"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="298536757"/>
<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">{271, 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">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">_textField</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="582786782"/>
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">OkayAction:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="864639067"/>
</object>
<int key="connectionID">14</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">CancelAction:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="298536757"/>
</object>
<int key="connectionID">15</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="582786782"/>
<reference ref="864639067"/>
<reference ref="298536757"/>
</object>
<reference key="parent" ref="748157544"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="582786782"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="100808871"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="100808871"/>
<reference key="parent" ref="582786782"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="864639067"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="113528151"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="113528151"/>
<reference key="parent" ref="864639067"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="298536757"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="902014562"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="902014562"/>
<reference key="parent" ref="298536757"/>
</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>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>{{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">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">EditNameWindow</string>
<string key="superclassName">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EditNameWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">EditNameWindowController</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>CancelAction:</string>
<string>OkayAction:</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>CancelAction:</string>
<string>OkayAction:</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">CancelAction:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">OkayAction:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">_textField</string>
<string key="NS.object.0">NSTextField</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">_textField</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">_textField</string>
<string key="candidateClassName">NSTextField</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EditNameWindowController.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,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
namespace NBTExplorer.Mac
{
public partial class EditNameWindowController : NSWindowController
{
private string _originalName;
private string _name;
private List<string> _invalidNames = new List<string>();
#region Constructors
// Called when created from unmanaged code
public EditNameWindowController (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public EditNameWindowController (NSCoder coder) : base (coder)
{
Initialize ();
}
// Call to load from the XIB/NIB file
public EditNameWindowController () : base ("EditNameWindow")
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
public override void AwakeFromNib ()
{
base.AwakeFromNib ();
_textField.StringValue = _name;
}
#endregion
public string OriginalName
{
get { return _originalName; }
set {
_originalName = value;
TagName = value;
}
}
public string TagName
{
get { return _name; }
set {
_name = value;
if (_textField != null)
_textField.StringValue = _name;
}
}
public List<string> InvalidNames
{
get { return _invalidNames; }
}
public bool IsModified
{
get { return _name != _originalName; }
}
private void Apply ()
{
if (ValidateInput()) {
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.OK);
return;
}
}
private bool ValidateInput ()
{
return ValidateNameInput();
}
private bool ValidateNameInput ()
{
string text = _textField.StringValue.Trim();
if (text != _originalName && _invalidNames.Contains(text)) {
NSAlert.WithMessage("Duplicate name provided.", "OK", null, null, "Duplicate name provided.").RunModal();
return false;
}
_name = _textField.StringValue.Trim();
return true;
}
partial void OkayAction (MonoMac.Foundation.NSObject sender)
{
Apply ();
}
partial void CancelAction (MonoMac.Foundation.NSObject sender)
{
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
}
//strongly typed window accessor
public new EditNameWindow Window
{
get {
return (EditNameWindow)base.Window;
}
}
}
}

35
Mac/EditStringWindow.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 EditStringWindow : MonoMac.AppKit.NSWindow
{
#region Constructors
// Called when created from unmanaged code
public EditStringWindow (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public EditStringWindow (NSCoder coder) : base (coder)
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
#endregion
}
}

40
Mac/EditStringWindow.designer.cs generated Normal file
View file

@ -0,0 +1,40 @@
// 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 ("EditStringWindowController")]
partial class EditStringWindowController
{
[Outlet]
MonoMac.AppKit.NSTextView _textView { get; set; }
[Action ("ActionOK:")]
partial void ActionOK (MonoMac.Foundation.NSObject sender);
[Action ("ActionCancel:")]
partial void ActionCancel (MonoMac.Foundation.NSObject sender);
void ReleaseDesignerOutlets ()
{
if (_textView != null) {
_textView.Dispose ();
_textView = null;
}
}
}
[Register ("EditStringWindow")]
partial class EditStringWindow
{
void ReleaseDesignerOutlets ()
{
}
}
}

721
Mac/EditStringWindow.xib Normal file
View file

@ -0,0 +1,721 @@
<?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>NSScrollView</string>
<string>NSScroller</string>
<string>NSTextView</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">EditStringWindowController</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">3</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 74}, {380, 190}}</string>
<int key="NSWTFlags">611844096</int>
<string key="NSWindowTitle">Edit String...</string>
<string key="NSWindowClass">EditStringWindow</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="NSScrollView" id="303140662">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSClipView" id="867757387">
<reference key="NSNextResponder" ref="303140662"/>
<int key="NSvFlags">2304</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextView" id="975408850">
<reference key="NSNextResponder" ref="867757387"/>
<int key="NSvFlags">2322</int>
<object class="NSMutableSet" key="NSDragTypes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="set.sortedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>Apple HTML pasteboard type</string>
<string>Apple PDF pasteboard type</string>
<string>Apple PICT pasteboard type</string>
<string>Apple PNG pasteboard type</string>
<string>Apple URL pasteboard type</string>
<string>CorePasteboardFlavorType 0x6D6F6F76</string>
<string>NSColor pasteboard type</string>
<string>NSFilenamesPboardType</string>
<string>NSStringPboardType</string>
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
<string>NeXT RTFD pasteboard type</string>
<string>NeXT Rich Text Format v1.0 pasteboard type</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
<string>NeXT font pasteboard type</string>
<string>NeXT ruler pasteboard type</string>
<string>WebURLsWithTitlesPboardType</string>
<string>public.url</string>
</object>
</object>
<string key="NSFrameSize">{338, 107}</string>
<reference key="NSSuperview" ref="867757387"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="905052057"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<object class="NSTextContainer" key="NSTextContainer" id="1008035773">
<object class="NSLayoutManager" key="NSLayoutManager">
<object class="NSTextStorage" key="NSTextStorage">
<object class="NSMutableString" key="NSString">
<characters key="NS.bytes"/>
</object>
<nil key="NSDelegate"/>
</object>
<object class="NSMutableArray" key="NSTextContainers">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1008035773"/>
</object>
<int key="NSLMFlags">166</int>
<nil key="NSDelegate"/>
</object>
<reference key="NSTextView" ref="975408850"/>
<double key="NSWidth">338</double>
<int key="NSTCFlags">1</int>
</object>
<object class="NSTextViewSharedData" key="NSSharedData">
<int key="NSFlags">67121123</int>
<int key="NSTextCheckingTypes">0</int>
<nil key="NSMarkedAttributes"/>
<object class="NSColor" key="NSBackgroundColor" id="813074888">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<object class="NSDictionary" key="NSSelectedAttributes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSBackgroundColor</string>
<string>NSColor</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">selectedTextBackgroundColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">selectedTextColor</string>
<object class="NSColor" key="NSColor" id="887728831">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<reference key="NSInsertionColor" ref="887728831"/>
<object class="NSDictionary" key="NSLinkAttributes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSColor</string>
<string>NSCursor</string>
<string>NSUnderline</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDEAA</bytes>
</object>
<object class="NSCursor">
<string key="NSHotSpot">{8, -8}</string>
<int key="NSCursorType">13</int>
</object>
<integer value="1"/>
</object>
</object>
<nil key="NSDefaultParagraphStyle"/>
<nil key="NSTextFinder"/>
<int key="NSPreferredTextFinderStyle">1</int>
</object>
<int key="NSTVFlags">6</int>
<string key="NSMaxSize">{463, 10000000}</string>
<nil key="NSDelegate"/>
</object>
</object>
<string key="NSFrame">{{1, 1}, {338, 107}}</string>
<reference key="NSSuperview" ref="303140662"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="975408850"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
<reference key="NSDocView" ref="975408850"/>
<reference key="NSBGColor" ref="813074888"/>
<object class="NSCursor" key="NSCursor">
<string key="NSHotSpot">{4, 5}</string>
<object class="NSImage" key="NSImage">
<int key="NSImageFlags">12582912</int>
<object class="NSMutableArray" key="NSReps">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="0"/>
<object class="NSBitmapImageRep">
<object class="NSData" key="NSTIFFRepresentation">
<bytes key="NS.bytes">TU0AKgAAEAj///8A////qwAAAP8AAAD/AwMD/BYWFtIFBQVuAAAABv///wD///8E6+vrTGhoaLYtLS3p
BAQE/QAAAP8AAAD/////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///+rAAAA/wAAAP8AAAD/AAAA/wAAAP8EBATSX19fK9HR0ZciIiLv
AAAA/wAAAP8AAAD/AAAA/wAAAP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////CsPDw0CRkZG1FxcX9AAAAP8bGxvr
ICAg8AAAAP8ICAjlFRUVVQAAAA////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wrm5uab
FxcX9AAAAP8AAAD/AQEB3wAAAA////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///zaXl5fGAAAA/wAAAP8AAABR////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////CO7u7q8AAAD/AAAA/wAAAAz///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////qwAAAP8AAAD/////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///+rAAAA/wAAAP////8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///6sAAAD/AAAA/////wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////qwAAAP8AAAD/
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///+r
AAAA/wAAAP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///6sAAAD/AAAA/////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////qwAAAP8AAAD/////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///+rAAAA/wAAAP////8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///6sAAAD/AAAA/////wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////qwAAAP8AAAD/////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////qwAAAP8AAAD/AAAA/wAAAP8AAAD/
AAAA/////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///+rAAAA/wAAAP8AAAD/
AAAA/wAAAP8AAAD/////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////qwAAAP8AAAD/////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///+rAAAA/wAAAP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///6sAAAD/AAAA/////wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////qwAAAP8AAAD/////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///+rAAAA/wAAAP////8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///6sAAAD/AAAA/////wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////qwAAAP8AAAD/
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///+r
AAAA/wAAAP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////CO7u7q8AAAD/AAAA/wAAAAz///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///80mpqaxQAAAP8AAAD/AAAATv///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////CuXl5ZYeHh7xAAAA/wAAAP8CAgLXAAAAD////wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////EKurq0mOjo63FxcX9AAAAP8bGxvrICAg8AAAAP8ICAjlHh4eXAAAABj///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////qwAAAP8AAAD/AAAA/wAAAP8AAAD/BAQE1V9fXyvS0tKZICAg8AAAAP8AAAD/
AAAA/wAAAP8AAAD/////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///+rAAAA/wAAAP8AAAD/FBQU1AUFBXEAAAAG////AP///wTr6+tO
ZWVluC4uLuoAAAD/AAAA/wAAAP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8AABABAAADAAAAAQAgAAABAQADAAAAAQAgAAABAgADAAAABAAA
EM4BAwADAAAAAQABAAABBgADAAAAAQACAAABEQAEAAAAAQAAAAgBEgADAAAAAQABAAABFQADAAAAAQAE
AAABFgADAAAAAQAgAAABFwAEAAAAAQAAEAABGgAFAAAAAQAAENYBGwAFAAAAAQAAEN4BHAADAAAAAQAB
AAABKAADAAAAAQACAAABUgADAAAAAQACAAABUwADAAAABAAAEOYAAAAAAAgACAAIAAgSAAAAACAAABIA
AAAAIAAAAAEAAQABAAE</bytes>
</object>
</object>
</object>
<object class="NSArray">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="0"/>
<object class="NSBitmapImageRep">
<object class="NSData" key="NSTIFFRepresentation">
<bytes key="NS.bytes">TU0AKgAABAj///9VQ0ND/wAAAP////8A////AP///6pDQ0P/AAAA/////wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///+qAAAA/////6oAAAD/////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///6oAAAD/////AP///wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///+qAAAA/////wD///8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////qgAAAP////8A////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///6oAAAD/////AP///wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///+qAAAA/////wD///8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////qgAAAP////8A
////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////qgAAAP8AAAD/
AAAA/////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///+q
AAAA/////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////qgAAAP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///6oAAAD/////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///+qAAAA/////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////qgAAAP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///8A////qgAAAP////+qAAAA/////wD///8A////AP///wD///8A////AP///wD///8A
////AP///wD///9VQ0ND/wAAAP////8A////AP///6pDQ0P/AAAA/////wD///8A////AP///wD///8A
////AP///wD///8AAA4BAAADAAAAAQAQAAABAQADAAAAAQAQAAABAgADAAAABAAABLYBAwADAAAAAQAB
AAABBgADAAAAAQACAAABEQAEAAAAAQAAAAgBEgADAAAAAQABAAABFQADAAAAAQAEAAABFgADAAAAAQAQ
AAABFwAEAAAAAQAABAABHAADAAAAAQABAAABUgADAAAAAQACAAABUwADAAAABAAABL6HcwAHAAAHqAAA
BMYAAAAAAAgACAAIAAgAAQABAAEAAQAAB6hhcHBsAiAAAG1udHJSR0IgWFlaIAfZAAIAGQALABoAC2Fj
c3BBUFBMAAAAAGFwcGwAAAAAAAAAAAAAAAAAAAAAAAD21gABAAAAANMtYXBwbAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC2Rlc2MAAAEIAAAAb2RzY20AAAF4AAAFbGNw
cnQAAAbkAAAAOHd0cHQAAAccAAAAFHJYWVoAAAcwAAAAFGdYWVoAAAdEAAAAFGJYWVoAAAdYAAAAFHJU
UkMAAAdsAAAADmNoYWQAAAd8AAAALGJUUkMAAAdsAAAADmdUUkMAAAdsAAAADmRlc2MAAAAAAAAAFEdl
bmVyaWMgUkdCIFByb2ZpbGUAAAAAAAAAAAAAABRHZW5lcmljIFJHQiBQcm9maWxlAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAB4AAAAMc2tTSwAA
ACgAAAF4aHJIUgAAACgAAAGgY2FFUwAAACQAAAHIcHRCUgAAACYAAAHsdWtVQQAAACoAAAISZnJGVQAA
ACgAAAI8emhUVwAAABYAAAJkaXRJVAAAACgAAAJ6bmJOTwAAACYAAAKia29LUgAAABYAAALIY3NDWgAA
ACIAAALeaGVJTAAAAB4AAAMAZGVERQAAACwAAAMeaHVIVQAAACgAAANKc3ZTRQAAACYAAAKiemhDTgAA
ABYAAANyamFKUAAAABoAAAOIcm9STwAAACQAAAOiZWxHUgAAACIAAAPGcHRQTwAAACYAAAPobmxOTAAA
ACgAAAQOZXNFUwAAACYAAAPodGhUSAAAACQAAAQ2dHJUUgAAACIAAARaZmlGSQAAACgAAAR8cGxQTAAA
ACwAAASkcnVSVQAAACIAAATQYXJFRwAAACYAAATyZW5VUwAAACYAAAUYZGFESwAAAC4AAAU+AFYBYQBl
AG8AYgBlAGMAbgD9ACAAUgBHAEIAIABwAHIAbwBmAGkAbABHAGUAbgBlAHIAaQENAGsAaQAgAFIARwBC
ACAAcAByAG8AZgBpAGwAUABlAHIAZgBpAGwAIABSAEcAQgAgAGcAZQBuAOgAcgBpAGMAUABlAHIAZgBp
AGwAIABSAEcAQgAgAEcAZQBuAOkAcgBpAGMAbwQXBDAEMwQwBDsETAQ9BDgEOQAgBD8EQAQ+BEQEMAQ5
BDsAIABSAEcAQgBQAHIAbwBmAGkAbAAgAGcA6QBuAOkAcgBpAHEAdQBlACAAUgBWAEKQGnUoACAAUgBH
AEIAIIJyX2ljz4/wAFAAcgBvAGYAaQBsAG8AIABSAEcAQgAgAGcAZQBuAGUAcgBpAGMAbwBHAGUAbgBl
AHIAaQBzAGsAIABSAEcAQgAtAHAAcgBvAGYAaQBsx3y8GAAgAFIARwBCACDVBLhc0wzHfABPAGIAZQBj
AG4A/QAgAFIARwBCACAAcAByAG8AZgBpAGwF5AXoBdUF5AXZBdwAIABSAEcAQgAgBdsF3AXcBdkAQQBs
AGwAZwBlAG0AZQBpAG4AZQBzACAAUgBHAEIALQBQAHIAbwBmAGkAbADBAGwAdABhAGwA4QBuAG8AcwAg
AFIARwBCACAAcAByAG8AZgBpAGxmbpAaACAAUgBHAEIAIGPPj/Blh072TgCCLAAgAFIARwBCACAw1zDt
MNUwoTCkMOsAUAByAG8AZgBpAGwAIABSAEcAQgAgAGcAZQBuAGUAcgBpAGMDkwO1A70DuQO6A8wAIAPA
A8EDvwPGA68DuwAgAFIARwBCAFAAZQByAGYAaQBsACAAUgBHAEIAIABnAGUAbgDpAHIAaQBjAG8AQQBs
AGcAZQBtAGUAZQBuACAAUgBHAEIALQBwAHIAbwBmAGkAZQBsDkIOGw4jDkQOHw4lDkwAIABSAEcAQgAg
DhcOMQ5IDicORA4bAEcAZQBuAGUAbAAgAFIARwBCACAAUAByAG8AZgBpAGwAaQBZAGwAZQBpAG4AZQBu
ACAAUgBHAEIALQBwAHIAbwBmAGkAaQBsAGkAVQBuAGkAdwBlAHIAcwBhAGwAbgB5ACAAcAByAG8AZgBp
AGwAIABSAEcAQgQeBDEESQQ4BDkAIAQ/BEAEPgREBDgEOwRMACAAUgBHAEIGRQZEBkEAIAYqBjkGMQZK
BkEAIABSAEcAQgAgBicGRAY5BicGRQBHAGUAbgBlAHIAaQBjACAAUgBHAEIAIABQAHIAbwBmAGkAbABl
AEcAZQBuAGUAcgBlAGwAIABSAEcAQgAtAGIAZQBzAGsAcgBpAHYAZQBsAHMAZXRleHQAAAAAQ29weXJp
Z2h0IDIwMDcgQXBwbGUgSW5jLiwgYWxsIHJpZ2h0cyByZXNlcnZlZC4AWFlaIAAAAAAAAPNSAAEAAAAB
Fs9YWVogAAAAAAAAdE0AAD3uAAAD0FhZWiAAAAAAAABadQAArHMAABc0WFlaIAAAAAAAACgaAAAVnwAA
uDZjdXJ2AAAAAAAAAAEBzQAAc2YzMgAAAAAAAQxCAAAF3v//8yYAAAeSAAD9kf//+6L///2jAAAD3AAA
wGw</bytes>
</object>
</object>
</object>
</object>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
</object>
</object>
<int key="NScvFlags">4</int>
</object>
<object class="NSScroller" id="617568171">
<reference key="NSNextResponder" ref="303140662"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{324, 1}, {15, 81}}</string>
<reference key="NSSuperview" ref="303140662"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:83</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<reference key="NSTarget" ref="303140662"/>
<string key="NSAction">_doScroller:</string>
<double key="NSCurValue">1</double>
<double key="NSPercent">0.85256409645080566</double>
</object>
<object class="NSScroller" id="905052057">
<reference key="NSNextResponder" ref="303140662"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {87, 18}}</string>
<reference key="NSSuperview" ref="303140662"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="867757387"/>
<string key="NSReuseIdentifierKey">_NS:33</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="303140662"/>
<string key="NSAction">_doScroller:</string>
<double key="NSCurValue">1</double>
<double key="NSPercent">0.94565218687057495</double>
</object>
</object>
<string key="NSFrame">{{20, 61}, {340, 109}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="867757387"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133650</int>
<reference key="NSVScroller" ref="617568171"/>
<reference key="NSHScroller" ref="905052057"/>
<reference key="NSContentView" ref="867757387"/>
<double key="NSMinMagnification">0.25</double>
<double key="NSMaxMagnification">4</double>
<double key="NSMagnification">1</double>
</object>
<object class="NSButton" id="975374104">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{284, 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="937221779">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">OK</string>
<object class="NSFont" key="NSSupport" id="982322557">
<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="975374104"/>
<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="904990022">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{202, 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="437276444">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Cancel</string>
<reference key="NSSupport" ref="982322557"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="904990022"/>
<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">{380, 190}</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">_textView</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="975408850"/>
</object>
<int key="connectionID">15</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionOK:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="975374104"/>
</object>
<int key="connectionID">16</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">ActionCancel:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="904990022"/>
</object>
<int key="connectionID">18</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="303140662"/>
<reference ref="975374104"/>
<reference ref="904990022"/>
</object>
<reference key="parent" ref="748157544"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="303140662"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="975408850"/>
<reference ref="905052057"/>
<reference ref="617568171"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="975408850"/>
<reference key="parent" ref="303140662"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="905052057"/>
<reference key="parent" ref="303140662"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="617568171"/>
<reference key="parent" ref="303140662"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="975374104"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="937221779"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="937221779"/>
<reference key="parent" ref="975374104"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">13</int>
<reference key="object" ref="904990022"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="437276444"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">14</int>
<reference key="object" ref="437276444"/>
<reference key="parent" ref="904990022"/>
</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>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>{{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">18</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">EditStringWindow</string>
<string key="superclassName">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EditStringWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">EditStringWindowController</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">
<string key="NS.key.0">_textView</string>
<string key="NS.object.0">NSTextView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">_textView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">_textView</string>
<string key="candidateClassName">NSTextView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EditStringWindowController.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,96 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
namespace NBTExplorer.Mac
{
public partial class EditStringWindowController : NSWindowController
{
private string _string;
#region Constructors
// Called when created from unmanaged code
public EditStringWindowController (IntPtr handle) : base (handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public EditStringWindowController (NSCoder coder) : base (coder)
{
Initialize ();
}
// Call to load from the XIB/NIB file
public EditStringWindowController () : base ("EditStringWindow")
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
public override void AwakeFromNib ()
{
base.AwakeFromNib ();
_textView.Value = _string;
}
#endregion
//strongly typed window accessor
public new EditStringWindow Window
{
get {
return (EditStringWindow)base.Window;
}
}
public string StringValue
{
get { return _string; }
set {
_string = value;
if (_textView != null)
_textView.Value = _string;
}
}
private void Apply ()
{
if (ValidateInput()) {
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.OK);
return;
}
}
private bool ValidateInput ()
{
return ValidateStringInput();
}
private bool ValidateStringInput ()
{
_string = _textView.Value.Trim();
return true;
}
partial void ActionOK (NSObject sender)
{
Apply ();
}
partial void ActionCancel (NSObject sender)
{
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
}
}
}

View file

@ -10,14 +10,7 @@ namespace NBTExplorer.Mac
{
public partial class EditValue : MonoMac.AppKit.NSWindow
{
public enum DialogResult
{
OK,
Cancel,
}
private TagNode _tag;
private DialogResult _result;
#region Constructors
@ -41,18 +34,22 @@ namespace NBTExplorer.Mac
_tag = tag;
if (tag == null) {
_result = DialogResult.Cancel;
Close();
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
return;
}
_valueField.StringValue = _tag.ToString();
}
// Shared initialization code
void Initialize ()
{
}
public override void AwakeFromNib ()
{
base.AwakeFromNib ();
if (_tag != null)
_valueField.StringValue = _tag.ToString();
}
#endregion
@ -61,9 +58,14 @@ namespace NBTExplorer.Mac
get { return _tag; }
}
public DialogResult Result
partial void ActionOK (MonoMac.Foundation.NSObject sender)
{
get { return _result; }
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.OK);
}
partial void ActionCancel (MonoMac.Foundation.NSObject sender)
{
NSApplication.SharedApplication.StopModalWithCode((int)ModalResult.Cancel);
}
/*private TagNode _tag;

109
Mac/FormHandlers.cs Normal file
View file

@ -0,0 +1,109 @@
using System;
using MonoMac.AppKit;
namespace NBTExplorer.Mac
{
public static class FormHandlers
{
public static void Register ()
{
//FormRegistry.EditByteArray = EditByteArrayHandler;
FormRegistry.EditString = EditStringHandler;
FormRegistry.EditTagScalar = EditTagScalarValueHandler;
FormRegistry.RenameTag = RenameTagHandler;
//FormRegistry.CreateNode = CreateNodeHandler;
FormRegistry.MessageBox = MessageBoxHandler;
}
private static ModalResult RunWindow (NSWindowController controller)
{
NSApplication.SharedApplication.BeginSheet (controller.Window, NSApplication.SharedApplication.MainWindow);
int response = NSApplication.SharedApplication.RunModalForWindow (controller.Window);
NSApplication.SharedApplication.EndSheet(controller.Window);
controller.Window.Close();
controller.Window.OrderOut(null);
if (!Enum.IsDefined(typeof(ModalResult), response))
response = 0;
return (ModalResult)response;
}
public static void MessageBoxHandler (string message)
{
NSAlert.WithMessage(message, "OK", null, null, null).RunModal();
}
public static bool EditStringHandler (StringFormData data)
{
EditStringWindowController form = new EditStringWindowController ();
form.StringValue = data.Value;
if (RunWindow (form) == ModalResult.OK) {
data.Value = form.StringValue;
return true;
}
else
return false;
}
public static bool RenameTagHandler (RestrictedStringFormData data)
{
EditNameWindowController form = new EditNameWindowController ();
form.OriginalName = data.Value;
form.InvalidNames.AddRange (data.RestrictedValues);
if (RunWindow (form) == ModalResult.OK) {
data.Value = form.TagName;
return true;
}
else
return false;
}
public static bool EditTagScalarValueHandler (TagScalarFormData data)
{
EditValue form = new EditValue(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
return false;
}
/*public static bool EditByteArrayHandler (ByteArrayFormData data)
{
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;
}
public static bool CreateNodeHandler (CreateTagFormData data)
{
CreateNodeForm form = new CreateNodeForm(data.TagType, data.HasName);
form.InvalidNames.AddRange(data.RestrictedNames);
if (form.ShowDialog() == DialogResult.OK) {
data.TagNode = form.TagNode;
data.TagName = form.TagName;
return true;
}
else
return false;
}*/
}
}

View file

@ -19,6 +19,7 @@ namespace NBTExplorer.Mac
public ImageAndTextCell ()
{
Initialize();
}
public ImageAndTextCell (IntPtr handle)
@ -39,6 +40,8 @@ namespace NBTExplorer.Mac
{
LineBreakMode = NSLineBreakMode.TruncatingTail;
Selectable = true;
PeriodicCleanup();
}
protected override void Dispose (bool disposing)
@ -53,6 +56,127 @@ namespace NBTExplorer.Mac
base.Dispose (disposing);
}
static List<ImageAndTextCell> _refPool = new List<ImageAndTextCell>();
// Method 1
/*static IntPtr selRetain = Selector.GetHandle ("retain");
[Export("copyWithZone:")]
public virtual NSObject CopyWithZone(IntPtr zone) {
ImageAndTextCell cell = new ImageAndTextCell() {
Title = Title,
Image = Image,
};
Messaging.void_objc_msgSend (cell.Handle, selRetain);
return cell;
}*/
// Method 2
/*[Export("copyWithZone:")]
public virtual NSObject CopyWithZone(IntPtr zone) {
ImageAndTextCell cell = new ImageAndTextCell() {
Title = Title,
Image = Image,
};
_refPool.Add(cell);
return cell;
}
[Export("dealloc")]
public void Dealloc ()
{
_refPool.Remove(this);
this.Dispose();
}
// Method 3
static IntPtr selRetain = Selector.GetHandle ("retain");
[Export("copyWithZone:")]
public virtual NSObject CopyWithZone(IntPtr zone) {
ImageAndTextCell cell = new ImageAndTextCell() {
Title = Title,
Image = Image,
};
_refPool.Add(cell);
Messaging.void_objc_msgSend (cell.Handle, selRetain);
return cell;
}
// Method 4
static IntPtr selRetain = Selector.GetHandle ("retain");
static IntPtr selRetainCount = Selector.GetHandle("retainCount");
[Export("copyWithZone:")]
public virtual NSObject CopyWithZone (IntPtr zone)
{
ImageAndTextCell cell = new ImageAndTextCell () {
Title = Title,
Image = Image,
};
_refPool.Add (cell);
Messaging.void_objc_msgSend (cell.Handle, selRetain);
return cell;
}*/
static IntPtr selRetain = Selector.GetHandle ("retain");
static IntPtr selRetainCount = Selector.GetHandle("retainCount");
public void PeriodicCleanup ()
{
List<ImageAndTextCell> markedForDelete = new List<ImageAndTextCell> ();
foreach (ImageAndTextCell cell in _refPool) {
uint count = Messaging.UInt32_objc_msgSend (cell.Handle, selRetainCount);
if (count == 1)
markedForDelete.Add (cell);
}
foreach (ImageAndTextCell cell in markedForDelete) {
_refPool.Remove (cell);
cell.Dispose ();
}
}
// Method 5
static IntPtr selCopyWithZone = Selector.GetHandle("copyWithZone:");
static IntPtr selDealloc = Selector.GetHandle("dealloc");
[Export("copyWithZone:")]
public virtual NSObject CopyWithZone(IntPtr zone) {
IntPtr copyHandle = Messaging.IntPtr_objc_msgSendSuper_IntPtr(SuperHandle, selCopyWithZone, zone);
ImageAndTextCell cell = new ImageAndTextCell(copyHandle) {
Image = Image,
};
_refPool.Add(cell);
return cell;
}
/*[Export("dealloc")]
public void Dealloc ()
{
//_refPool.Remove(this);
//Messaging.void_objc_msgSendSuper(SuperHandle, selDealloc);
}*/
/*[Export("copyWithZone:")]
public virtual NSObject CopyWithZone(IntPtr zone) {
ImageAndTextCell cell = new ImageAndTextCell() {
@ -63,14 +187,14 @@ namespace NBTExplorer.Mac
return cell;
}*/
static List<ImageAndTextCell> _refPool = new List<ImageAndTextCell>();
//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:")]
/*[Export("copyWithZone:")]
public NSObject CopyWithZone (IntPtr zone)
{
//IntPtr copy = Messaging.IntPtr_objc_msgSendSuper_IntPtr(SuperHandle, selCopyWithZone, zone);
@ -99,7 +223,7 @@ namespace NBTExplorer.Mac
_refPool.Remove(this);
//Messaging.void_objc_msgSendSuper(SuperHandle, selDealloc);
}
}*/
public new NSImage Image
{

View file

@ -292,7 +292,8 @@
<object class="NSMenuItem" id="406540956">
<reference key="NSMenu" ref="789758025"/>
<string key="NSTitle">Find Next</string>
<string key="NSKeyEquiv"></string>
<string key="NSKeyEquiv">g</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
@ -334,22 +335,182 @@
</object>
</object>
</object>
<object class="NSMenuItem" id="713487014">
<object class="NSMenuItem" id="48785913">
<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="NSTitle">Insert</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="266196583">
<string key="NSTitle">Insert</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="50922073">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Byte Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">document-attribute-b</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="911496477">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Short Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">document-attribute-s</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="332264467">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Int Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">document-attribute-i</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="128440236">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Long Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">document-attribute-l</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="1049809000">
<reference key="NSMenu" ref="266196583"/>
<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="961458250">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Float Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">document-attribute-f</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="223962722">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Double Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">document-attribute-d</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="930758066">
<reference key="NSMenu" ref="266196583"/>
<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="112366097">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Byte Array Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">edit-code</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="93765767">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Int Array Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">edit-code-i</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="662172920">
<reference key="NSMenu" ref="266196583"/>
<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="152916859">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">String Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">edit-small-caps</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="425841552">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">List Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">edit-list</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="352409518">
<reference key="NSMenu" ref="266196583"/>
<string key="NSTitle">Compound Tag</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">box</string>
</object>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
</object>
</object>
</object>
<string key="NSName">_NSMainMenu</string>
@ -468,6 +629,206 @@
</object>
<int key="connectionID">548</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuRename</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="978707231"/>
</object>
<int key="connectionID">549</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuEditValue</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="386478888"/>
</object>
<int key="connectionID">550</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuDelete</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="437104165"/>
</object>
<int key="connectionID">551</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuCut</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="296257095"/>
</object>
<int key="connectionID">574</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuCopy</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="860595796"/>
</object>
<int key="connectionID">575</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuPaste</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="29853731"/>
</object>
<int key="connectionID">576</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuFind</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="713722761"/>
</object>
<int key="connectionID">577</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuFindNext</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="406540956"/>
</object>
<int key="connectionID">578</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuAbout</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">579</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuQuit</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="632727374"/>
</object>
<int key="connectionID">580</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuOpen</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="722745758"/>
</object>
<int key="connectionID">581</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuOpenFolder</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="827642748"/>
</object>
<int key="connectionID">582</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuOpenMinecraft</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="692639359"/>
</object>
<int key="connectionID">583</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuSave</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="1023925487"/>
</object>
<int key="connectionID">584</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertByte</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="50922073"/>
</object>
<int key="connectionID">585</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertShort</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="911496477"/>
</object>
<int key="connectionID">586</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertInt</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="332264467"/>
</object>
<int key="connectionID">587</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertLong</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="128440236"/>
</object>
<int key="connectionID">588</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertFloat</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="961458250"/>
</object>
<int key="connectionID">589</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertDouble</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="223962722"/>
</object>
<int key="connectionID">590</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertByteArray</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="112366097"/>
</object>
<int key="connectionID">591</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertIntArray</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="93765767"/>
</object>
<int key="connectionID">592</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertString</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="152916859"/>
</object>
<int key="connectionID">593</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_menuInsertList</string>
<reference key="source" ref="947627720"/>
<reference key="destination" ref="425841552"/>
</object>
<int key="connectionID">594</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>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -503,23 +864,14 @@
<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"/>
<reference ref="48785913"/>
</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"/>
@ -698,14 +1050,6 @@
<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"/>
@ -768,6 +1112,107 @@
<reference key="object" ref="406540956"/>
<reference key="parent" ref="789758025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">558</int>
<reference key="object" ref="48785913"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="266196583"/>
</object>
<reference key="parent" ref="649796088"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">559</int>
<reference key="object" ref="266196583"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="50922073"/>
<reference ref="911496477"/>
<reference ref="332264467"/>
<reference ref="128440236"/>
<reference ref="961458250"/>
<reference ref="223962722"/>
<reference ref="112366097"/>
<reference ref="93765767"/>
<reference ref="425841552"/>
<reference ref="352409518"/>
<reference ref="662172920"/>
<reference ref="930758066"/>
<reference ref="1049809000"/>
<reference ref="152916859"/>
</object>
<reference key="parent" ref="48785913"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">560</int>
<reference key="object" ref="50922073"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">561</int>
<reference key="object" ref="911496477"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">562</int>
<reference key="object" ref="332264467"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">563</int>
<reference key="object" ref="128440236"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">564</int>
<reference key="object" ref="961458250"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">565</int>
<reference key="object" ref="223962722"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">566</int>
<reference key="object" ref="112366097"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">567</int>
<reference key="object" ref="93765767"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">568</int>
<reference key="object" ref="425841552"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">569</int>
<reference key="object" ref="352409518"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">570</int>
<reference key="object" ref="662172920"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">571</int>
<reference key="object" ref="930758066"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">572</int>
<reference key="object" ref="1049809000"/>
<reference key="parent" ref="266196583"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">573</int>
<reference key="object" ref="152916859"/>
<reference key="parent" ref="266196583"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -780,7 +1225,6 @@
<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>
@ -795,7 +1239,6 @@
<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>
@ -807,8 +1250,24 @@
<string>543.IBPluginDependency</string>
<string>544.IBPluginDependency</string>
<string>545.IBPluginDependency</string>
<string>558.IBPluginDependency</string>
<string>559.IBPluginDependency</string>
<string>56.IBPluginDependency</string>
<string>560.IBPluginDependency</string>
<string>561.IBPluginDependency</string>
<string>562.IBPluginDependency</string>
<string>563.IBPluginDependency</string>
<string>564.IBPluginDependency</string>
<string>565.IBPluginDependency</string>
<string>566.IBPluginDependency</string>
<string>567.IBPluginDependency</string>
<string>568.IBPluginDependency</string>
<string>569.IBPluginDependency</string>
<string>57.IBPluginDependency</string>
<string>570.IBPluginDependency</string>
<string>571.IBPluginDependency</string>
<string>572.IBPluginDependency</string>
<string>573.IBPluginDependency</string>
<string>58.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>75.IBPluginDependency</string>
@ -859,6 +1318,20 @@
<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">
@ -873,7 +1346,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">548</int>
<int key="maxID">595</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -920,6 +1393,199 @@
</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>_menuAbout</string>
<string>_menuCopy</string>
<string>_menuCut</string>
<string>_menuDelete</string>
<string>_menuEditValue</string>
<string>_menuFind</string>
<string>_menuFindNext</string>
<string>_menuInsertByte</string>
<string>_menuInsertByteArray</string>
<string>_menuInsertCompound</string>
<string>_menuInsertDouble</string>
<string>_menuInsertFloat</string>
<string>_menuInsertInt</string>
<string>_menuInsertIntArray</string>
<string>_menuInsertList</string>
<string>_menuInsertLong</string>
<string>_menuInsertShort</string>
<string>_menuInsertString</string>
<string>_menuOpen</string>
<string>_menuOpenFolder</string>
<string>_menuOpenMinecraft</string>
<string>_menuPaste</string>
<string>_menuQuit</string>
<string>_menuRename</string>
<string>_menuSave</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</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>_menuAbout</string>
<string>_menuCopy</string>
<string>_menuCut</string>
<string>_menuDelete</string>
<string>_menuEditValue</string>
<string>_menuFind</string>
<string>_menuFindNext</string>
<string>_menuInsertByte</string>
<string>_menuInsertByteArray</string>
<string>_menuInsertCompound</string>
<string>_menuInsertDouble</string>
<string>_menuInsertFloat</string>
<string>_menuInsertInt</string>
<string>_menuInsertIntArray</string>
<string>_menuInsertList</string>
<string>_menuInsertLong</string>
<string>_menuInsertShort</string>
<string>_menuInsertString</string>
<string>_menuOpen</string>
<string>_menuOpenFolder</string>
<string>_menuOpenMinecraft</string>
<string>_menuPaste</string>
<string>_menuQuit</string>
<string>_menuRename</string>
<string>_menuSave</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">_menuAbout</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuCopy</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuCut</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuDelete</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuEditValue</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuFind</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuFindNext</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertByte</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertByteArray</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertCompound</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertDouble</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertFloat</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertInt</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertIntArray</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertList</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertLong</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertShort</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuInsertString</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuOpen</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuOpenFolder</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuOpenMinecraft</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuPaste</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuQuit</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuRename</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_menuSave</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/AppDelegate.h</string>
@ -941,11 +1607,33 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMenuCheckmark</string>
<string>NSMenuMixedState</string>
<string>box</string>
<string>document-attribute-b</string>
<string>document-attribute-d</string>
<string>document-attribute-f</string>
<string>document-attribute-i</string>
<string>document-attribute-l</string>
<string>document-attribute-s</string>
<string>edit-code</string>
<string>edit-code-i</string>
<string>edit-list</string>
<string>edit-small-caps</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{11, 11}</string>
<string>{10, 3}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
<string>{16, 16}</string>
</object>
</object>
</data>

View file

@ -7,6 +7,7 @@ using MonoMac.AppKit;
using NBTExplorer.Mac;
using System.IO;
using NBTExplorer.Model;
using Substrate.Nbt;
namespace NBTExplorer
{
@ -31,8 +32,11 @@ namespace NBTExplorer
void Initialize ()
{
InitializeIconRegistry();
FormHandlers.Register();
}
private AppDelegate _appDelegate;
private NBTExplorer.Mac.IconRegistry _iconRegistry;
private void InitializeIconRegistry ()
@ -57,6 +61,12 @@ namespace NBTExplorer
_iconRegistry.Register(typeof(NbtFileDataNode), NSImage.ImageNamed("wooden-box.png"));
_iconRegistry.Register(typeof(TagIntArrayDataNode), NSImage.ImageNamed("edit-code-i.png"));
}
public AppDelegate AppDelegate
{
get { return _appDelegate; }
set { _appDelegate = value; }
}
#endregion
@ -162,7 +172,7 @@ namespace NBTExplorer
OpenPaths(new string[] { opanel.DirectoryUrl.Path });
}
//UpdateUI();
UpdateUI();
}
private void OpenMinecraftDirectory ()
@ -192,7 +202,7 @@ namespace NBTExplorer
}
}
//UpdateUI();
UpdateUI();
}
private void OpenPaths (string[] paths)
@ -217,7 +227,7 @@ namespace NBTExplorer
_mainOutlineView.ReloadData();
// UpdateUI();
UpdateUI();
// UpdateOpenMenu();
/*_nodeTree.Nodes.Clear();
@ -268,7 +278,7 @@ namespace NBTExplorer
foreach (DataNode child in backNode.Nodes) {
if (child != null) {
node.Nodes.Add (new TreeDataNode (child));
node.AddNode (new TreeDataNode (child));
}
}
}
@ -297,6 +307,20 @@ namespace NBTExplorer
EditNode(node);
}
public void ActionRenameValue ()
{
TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
if (node != null)
RenameNode(node);
}
public void ActionDeleteValue ()
{
TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
if (node != null)
DeleteNode(node);
}
private void EditNode (TreeDataNode node)
{
if (node == null)
@ -305,13 +329,86 @@ namespace NBTExplorer
if (!node.Data.CanEditNode)
return;
//NBTExplorer.Mac.EditValue form = new NBTExplorer.Mac.EditValue(node.Data);
if (node.Data.EditNode()) {
//node.Text = node.Data.NodeDisplay;
UpdateUI(node.Data);
}
}
//if (node.Data.EditNode()) {
private void RenameNode (TreeDataNode node)
{
if (node == null)
return;
if (!node.Data.CanRenameNode)
return;
if (node.Data.RenameNode()) {
//node.Text = dataNode.NodeDisplay;
//UpdateUI(dataNode);
//}
UpdateUI(node.Data);
}
}
private void DeleteNode (TreeDataNode node)
{
if (node == null)
return;
if (!node.Data.CanDeleteNode)
return;
if (node.Data.DeleteNode()) {
UpdateUI(node.Parent.Data);
//UpdateNodeText(node.Parent);
TreeDataNode parent = node.Parent;
node.Remove();
_mainOutlineView.ReloadItem(parent, true);
}
}
private void UpdateUI ()
{
if (_appDelegate == null)
return;
TreeDataNode selected = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
if (selected != null) {
UpdateUI(selected.Data);
}
else {
//_appDelegate.MenuSave.Enabled = CheckModifications();
_appDelegate.MenuFind.Enabled = false;
//_appDelegate.MenuFindNext.Enabled = _searchState != null;
}
}
private void UpdateUI (DataNode node)
{
if (_appDelegate == null || node == null)
return;
_appDelegate.MenuInsertByte.Enabled = node.CanCreateTag(TagType.TAG_BYTE);
_appDelegate.MenuInsertShort.Enabled = node.CanCreateTag(TagType.TAG_SHORT);
_appDelegate.MenuInsertInt.Enabled = node.CanCreateTag(TagType.TAG_INT);
_appDelegate.MenuInsertLong.Enabled = node.CanCreateTag(TagType.TAG_LONG);
_appDelegate.MenuInsertFloat.Enabled = node.CanCreateTag(TagType.TAG_FLOAT);
_appDelegate.MenuInsertDouble.Enabled = node.CanCreateTag(TagType.TAG_DOUBLE);
_appDelegate.MenuInsertByteArray.Enabled = node.CanCreateTag(TagType.TAG_BYTE_ARRAY);
_appDelegate.MenuInsertIntArray.Enabled = node.CanCreateTag(TagType.TAG_INT_ARRAY);
_appDelegate.MenuInsertString.Enabled = node.CanCreateTag(TagType.TAG_STRING);
_appDelegate.MenuInsertList.Enabled = node.CanCreateTag(TagType.TAG_LIST);
_appDelegate.MenuInsertCompound.Enabled = node.CanCreateTag(TagType.TAG_COMPOUND);
//_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.MenuFind.Enabled = node.CanSearchNode;
//_appDelegate.MenuFindNext.Enabled = _searchState != null;
}
}
}

View file

@ -270,7 +270,6 @@
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
<bool key="NSIsEditable">YES</bool>
<reference key="NSTableView" ref="26648463"/>
</object>
</object>
@ -337,7 +336,6 @@
<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>

12
Mac/ModalResult.cs Normal file
View file

@ -0,0 +1,12 @@
using System;
namespace NBTExplorer.Mac
{
public enum ModalResult
{
Unknown = 0,
OK = 1,
Cancel = 2,
}
}

View file

@ -6,6 +6,8 @@ namespace NBTExplorer.Mac.Test
{
// ...
[Outlet]
MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; }

View file

@ -8,6 +8,7 @@ namespace NBTExplorer.Mac
{
public class TreeDataNode : NSObject
{
private TreeDataNode _parent;
private DataNode _dataNode;
private List<TreeDataNode> _children;
private bool _expanded;
@ -39,11 +40,36 @@ namespace NBTExplorer.Mac
set { _expanded = value; }
}
public void Remove ()
{
if (_parent != null)
_parent.RemoveNode(this);
}
public TreeDataNode Parent
{
get { return _parent; }
}
public bool HasChildren
{
get { return _children.Count > 0 || _dataNode.HasUnexpandedChildren; }
}
public void AddNode (TreeDataNode node)
{
node._parent = this;
_children.Add(node);
}
public void RemoveNode (TreeDataNode node)
{
if (_children.Contains (node)) {
_children.Remove(node);
node._parent = null;
}
}
public List<TreeDataNode> Nodes
{
get { return _children; }

View file

@ -62,7 +62,7 @@ namespace NBTExplorer.Model
});
}
catch (Exception e) {
Program.StaticInitFailure(e);
//Program.StaticInitFailure(e);
}
}
}

View file

@ -46,7 +46,7 @@ Global
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = NBTExplorer.csproj
StartupItem = NBTExplorerMac.csproj
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -164,6 +164,19 @@
</Compile>
<Compile Include="Model\TagKey.cs" />
<Compile Include="ProgramMac.cs" />
<Compile Include="FormRegistry.cs" />
<Compile Include="Mac\FormHandlers.cs" />
<Compile Include="Mac\EditStringWindow.cs" />
<Compile Include="Mac\EditStringWindowController.cs" />
<Compile Include="Mac\EditStringWindow.designer.cs">
<DependentUpon>EditStringWindow.cs</DependentUpon>
</Compile>
<Compile Include="Mac\ModalResult.cs" />
<Compile Include="Mac\EditNameWindow.cs" />
<Compile Include="Mac\EditNameWindowController.cs" />
<Compile Include="Mac\EditNameWindow.designer.cs">
<DependentUpon>EditNameWindow.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Dead_Bush.png" />
@ -190,22 +203,6 @@
<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" />
@ -217,10 +214,27 @@
<BundleResource Include="Resources\edit-list.png" />
<BundleResource Include="Resources\edit-small-caps.png" />
<BundleResource Include="Resources\wooden-box.png" />
<BundleResource Include="Resources\24\edit-code-24.png" />
<BundleResource Include="Resources\24\edit-code-i-24.png" />
<BundleResource Include="Resources\24\edit-list-24.png" />
<BundleResource Include="Resources\24\edit-small-caps-24.png" />
<BundleResource Include="Resources\24\pencil-24.png" />
<BundleResource Include="Resources\24\scissors-24.png" />
<BundleResource Include="Resources\24\selection-input-24.png" />
<BundleResource Include="Resources\24\document-s-24.png" />
<BundleResource Include="Resources\24\document-l-24.png" />
<BundleResource Include="Resources\24\document-i-24.png" />
<BundleResource Include="Resources\24\document-f-24.png" />
<BundleResource Include="Resources\24\document-d-24.png" />
<BundleResource Include="Resources\24\document-b-24.png" />
<BundleResource Include="Resources\24\document-24.png" />
<BundleResource Include="Resources\24\cross-24.png" />
</ItemGroup>
<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" />
</ItemGroup>
</Project>

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 624 B

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 603 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB