forked from mirrors/NBTExplorer
Mac UI
This commit is contained in:
parent
a2571f79a8
commit
5849c30f2e
32 changed files with 2645 additions and 8268 deletions
|
@ -11,15 +11,13 @@
|
|||
<RootNamespace>NBTExplorer</RootNamespace>
|
||||
<AssemblyName>NBTExplorer</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
|
@ -28,7 +26,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
|
@ -38,7 +36,7 @@
|
|||
<ApplicationIcon>dead_bush.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
|
@ -52,13 +50,14 @@
|
|||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Optimize>False</Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<Optimize>True</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Release\NBTExplorer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
|
@ -67,17 +66,17 @@
|
|||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Substrate, Version=1.3.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Substrate">
|
||||
<HintPath>..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Forms\CancelSearchForm.cs">
|
||||
|
@ -170,7 +169,6 @@
|
|||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SearchWorker.cs" />
|
||||
<Compile Include="TagKey.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\BuiltInContextMenu.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -235,6 +233,7 @@
|
|||
<None Include="app.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<Compile Include="TagKey.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="dead_bush.ico" />
|
||||
|
|
|
@ -1,32 +1,52 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorer", "NBTExplorer.csproj", "{8A458245-8176-4599-95CD-3CA39F2435CE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.Build.0 = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.ActiveCfg = Release|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorer", "NBTExplorer.csproj", "{8A458245-8176-4599-95CD-3CA39F2435CE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorerMac", "NBTExplorerMac\NBTExplorerMac.csproj", "{01F9A296-C477-4CBF-A0D0-41E697048257}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
AppStore|Any CPU = AppStore|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.AppStore|Any CPU.ActiveCfg = AppStore|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.AppStore|Any CPU.Build.0 = AppStore|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{01F9A296-C477-4CBF-A0D0-41E697048257}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.Build.0 = Debug|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.ActiveCfg = Release|x86
|
||||
{8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = NBTExplorerMac\NBTExplorerMac.csproj
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -2,12 +2,22 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array/>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>dead_bush.icns</string>
|
||||
</array>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.NBTExplorerMac</string>
|
||||
<string>jaquadro.NBTExplorer</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>NBTExplorerMac</string>
|
||||
<string>NBTExplorer</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.3</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6</string>
|
||||
<key>NSMainNibFile</key>
|
||||
|
|
|
@ -4,7 +4,7 @@ using MonoMac.Foundation;
|
|||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
|
||||
namespace Test
|
||||
namespace NBTExplorer
|
||||
{
|
||||
public partial class AppDelegate : NSApplicationDelegate
|
||||
{
|
||||
|
@ -19,6 +19,11 @@ namespace Test
|
|||
mainWindowController = new MainWindowController ();
|
||||
mainWindowController.Window.MakeKeyAndOrderFront (this);
|
||||
}
|
||||
|
||||
partial void ActionRename (NSObject sender)
|
||||
{
|
||||
mainWindowController.Window.ActionEditValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
27
NBTExplorerMac/Mac/AppDelegate.designer.cs
generated
27
NBTExplorerMac/Mac/AppDelegate.designer.cs
generated
|
@ -1,10 +1,27 @@
|
|||
// 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 Test
|
||||
namespace NBTExplorer
|
||||
{
|
||||
// Should subclass MonoMac.AppKit.NSResponder
|
||||
[MonoMac.Foundation.Register("AppDelegate")]
|
||||
public partial class AppDelegate
|
||||
[Register ("AppDelegate")]
|
||||
partial class AppDelegate
|
||||
{
|
||||
[Action ("ActionRename:")]
|
||||
partial void ActionRename (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionEditValue:")]
|
||||
partial void ActionEditValue (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionDelete:")]
|
||||
partial void ActionDelete (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,21 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public partial class EditValue : MonoMac.AppKit.NSWindow
|
||||
{
|
||||
public enum DialogResult
|
||||
{
|
||||
OK,
|
||||
Cancel,
|
||||
}
|
||||
|
||||
private TagNode _tag;
|
||||
private DialogResult _result;
|
||||
|
||||
#region Constructors
|
||||
|
||||
// Called when created from unmanaged code
|
||||
|
@ -23,6 +33,21 @@ namespace NBTExplorer.Mac
|
|||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
public EditValue (TagNode tag)
|
||||
{
|
||||
Initialize ();
|
||||
|
||||
_tag = tag;
|
||||
|
||||
if (tag == null) {
|
||||
_result = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
_valueField.StringValue = _tag.ToString();
|
||||
}
|
||||
|
||||
// Shared initialization code
|
||||
void Initialize ()
|
||||
|
@ -30,6 +55,104 @@ namespace NBTExplorer.Mac
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public TagNode NodeTag
|
||||
{
|
||||
get { return _tag; }
|
||||
}
|
||||
|
||||
public DialogResult Result
|
||||
{
|
||||
get { return _result; }
|
||||
}
|
||||
|
||||
/*private TagNode _tag;
|
||||
|
||||
public EditValue (TagNode tag)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_tag = tag;
|
||||
|
||||
if (tag == null) {
|
||||
DialogResult = DialogResult.Abort;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
textBox1.Text = _tag.ToString();
|
||||
}
|
||||
|
||||
public TagNode NodeTag
|
||||
{
|
||||
get { return _tag; }
|
||||
}
|
||||
|
||||
private void Apply ()
|
||||
{
|
||||
if (ValidateInput()) {
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private bool ValidateInput ()
|
||||
{
|
||||
return ValidateValueInput();
|
||||
}
|
||||
|
||||
private bool ValidateValueInput ()
|
||||
{
|
||||
try {
|
||||
switch (_tag.GetTagType()) {
|
||||
case TagType.TAG_BYTE:
|
||||
_tag.ToTagByte().Data = unchecked((byte)sbyte.Parse(textBox1.Text));
|
||||
break;
|
||||
|
||||
case TagType.TAG_SHORT:
|
||||
_tag.ToTagShort().Data = short.Parse(textBox1.Text);
|
||||
break;
|
||||
|
||||
case TagType.TAG_INT:
|
||||
_tag.ToTagInt().Data = int.Parse(textBox1.Text);
|
||||
break;
|
||||
|
||||
case TagType.TAG_LONG:
|
||||
_tag.ToTagLong().Data = long.Parse(textBox1.Text);
|
||||
break;
|
||||
|
||||
case TagType.TAG_FLOAT:
|
||||
_tag.ToTagFloat().Data = float.Parse(textBox1.Text);
|
||||
break;
|
||||
|
||||
case TagType.TAG_DOUBLE:
|
||||
_tag.ToTagDouble().Data = double.Parse(textBox1.Text);
|
||||
break;
|
||||
|
||||
case TagType.TAG_STRING:
|
||||
_tag.ToTagString().Data = textBox1.Text;
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (FormatException) {
|
||||
MessageBox.Show("The value is formatted incorrectly for the given type.");
|
||||
return false;
|
||||
}
|
||||
catch (OverflowException) {
|
||||
MessageBox.Show("The value is outside the acceptable range for the given type.");
|
||||
return false;
|
||||
}
|
||||
catch {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void _buttonOK_Click (object sender, EventArgs e)
|
||||
{
|
||||
Apply();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
31
NBTExplorerMac/Mac/EditValue.designer.cs
generated
31
NBTExplorerMac/Mac/EditValue.designer.cs
generated
|
@ -1,12 +1,31 @@
|
|||
// 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
|
||||
{
|
||||
|
||||
// Should subclass MonoMac.AppKit.NSWindow
|
||||
[MonoMac.Foundation.Register("EditValue")]
|
||||
public partial class EditValue
|
||||
[Register ("EditValue")]
|
||||
partial class EditValue
|
||||
{
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSTextField _valueField { get; set; }
|
||||
|
||||
[Action ("ActionOK:")]
|
||||
partial void ActionOK (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionCancel:")]
|
||||
partial void ActionCancel (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
if (_valueField != null) {
|
||||
_valueField.Dispose ();
|
||||
_valueField = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,31 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1060</int>
|
||||
<string key="IBDocument.SystemVersion">10D573</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">762</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||
<string key="IBDocument.HIToolboxVersion">460.00</string>
|
||||
<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">762</string>
|
||||
<string key="NS.object.0">2844</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="2" />
|
||||
<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">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<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>
|
||||
|
@ -39,68 +40,236 @@
|
|||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="661050917">
|
||||
<int key="NSWindowStyleMask">15</int>
|
||||
<int key="NSWindowStyleMask">3</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{131, 86}, {602, 342}}</string>
|
||||
<string key="NSWindowRect">{{131, 86}, {262, 91}}</string>
|
||||
<int key="NSWTFlags">611844096</int>
|
||||
<string key="NSWindowTitle">Window</string>
|
||||
<string key="NSWindowTitle">Edit Value...</string>
|
||||
<string key="NSWindowClass">EditValue</string>
|
||||
<nil key="NSViewClass" />
|
||||
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
<nil key="NSViewClass"/>
|
||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||
<object class="NSView" key="NSWindowView" id="1068206745">
|
||||
<reference key="NSNextResponder" />
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{602, 342}</string>
|
||||
<reference key="NSSuperview" />
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTextField" id="922648809">
|
||||
<reference key="NSNextResponder" ref="1068206745"/>
|
||||
<int key="NSvFlags">266</int>
|
||||
<string key="NSFrame">{{20, 49}, {222, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1068206745"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="321744782">
|
||||
<int key="NSCellFlags">-1804599231</int>
|
||||
<int key="NSCellFlags2">272630848</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport" id="1011941154">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="922648809"/>
|
||||
<bool key="NSDrawsBackground">YES</bool>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textBackgroundColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSButton" id="134334418">
|
||||
<reference key="NSNextResponder" ref="1068206745"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{166, 13}, {82, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1068206745"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="524484320">
|
||||
<int key="NSCellFlags">67108864</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">OK</string>
|
||||
<reference key="NSSupport" ref="1011941154"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="134334418"/>
|
||||
<int key="NSButtonFlags">-2038284288</int>
|
||||
<int key="NSButtonFlags2">129</int>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSButton" id="862679276">
|
||||
<reference key="NSNextResponder" ref="1068206745"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{84, 13}, {82, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1068206745"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="980603739">
|
||||
<int key="NSCellFlags">67108864</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">Cancel</string>
|
||||
<reference key="NSSupport" ref="1011941154"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="862679276"/>
|
||||
<int key="NSButtonFlags">-2038284288</int>
|
||||
<int key="NSButtonFlags2">129</int>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{262, 91}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
|
||||
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
<string key="NSScreenRect">{{0, 0}, {1600, 1178}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_valueField</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="922648809"/>
|
||||
</object>
|
||||
<int key="connectionID">9</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionOK:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="134334418"/>
|
||||
</object>
|
||||
<int key="connectionID">10</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionCancel:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="862679276"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0" />
|
||||
<reference key="children" ref="1000" />
|
||||
<nil key="parent" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<reference key="object" ref="1004"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="661050917" />
|
||||
<reference key="object" ref="661050917"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="1068206745" />
|
||||
<reference ref="1068206745"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0" />
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">2</int>
|
||||
<reference key="object" ref="1068206745" />
|
||||
<reference key="parent" ref="661050917" />
|
||||
<reference key="object" ref="1068206745"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="922648809"/>
|
||||
<reference ref="134334418"/>
|
||||
<reference ref="862679276"/>
|
||||
</object>
|
||||
<reference key="parent" ref="661050917"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="922648809"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="321744782"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1068206745"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="321744782"/>
|
||||
<reference key="parent" ref="922648809"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="134334418"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="524484320"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1068206745"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="524484320"/>
|
||||
<reference key="parent" ref="134334418"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="862679276"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="980603739"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1068206745"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="980603739"/>
|
||||
<reference key="parent" ref="862679276"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -111,41 +280,47 @@
|
|||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>1.IBEditorWindowLastContentRect</string>
|
||||
<string>1.IBPluginDependency</string>
|
||||
<string>1.IBWindowTemplateEditedContentRect</string>
|
||||
<string>1.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
<string>4.IBPluginDependency</string>
|
||||
<string>5.IBPluginDependency</string>
|
||||
<string>6.IBPluginDependency</string>
|
||||
<string>7.IBPluginDependency</string>
|
||||
<string>8.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<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>{{361, 348}, {602, 342}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{361, 348}, {602, 342}}</string>
|
||||
<boolean value="YES" />
|
||||
<boolean value="YES"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0" />
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization" />
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0" />
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID" />
|
||||
<int key="maxID">2</int>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">11</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
@ -153,9 +328,52 @@
|
|||
<object class="IBPartialClassDescription">
|
||||
<string key="className">EditValue</string>
|
||||
<string key="superclassName">NSWindow</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionCancel:</string>
|
||||
<string>ActionOK:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionCancel:</string>
|
||||
<string>ActionOK:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionCancel:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionOK:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">_valueField</string>
|
||||
<string key="NS.object.0">NSTextField</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">_valueField</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">_valueField</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey" />
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/EditValue.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -164,10 +382,9 @@
|
|||
<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" />
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<nil key="IBDocument.LastKnownRelativeProjectPath" />
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
|
@ -1,11 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MonoMac.AppKit;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public class IconRegistry
|
||||
{
|
||||
private Dictionary<Type, NSImage> _iconRegistry;
|
||||
|
||||
public IconRegistry ()
|
||||
{
|
||||
_iconRegistry = new Dictionary<Type, NSImage>();
|
||||
}
|
||||
|
||||
public NSImage DefaultIcon { get; set; }
|
||||
|
||||
public NSImage Lookup (Type type)
|
||||
{
|
||||
if (_iconRegistry.ContainsKey(type))
|
||||
return _iconRegistry[type];
|
||||
else
|
||||
return DefaultIcon;
|
||||
}
|
||||
|
||||
public void Register (Type type, NSImage icon)
|
||||
{
|
||||
_iconRegistry[type] = icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,210 @@
|
|||
using System;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.CoreGraphics;
|
||||
using System.Drawing;
|
||||
using MonoMac.ObjCRuntime;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public class ImageAndTextCell
|
||||
[Register("ImageAndTextCell")]
|
||||
public class ImageAndTextCell : NSTextFieldCell
|
||||
{
|
||||
private NSImage _image;
|
||||
private bool _copyCalled;
|
||||
private bool _disposeCalled;
|
||||
private bool _deallocCalled;
|
||||
private bool _drawCalled;
|
||||
|
||||
public ImageAndTextCell ()
|
||||
{
|
||||
}
|
||||
|
||||
public ImageAndTextCell (IntPtr handle)
|
||||
: base(handle)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// Called when created directly from a XIB file
|
||||
[Export ("initWithCoder:")]
|
||||
public ImageAndTextCell (NSCoder coder)
|
||||
: base (coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
private void Initialize ()
|
||||
{
|
||||
LineBreakMode = NSLineBreakMode.TruncatingTail;
|
||||
Selectable = true;
|
||||
}
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
//if (_image != null)
|
||||
// _image.Dispose();
|
||||
|
||||
//if (_noDispose)
|
||||
// Handle = IntPtr.Zero;
|
||||
_disposeCalled = true;
|
||||
|
||||
base.Dispose (disposing);
|
||||
}
|
||||
|
||||
/*[Export("copyWithZone:")]
|
||||
public virtual NSObject CopyWithZone(IntPtr zone) {
|
||||
ImageAndTextCell cell = new ImageAndTextCell() {
|
||||
Title = Title,
|
||||
Image = Image,
|
||||
};
|
||||
cell._noDispose = true;
|
||||
return cell;
|
||||
}*/
|
||||
|
||||
static List<ImageAndTextCell> _refPool = new List<ImageAndTextCell>();
|
||||
|
||||
//static IntPtr selRetain = Selector.GetHandle ("retain");
|
||||
//static IntPtr selAutoRelease = Selector.GetHandle("autorelease");
|
||||
//static IntPtr selRelease = Selector.GetHandle("release");
|
||||
//static IntPtr selCopyWithZone = Selector.GetHandle("copyWithZone:");
|
||||
|
||||
[Export("copyWithZone:")]
|
||||
public NSObject CopyWithZone (IntPtr zone)
|
||||
{
|
||||
//IntPtr copy = Messaging.IntPtr_objc_msgSendSuper_IntPtr(SuperHandle, selCopyWithZone, zone);
|
||||
//var cloned = new ImageAndTextCell(copy);
|
||||
//cloned.Title = Title;
|
||||
//cloned.Image = Image;
|
||||
|
||||
var cloned = new ImageAndTextCell {
|
||||
Title = Title,
|
||||
Image = Image,
|
||||
};
|
||||
cloned._copyCalled = true;
|
||||
|
||||
_refPool.Add(cloned);
|
||||
|
||||
//Messaging.void_objc_msgSend (cloned.Handle, selRetain);
|
||||
return cloned;
|
||||
}
|
||||
|
||||
//static IntPtr selDealloc = Selector.GetHandle("dealloc");
|
||||
|
||||
[Export("dealloc")]
|
||||
public void Dealloc ()
|
||||
{
|
||||
_deallocCalled = true;
|
||||
_refPool.Remove(this);
|
||||
|
||||
//Messaging.void_objc_msgSendSuper(SuperHandle, selDealloc);
|
||||
}
|
||||
|
||||
public new NSImage Image
|
||||
{
|
||||
get { return _image; }
|
||||
set { _image = value; }
|
||||
}
|
||||
|
||||
public override RectangleF ImageRectForBounds (RectangleF theRect)
|
||||
{
|
||||
if (_image != null) {
|
||||
PointF origin = new PointF(theRect.X + 3, theRect.Y + (float)Math.Ceiling((theRect.Height - _image.Size.Height) / 2));
|
||||
return new RectangleF(origin, _image.Size);
|
||||
}
|
||||
else
|
||||
return RectangleF.Empty;
|
||||
}
|
||||
|
||||
public override RectangleF TitleRectForBounds (RectangleF theRect)
|
||||
{
|
||||
if (_image != null) {
|
||||
PointF origin = new PointF(theRect.X + 3 + _image.Size.Width, theRect.Y);
|
||||
SizeF size = new SizeF(theRect.Width - 3 - _image.Size.Width, theRect.Height);
|
||||
return new RectangleF(origin, size);
|
||||
}
|
||||
else
|
||||
return base.TitleRectForBounds(theRect);
|
||||
}
|
||||
|
||||
public override void EditWithFrame (RectangleF aRect, NSView inView, NSText editor, NSObject delegateObject, NSEvent theEvent)
|
||||
{
|
||||
RectangleF textFrame, imageFrame;
|
||||
aRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out textFrame);
|
||||
base.EditWithFrame(textFrame, inView, editor, delegateObject, theEvent);
|
||||
}
|
||||
|
||||
public override void SelectWithFrame (RectangleF aRect, NSView inView, NSText editor, NSObject delegateObject, int selStart, int selLength)
|
||||
{
|
||||
RectangleF textFrame, imageFrame;
|
||||
aRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out textFrame);
|
||||
base.SelectWithFrame(textFrame, inView, editor, delegateObject, selStart, selLength);
|
||||
}
|
||||
|
||||
public override void DrawWithFrame (RectangleF cellFrame, NSView inView)
|
||||
{
|
||||
Assert (!_deallocCalled, "DrawWithFrame: Dealloc was called on object");
|
||||
Assert (!_disposeCalled, "DrawWithFrame: Dispose was called on object");
|
||||
|
||||
_drawCalled = true;
|
||||
if (_image != null) {
|
||||
RectangleF imageFrame;
|
||||
cellFrame.Divide (3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out cellFrame);
|
||||
|
||||
if (DrawsBackground) {
|
||||
BackgroundColor.Set ();
|
||||
NSGraphics.RectFill (imageFrame);
|
||||
}
|
||||
|
||||
imageFrame.X += 3;
|
||||
imageFrame.Size = _image.Size;
|
||||
|
||||
//if (inView.IsFlipped) {
|
||||
// imageFrame.Y += (float)Math.Ceiling((cellFrame.Height + imageFrame.Height) / 2);
|
||||
//}
|
||||
//else {
|
||||
imageFrame.Y += (float)Math.Ceiling ((cellFrame.Height - imageFrame.Height) / 2);
|
||||
//}
|
||||
|
||||
_image.Draw (imageFrame, new RectangleF (PointF.Empty, _image.Size), NSCompositingOperation.SourceOver, 1f, true, null);
|
||||
}
|
||||
|
||||
base.DrawWithFrame (cellFrame, inView);
|
||||
}
|
||||
|
||||
public override SizeF CellSize
|
||||
{
|
||||
get {
|
||||
if (_image != null)
|
||||
return new SizeF(base.CellSize.Width + 3 + _image.Size.Width, base.CellSize.Height);
|
||||
else
|
||||
return new SizeF(base.CellSize.Width + 3, base.CellSize.Height);
|
||||
}
|
||||
}
|
||||
|
||||
public override NSCellHit HitTest (NSEvent forEvent, RectangleF inRect, NSView ofView)
|
||||
{
|
||||
PointF point = ofView.ConvertPointFromView (forEvent.LocationInWindow, null);
|
||||
|
||||
if (_image != null) {
|
||||
RectangleF imageFrame;
|
||||
inRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out inRect);
|
||||
|
||||
imageFrame.X += 3;
|
||||
imageFrame.Size = _image.Size;
|
||||
if (ofView.MouseinRect(point, imageFrame))
|
||||
return NSCellHit.ContentArea;
|
||||
}
|
||||
|
||||
return base.HitTest (forEvent, inRect, ofView);
|
||||
}
|
||||
|
||||
private void Assert (bool condition, string message)
|
||||
{
|
||||
if (!condition)
|
||||
throw new Exception("Assert failed: " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,6 +4,9 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using NBTExplorer.Mac;
|
||||
using System.IO;
|
||||
using NBTExplorer.Model;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
|
@ -27,9 +30,289 @@ namespace NBTExplorer
|
|||
// Shared initialization code
|
||||
void Initialize ()
|
||||
{
|
||||
InitializeIconRegistry();
|
||||
}
|
||||
|
||||
private NBTExplorer.Mac.IconRegistry _iconRegistry;
|
||||
|
||||
private void InitializeIconRegistry ()
|
||||
{
|
||||
_iconRegistry = new NBTExplorer.Mac.IconRegistry();
|
||||
_iconRegistry.DefaultIcon = NSImage.ImageNamed("question-white.png");
|
||||
|
||||
_iconRegistry.Register(typeof(TagByteDataNode), NSImage.ImageNamed("document-attribute-b.png"));
|
||||
_iconRegistry.Register(typeof(TagShortDataNode), NSImage.ImageNamed("document-attribute-s.png"));
|
||||
_iconRegistry.Register(typeof(TagIntDataNode), NSImage.ImageNamed("document-attribute-i.png"));
|
||||
_iconRegistry.Register(typeof(TagLongDataNode), NSImage.ImageNamed("document-attribute-l.png"));
|
||||
_iconRegistry.Register(typeof(TagFloatDataNode), NSImage.ImageNamed("document-attribute-f.png"));
|
||||
_iconRegistry.Register(typeof(TagDoubleDataNode), NSImage.ImageNamed("document-attribute-d.png"));
|
||||
_iconRegistry.Register(typeof(TagByteArrayDataNode), NSImage.ImageNamed("edit-code.png"));
|
||||
_iconRegistry.Register(typeof(TagStringDataNode), NSImage.ImageNamed("edit-small-caps.png"));
|
||||
_iconRegistry.Register(typeof(TagListDataNode), NSImage.ImageNamed("edit-list.png"));
|
||||
_iconRegistry.Register(typeof(TagCompoundDataNode), NSImage.ImageNamed("box.png"));
|
||||
_iconRegistry.Register(typeof(RegionChunkDataNode), NSImage.ImageNamed("wooden-box.png"));
|
||||
_iconRegistry.Register(typeof(DirectoryDataNode), NSImage.ImageNamed("folder-open"));
|
||||
_iconRegistry.Register(typeof(RegionFileDataNode), NSImage.ImageNamed("block.png"));
|
||||
_iconRegistry.Register(typeof(CubicRegionDataNode), NSImage.ImageNamed("block.png"));
|
||||
_iconRegistry.Register(typeof(NbtFileDataNode), NSImage.ImageNamed("wooden-box.png"));
|
||||
_iconRegistry.Register(typeof(TagIntArrayDataNode), NSImage.ImageNamed("edit-code-i.png"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TreeDataSource _dataSource;
|
||||
|
||||
public override void AwakeFromNib ()
|
||||
{
|
||||
base.AwakeFromNib ();
|
||||
|
||||
_dataSource = new TreeDataSource();
|
||||
_mainOutlineView.DataSource = _dataSource;
|
||||
_mainOutlineView.Delegate = new MyDelegate(this);
|
||||
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
if (args.Length > 2) {
|
||||
string[] paths = new string[args.Length - 1];
|
||||
Array.Copy(args, 1, paths, 0, paths.Length);
|
||||
OpenPaths(paths);
|
||||
}
|
||||
else {
|
||||
OpenMinecraftDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
public class MyDelegate : NSOutlineViewDelegate
|
||||
{
|
||||
private MainWindow _main;
|
||||
|
||||
public MyDelegate (MainWindow main)
|
||||
{
|
||||
_main = main;
|
||||
}
|
||||
|
||||
public override void ItemWillExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay);
|
||||
_main.ExpandNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemDidExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemWillCollapse (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
if (node.Data.NodeDisplay == "saves") // The root node
|
||||
Console.WriteLine ("Uh-oh...");
|
||||
Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemDidCollapse (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
_main.CollapseNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override void WillDisplayCell (NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item)
|
||||
{
|
||||
ImageAndTextCell c = cell as ImageAndTextCell;
|
||||
TreeDataNode node = item as TreeDataNode;
|
||||
|
||||
c.Title = node.CombinedName;
|
||||
c.Image = _main._iconRegistry.Lookup(node.Data.GetType());
|
||||
//c.StringValue = node.Name;
|
||||
//throw new System.NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#region Actions
|
||||
|
||||
partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender)
|
||||
{
|
||||
OpenFolder ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private string _openFolderPath = null;
|
||||
|
||||
private void OpenFolder ()
|
||||
{
|
||||
NSOpenPanel opanel = new NSOpenPanel ();
|
||||
opanel.CanChooseDirectories = true;
|
||||
opanel.CanChooseFiles = false;
|
||||
|
||||
if (_openFolderPath != null)
|
||||
opanel.DirectoryUrl = new NSUrl (_openFolderPath, true);
|
||||
|
||||
if (opanel.RunModal () == (int)NSPanelButtonType.Ok) {
|
||||
_openFolderPath = opanel.DirectoryUrl.AbsoluteString;
|
||||
OpenPaths(new string[] { opanel.DirectoryUrl.Path });
|
||||
}
|
||||
|
||||
//UpdateUI();
|
||||
}
|
||||
|
||||
private void OpenMinecraftDirectory ()
|
||||
{
|
||||
try {
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
|
||||
path = Path.Combine(path, "Library", "Application Support");
|
||||
path = Path.Combine(path, "minecraft", "saves");
|
||||
|
||||
if (!Directory.Exists(path)) {
|
||||
path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
|
||||
}
|
||||
|
||||
OpenPaths(new string[] { path });
|
||||
}
|
||||
catch (Exception e) {
|
||||
//NSAlert.WithMessage("Could not open default Minecraft save directory", "OK", null, null, null).RunModal();
|
||||
Console.WriteLine(e.Message);
|
||||
|
||||
try {
|
||||
OpenPaths(new string[] { Directory.GetCurrentDirectory() });
|
||||
}
|
||||
catch (Exception) {
|
||||
//MessageBox.Show("Could not open current directory, this tool is probably not compatible with your platform.");
|
||||
Console.WriteLine(e.Message);
|
||||
NSApplication.SharedApplication.Terminate(this);
|
||||
}
|
||||
}
|
||||
|
||||
//UpdateUI();
|
||||
}
|
||||
|
||||
private void OpenPaths (string[] paths)
|
||||
{
|
||||
_dataSource.Nodes.Clear ();
|
||||
_mainOutlineView.ReloadData ();
|
||||
|
||||
foreach (string path in paths) {
|
||||
if (Directory.Exists (path)) {
|
||||
DirectoryDataNode node = new DirectoryDataNode (path);
|
||||
_dataSource.Nodes.Add (new TreeDataNode (node));
|
||||
|
||||
// AddPathToHistory(Settings.Default.RecentDirectories, path);
|
||||
} else if (File.Exists (path)) {
|
||||
DataNode node = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (_dataSource.Nodes.Count > 0) {
|
||||
_mainOutlineView.ExpandItem(_dataSource.Nodes[0]);
|
||||
}
|
||||
|
||||
_mainOutlineView.ReloadData();
|
||||
|
||||
// UpdateUI();
|
||||
// UpdateOpenMenu();
|
||||
|
||||
/*_nodeTree.Nodes.Clear();
|
||||
|
||||
foreach (string path in paths) {
|
||||
if (Directory.Exists(path)) {
|
||||
DirectoryDataNode node = new DirectoryDataNode(path);
|
||||
_nodeTree.Nodes.Add(CreateUnexpandedNode(node));
|
||||
|
||||
AddPathToHistory(Settings.Default.RecentDirectories, path);
|
||||
}
|
||||
else if (File.Exists(path)) {
|
||||
DataNode node = null;
|
||||
foreach (var item in FileTypeRegistry.RegisteredTypes) {
|
||||
if (item.Value.NamePatternTest(path))
|
||||
node = item.Value.NodeCreate(path);
|
||||
}
|
||||
|
||||
if (node != null) {
|
||||
_nodeTree.Nodes.Add(CreateUnexpandedNode(node));
|
||||
AddPathToHistory(Settings.Default.RecentFiles, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_nodeTree.Nodes.Count > 0) {
|
||||
_nodeTree.Nodes[0].Expand();
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
UpdateOpenMenu();*/
|
||||
}
|
||||
|
||||
private void ExpandNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null || node.IsExpanded)
|
||||
return;
|
||||
|
||||
Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay);
|
||||
|
||||
node.IsExpanded = true;
|
||||
node.Nodes.Clear ();
|
||||
|
||||
DataNode backNode = node.Data;
|
||||
if (!backNode.IsExpanded) {
|
||||
backNode.Expand ();
|
||||
}
|
||||
|
||||
foreach (DataNode child in backNode.Nodes) {
|
||||
if (child != null) {
|
||||
node.Nodes.Add (new TreeDataNode (child));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CollapseNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null || !node.IsExpanded)
|
||||
return;
|
||||
|
||||
/*Console.WriteLine("Collapse Node: " + node.Data.NodeDisplay);
|
||||
|
||||
DataNode backNode = node.Data;
|
||||
if (backNode.IsModified)
|
||||
return;
|
||||
|
||||
backNode.Collapse();
|
||||
|
||||
node.IsExpanded = false;
|
||||
node.Nodes.Clear();*/
|
||||
}
|
||||
|
||||
public void ActionEditValue ()
|
||||
{
|
||||
TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode;
|
||||
if (node != null)
|
||||
EditNode(node);
|
||||
}
|
||||
|
||||
private void EditNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
if (!node.Data.CanEditNode)
|
||||
return;
|
||||
|
||||
//NBTExplorer.Mac.EditValue form = new NBTExplorer.Mac.EditValue(node.Data);
|
||||
|
||||
|
||||
//if (node.Data.EditNode()) {
|
||||
//node.Text = dataNode.NodeDisplay;
|
||||
//UpdateUI(dataNode);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
73
NBTExplorerMac/Mac/MainWindow.designer.cs
generated
73
NBTExplorerMac/Mac/MainWindow.designer.cs
generated
|
@ -1,17 +1,72 @@
|
|||
// 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
|
||||
{
|
||||
|
||||
// Should subclass MonoMac.AppKit.NSWindow
|
||||
[MonoMac.Foundation.Register("MainWindow")]
|
||||
public partial class MainWindow
|
||||
[Register ("MainWindow")]
|
||||
partial class MainWindow
|
||||
{
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSToolbar _toolbar { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSToolbarItem _toolbarOpenFolder { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSToolbarItem _toolbarSave { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSScrollView _mainScrollView { get; set; }
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; }
|
||||
|
||||
[Action ("ActionOpenFolder:")]
|
||||
partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
[Action ("ActionSave:")]
|
||||
partial void ActionSave (MonoMac.Foundation.NSObject sender);
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
if (_toolbar != null) {
|
||||
_toolbar.Dispose ();
|
||||
_toolbar = null;
|
||||
}
|
||||
|
||||
if (_toolbarOpenFolder != null) {
|
||||
_toolbarOpenFolder.Dispose ();
|
||||
_toolbarOpenFolder = null;
|
||||
}
|
||||
|
||||
if (_toolbarSave != null) {
|
||||
_toolbarSave.Dispose ();
|
||||
_toolbarSave = null;
|
||||
}
|
||||
|
||||
if (_mainScrollView != null) {
|
||||
_mainScrollView.Dispose ();
|
||||
_mainScrollView = null;
|
||||
}
|
||||
|
||||
if (_mainOutlineView != null) {
|
||||
_mainOutlineView.Dispose ();
|
||||
_mainOutlineView = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Should subclass MonoMac.AppKit.NSWindowController
|
||||
[MonoMac.Foundation.Register("MainWindowController")]
|
||||
public partial class MainWindowController
|
||||
|
||||
[Register ("MainWindowController")]
|
||||
partial class MainWindowController
|
||||
{
|
||||
|
||||
void ReleaseDesignerOutlets ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,31 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1060</int>
|
||||
<string key="IBDocument.SystemVersion">10D573</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">762</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||
<string key="IBDocument.HIToolboxVersion">460.00</string>
|
||||
<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">762</string>
|
||||
<string key="NS.object.0">2844</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="2" />
|
||||
<string>IBCustomCell</string>
|
||||
<string>NSCustomObject</string>
|
||||
<string>NSOutlineView</string>
|
||||
<string>NSScrollView</string>
|
||||
<string>NSScroller</string>
|
||||
<string>NSTableColumn</string>
|
||||
<string>NSToolbar</string>
|
||||
<string>NSToolbarFlexibleSpaceItem</string>
|
||||
<string>NSToolbarItem</string>
|
||||
<string>NSToolbarSpaceItem</string>
|
||||
<string>NSUserDefaultsController</string>
|
||||
<string>NSView</string>
|
||||
<string>NSWindowTemplate</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<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>
|
||||
|
@ -41,20 +48,330 @@
|
|||
<object class="NSWindowTemplate" id="748157544">
|
||||
<int key="NSWindowStyleMask">15</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{131, 74}, {606, 354}}</string>
|
||||
<string key="NSWindowRect">{{131, 74}, {776, 558}}</string>
|
||||
<int key="NSWTFlags">611844096</int>
|
||||
<string key="NSWindowTitle">Window</string>
|
||||
<string key="NSWindowTitle">NBTExplorer</string>
|
||||
<string key="NSWindowClass">MainWindow</string>
|
||||
<nil key="NSViewClass" />
|
||||
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
<object class="NSView" key="NSWindowView" id="312036702">
|
||||
<reference key="NSNextResponder" />
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{606, 354}</string>
|
||||
<reference key="NSSuperview" />
|
||||
<object class="NSToolbar" key="NSViewClass" id="919098349">
|
||||
<object class="NSMutableString" key="NSToolbarIdentifier">
|
||||
<characters key="NS.bytes">A9746BAB-CAB3-4A72-9A03-237662FA7440</characters>
|
||||
</object>
|
||||
<nil key="NSToolbarDelegate"/>
|
||||
<bool key="NSToolbarPrefersToBeShown">YES</bool>
|
||||
<bool key="NSToolbarShowsBaselineSeparator">YES</bool>
|
||||
<bool key="NSToolbarAllowsUserCustomization">YES</bool>
|
||||
<bool key="NSToolbarAutosavesConfiguration">YES</bool>
|
||||
<int key="NSToolbarDisplayMode">1</int>
|
||||
<int key="NSToolbarSizeMode">2</int>
|
||||
<object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>0156226B-2E18-4406-BBE6-7C88F62B4E27</string>
|
||||
<string>B62CA8DD-7D49-4BF3-B4AB-417078852D8B</string>
|
||||
<string>NSToolbarFlexibleSpaceItem</string>
|
||||
<string>NSToolbarSpaceItem</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSToolbarItem" id="994350550">
|
||||
<object class="NSMutableString" key="NSToolbarItemIdentifier">
|
||||
<characters key="NS.bytes">0156226B-2E18-4406-BBE6-7C88F62B4E27</characters>
|
||||
</object>
|
||||
<string key="NSToolbarItemLabel">Open</string>
|
||||
<string key="NSToolbarItemPaletteLabel">Open</string>
|
||||
<string key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<object class="NSCustomResource" key="NSToolbarItemImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">folder-open-24</string>
|
||||
</object>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{0, 0}</string>
|
||||
<string key="NSToolbarItemMaxSize">{0, 0}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
</object>
|
||||
<object class="NSToolbarItem" id="386220062">
|
||||
<object class="NSMutableString" key="NSToolbarItemIdentifier">
|
||||
<characters key="NS.bytes">B62CA8DD-7D49-4BF3-B4AB-417078852D8B</characters>
|
||||
</object>
|
||||
<string key="NSToolbarItemLabel">Save</string>
|
||||
<string key="NSToolbarItemPaletteLabel">Save</string>
|
||||
<string key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<object class="NSCustomResource" key="NSToolbarItemImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">disk-24</string>
|
||||
</object>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{0, 0}</string>
|
||||
<string key="NSToolbarItemMaxSize">{0, 0}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
</object>
|
||||
<object class="NSToolbarFlexibleSpaceItem" id="767736573">
|
||||
<string key="NSToolbarItemIdentifier">NSToolbarFlexibleSpaceItem</string>
|
||||
<string key="NSToolbarItemLabel"/>
|
||||
<string key="NSToolbarItemPaletteLabel">Flexible Space</string>
|
||||
<nil key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<nil key="NSToolbarItemImage"/>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{1, 5}</string>
|
||||
<string key="NSToolbarItemMaxSize">{20000, 32}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
<object class="NSMenuItem" key="NSToolbarItemMenuFormRepresentation">
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<object class="NSCustomResource" key="NSOnImage" id="295458021">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuCheckmark</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="NSMixedImage" id="707498796">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">NSMenuMixedState</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSToolbarSpaceItem" id="367445820">
|
||||
<string key="NSToolbarItemIdentifier">NSToolbarSpaceItem</string>
|
||||
<string key="NSToolbarItemLabel"/>
|
||||
<string key="NSToolbarItemPaletteLabel">Space</string>
|
||||
<nil key="NSToolbarItemToolTip"/>
|
||||
<nil key="NSToolbarItemView"/>
|
||||
<nil key="NSToolbarItemImage"/>
|
||||
<nil key="NSToolbarItemTarget"/>
|
||||
<nil key="NSToolbarItemAction"/>
|
||||
<string key="NSToolbarItemMinSize">{32, 5}</string>
|
||||
<string key="NSToolbarItemMaxSize">{32, 32}</string>
|
||||
<bool key="NSToolbarItemEnabled">YES</bool>
|
||||
<bool key="NSToolbarItemAutovalidates">YES</bool>
|
||||
<int key="NSToolbarItemTag">-1</int>
|
||||
<bool key="NSToolbarIsUserRemovable">YES</bool>
|
||||
<int key="NSToolbarItemVisibilityPriority">0</int>
|
||||
<object class="NSMenuItem" key="NSToolbarItemMenuFormRepresentation">
|
||||
<bool key="NSIsDisabled">YES</bool>
|
||||
<bool key="NSIsSeparator">YES</bool>
|
||||
<string key="NSTitle"/>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
<reference key="NSOnImage" ref="295458021"/>
|
||||
<reference key="NSMixedImage" ref="707498796"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSArray" key="NSToolbarIBAllowedItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="367445820"/>
|
||||
<reference ref="767736573"/>
|
||||
<reference ref="994350550"/>
|
||||
<reference ref="386220062"/>
|
||||
</object>
|
||||
<object class="NSArray" key="NSToolbarIBDefaultItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="994350550"/>
|
||||
<reference ref="386220062"/>
|
||||
<reference ref="767736573"/>
|
||||
</object>
|
||||
<object class="NSArray" key="NSToolbarIBSelectableItems" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
|
||||
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||
<object class="NSView" key="NSWindowView" id="312036702">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSScrollView" id="595155248">
|
||||
<reference key="NSNextResponder" ref="312036702"/>
|
||||
<int key="NSvFlags">286</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSClipView" id="704700639">
|
||||
<reference key="NSNextResponder" ref="595155248"/>
|
||||
<int key="NSvFlags">2304</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSOutlineView" id="26648463">
|
||||
<reference key="NSNextResponder" ref="704700639"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<string key="NSFrameSize">{776, 558}</string>
|
||||
<reference key="NSSuperview" ref="704700639"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="720194609"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:13</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<bool key="NSControlAllowsExpansionToolTips">YES</bool>
|
||||
<object class="_NSCornerView" key="NSCornerView">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{224, 0}, {16, 17}}</string>
|
||||
<reference key="NSNextKeyView" ref="704700639"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:18</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="NSTableColumns">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTableColumn" id="728960727">
|
||||
<double key="NSWidth">773</double>
|
||||
<double key="NSMinWidth">16</double>
|
||||
<double key="NSMaxWidth">1000</double>
|
||||
<object class="NSTableHeaderCell" key="NSHeaderCell">
|
||||
<int key="NSCellFlags">75497536</int>
|
||||
<int key="NSCellFlags2">2048</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">11</double>
|
||||
<int key="NSfFlags">3100</int>
|
||||
</object>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">headerTextColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBCustomCell" key="NSDataCell" id="925144048">
|
||||
<int key="NSCellFlags">0</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<reference key="NSControlView" ref="26648463"/>
|
||||
</object>
|
||||
<int key="NSResizingMask">3</int>
|
||||
<bool key="NSIsResizeable">YES</bool>
|
||||
<bool key="NSIsEditable">YES</bool>
|
||||
<reference key="NSTableView" ref="26648463"/>
|
||||
</object>
|
||||
</object>
|
||||
<double key="NSIntercellSpacingWidth">3</double>
|
||||
<double key="NSIntercellSpacingHeight">2</double>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="NSGridColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">gridColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<double key="NSRowHeight">17</double>
|
||||
<int key="NSTvFlags">306184192</int>
|
||||
<reference key="NSDelegate"/>
|
||||
<reference key="NSDataSource"/>
|
||||
<int key="NSColumnAutoresizingStyle">0</int>
|
||||
<int key="NSDraggingSourceMaskForLocal">15</int>
|
||||
<int key="NSDraggingSourceMaskForNonLocal">0</int>
|
||||
<bool key="NSAllowsTypeSelect">YES</bool>
|
||||
<int key="NSTableViewDraggingDestinationStyle">0</int>
|
||||
<int key="NSTableViewGroupRowStyle">1</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{1, 1}, {776, 558}}</string>
|
||||
<reference key="NSSuperview" ref="595155248"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="26648463"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:11</string>
|
||||
<reference key="NSDocView" ref="26648463"/>
|
||||
<object class="NSColor" key="NSBGColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlBackgroundColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<int key="NScvFlags">4</int>
|
||||
</object>
|
||||
<object class="NSScroller" id="720194609">
|
||||
<reference key="NSNextResponder" ref="595155248"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
|
||||
<reference key="NSSuperview" ref="595155248"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="927451524"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:58</string>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<reference key="NSTarget" ref="595155248"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.99821109123434704</double>
|
||||
</object>
|
||||
<object class="NSScroller" id="927451524">
|
||||
<reference key="NSNextResponder" ref="595155248"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{1, 544}, {776, 15}}</string>
|
||||
<reference key="NSSuperview" ref="595155248"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:60</string>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSsFlags">1</int>
|
||||
<reference key="NSTarget" ref="595155248"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.99871299871299868</double>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{-1, -1}, {778, 560}}</string>
|
||||
<reference key="NSSuperview" ref="312036702"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="704700639"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<int key="NSsFlags">133682</int>
|
||||
<reference key="NSVScroller" ref="720194609"/>
|
||||
<reference key="NSHScroller" ref="927451524"/>
|
||||
<reference key="NSContentView" ref="704700639"/>
|
||||
<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
|
||||
<double key="NSMinMagnification">0.25</double>
|
||||
<double key="NSMaxMagnification">4</double>
|
||||
<double key="NSMagnification">1</double>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{776, 558}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="595155248"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1600, 1178}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSUserDefaultsController" id="28353509">
|
||||
<bool key="NSSharedInstance">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
|
@ -63,52 +380,194 @@
|
|||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">window</string>
|
||||
<reference key="source" ref="1001" />
|
||||
<reference key="destination" ref="748157544" />
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="748157544"/>
|
||||
</object>
|
||||
<int key="connectionID">6</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_mainScrollView</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="595155248"/>
|
||||
</object>
|
||||
<int key="connectionID">36</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_mainOutlineView</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="26648463"/>
|
||||
</object>
|
||||
<int key="connectionID">37</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_toolbar</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="919098349"/>
|
||||
</object>
|
||||
<int key="connectionID">38</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_toolbarOpenFolder</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="994350550"/>
|
||||
</object>
|
||||
<int key="connectionID">39</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">_toolbarSave</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="386220062"/>
|
||||
</object>
|
||||
<int key="connectionID">40</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionOpenFolder:</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="994350550"/>
|
||||
</object>
|
||||
<int key="connectionID">41</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">ActionSave:</string>
|
||||
<reference key="source" ref="748157544"/>
|
||||
<reference key="destination" ref="386220062"/>
|
||||
</object>
|
||||
<int key="connectionID">42</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0" />
|
||||
<reference key="children" ref="1000" />
|
||||
<nil key="parent" />
|
||||
<reference key="object" ref="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1001" />
|
||||
<reference key="parent" ref="0" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<reference key="object" ref="748157544"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="312036702" />
|
||||
<reference ref="312036702"/>
|
||||
<reference ref="919098349"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0" />
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="312036702" />
|
||||
<reference key="parent" ref="748157544" />
|
||||
<reference key="object" ref="312036702"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="595155248"/>
|
||||
</object>
|
||||
<reference key="parent" ref="748157544"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">14</int>
|
||||
<reference key="object" ref="919098349"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="367445820"/>
|
||||
<reference ref="767736573"/>
|
||||
<reference ref="994350550"/>
|
||||
<reference ref="386220062"/>
|
||||
</object>
|
||||
<reference key="parent" ref="748157544"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">15</int>
|
||||
<reference key="object" ref="367445820"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">18</int>
|
||||
<reference key="object" ref="767736573"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">20</int>
|
||||
<reference key="object" ref="994350550"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">21</int>
|
||||
<reference key="object" ref="386220062"/>
|
||||
<reference key="parent" ref="919098349"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">22</int>
|
||||
<reference key="object" ref="595155248"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="26648463"/>
|
||||
<reference ref="927451524"/>
|
||||
<reference ref="720194609"/>
|
||||
</object>
|
||||
<reference key="parent" ref="312036702"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">23</int>
|
||||
<reference key="object" ref="26648463"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="728960727"/>
|
||||
</object>
|
||||
<reference key="parent" ref="595155248"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">24</int>
|
||||
<reference key="object" ref="927451524"/>
|
||||
<reference key="parent" ref="595155248"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">26</int>
|
||||
<reference key="object" ref="720194609"/>
|
||||
<reference key="parent" ref="595155248"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">27</int>
|
||||
<reference key="object" ref="728960727"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="925144048"/>
|
||||
</object>
|
||||
<reference key="parent" ref="26648463"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">44</int>
|
||||
<reference key="object" ref="28353509"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">71</int>
|
||||
<reference key="object" ref="925144048"/>
|
||||
<reference key="parent" ref="728960727"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -119,59 +578,176 @@
|
|||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>2.IBEditorWindowLastContentRect</string>
|
||||
<string>14.IBPluginDependency</string>
|
||||
<string>15.IBPluginDependency</string>
|
||||
<string>18.IBPluginDependency</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>2.IBWindowTemplateEditedContentRect</string>
|
||||
<string>2.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>20.IBPluginDependency</string>
|
||||
<string>20.designableToolbarItemIdentifier</string>
|
||||
<string>21.IBPluginDependency</string>
|
||||
<string>21.designableToolbarItemIdentifier</string>
|
||||
<string>22.IBPluginDependency</string>
|
||||
<string>23.IBPluginDependency</string>
|
||||
<string>24.IBPluginDependency</string>
|
||||
<string>26.IBPluginDependency</string>
|
||||
<string>27.IBPluginDependency</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
<string>44.IBPluginDependency</string>
|
||||
<string>71.CustomClassName</string>
|
||||
<string>71.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<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>{{319, 371}, {606, 354}}</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" />
|
||||
<boolean value="YES"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>ToolbarOpen</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>ToolbarSave</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>ImageAndTextCell</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0" />
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization" />
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0" />
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID" />
|
||||
<int key="maxID">6</int>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">71</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ImageAndTextCell</string>
|
||||
<string key="superclassName">NSTextFieldCell</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ImageAndTextCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MainWindow</string>
|
||||
<string key="superclassName">NSWindow</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionOpenFolder:</string>
|
||||
<string>ActionSave:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ActionOpenFolder:</string>
|
||||
<string>ActionSave:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionOpenFolder:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">ActionSave:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>_mainOutlineView</string>
|
||||
<string>_mainScrollView</string>
|
||||
<string>_toolbar</string>
|
||||
<string>_toolbarOpenFolder</string>
|
||||
<string>_toolbarSave</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSOutlineView</string>
|
||||
<string>NSScrollView</string>
|
||||
<string>NSToolbar</string>
|
||||
<string>NSToolbarItem</string>
|
||||
<string>NSToolbarItem</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>_mainOutlineView</string>
|
||||
<string>_mainScrollView</string>
|
||||
<string>_toolbar</string>
|
||||
<string>_toolbarOpenFolder</string>
|
||||
<string>_toolbarSave</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_mainOutlineView</string>
|
||||
<string key="candidateClassName">NSOutlineView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_mainScrollView</string>
|
||||
<string key="candidateClassName">NSScrollView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_toolbar</string>
|
||||
<string key="candidateClassName">NSToolbar</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_toolbarOpenFolder</string>
|
||||
<string key="candidateClassName">NSToolbarItem</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">_toolbarSave</string>
|
||||
<string key="candidateClassName">NSToolbarItem</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey" />
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MainWindow.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MainWindowController</string>
|
||||
<string key="superclassName">NSWindowController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey" />
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MainWindowController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -180,10 +756,33 @@
|
|||
<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" />
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<nil key="IBDocument.LastKnownRelativeProjectPath" />
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSMenuCheckmark</string>
|
||||
<string>NSMenuMixedState</string>
|
||||
<string>disk-24</string>
|
||||
<string>folder-open-24</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>{11, 11}</string>
|
||||
<string>{10, 3}</string>
|
||||
<string>{24, 24}</string>
|
||||
<string>{24, 24}</string>
|
||||
</object>
|
||||
</object>
|
||||
</data>
|
||||
<classes>
|
||||
<class name="IBCustomCell">
|
||||
<fallbacks>
|
||||
<name>NSCell</name>
|
||||
</fallbacks>
|
||||
</class>
|
||||
</classes>
|
||||
</archive>
|
||||
|
|
|
@ -1,11 +1,176 @@
|
|||
using System;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
namespace NBTExplorer.Mac.Test
|
||||
{
|
||||
public class Scratch
|
||||
public partial class MainWindow : MonoMac.AppKit.NSWindow
|
||||
{
|
||||
public Scratch ()
|
||||
// ...
|
||||
|
||||
[Outlet]
|
||||
MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; }
|
||||
|
||||
private TreeDataSource _dataSource;
|
||||
|
||||
public override void AwakeFromNib ()
|
||||
{
|
||||
base.AwakeFromNib ();
|
||||
|
||||
_dataSource = new TreeDataSource();
|
||||
_mainOutlineView.DataSource = _dataSource;
|
||||
_mainOutlineView.Delegate = new MyDelegate(this);
|
||||
}
|
||||
|
||||
public class MyDelegate : NSOutlineViewDelegate
|
||||
{
|
||||
private MainWindow _main;
|
||||
|
||||
public MyDelegate (MainWindow main)
|
||||
{
|
||||
_main = main;
|
||||
}
|
||||
|
||||
public override void ItemWillExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay);
|
||||
_main.ExpandNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemDidExpand (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ItemWillCollapse (NSNotification notification)
|
||||
{
|
||||
TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode;
|
||||
if (node != null) {
|
||||
if (node.Data.NodeDisplay == "saves") // The root node
|
||||
Console.WriteLine ("Uh-oh...");
|
||||
Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
private void ExpandNode (TreeDataNode node)
|
||||
{
|
||||
if (node == null || node.IsExpanded)
|
||||
return;
|
||||
|
||||
Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay);
|
||||
|
||||
node.IsExpanded = true;
|
||||
node.Nodes.Clear ();
|
||||
|
||||
DataNode backNode = node.Data;
|
||||
if (!backNode.IsExpanded) {
|
||||
backNode.Expand ();
|
||||
}
|
||||
|
||||
foreach (DataNode child in backNode.Nodes) {
|
||||
if (child != null) {
|
||||
node.Nodes.Add (new TreeDataNode (child));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TreeDataSource : NSOutlineViewDataSource
|
||||
{
|
||||
private List<TreeDataNode> _nodes;
|
||||
|
||||
public TreeDataSource ()
|
||||
{
|
||||
_nodes = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _nodes; }
|
||||
}
|
||||
|
||||
public override int GetChildrenCount (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
if (item is TreeDataNode) {
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
return nodeItem.Nodes.Count;
|
||||
}
|
||||
|
||||
return _nodes.Count;
|
||||
}
|
||||
|
||||
public override NSObject GetObjectValue (NSOutlineView outlineView, NSTableColumn forTableColumn, NSObject byItem)
|
||||
{
|
||||
TreeDataNode nodeItem = byItem as TreeDataNode;
|
||||
if (nodeItem == null)
|
||||
return null;
|
||||
|
||||
return (NSString)nodeItem.CombinedName;
|
||||
}
|
||||
|
||||
public override NSObject GetChild (NSOutlineView outlineView, int childIndex, NSObject ofItem)
|
||||
{
|
||||
TreeDataNode nodeItem = ofItem as TreeDataNode;
|
||||
if (nodeItem != null) {
|
||||
return nodeItem.Nodes [childIndex];
|
||||
}
|
||||
|
||||
return Nodes[childIndex];
|
||||
}
|
||||
|
||||
public override bool ItemExpandable (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
if (nodeItem != null)
|
||||
return nodeItem.HasChildren;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class TreeDataNode : NSObject
|
||||
{
|
||||
private DataNode _dataNode;
|
||||
private List<TreeDataNode> _children;
|
||||
private bool _expanded;
|
||||
|
||||
public TreeDataNode (DataNode node)
|
||||
{
|
||||
_dataNode = node;
|
||||
_children = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public DataNode Data
|
||||
{
|
||||
get { return _dataNode; }
|
||||
}
|
||||
|
||||
public string CombinedName
|
||||
{
|
||||
get { return _dataNode.NodeDisplay; }
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get { return _expanded; }
|
||||
set { _expanded = value; }
|
||||
}
|
||||
|
||||
public bool HasChildren
|
||||
{
|
||||
get { return _children.Count > 0 || _dataNode.HasUnexpandedChildren; }
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _children; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,52 @@
|
|||
using System;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using NBTExplorer.Model;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NBTExplorer
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public class TreeDataNode
|
||||
public class TreeDataNode : NSObject
|
||||
{
|
||||
public TreeDataNode ()
|
||||
private DataNode _dataNode;
|
||||
private List<TreeDataNode> _children;
|
||||
private bool _expanded;
|
||||
|
||||
public TreeDataNode (DataNode node)
|
||||
{
|
||||
_dataNode = node;
|
||||
_children = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public DataNode Data
|
||||
{
|
||||
get { return _dataNode; }
|
||||
}
|
||||
|
||||
public string CombinedName
|
||||
{
|
||||
get { return _dataNode.NodeDisplay; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return _dataNode.NodeName; }
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get { return _expanded; }
|
||||
set { _expanded = value; }
|
||||
}
|
||||
|
||||
public bool HasChildren
|
||||
{
|
||||
get { return _children.Count > 0 || _dataNode.HasUnexpandedChildren; }
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _children; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,60 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.Foundation;
|
||||
|
||||
namespace NBTExplorer.Mac
|
||||
{
|
||||
public class TreeDataSource
|
||||
public class TreeDataSource : NSOutlineViewDataSource
|
||||
{
|
||||
private List<TreeDataNode> _nodes;
|
||||
|
||||
public TreeDataSource ()
|
||||
{
|
||||
_nodes = new List<TreeDataNode>();
|
||||
}
|
||||
|
||||
public List<TreeDataNode> Nodes
|
||||
{
|
||||
get { return _nodes; }
|
||||
}
|
||||
|
||||
public override int GetChildrenCount (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
if (item is TreeDataNode) {
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
return nodeItem.Nodes.Count;
|
||||
}
|
||||
|
||||
return _nodes.Count;
|
||||
}
|
||||
|
||||
public override NSObject GetObjectValue (NSOutlineView outlineView, NSTableColumn forTableColumn, NSObject byItem)
|
||||
{
|
||||
TreeDataNode nodeItem = byItem as TreeDataNode;
|
||||
if (nodeItem == null)
|
||||
return null;
|
||||
|
||||
return (NSString)nodeItem.CombinedName;
|
||||
}
|
||||
|
||||
public override NSObject GetChild (NSOutlineView outlineView, int childIndex, NSObject ofItem)
|
||||
{
|
||||
TreeDataNode nodeItem = ofItem as TreeDataNode;
|
||||
if (nodeItem != null) {
|
||||
return nodeItem.Nodes [childIndex];
|
||||
}
|
||||
|
||||
return Nodes[childIndex];
|
||||
}
|
||||
|
||||
public override bool ItemExpandable (NSOutlineView outlineView, NSObject item)
|
||||
{
|
||||
TreeDataNode nodeItem = item as TreeDataNode;
|
||||
if (nodeItem != null)
|
||||
return nodeItem.HasChildren;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace NBTExplorer
|
|||
_tagIconIndex[TagType.TAG_INT_ARRAY] = 14;
|
||||
}
|
||||
catch (Exception e) {
|
||||
Program.StaticInitFailure(e);
|
||||
//Program.StaticInitFailure(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace NBTExplorer.Model
|
|||
});
|
||||
}
|
||||
catch (Exception e) {
|
||||
Program.StaticInitFailure(e);
|
||||
//Program.StaticInitFailure(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<ProjectGuid>{01F9A296-C477-4CBF-A0D0-41E697048257}</ProjectGuid>
|
||||
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>NBTExplorerMac</RootNamespace>
|
||||
<RootNamespace>NBTExplorer</RootNamespace>
|
||||
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
|
||||
<AssemblyName>NBTExplorerMac</AssemblyName>
|
||||
<AssemblyName>NBTExplorer</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
|
@ -26,6 +26,7 @@
|
|||
<EnableCodeSigning>False</EnableCodeSigning>
|
||||
<CreatePackage>False</CreatePackage>
|
||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
||||
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
|
@ -34,12 +35,13 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnablePackageSigning>False</EnablePackageSigning>
|
||||
<IncludeMonoRuntime>False</IncludeMonoRuntime>
|
||||
<IncludeMonoRuntime>True</IncludeMonoRuntime>
|
||||
<LinkMode>Full</LinkMode>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<EnableCodeSigning>False</EnableCodeSigning>
|
||||
<CreatePackage>False</CreatePackage>
|
||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
||||
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
|
@ -62,11 +64,203 @@
|
|||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="MonoMac" />
|
||||
<Reference Include="Substrate">
|
||||
<HintPath>..\..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
<None Include="app.config" />
|
||||
<None Include="forms\About.resources" />
|
||||
<None Include="forms\About.resx" />
|
||||
<None Include="forms\CancelSearchForm.resources" />
|
||||
<None Include="forms\CancelSearchForm.resx" />
|
||||
<None Include="forms\CreateNode.resources" />
|
||||
<None Include="forms\CreateNode.resx" />
|
||||
<None Include="forms\EditHex.resources" />
|
||||
<None Include="forms\EditHex.resx" />
|
||||
<None Include="forms\EditName.resources" />
|
||||
<None Include="forms\EditName.resx" />
|
||||
<None Include="forms\EditString.resources" />
|
||||
<None Include="forms\EditString.resx" />
|
||||
<None Include="forms\EditValue.resources" />
|
||||
<None Include="forms\EditValue.resx" />
|
||||
<None Include="forms\Find.resources" />
|
||||
<None Include="forms\Find.resx" />
|
||||
<None Include="Properties\Resources.resources" />
|
||||
<None Include="Properties\Resources.resx" />
|
||||
<None Include="Properties\Settings.settings" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\HexBox.bmp" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\HexBox.resources" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\HexBox.resx" />
|
||||
<None Include="Vendor\Be.Windows.Forms.HexBox\Properties\Resources.resx" />
|
||||
<None Include="LICENSE.txt" />
|
||||
<None Include="MainForm.resources" />
|
||||
<None Include="MainForm.resx" />
|
||||
<None Include="dead_bush.ico" />
|
||||
<None Include="dead_bush.icns" />
|
||||
<None Include="Mac\Scratch.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Model\" />
|
||||
<Folder Include="forms\" />
|
||||
<Folder Include="Properties\" />
|
||||
<Folder Include="Resources\" />
|
||||
<Folder Include="Vendor\" />
|
||||
<Folder Include="Mac\" />
|
||||
<Folder Include="Resources\24\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\CompoundTagContainer.cs" />
|
||||
<Compile Include="Model\CubicRegionDataNode.cs" />
|
||||
<Compile Include="Model\CubicRegionFile.cs" />
|
||||
<Compile Include="Model\DataNode.cs" />
|
||||
<Compile Include="Model\DataNodeCollection.cs" />
|
||||
<Compile Include="Model\DirectoryDataNode.cs" />
|
||||
<Compile Include="Model\FileTypeRegistry.cs" />
|
||||
<Compile Include="Model\ListTagContainer.cs" />
|
||||
<Compile Include="Model\NbtFileDataNode.cs" />
|
||||
<Compile Include="Model\NodeCapabilities.cs" />
|
||||
<Compile Include="Model\RegionChunkDataNode.cs" />
|
||||
<Compile Include="Model\RegionFileDataNode.cs" />
|
||||
<Compile Include="Model\TagByteArrayDataNode.cs" />
|
||||
<Compile Include="Model\TagByteDataNode.cs" />
|
||||
<Compile Include="Model\TagCompoundDataNode.cs" />
|
||||
<Compile Include="Model\TagContainerInterface.cs" />
|
||||
<Compile Include="Model\TagDataNode.cs" />
|
||||
<Compile Include="Model\TagDoubleDataNode.cs" />
|
||||
<Compile Include="Model\TagFloatDataNode.cs" />
|
||||
<Compile Include="Model\TagIntArrayDataNode.cs" />
|
||||
<Compile Include="Model\TagIntDataNode.cs" />
|
||||
<Compile Include="Model\TagListDataNode.cs" />
|
||||
<Compile Include="Model\TagLongDataNode.cs" />
|
||||
<Compile Include="Model\TagShortDataNode.cs" />
|
||||
<Compile Include="Model\TagStringDataNode.cs" />
|
||||
<Compile Include="forms\About.Designer.cs" />
|
||||
<Compile Include="forms\About.cs" />
|
||||
<Compile Include="forms\CancelSearchForm.Designer.cs" />
|
||||
<Compile Include="forms\CancelSearchForm.cs" />
|
||||
<Compile Include="forms\CreateNode.Designer.cs" />
|
||||
<Compile Include="forms\CreateNode.cs" />
|
||||
<Compile Include="forms\EditHex.Designer.cs" />
|
||||
<Compile Include="forms\EditHex.cs" />
|
||||
<Compile Include="forms\EditName.Designer.cs" />
|
||||
<Compile Include="forms\EditName.cs" />
|
||||
<Compile Include="forms\EditString.Designer.cs" />
|
||||
<Compile Include="forms\EditString.cs" />
|
||||
<Compile Include="forms\EditValue.Designer.cs" />
|
||||
<Compile Include="forms\EditValue.cs" />
|
||||
<Compile Include="forms\Find.Designer.cs" />
|
||||
<Compile Include="forms\Find.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\BuiltInContextMenu.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\ByteCharConverters.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\ByteCollection.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\BytePositionInfo.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DataBlock.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DataMap.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DynamicByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\DynamicFileByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\FileByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\FileDataBlock.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\HexBox.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\HexCasing.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\IByteProvider.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\MemoryDataBlock.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\NativeMethods.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\Util.cs" />
|
||||
<Compile Include="Vendor\Be.Windows.Forms.HexBox\Properties\Resources.Designer.cs" />
|
||||
<Compile Include="DataNode.cs" />
|
||||
<Compile Include="IconRegistry.cs" />
|
||||
<Compile Include="MainForm.Designer.cs" />
|
||||
<Compile Include="MainForm.cs" />
|
||||
<Compile Include="NbtClipboardData.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="SearchWorker.cs" />
|
||||
<Compile Include="TagKey.cs" />
|
||||
<Compile Include="Mac\MainWindow.cs" />
|
||||
<Compile Include="Mac\MainWindowController.cs" />
|
||||
<Compile Include="Mac\MainWindow.designer.cs">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Mac\AppDelegate.cs" />
|
||||
<Compile Include="Mac\AppDelegate.designer.cs">
|
||||
<DependentUpon>AppDelegate.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Mac\TreeDataNode.cs" />
|
||||
<Compile Include="Mac\TreeDataSource.cs" />
|
||||
<Compile Include="Mac\ImageAndTextCell.cs" />
|
||||
<Compile Include="Mac\IconRegistry.cs" />
|
||||
<Compile Include="Mac\EditValue.cs" />
|
||||
<Compile Include="Mac\EditValue.designer.cs">
|
||||
<DependentUpon>EditValue.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="Resources\Dead_Bush.png" />
|
||||
<BundleResource Include="Resources\arrow-090.png" />
|
||||
<BundleResource Include="Resources\arrow-270.png" />
|
||||
<BundleResource Include="Resources\binocular--arrow.png" />
|
||||
<BundleResource Include="Resources\binocular.png" />
|
||||
<BundleResource Include="Resources\clipboard-paste.png" />
|
||||
<BundleResource Include="Resources\cross.png" />
|
||||
<BundleResource Include="Resources\disk--pencil.png" />
|
||||
<BundleResource Include="Resources\disk.png" />
|
||||
<BundleResource Include="Resources\document-attribute-b.png" />
|
||||
<BundleResource Include="Resources\document-attribute-i.png" />
|
||||
<BundleResource Include="Resources\document-copy.png" />
|
||||
<BundleResource Include="Resources\door.png" />
|
||||
<BundleResource Include="Resources\edit-code-b.png" />
|
||||
<BundleResource Include="Resources\edit-code-i.png" />
|
||||
<BundleResource Include="Resources\edit-code.png" />
|
||||
<BundleResource Include="Resources\folder-open-document.png" />
|
||||
<BundleResource Include="Resources\folder-open.png" />
|
||||
<BundleResource Include="Resources\information-frame.png" />
|
||||
<BundleResource Include="Resources\pencil.png" />
|
||||
<BundleResource Include="Resources\question-frame.png" />
|
||||
<BundleResource Include="Resources\question-white.png" />
|
||||
<BundleResource Include="Resources\scissors.png" />
|
||||
<BundleResource Include="Resources\selection-input.png" />
|
||||
<BundleResource Include="Resources\24\cross.png" />
|
||||
<BundleResource Include="Resources\24\document-b.png" />
|
||||
<BundleResource Include="Resources\24\document-d.png" />
|
||||
<BundleResource Include="Resources\24\document-f.png" />
|
||||
<BundleResource Include="Resources\24\document-i.png" />
|
||||
<BundleResource Include="Resources\24\document-l.png" />
|
||||
<BundleResource Include="Resources\24\document-s.png" />
|
||||
<BundleResource Include="Resources\24\document.png" />
|
||||
<BundleResource Include="Resources\24\edit-code-i.png" />
|
||||
<BundleResource Include="Resources\24\edit-code.png" />
|
||||
<BundleResource Include="Resources\24\edit-list.png" />
|
||||
<BundleResource Include="Resources\24\edit-smallcaps.png" />
|
||||
<BundleResource Include="Resources\24\pencil.png" />
|
||||
<BundleResource Include="Resources\24\scissors.png" />
|
||||
<BundleResource Include="Resources\24\selection-input.png" />
|
||||
<BundleResource Include="Resources\24\box-24.png" />
|
||||
<BundleResource Include="Resources\folder-open-24.png" />
|
||||
<BundleResource Include="Resources\disk-24.png" />
|
||||
<BundleResource Include="Resources\block.png" />
|
||||
<BundleResource Include="Resources\box.png" />
|
||||
<BundleResource Include="Resources\document-attribute-d.png" />
|
||||
<BundleResource Include="Resources\document-attribute-f.png" />
|
||||
<BundleResource Include="Resources\document-attribute-l.png" />
|
||||
<BundleResource Include="Resources\document-attribute-s.png" />
|
||||
<BundleResource Include="Resources\edit-list.png" />
|
||||
<BundleResource Include="Resources\edit-small-caps.png" />
|
||||
<BundleResource Include="Resources\wooden-box.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="Mac\MainWindow.xib" />
|
||||
<InterfaceDefinition Include="Mac\MainMenu.xib" />
|
||||
<InterfaceDefinition Include="Mac\EditValue.xib" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,6 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
|
||||
namespace NBTExplorer
|
||||
{
|
||||
|
@ -9,15 +12,18 @@ namespace NBTExplorer
|
|||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main ()
|
||||
//[STAThread]
|
||||
static void Main (string[] args)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
NSApplication.Init ();
|
||||
NSApplication.Main (args);
|
||||
|
||||
//Application.EnableVisualStyles();
|
||||
//Application.SetCompatibleTextRenderingDefault(false);
|
||||
///Application.Run(new MainForm());
|
||||
}
|
||||
|
||||
public static void StaticInitFailure (Exception e)
|
||||
/*public static void StaticInitFailure (Exception e)
|
||||
{
|
||||
Console.WriteLine("Static Initialization Failure:");
|
||||
|
||||
|
@ -30,6 +36,6 @@ namespace NBTExplorer
|
|||
|
||||
MessageBox.Show("Application failed during static initialization: " + original.Message);
|
||||
Application.Exit();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
public partial class AppDelegate : NSApplicationDelegate
|
||||
{
|
||||
MainWindowController mainWindowController;
|
||||
|
||||
public AppDelegate ()
|
||||
{
|
||||
}
|
||||
|
||||
public override void FinishedLaunching (NSObject notification)
|
||||
{
|
||||
mainWindowController = new MainWindowController ();
|
||||
mainWindowController.Window.MakeKeyAndOrderFront (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
Test/AppDelegate.designer.cs
generated
10
Test/AppDelegate.designer.cs
generated
|
@ -1,10 +0,0 @@
|
|||
|
||||
namespace Test
|
||||
{
|
||||
// Should subclass MonoMac.AppKit.NSResponder
|
||||
[MonoMac.Foundation.Register("AppDelegate")]
|
||||
public partial class AppDelegate
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.Test</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Test</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
18
Test/Main.cs
18
Test/Main.cs
|
@ -1,18 +0,0 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
class MainClass
|
||||
{
|
||||
static void Main (string[] args)
|
||||
{
|
||||
NSApplication.Init ();
|
||||
NSApplication.Main (args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4074
Test/MainMenu.xib
4074
Test/MainMenu.xib
File diff suppressed because it is too large
Load diff
|
@ -1,35 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
public partial class MainWindow : MonoMac.AppKit.NSWindow
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
// Called when created from unmanaged code
|
||||
public MainWindow (IntPtr handle) : base (handle)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Called when created directly from a XIB file
|
||||
[Export ("initWithCoder:")]
|
||||
public MainWindow (NSCoder coder) : base (coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Shared initialization code
|
||||
void Initialize ()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
17
Test/MainWindow.designer.cs
generated
17
Test/MainWindow.designer.cs
generated
|
@ -1,17 +0,0 @@
|
|||
|
||||
namespace Test
|
||||
{
|
||||
|
||||
// Should subclass MonoMac.AppKit.NSWindow
|
||||
[MonoMac.Foundation.Register("MainWindow")]
|
||||
public partial class MainWindow
|
||||
{
|
||||
}
|
||||
|
||||
// Should subclass MonoMac.AppKit.NSWindowController
|
||||
[MonoMac.Foundation.Register("MainWindowController")]
|
||||
public partial class MainWindowController
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1060</int>
|
||||
<string key="IBDocument.SystemVersion">10D573</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">762</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||
<string key="IBDocument.HIToolboxVersion">460.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">762</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="2" />
|
||||
</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">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSCustomObject" id="1001">
|
||||
<string key="NSClassName">MainWindowController</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1003">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1004">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="748157544">
|
||||
<int key="NSWindowStyleMask">15</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{131, 74}, {606, 354}}</string>
|
||||
<int key="NSWTFlags">611844096</int>
|
||||
<string key="NSWindowTitle">Window</string>
|
||||
<string key="NSWindowClass">MainWindow</string>
|
||||
<nil key="NSViewClass" />
|
||||
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
<object class="NSView" key="NSWindowView" id="312036702">
|
||||
<reference key="NSNextResponder" />
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{606, 354}</string>
|
||||
<reference key="NSSuperview" />
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
|
||||
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
</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>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0" />
|
||||
<reference key="children" ref="1000" />
|
||||
<nil key="parent" />
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1001" />
|
||||
<reference key="parent" ref="0" />
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1003" />
|
||||
<reference key="parent" ref="0" />
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1004" />
|
||||
<reference key="parent" ref="0" />
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">2</int>
|
||||
<reference key="object" ref="748157544" />
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="312036702" />
|
||||
</object>
|
||||
<reference key="parent" ref="0" />
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="312036702" />
|
||||
<reference key="parent" ref="748157544" />
|
||||
</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>2.IBEditorWindowLastContentRect</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>2.IBWindowTemplateEditedContentRect</string>
|
||||
<string>2.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" 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>{{319, 371}, {606, 354}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{319, 371}, {606, 354}}</string>
|
||||
<boolean value="YES" />
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0" />
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="activeLocalization" />
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0" />
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID" />
|
||||
<int key="maxID">6</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MainWindow</string>
|
||||
<string key="superclassName">NSWindow</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MainWindowController</string>
|
||||
<string key="superclassName">NSWindowController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey" />
|
||||
</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>
|
||||
<nil key="IBDocument.LastKnownRelativeProjectPath" />
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
|
@ -1,48 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
public partial class MainWindowController : MonoMac.AppKit.NSWindowController
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
// Called when created from unmanaged code
|
||||
public MainWindowController (IntPtr handle) : base (handle)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Called when created directly from a XIB file
|
||||
[Export ("initWithCoder:")]
|
||||
public MainWindowController (NSCoder coder) : base (coder)
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Call to load from the XIB/NIB file
|
||||
public MainWindowController () : base ("MainWindow")
|
||||
{
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
// Shared initialization code
|
||||
void Initialize ()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//strongly typed window accessor
|
||||
public new MainWindow Window {
|
||||
get {
|
||||
return (MainWindow)base.Window;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 690 B |
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.0</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{C7203DAF-8FEF-4F66-9A6B-4657A85F0B5D}</ProjectGuid>
|
||||
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Test</RootNamespace>
|
||||
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
|
||||
<AssemblyName>Test</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnablePackageSigning>False</EnablePackageSigning>
|
||||
<IncludeMonoRuntime>False</IncludeMonoRuntime>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<EnableCodeSigning>False</EnableCodeSigning>
|
||||
<CreatePackage>False</CreatePackage>
|
||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnablePackageSigning>False</EnablePackageSigning>
|
||||
<IncludeMonoRuntime>False</IncludeMonoRuntime>
|
||||
<LinkMode>Full</LinkMode>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<EnableCodeSigning>False</EnableCodeSigning>
|
||||
<CreatePackage>False</CreatePackage>
|
||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\AppStore</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
|
||||
<IncludeMonoRuntime>True</IncludeMonoRuntime>
|
||||
<LinkMode>Full</LinkMode>
|
||||
<EnablePackageSigning>True</EnablePackageSigning>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<EnableCodeSigning>True</EnableCodeSigning>
|
||||
<CreatePackage>True</CreatePackage>
|
||||
<CodeSigningKey>3rd Party Mac Developer Application</CodeSigningKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="MonoMac" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainWindow.cs" />
|
||||
<Compile Include="MainWindowController.cs" />
|
||||
<Compile Include="MainWindow.designer.cs">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<Compile Include="AppDelegate.designer.cs">
|
||||
<DependentUpon>AppDelegate.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="MainWindow.xib" />
|
||||
<InterfaceDefinition Include="MainMenu.xib" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
|
||||
</Project>
|
Loading…
Reference in a new issue