diff --git a/NBTExplorerMac/DataNode.cs b/NBTExplorerMac/DataNode.cs deleted file mode 100644 index ef3248d..0000000 --- a/NBTExplorerMac/DataNode.cs +++ /dev/null @@ -1,121 +0,0 @@ -using Substrate.Core; -using Substrate.Nbt; -using System.Collections.Generic; -using System; -using System.Windows.Forms; - -namespace NBTExplorer -{ - public class DataNodeOld - { - public DataNodeOld () - { - } - - public DataNodeOld (DataNodeOld parent) - { - Parent = parent; - } - - public DataNodeOld Parent { get; set; } - - private bool _modified; - public bool Modified - { - get { return _modified; } - set - { - if (value && Parent != null) { - Parent.Modified = value; - } - _modified = value; - } - } - - public bool Expanded { get; set; } - } - - public class NbtDataNode : DataNodeOld - { - public NbtDataNode () - { - } - - public NbtDataNode (DataNodeOld parent) - : base(parent) - { - } - - public NbtTree Tree { get; set; } - } - - public class RegionChunkData : NbtDataNode - { - public RegionChunkData (RegionFile file, int x, int z) - : this(null, file, x, z) - { - } - - public RegionChunkData (DataNodeOld parent, RegionFile file, int x, int z) - : base(parent) - { - Region = file; - X = x; - Z = z; - } - - public RegionFile Region { get; private set; } - public int X { get; private set; } - public int Z { get; private set; } - } - - public class RegionData : DataNodeOld - { - public RegionData (string path) - : this(null, path) - { - } - - public RegionData (DataNodeOld parent, string path) - : base(parent) - { - Path = path; - } - - public string Path { get; private set; } - } - - public class NbtFileData : NbtDataNode - { - public NbtFileData (string path, CompressionType cztype) - : this(null, path, cztype) - { - } - - public NbtFileData (DataNodeOld parent, string path, CompressionType cztype) - : base(parent) - { - Path = path; - CompressionType = cztype; - } - - public string Path { get; private set; } - public CompressionType CompressionType { get; private set; } - } - - public class DirectoryData : DataNodeOld - { - public DirectoryData (string path) - : this(null, path) - { - } - - public DirectoryData (DataNodeOld parent, string path) - : base(parent) - { - Path = path; - } - - public string Path { get; private set; } - } -} diff --git a/NBTExplorerMac/IconRegistry.cs b/NBTExplorerMac/IconRegistry.cs deleted file mode 100644 index 14ec075..0000000 --- a/NBTExplorerMac/IconRegistry.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NBTExplorer -{ - public class IconRegistry - { - private Dictionary _iconRegistry; - - public IconRegistry () - { - _iconRegistry = new Dictionary(); - } - - public int DefaultIcon { get; set; } - - public int Lookup (Type type) - { - if (_iconRegistry.ContainsKey(type)) - return _iconRegistry[type]; - else - return DefaultIcon; - } - - public void Register (Type type, int iconIndex) - { - _iconRegistry[type] = iconIndex; - } - } -} diff --git a/NBTExplorerMac/Info.plist b/NBTExplorerMac/Info.plist deleted file mode 100644 index 03e6795..0000000 --- a/NBTExplorerMac/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDocumentTypes - - CFBundleIconFiles - - dead_bush.icns - - CFBundleIdentifier - jaquadro.NBTExplorer - CFBundleName - NBTExplorer - CFBundleShortVersionString - 2.0.3 - CFBundleVersion - 1 - LSApplicationCategoryType - public.app-category.utilities - LSMinimumSystemVersion - 10.6 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/NBTExplorerMac/LICENSE.txt b/NBTExplorerMac/LICENSE.txt deleted file mode 100644 index 27a2f7e..0000000 --- a/NBTExplorerMac/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011 by Justin Aquadro - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/NBTExplorerMac/Mac/AppDelegate.cs b/NBTExplorerMac/Mac/AppDelegate.cs deleted file mode 100644 index bf5b294..0000000 --- a/NBTExplorerMac/Mac/AppDelegate.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Drawing; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ObjCRuntime; - -namespace NBTExplorer -{ - public partial class AppDelegate : NSApplicationDelegate - { - MainWindowController mainWindowController; - - public AppDelegate () - { - } - - public override void FinishedLaunching (NSObject notification) - { - mainWindowController = new MainWindowController (); - mainWindowController.Window.MakeKeyAndOrderFront (this); - } - - partial void ActionRename (NSObject sender) - { - mainWindowController.Window.ActionEditValue(); - } - } -} - diff --git a/NBTExplorerMac/Mac/AppDelegate.designer.cs b/NBTExplorerMac/Mac/AppDelegate.designer.cs deleted file mode 100644 index 79392b8..0000000 --- a/NBTExplorerMac/Mac/AppDelegate.designer.cs +++ /dev/null @@ -1,27 +0,0 @@ -// WARNING -// -// This file has been generated automatically by MonoDevelop to store outlets and -// actions made in the Xcode designer. If it is removed, they will be lost. -// Manual changes to this file may not be handled correctly. -// -using MonoMac.Foundation; - -namespace NBTExplorer -{ - [Register ("AppDelegate")] - partial class AppDelegate - { - [Action ("ActionRename:")] - partial void ActionRename (MonoMac.Foundation.NSObject sender); - - [Action ("ActionEditValue:")] - partial void ActionEditValue (MonoMac.Foundation.NSObject sender); - - [Action ("ActionDelete:")] - partial void ActionDelete (MonoMac.Foundation.NSObject sender); - - void ReleaseDesignerOutlets () - { - } - } -} diff --git a/NBTExplorerMac/Mac/EditValue.cs b/NBTExplorerMac/Mac/EditValue.cs deleted file mode 100644 index 7bb94d6..0000000 --- a/NBTExplorerMac/Mac/EditValue.cs +++ /dev/null @@ -1,158 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; -using Substrate.Nbt; - -namespace NBTExplorer.Mac -{ - public partial class EditValue : MonoMac.AppKit.NSWindow - { - public enum DialogResult - { - OK, - Cancel, - } - - private TagNode _tag; - private DialogResult _result; - - #region Constructors - - // Called when created from unmanaged code - public EditValue (IntPtr handle) : base (handle) - { - Initialize (); - } - - // Called when created directly from a XIB file - [Export ("initWithCoder:")] - public EditValue (NSCoder coder) : base (coder) - { - Initialize (); - } - - public EditValue (TagNode tag) - { - Initialize (); - - _tag = tag; - - if (tag == null) { - _result = DialogResult.Cancel; - Close(); - return; - } - - _valueField.StringValue = _tag.ToString(); - } - - // Shared initialization code - void Initialize () - { - } - - #endregion - - public TagNode NodeTag - { - get { return _tag; } - } - - public DialogResult Result - { - get { return _result; } - } - - /*private TagNode _tag; - - public EditValue (TagNode tag) - { - InitializeComponent(); - - _tag = tag; - - if (tag == null) { - DialogResult = DialogResult.Abort; - Close(); - return; - } - - textBox1.Text = _tag.ToString(); - } - - public TagNode NodeTag - { - get { return _tag; } - } - - private void Apply () - { - if (ValidateInput()) { - DialogResult = DialogResult.OK; - Close(); - } - } - - private bool ValidateInput () - { - return ValidateValueInput(); - } - - private bool ValidateValueInput () - { - try { - switch (_tag.GetTagType()) { - case TagType.TAG_BYTE: - _tag.ToTagByte().Data = unchecked((byte)sbyte.Parse(textBox1.Text)); - break; - - case TagType.TAG_SHORT: - _tag.ToTagShort().Data = short.Parse(textBox1.Text); - break; - - case TagType.TAG_INT: - _tag.ToTagInt().Data = int.Parse(textBox1.Text); - break; - - case TagType.TAG_LONG: - _tag.ToTagLong().Data = long.Parse(textBox1.Text); - break; - - case TagType.TAG_FLOAT: - _tag.ToTagFloat().Data = float.Parse(textBox1.Text); - break; - - case TagType.TAG_DOUBLE: - _tag.ToTagDouble().Data = double.Parse(textBox1.Text); - break; - - case TagType.TAG_STRING: - _tag.ToTagString().Data = textBox1.Text; - break; - } - } - catch (FormatException) { - MessageBox.Show("The value is formatted incorrectly for the given type."); - return false; - } - catch (OverflowException) { - MessageBox.Show("The value is outside the acceptable range for the given type."); - return false; - } - catch { - return false; - } - - return true; - } - - private void _buttonOK_Click (object sender, EventArgs e) - { - Apply(); - }*/ - } -} - diff --git a/NBTExplorerMac/Mac/EditValue.designer.cs b/NBTExplorerMac/Mac/EditValue.designer.cs deleted file mode 100644 index 1644bfa..0000000 --- a/NBTExplorerMac/Mac/EditValue.designer.cs +++ /dev/null @@ -1,31 +0,0 @@ -// WARNING -// -// This file has been generated automatically by MonoDevelop to store outlets and -// actions made in the Xcode designer. If it is removed, they will be lost. -// Manual changes to this file may not be handled correctly. -// -using MonoMac.Foundation; - -namespace NBTExplorer.Mac -{ - [Register ("EditValue")] - partial class EditValue - { - [Outlet] - MonoMac.AppKit.NSTextField _valueField { get; set; } - - [Action ("ActionOK:")] - partial void ActionOK (MonoMac.Foundation.NSObject sender); - - [Action ("ActionCancel:")] - partial void ActionCancel (MonoMac.Foundation.NSObject sender); - - void ReleaseDesignerOutlets () - { - if (_valueField != null) { - _valueField.Dispose (); - _valueField = null; - } - } - } -} diff --git a/NBTExplorerMac/Mac/EditValue.xib b/NBTExplorerMac/Mac/EditValue.xib deleted file mode 100644 index 76a7cc7..0000000 --- a/NBTExplorerMac/Mac/EditValue.xib +++ /dev/null @@ -1,390 +0,0 @@ - - - - 1080 - 12B2080 - 2844 - 1187 - 624.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2844 - - - YES - NSButton - NSButtonCell - NSCustomObject - NSTextField - NSTextFieldCell - NSView - NSWindowTemplate - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - EditValue - - - FirstResponder - - - NSApplication - - - 3 - 2 - {{131, 86}, {262, 91}} - 611844096 - Edit Value... - EditValue - - - - - 256 - - YES - - - 266 - {{20, 49}, {222, 22}} - - - _NS:9 - YES - - -1804599231 - 272630848 - - - LucidaGrande - 13 - 1044 - - _NS:9 - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - 3 - MAA - - - - NO - - - - 268 - {{166, 13}, {82, 32}} - - - _NS:9 - YES - - 67108864 - 134217728 - OK - - _NS:9 - - -2038284288 - 129 - - DQ - 200 - 25 - - NO - - - - 268 - {{84, 13}, {82, 32}} - - - _NS:9 - YES - - 67108864 - 134217728 - Cancel - - _NS:9 - - -2038284288 - 129 - - Gw - 200 - 25 - - NO - - - {262, 91} - - - - {{0, 0}, {1600, 1178}} - {10000000000000, 10000000000000} - YES - - - - - YES - - - _valueField - - - - 9 - - - - ActionOK: - - - - 10 - - - - ActionCancel: - - - - 11 - - - - - YES - - 0 - - YES - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - YES - - - - - - 2 - - - YES - - - - - - - - 3 - - - YES - - - - - - 4 - - - - - 5 - - - YES - - - - - - 6 - - - - - 7 - - - YES - - - - - - 8 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 1.IBPluginDependency - 1.IBWindowTemplateEditedContentRect - 1.NSWindowTemplate.visibleAtLaunch - 2.IBPluginDependency - 3.IBPluginDependency - 4.IBPluginDependency - 5.IBPluginDependency - 6.IBPluginDependency - 7.IBPluginDependency - 8.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{361, 348}, {602, 342}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - - - - YES - - - - - 11 - - - - YES - - EditValue - NSWindow - - YES - - YES - ActionCancel: - ActionOK: - - - YES - id - id - - - - YES - - YES - ActionCancel: - ActionOK: - - - YES - - ActionCancel: - id - - - ActionOK: - id - - - - - _valueField - NSTextField - - - _valueField - - _valueField - NSTextField - - - - IBProjectSource - ./Classes/EditValue.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - diff --git a/NBTExplorerMac/Mac/IconRegistry.cs b/NBTExplorerMac/Mac/IconRegistry.cs deleted file mode 100644 index 28fafad..0000000 --- a/NBTExplorerMac/Mac/IconRegistry.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using MonoMac.AppKit; - -namespace NBTExplorer.Mac -{ - public class IconRegistry - { - private Dictionary _iconRegistry; - - public IconRegistry () - { - _iconRegistry = new Dictionary(); - } - - 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; - } - } -} - diff --git a/NBTExplorerMac/Mac/ImageAndTextCell.cs b/NBTExplorerMac/Mac/ImageAndTextCell.cs deleted file mode 100644 index d3e0aaa..0000000 --- a/NBTExplorerMac/Mac/ImageAndTextCell.cs +++ /dev/null @@ -1,210 +0,0 @@ -using System; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.CoreGraphics; -using System.Drawing; -using MonoMac.ObjCRuntime; -using System.Collections.Generic; - -namespace NBTExplorer.Mac -{ - [Register("ImageAndTextCell")] - public class ImageAndTextCell : NSTextFieldCell - { - private NSImage _image; - private bool _copyCalled; - private bool _disposeCalled; - private bool _deallocCalled; - private bool _drawCalled; - - public ImageAndTextCell () - { - } - - public ImageAndTextCell (IntPtr handle) - : base(handle) - { - Initialize(); - } - - // Called when created directly from a XIB file - [Export ("initWithCoder:")] - public ImageAndTextCell (NSCoder coder) - : base (coder) - { - Initialize (); - } - - private void Initialize () - { - LineBreakMode = NSLineBreakMode.TruncatingTail; - Selectable = true; - } - - protected override void Dispose (bool disposing) - { - //if (_image != null) - // _image.Dispose(); - - //if (_noDispose) - // Handle = IntPtr.Zero; - _disposeCalled = true; - - base.Dispose (disposing); - } - - /*[Export("copyWithZone:")] - public virtual NSObject CopyWithZone(IntPtr zone) { - ImageAndTextCell cell = new ImageAndTextCell() { - Title = Title, - Image = Image, - }; - cell._noDispose = true; - return cell; - }*/ - - static List _refPool = new List(); - - //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); - } - } -} - diff --git a/NBTExplorerMac/Mac/MainMenu.xib b/NBTExplorerMac/Mac/MainMenu.xib deleted file mode 100644 index d8693c3..0000000 --- a/NBTExplorerMac/Mac/MainMenu.xib +++ /dev/null @@ -1,952 +0,0 @@ - - - - 1080 - 12B2080 - 2844 - 1187 - 624.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2844 - - - YES - NSCustomObject - NSMenu - NSMenuItem - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - NBTExplorer - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - NBTExplorer - - YES - - - About NBTExplorer - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit NBTExplorer - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Folder... - O - 1048576 - 2147483647 - - - - - - Open Minecraft Save Folder - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Recent Files - R - 2147483647 - - - submenuAction: - - Recent Files - - YES - - _NSRecentDocumentsMenu - - - - - Recent Folders - - 2147483647 - - - submenuAction: - - Recent Folders - - YES - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Rename - r - 1048576 - 2147483647 - - - - - - Edit Value - e - 1048576 - 2147483647 - - - - - - Delete -  - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Find... - f - 1048576 - 2147483647 - - - - - - Find Next -  - 2147483647 - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - - - - Help - - 2147483647 - - - - - _NSMainMenu - - - NSFontManager - - - AppDelegate - - - - - YES - - - terminate: - - - - 449 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - delegate - - - - 534 - - - - copy: - - - - 224 - - - - paste: - - - - 226 - - - - cut: - - - - 228 - - - - saveDocument: - - - - 362 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - openDocument: - - - - 374 - - - - ActionEditValue: - - - - 546 - - - - ActionRename: - - - - 547 - - - - ActionDelete: - - - - 548 - - - - - YES - - 0 - - YES - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - 19 - - - YES - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - 75 - - - - - 72 - - - - - 124 - - - YES - - - - - - 79 - - - - - 125 - - - YES - - - - - 205 - - - YES - - - - - - - - - - - - - - - 202 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 57 - - - YES - - - - - - - - 58 - - - - - 136 - - - - - 236 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 420 - - - - - 490 - - - YES - - - - - 533 - - - - - 535 - - - - - 536 - - - - - 537 - - - - - 538 - - - - - 539 - - - YES - - - - - - 540 - - - YES - - - - - 542 - - - - - 543 - - - - - 544 - - - - - 545 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 124.IBPluginDependency - 125.IBPluginDependency - 136.IBPluginDependency - 19.IBPluginDependency - 197.IBPluginDependency - 199.IBPluginDependency - 202.IBPluginDependency - 203.IBPluginDependency - 205.IBPluginDependency - 214.IBPluginDependency - 217.IBPluginDependency - 236.IBPluginDependency - 29.IBPluginDependency - 295.IBPluginDependency - 296.IBPluginDependency - 297.IBPluginDependency - 298.IBPluginDependency - 420.IBPluginDependency - 490.IBPluginDependency - 533.IBPluginDependency - 535.IBPluginDependency - 536.IBPluginDependency - 537.IBPluginDependency - 538.IBPluginDependency - 539.IBPluginDependency - 540.IBPluginDependency - 542.IBPluginDependency - 543.IBPluginDependency - 544.IBPluginDependency - 545.IBPluginDependency - 56.IBPluginDependency - 57.IBPluginDependency - 58.IBPluginDependency - 72.IBPluginDependency - 75.IBPluginDependency - 79.IBPluginDependency - 81.IBPluginDependency - 83.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - - - - YES - - - - - 548 - - - - YES - - AppDelegate - NSObject - - YES - - YES - ActionDelete: - ActionEditValue: - ActionRename: - - - YES - id - id - id - - - - YES - - YES - ActionDelete: - ActionEditValue: - ActionRename: - - - YES - - ActionDelete: - id - - - ActionEditValue: - id - - - ActionRename: - id - - - - - IBProjectSource - ./Classes/AppDelegate.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {11, 11} - {10, 3} - - - - diff --git a/NBTExplorerMac/Mac/MainWindow.cs b/NBTExplorerMac/Mac/MainWindow.cs deleted file mode 100644 index ff31d6e..0000000 --- a/NBTExplorerMac/Mac/MainWindow.cs +++ /dev/null @@ -1,318 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; -using NBTExplorer.Mac; -using System.IO; -using NBTExplorer.Model; - -namespace NBTExplorer -{ - public partial class MainWindow : MonoMac.AppKit.NSWindow - { - #region Constructors - - // Called when created from unmanaged code - public MainWindow (IntPtr handle) : base (handle) - { - Initialize (); - } - - // Called when created directly from a XIB file - [Export ("initWithCoder:")] - public MainWindow (NSCoder coder) : base (coder) - { - Initialize (); - } - - // Shared initialization code - void Initialize () - { - InitializeIconRegistry(); - } - - private NBTExplorer.Mac.IconRegistry _iconRegistry; - - private void InitializeIconRegistry () - { - _iconRegistry = new NBTExplorer.Mac.IconRegistry(); - _iconRegistry.DefaultIcon = NSImage.ImageNamed("question-white.png"); - - _iconRegistry.Register(typeof(TagByteDataNode), NSImage.ImageNamed("document-attribute-b.png")); - _iconRegistry.Register(typeof(TagShortDataNode), NSImage.ImageNamed("document-attribute-s.png")); - _iconRegistry.Register(typeof(TagIntDataNode), NSImage.ImageNamed("document-attribute-i.png")); - _iconRegistry.Register(typeof(TagLongDataNode), NSImage.ImageNamed("document-attribute-l.png")); - _iconRegistry.Register(typeof(TagFloatDataNode), NSImage.ImageNamed("document-attribute-f.png")); - _iconRegistry.Register(typeof(TagDoubleDataNode), NSImage.ImageNamed("document-attribute-d.png")); - _iconRegistry.Register(typeof(TagByteArrayDataNode), NSImage.ImageNamed("edit-code.png")); - _iconRegistry.Register(typeof(TagStringDataNode), NSImage.ImageNamed("edit-small-caps.png")); - _iconRegistry.Register(typeof(TagListDataNode), NSImage.ImageNamed("edit-list.png")); - _iconRegistry.Register(typeof(TagCompoundDataNode), NSImage.ImageNamed("box.png")); - _iconRegistry.Register(typeof(RegionChunkDataNode), NSImage.ImageNamed("wooden-box.png")); - _iconRegistry.Register(typeof(DirectoryDataNode), NSImage.ImageNamed("folder-open")); - _iconRegistry.Register(typeof(RegionFileDataNode), NSImage.ImageNamed("block.png")); - _iconRegistry.Register(typeof(CubicRegionDataNode), NSImage.ImageNamed("block.png")); - _iconRegistry.Register(typeof(NbtFileDataNode), NSImage.ImageNamed("wooden-box.png")); - _iconRegistry.Register(typeof(TagIntArrayDataNode), NSImage.ImageNamed("edit-code-i.png")); - } - - #endregion - - private TreeDataSource _dataSource; - - public override void AwakeFromNib () - { - base.AwakeFromNib (); - - _dataSource = new TreeDataSource(); - _mainOutlineView.DataSource = _dataSource; - _mainOutlineView.Delegate = new MyDelegate(this); - - string[] args = Environment.GetCommandLineArgs(); - if (args.Length > 2) { - string[] paths = new string[args.Length - 1]; - Array.Copy(args, 1, paths, 0, paths.Length); - OpenPaths(paths); - } - else { - OpenMinecraftDirectory(); - } - } - - public class MyDelegate : NSOutlineViewDelegate - { - private MainWindow _main; - - public MyDelegate (MainWindow main) - { - _main = main; - } - - public override void ItemWillExpand (NSNotification notification) - { - TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; - if (node != null) { - Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay); - _main.ExpandNode(node); - } - } - - public override void ItemDidExpand (NSNotification notification) - { - TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; - if (node != null) { - Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay); - } - } - - public override void ItemWillCollapse (NSNotification notification) - { - TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; - if (node != null) { - if (node.Data.NodeDisplay == "saves") // The root node - Console.WriteLine ("Uh-oh..."); - Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay); - } - } - - public override void ItemDidCollapse (NSNotification notification) - { - TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; - if (node != null) { - _main.CollapseNode(node); - } - } - - public override void WillDisplayCell (NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) - { - ImageAndTextCell c = cell as ImageAndTextCell; - TreeDataNode node = item as TreeDataNode; - - c.Title = node.CombinedName; - c.Image = _main._iconRegistry.Lookup(node.Data.GetType()); - //c.StringValue = node.Name; - //throw new System.NotImplementedException (); - } - } - - #region Actions - - partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender) - { - OpenFolder (); - } - - #endregion - - private string _openFolderPath = null; - - private void OpenFolder () - { - NSOpenPanel opanel = new NSOpenPanel (); - opanel.CanChooseDirectories = true; - opanel.CanChooseFiles = false; - - if (_openFolderPath != null) - opanel.DirectoryUrl = new NSUrl (_openFolderPath, true); - - if (opanel.RunModal () == (int)NSPanelButtonType.Ok) { - _openFolderPath = opanel.DirectoryUrl.AbsoluteString; - OpenPaths(new string[] { opanel.DirectoryUrl.Path }); - } - - //UpdateUI(); - } - - private void OpenMinecraftDirectory () - { - try { - string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); - path = Path.Combine(path, "Library", "Application Support"); - path = Path.Combine(path, "minecraft", "saves"); - - if (!Directory.Exists(path)) { - path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); - } - - OpenPaths(new string[] { path }); - } - catch (Exception e) { - //NSAlert.WithMessage("Could not open default Minecraft save directory", "OK", null, null, null).RunModal(); - Console.WriteLine(e.Message); - - try { - OpenPaths(new string[] { Directory.GetCurrentDirectory() }); - } - catch (Exception) { - //MessageBox.Show("Could not open current directory, this tool is probably not compatible with your platform."); - Console.WriteLine(e.Message); - NSApplication.SharedApplication.Terminate(this); - } - } - - //UpdateUI(); - } - - private void OpenPaths (string[] paths) - { - _dataSource.Nodes.Clear (); - _mainOutlineView.ReloadData (); - - foreach (string path in paths) { - if (Directory.Exists (path)) { - DirectoryDataNode node = new DirectoryDataNode (path); - _dataSource.Nodes.Add (new TreeDataNode (node)); - - // AddPathToHistory(Settings.Default.RecentDirectories, path); - } else if (File.Exists (path)) { - DataNode node = null; - } - } - - if (_dataSource.Nodes.Count > 0) { - _mainOutlineView.ExpandItem(_dataSource.Nodes[0]); - } - - _mainOutlineView.ReloadData(); - - // UpdateUI(); - // UpdateOpenMenu(); - - /*_nodeTree.Nodes.Clear(); - - foreach (string path in paths) { - if (Directory.Exists(path)) { - DirectoryDataNode node = new DirectoryDataNode(path); - _nodeTree.Nodes.Add(CreateUnexpandedNode(node)); - - AddPathToHistory(Settings.Default.RecentDirectories, path); - } - else if (File.Exists(path)) { - DataNode node = null; - foreach (var item in FileTypeRegistry.RegisteredTypes) { - if (item.Value.NamePatternTest(path)) - node = item.Value.NodeCreate(path); - } - - if (node != null) { - _nodeTree.Nodes.Add(CreateUnexpandedNode(node)); - AddPathToHistory(Settings.Default.RecentFiles, path); - } - } - } - - if (_nodeTree.Nodes.Count > 0) { - _nodeTree.Nodes[0].Expand(); - } - - UpdateUI(); - UpdateOpenMenu();*/ - } - - private void ExpandNode (TreeDataNode node) - { - if (node == null || node.IsExpanded) - return; - - Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay); - - node.IsExpanded = true; - node.Nodes.Clear (); - - DataNode backNode = node.Data; - if (!backNode.IsExpanded) { - backNode.Expand (); - } - - foreach (DataNode child in backNode.Nodes) { - if (child != null) { - node.Nodes.Add (new TreeDataNode (child)); - } - } - } - - private void CollapseNode (TreeDataNode node) - { - if (node == null || !node.IsExpanded) - return; - - /*Console.WriteLine("Collapse Node: " + node.Data.NodeDisplay); - - DataNode backNode = node.Data; - if (backNode.IsModified) - return; - - backNode.Collapse(); - - node.IsExpanded = false; - node.Nodes.Clear();*/ - } - - public void ActionEditValue () - { - TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode; - if (node != null) - EditNode(node); - } - - private void EditNode (TreeDataNode node) - { - if (node == null) - return; - - if (!node.Data.CanEditNode) - return; - - //NBTExplorer.Mac.EditValue form = new NBTExplorer.Mac.EditValue(node.Data); - - - //if (node.Data.EditNode()) { - //node.Text = dataNode.NodeDisplay; - //UpdateUI(dataNode); - //} - } - } -} - diff --git a/NBTExplorerMac/Mac/MainWindow.designer.cs b/NBTExplorerMac/Mac/MainWindow.designer.cs deleted file mode 100644 index 677619b..0000000 --- a/NBTExplorerMac/Mac/MainWindow.designer.cs +++ /dev/null @@ -1,72 +0,0 @@ -// WARNING -// -// This file has been generated automatically by MonoDevelop to store outlets and -// actions made in the Xcode designer. If it is removed, they will be lost. -// Manual changes to this file may not be handled correctly. -// -using MonoMac.Foundation; - -namespace NBTExplorer -{ - [Register ("MainWindow")] - partial class MainWindow - { - [Outlet] - MonoMac.AppKit.NSToolbar _toolbar { get; set; } - - [Outlet] - MonoMac.AppKit.NSToolbarItem _toolbarOpenFolder { get; set; } - - [Outlet] - MonoMac.AppKit.NSToolbarItem _toolbarSave { get; set; } - - [Outlet] - MonoMac.AppKit.NSScrollView _mainScrollView { get; set; } - - [Outlet] - MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; } - - [Action ("ActionOpenFolder:")] - partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender); - - [Action ("ActionSave:")] - partial void ActionSave (MonoMac.Foundation.NSObject sender); - - void ReleaseDesignerOutlets () - { - if (_toolbar != null) { - _toolbar.Dispose (); - _toolbar = null; - } - - if (_toolbarOpenFolder != null) { - _toolbarOpenFolder.Dispose (); - _toolbarOpenFolder = null; - } - - if (_toolbarSave != null) { - _toolbarSave.Dispose (); - _toolbarSave = null; - } - - if (_mainScrollView != null) { - _mainScrollView.Dispose (); - _mainScrollView = null; - } - - if (_mainOutlineView != null) { - _mainOutlineView.Dispose (); - _mainOutlineView = null; - } - } - } - - [Register ("MainWindowController")] - partial class MainWindowController - { - - void ReleaseDesignerOutlets () - { - } - } -} diff --git a/NBTExplorerMac/Mac/MainWindow.xib b/NBTExplorerMac/Mac/MainWindow.xib deleted file mode 100644 index 85a490d..0000000 --- a/NBTExplorerMac/Mac/MainWindow.xib +++ /dev/null @@ -1,788 +0,0 @@ - - - - 1080 - 12B2080 - 2844 - 1187 - 624.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2844 - - - YES - IBCustomCell - NSCustomObject - NSOutlineView - NSScrollView - NSScroller - NSTableColumn - NSToolbar - NSToolbarFlexibleSpaceItem - NSToolbarItem - NSToolbarSpaceItem - NSUserDefaultsController - NSView - NSWindowTemplate - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - MainWindowController - - - FirstResponder - - - NSApplication - - - 15 - 2 - {{131, 74}, {776, 558}} - 611844096 - NBTExplorer - MainWindow - - - A9746BAB-CAB3-4A72-9A03-237662FA7440 - - - YES - YES - YES - YES - 1 - 2 - - YES - - YES - 0156226B-2E18-4406-BBE6-7C88F62B4E27 - B62CA8DD-7D49-4BF3-B4AB-417078852D8B - NSToolbarFlexibleSpaceItem - NSToolbarSpaceItem - - - YES - - - 0156226B-2E18-4406-BBE6-7C88F62B4E27 - - Open - Open - - - - NSImage - folder-open-24 - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - B62CA8DD-7D49-4BF3-B4AB-417078852D8B - - Save - Save - - - - NSImage - disk-24 - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - NSToolbarFlexibleSpaceItem - - Flexible Space - - - - - - {1, 5} - {20000, 32} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - - - - NSToolbarSpaceItem - - Space - - - - - - {32, 5} - {32, 32} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - YES - - - - - - - YES - - - - - - YES - - - - - - 256 - - YES - - - 286 - - YES - - - 2304 - - YES - - - 256 - - YES - - {776, 558} - - - - _NS:13 - YES - NO - YES - - - -2147483392 - {{224, 0}, {16, 17}} - - _NS:18 - - - YES - - 773 - 16 - 1000 - - 75497536 - 2048 - - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 0 - 0 - - - 3 - YES - YES - - - - 3 - 2 - - 3 - MQA - - - 6 - System - gridColor - - 3 - MC41AA - - - 17 - 306184192 - - - 0 - 15 - 0 - YES - 0 - 1 - - - {{1, 1}, {776, 558}} - - - - _NS:11 - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - - _NS:58 - NO - - _doScroller: - 0.99821109123434704 - - - - -2147483392 - {{1, 544}, {776, 15}} - - - - _NS:60 - NO - 1 - - _doScroller: - 0.99871299871299868 - - - {{-1, -1}, {778, 560}} - - - - _NS:9 - 133682 - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - {776, 558} - - - - - {{0, 0}, {1600, 1178}} - {10000000000000, 10000000000000} - YES - - - YES - - - - - YES - - - window - - - - 6 - - - - _mainScrollView - - - - 36 - - - - _mainOutlineView - - - - 37 - - - - _toolbar - - - - 38 - - - - _toolbarOpenFolder - - - - 39 - - - - _toolbarSave - - - - 40 - - - - ActionOpenFolder: - - - - 41 - - - - ActionSave: - - - - 42 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 2 - - - YES - - - - - - - 3 - - - YES - - - - - - 14 - - - YES - - - - - - - - - 15 - - - - - 18 - - - - - 20 - - - - - 21 - - - - - 22 - - - YES - - - - - - - - 23 - - - YES - - - - - - 24 - - - - - 26 - - - - - 27 - - - YES - - - - - - 44 - - - - - 71 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 14.IBPluginDependency - 15.IBPluginDependency - 18.IBPluginDependency - 2.IBPluginDependency - 2.IBWindowTemplateEditedContentRect - 2.NSWindowTemplate.visibleAtLaunch - 20.IBPluginDependency - 20.designableToolbarItemIdentifier - 21.IBPluginDependency - 21.designableToolbarItemIdentifier - 22.IBPluginDependency - 23.IBPluginDependency - 24.IBPluginDependency - 26.IBPluginDependency - 27.IBPluginDependency - 3.IBPluginDependency - 44.IBPluginDependency - 71.CustomClassName - 71.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{319, 371}, {606, 354}} - - com.apple.InterfaceBuilder.CocoaPlugin - ToolbarOpen - com.apple.InterfaceBuilder.CocoaPlugin - ToolbarSave - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - ImageAndTextCell - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - - - - YES - - - - - 71 - - - - YES - - ImageAndTextCell - NSTextFieldCell - - IBProjectSource - ./Classes/ImageAndTextCell.h - - - - MainWindow - NSWindow - - YES - - YES - ActionOpenFolder: - ActionSave: - - - YES - id - id - - - - YES - - YES - ActionOpenFolder: - ActionSave: - - - YES - - ActionOpenFolder: - id - - - ActionSave: - id - - - - - YES - - YES - _mainOutlineView - _mainScrollView - _toolbar - _toolbarOpenFolder - _toolbarSave - - - YES - NSOutlineView - NSScrollView - NSToolbar - NSToolbarItem - NSToolbarItem - - - - YES - - YES - _mainOutlineView - _mainScrollView - _toolbar - _toolbarOpenFolder - _toolbarSave - - - YES - - _mainOutlineView - NSOutlineView - - - _mainScrollView - NSScrollView - - - _toolbar - NSToolbar - - - _toolbarOpenFolder - NSToolbarItem - - - _toolbarSave - NSToolbarItem - - - - - IBProjectSource - ./Classes/MainWindow.h - - - - MainWindowController - NSWindowController - - IBProjectSource - ./Classes/MainWindowController.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - disk-24 - folder-open-24 - - - YES - {11, 11} - {10, 3} - {24, 24} - {24, 24} - - - - - - - NSCell - - - - diff --git a/NBTExplorerMac/Mac/MainWindowController.cs b/NBTExplorerMac/Mac/MainWindowController.cs deleted file mode 100644 index c39fd21..0000000 --- a/NBTExplorerMac/Mac/MainWindowController.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; - -namespace NBTExplorer -{ - public partial class MainWindowController : MonoMac.AppKit.NSWindowController - { - #region Constructors - - // Called when created from unmanaged code - public MainWindowController (IntPtr handle) : base (handle) - { - Initialize (); - } - - // Called when created directly from a XIB file - [Export ("initWithCoder:")] - public MainWindowController (NSCoder coder) : base (coder) - { - Initialize (); - } - - // Call to load from the XIB/NIB file - public MainWindowController () : base ("MainWindow") - { - Initialize (); - } - - // Shared initialization code - void Initialize () - { - } - - #endregion - - //strongly typed window accessor - public new MainWindow Window { - get { - return (MainWindow)base.Window; - } - } - } -} - diff --git a/NBTExplorerMac/Mac/Scratch.cs b/NBTExplorerMac/Mac/Scratch.cs deleted file mode 100644 index 3313185..0000000 --- a/NBTExplorerMac/Mac/Scratch.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; - -namespace NBTExplorer.Mac.Test -{ - public partial class MainWindow : MonoMac.AppKit.NSWindow - { - // ... - - [Outlet] - MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; } - - private TreeDataSource _dataSource; - - public override void AwakeFromNib () - { - base.AwakeFromNib (); - - _dataSource = new TreeDataSource(); - _mainOutlineView.DataSource = _dataSource; - _mainOutlineView.Delegate = new MyDelegate(this); - } - - public class MyDelegate : NSOutlineViewDelegate - { - private MainWindow _main; - - public MyDelegate (MainWindow main) - { - _main = main; - } - - public override void ItemWillExpand (NSNotification notification) - { - TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; - if (node != null) { - Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay); - _main.ExpandNode(node); - } - } - - public override void ItemDidExpand (NSNotification notification) - { - TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; - if (node != null) { - Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay); - } - } - - public override void ItemWillCollapse (NSNotification notification) - { - TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; - if (node != null) { - if (node.Data.NodeDisplay == "saves") // The root node - Console.WriteLine ("Uh-oh..."); - Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay); - } - } - } - - // ... - - private void ExpandNode (TreeDataNode node) - { - if (node == null || node.IsExpanded) - return; - - Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay); - - node.IsExpanded = true; - node.Nodes.Clear (); - - DataNode backNode = node.Data; - if (!backNode.IsExpanded) { - backNode.Expand (); - } - - foreach (DataNode child in backNode.Nodes) { - if (child != null) { - node.Nodes.Add (new TreeDataNode (child)); - } - } - } - } - - public class TreeDataSource : NSOutlineViewDataSource - { - private List _nodes; - - public TreeDataSource () - { - _nodes = new List(); - } - - public List 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 _children; - private bool _expanded; - - public TreeDataNode (DataNode node) - { - _dataNode = node; - _children = new List(); - } - - 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 Nodes - { - get { return _children; } - } - } -} - diff --git a/NBTExplorerMac/Mac/TreeDataNode.cs b/NBTExplorerMac/Mac/TreeDataNode.cs deleted file mode 100644 index 6349bf0..0000000 --- a/NBTExplorerMac/Mac/TreeDataNode.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using MonoMac.Foundation; -using MonoMac.AppKit; -using NBTExplorer.Model; -using System.Collections.Generic; - -namespace NBTExplorer.Mac -{ - public class TreeDataNode : NSObject - { - private DataNode _dataNode; - private List _children; - private bool _expanded; - - public TreeDataNode (DataNode node) - { - _dataNode = node; - _children = new List(); - } - - 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 Nodes - { - get { return _children; } - } - } -} - diff --git a/NBTExplorerMac/Mac/TreeDataSource.cs b/NBTExplorerMac/Mac/TreeDataSource.cs deleted file mode 100644 index 2791c2e..0000000 --- a/NBTExplorerMac/Mac/TreeDataSource.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using MonoMac.AppKit; -using MonoMac.Foundation; - -namespace NBTExplorer.Mac -{ - public class TreeDataSource : NSOutlineViewDataSource - { - private List _nodes; - - public TreeDataSource () - { - _nodes = new List(); - } - - public List 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; - } - } -} - diff --git a/NBTExplorerMac/MainForm.Designer.cs b/NBTExplorerMac/MainForm.Designer.cs deleted file mode 100644 index 1d3fd1d..0000000 --- a/NBTExplorerMac/MainForm.Designer.cs +++ /dev/null @@ -1,718 +0,0 @@ -namespace NBTExplorer -{ - partial class MainForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemOpen = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemOpenFolder = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemOpenMinecraftSaveFolder = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this._menuItemSave = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this._menuItemExit = new System.Windows.Forms.ToolStripMenuItem(); - this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemCut = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemCopy = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemPaste = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); - this._menuItemRename = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemEditValue = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemDelete = new System.Windows.Forms.ToolStripMenuItem(); - this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemFind = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemFindNext = new System.Windows.Forms.ToolStripMenuItem(); - this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemAbout = new System.Windows.Forms.ToolStripMenuItem(); - this._nodeTree = new System.Windows.Forms.TreeView(); - this.imageList1 = new System.Windows.Forms.ImageList(this.components); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this._buttonOpen = new System.Windows.Forms.ToolStripButton(); - this._buttonOpenFolder = new System.Windows.Forms.ToolStripButton(); - this._buttonSave = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this._buttonCut = new System.Windows.Forms.ToolStripButton(); - this._buttonCopy = new System.Windows.Forms.ToolStripButton(); - this._buttonPaste = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); - this._buttonRename = new System.Windows.Forms.ToolStripButton(); - this._buttonEdit = new System.Windows.Forms.ToolStripButton(); - this._buttonDelete = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this._buttonAddTagByte = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagShort = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagInt = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagLong = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagFloat = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagDouble = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagByteArray = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagIntArray = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagString = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagList = new System.Windows.Forms.ToolStripButton(); - this._buttonAddTagCompound = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this._buttonFindNext = new System.Windows.Forms.ToolStripButton(); - this.BottomToolStripPanel = new System.Windows.Forms.ToolStripPanel(); - this.TopToolStripPanel = new System.Windows.Forms.ToolStripPanel(); - this.RightToolStripPanel = new System.Windows.Forms.ToolStripPanel(); - this.LeftToolStripPanel = new System.Windows.Forms.ToolStripPanel(); - this.ContentPanel = new System.Windows.Forms.ToolStripContentPanel(); - this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.testToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemRecentFiles = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemRecentFolders = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); - this.menuStrip1.SuspendLayout(); - this.toolStrip1.SuspendLayout(); - this.contextMenuStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem, - this.editToolStripMenuItem, - this.searchToolStripMenuItem, - this.helpToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(619, 24); - this.menuStrip1.TabIndex = 0; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this._menuItemOpen, - this._menuItemOpenFolder, - this._menuItemOpenMinecraftSaveFolder, - this.toolStripSeparator3, - this._menuItemSave, - this.toolStripSeparator4, - this._menuItemRecentFiles, - this._menuItemRecentFolders, - this.toolStripSeparator8, - this._menuItemExit}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.fileToolStripMenuItem.Text = "&File"; - // - // _menuItemOpen - // - this._menuItemOpen.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemOpen.Image"))); - this._menuItemOpen.Name = "_menuItemOpen"; - this._menuItemOpen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this._menuItemOpen.Size = new System.Drawing.Size(223, 22); - this._menuItemOpen.Text = "&Open..."; - // - // _menuItemOpenFolder - // - this._menuItemOpenFolder.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemOpenFolder.Image"))); - this._menuItemOpenFolder.Name = "_menuItemOpenFolder"; - this._menuItemOpenFolder.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.O))); - this._menuItemOpenFolder.Size = new System.Drawing.Size(223, 22); - this._menuItemOpenFolder.Text = "Open &Folder..."; - // - // _menuItemOpenMinecraftSaveFolder - // - this._menuItemOpenMinecraftSaveFolder.Name = "_menuItemOpenMinecraftSaveFolder"; - this._menuItemOpenMinecraftSaveFolder.Size = new System.Drawing.Size(223, 22); - this._menuItemOpenMinecraftSaveFolder.Text = "Open &Minecraft Save Folder"; - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(220, 6); - // - // _menuItemSave - // - this._menuItemSave.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemSave.Image"))); - this._menuItemSave.Name = "_menuItemSave"; - this._menuItemSave.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this._menuItemSave.Size = new System.Drawing.Size(223, 22); - this._menuItemSave.Text = "&Save"; - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(220, 6); - // - // _menuItemExit - // - this._menuItemExit.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemExit.Image"))); - this._menuItemExit.Name = "_menuItemExit"; - this._menuItemExit.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); - this._menuItemExit.Size = new System.Drawing.Size(223, 22); - this._menuItemExit.Text = "E&xit"; - // - // editToolStripMenuItem - // - this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this._menuItemCut, - this._menuItemCopy, - this._menuItemPaste, - this.toolStripSeparator7, - this._menuItemRename, - this._menuItemEditValue, - this._menuItemDelete}); - this.editToolStripMenuItem.Name = "editToolStripMenuItem"; - this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); - this.editToolStripMenuItem.Text = "&Edit"; - // - // _menuItemCut - // - this._menuItemCut.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemCut.Image"))); - this._menuItemCut.Name = "_menuItemCut"; - this._menuItemCut.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); - this._menuItemCut.Size = new System.Drawing.Size(166, 22); - this._menuItemCut.Text = "Cu&t"; - // - // _menuItemCopy - // - this._menuItemCopy.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemCopy.Image"))); - this._menuItemCopy.Name = "_menuItemCopy"; - this._menuItemCopy.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this._menuItemCopy.Size = new System.Drawing.Size(166, 22); - this._menuItemCopy.Text = "&Copy"; - // - // _menuItemPaste - // - this._menuItemPaste.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemPaste.Image"))); - this._menuItemPaste.Name = "_menuItemPaste"; - this._menuItemPaste.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); - this._menuItemPaste.Size = new System.Drawing.Size(166, 22); - this._menuItemPaste.Text = "&Paste"; - // - // toolStripSeparator7 - // - this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(163, 6); - // - // _menuItemRename - // - this._menuItemRename.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemRename.Image"))); - this._menuItemRename.Name = "_menuItemRename"; - this._menuItemRename.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R))); - this._menuItemRename.Size = new System.Drawing.Size(166, 22); - this._menuItemRename.Text = "&Rename"; - // - // _menuItemEditValue - // - this._menuItemEditValue.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemEditValue.Image"))); - this._menuItemEditValue.Name = "_menuItemEditValue"; - this._menuItemEditValue.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E))); - this._menuItemEditValue.Size = new System.Drawing.Size(166, 22); - this._menuItemEditValue.Text = "&Edit Value"; - // - // _menuItemDelete - // - this._menuItemDelete.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemDelete.Image"))); - this._menuItemDelete.Name = "_menuItemDelete"; - this._menuItemDelete.ShortcutKeys = System.Windows.Forms.Keys.Delete; - this._menuItemDelete.Size = new System.Drawing.Size(166, 22); - this._menuItemDelete.Text = "&Delete"; - // - // searchToolStripMenuItem - // - this.searchToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this._menuItemFind, - this._menuItemFindNext}); - this.searchToolStripMenuItem.Name = "searchToolStripMenuItem"; - this.searchToolStripMenuItem.Size = new System.Drawing.Size(54, 20); - this.searchToolStripMenuItem.Text = "&Search"; - // - // _menuItemFind - // - this._menuItemFind.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemFind.Image"))); - this._menuItemFind.Name = "_menuItemFind"; - this._menuItemFind.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); - this._menuItemFind.Size = new System.Drawing.Size(146, 22); - this._menuItemFind.Text = "Find..."; - // - // _menuItemFindNext - // - this._menuItemFindNext.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemFindNext.Image"))); - this._menuItemFindNext.Name = "_menuItemFindNext"; - this._menuItemFindNext.ShortcutKeys = System.Windows.Forms.Keys.F3; - this._menuItemFindNext.Size = new System.Drawing.Size(146, 22); - this._menuItemFindNext.Text = "Find Next"; - // - // helpToolStripMenuItem - // - this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this._menuItemAbout}); - this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.helpToolStripMenuItem.Text = "&Help"; - // - // _menuItemAbout - // - this._menuItemAbout.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemAbout.Image"))); - this._menuItemAbout.Name = "_menuItemAbout"; - this._menuItemAbout.ShortcutKeys = System.Windows.Forms.Keys.F1; - this._menuItemAbout.Size = new System.Drawing.Size(126, 22); - this._menuItemAbout.Text = "&About"; - // - // _nodeTree - // - this._nodeTree.AllowDrop = true; - this._nodeTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this._nodeTree.ImageIndex = 0; - this._nodeTree.ImageList = this.imageList1; - this._nodeTree.ItemHeight = 18; - this._nodeTree.Location = new System.Drawing.Point(0, 49); - this._nodeTree.Margin = new System.Windows.Forms.Padding(0); - this._nodeTree.Name = "_nodeTree"; - this._nodeTree.SelectedImageIndex = 0; - this._nodeTree.Size = new System.Drawing.Size(619, 374); - this._nodeTree.TabIndex = 0; - // - // imageList1 - // - this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); - this.imageList1.TransparentColor = System.Drawing.Color.Transparent; - this.imageList1.Images.SetKeyName(0, "document-attribute-b.png"); - this.imageList1.Images.SetKeyName(1, "document-attribute-s.png"); - this.imageList1.Images.SetKeyName(2, "document-attribute-i.png"); - this.imageList1.Images.SetKeyName(3, "document-attribute-l.png"); - this.imageList1.Images.SetKeyName(4, "document-attribute-f.png"); - this.imageList1.Images.SetKeyName(5, "document-attribute-d.png"); - this.imageList1.Images.SetKeyName(6, "edit-code.png"); - this.imageList1.Images.SetKeyName(7, "edit-small-caps.png"); - this.imageList1.Images.SetKeyName(8, "edit-list.png"); - this.imageList1.Images.SetKeyName(9, "box.png"); - this.imageList1.Images.SetKeyName(10, "folder.png"); - this.imageList1.Images.SetKeyName(11, "block.png"); - this.imageList1.Images.SetKeyName(12, "wooden-box.png"); - this.imageList1.Images.SetKeyName(13, "map.png"); - this.imageList1.Images.SetKeyName(14, "edit-code-i.png"); - this.imageList1.Images.SetKeyName(15, "question-white.png"); - // - // toolStrip1 - // - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this._buttonOpen, - this._buttonOpenFolder, - this._buttonSave, - this.toolStripSeparator1, - this._buttonCut, - this._buttonCopy, - this._buttonPaste, - this.toolStripSeparator6, - this._buttonRename, - this._buttonEdit, - this._buttonDelete, - this.toolStripSeparator2, - this._buttonAddTagByte, - this._buttonAddTagShort, - this._buttonAddTagInt, - this._buttonAddTagLong, - this._buttonAddTagFloat, - this._buttonAddTagDouble, - this._buttonAddTagByteArray, - this._buttonAddTagIntArray, - this._buttonAddTagString, - this._buttonAddTagList, - this._buttonAddTagCompound, - this.toolStripSeparator5, - this._buttonFindNext}); - this.toolStrip1.Location = new System.Drawing.Point(0, 24); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(619, 25); - this.toolStrip1.Stretch = true; - this.toolStrip1.TabIndex = 0; - // - // _buttonOpen - // - this._buttonOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonOpen.Image = ((System.Drawing.Image)(resources.GetObject("_buttonOpen.Image"))); - this._buttonOpen.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonOpen.Name = "_buttonOpen"; - this._buttonOpen.Size = new System.Drawing.Size(23, 22); - this._buttonOpen.Text = "Open NBT Data Source"; - // - // _buttonOpenFolder - // - this._buttonOpenFolder.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonOpenFolder.Image = ((System.Drawing.Image)(resources.GetObject("_buttonOpenFolder.Image"))); - this._buttonOpenFolder.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonOpenFolder.Name = "_buttonOpenFolder"; - this._buttonOpenFolder.Size = new System.Drawing.Size(23, 22); - this._buttonOpenFolder.Text = "Open Folder"; - // - // _buttonSave - // - this._buttonSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonSave.Image = ((System.Drawing.Image)(resources.GetObject("_buttonSave.Image"))); - this._buttonSave.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonSave.Name = "_buttonSave"; - this._buttonSave.Size = new System.Drawing.Size(23, 22); - this._buttonSave.Text = "Save All Modified Tags"; - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // _buttonCut - // - this._buttonCut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonCut.Image = ((System.Drawing.Image)(resources.GetObject("_buttonCut.Image"))); - this._buttonCut.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonCut.Name = "_buttonCut"; - this._buttonCut.Size = new System.Drawing.Size(23, 22); - this._buttonCut.Text = "Cut"; - // - // _buttonCopy - // - this._buttonCopy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonCopy.Image = ((System.Drawing.Image)(resources.GetObject("_buttonCopy.Image"))); - this._buttonCopy.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonCopy.Name = "_buttonCopy"; - this._buttonCopy.Size = new System.Drawing.Size(23, 22); - this._buttonCopy.Text = "Copy"; - // - // _buttonPaste - // - this._buttonPaste.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonPaste.Image = ((System.Drawing.Image)(resources.GetObject("_buttonPaste.Image"))); - this._buttonPaste.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonPaste.Name = "_buttonPaste"; - this._buttonPaste.Size = new System.Drawing.Size(23, 22); - this._buttonPaste.Text = "Paste"; - // - // toolStripSeparator6 - // - this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25); - // - // _buttonRename - // - this._buttonRename.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonRename.Image = ((System.Drawing.Image)(resources.GetObject("_buttonRename.Image"))); - this._buttonRename.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonRename.Name = "_buttonRename"; - this._buttonRename.Size = new System.Drawing.Size(23, 22); - this._buttonRename.Text = "Rename Tag"; - // - // _buttonEdit - // - this._buttonEdit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonEdit.Image = ((System.Drawing.Image)(resources.GetObject("_buttonEdit.Image"))); - this._buttonEdit.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonEdit.Name = "_buttonEdit"; - this._buttonEdit.Size = new System.Drawing.Size(23, 22); - this._buttonEdit.Text = "Edit Tag Value"; - // - // _buttonDelete - // - this._buttonDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonDelete.Image = ((System.Drawing.Image)(resources.GetObject("_buttonDelete.Image"))); - this._buttonDelete.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonDelete.Name = "_buttonDelete"; - this._buttonDelete.Size = new System.Drawing.Size(23, 22); - this._buttonDelete.Text = "Delete Tag"; - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); - // - // _buttonAddTagByte - // - this._buttonAddTagByte.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagByte.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagByte.Image"))); - this._buttonAddTagByte.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagByte.Name = "_buttonAddTagByte"; - this._buttonAddTagByte.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagByte.Text = "Add Byte Tag"; - // - // _buttonAddTagShort - // - this._buttonAddTagShort.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagShort.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagShort.Image"))); - this._buttonAddTagShort.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagShort.Name = "_buttonAddTagShort"; - this._buttonAddTagShort.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagShort.Text = "Add Short Tag"; - // - // _buttonAddTagInt - // - this._buttonAddTagInt.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagInt.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagInt.Image"))); - this._buttonAddTagInt.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagInt.Name = "_buttonAddTagInt"; - this._buttonAddTagInt.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagInt.Text = "Add Int Tag"; - // - // _buttonAddTagLong - // - this._buttonAddTagLong.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagLong.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagLong.Image"))); - this._buttonAddTagLong.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagLong.Name = "_buttonAddTagLong"; - this._buttonAddTagLong.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagLong.Text = "Add Long Tag"; - // - // _buttonAddTagFloat - // - this._buttonAddTagFloat.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagFloat.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagFloat.Image"))); - this._buttonAddTagFloat.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagFloat.Name = "_buttonAddTagFloat"; - this._buttonAddTagFloat.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagFloat.Text = "Add Float Tag"; - // - // _buttonAddTagDouble - // - this._buttonAddTagDouble.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagDouble.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagDouble.Image"))); - this._buttonAddTagDouble.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagDouble.Name = "_buttonAddTagDouble"; - this._buttonAddTagDouble.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagDouble.Text = "Add Double Tag"; - // - // _buttonAddTagByteArray - // - this._buttonAddTagByteArray.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagByteArray.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagByteArray.Image"))); - this._buttonAddTagByteArray.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagByteArray.Name = "_buttonAddTagByteArray"; - this._buttonAddTagByteArray.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagByteArray.Text = "Add Byte Array Tag"; - // - // _buttonAddTagIntArray - // - this._buttonAddTagIntArray.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagIntArray.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagIntArray.Image"))); - this._buttonAddTagIntArray.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; - this._buttonAddTagIntArray.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagIntArray.Name = "_buttonAddTagIntArray"; - this._buttonAddTagIntArray.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagIntArray.Text = "Add Int Array Tag"; - // - // _buttonAddTagString - // - this._buttonAddTagString.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagString.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagString.Image"))); - this._buttonAddTagString.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagString.Name = "_buttonAddTagString"; - this._buttonAddTagString.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagString.Text = "Add String Tag"; - // - // _buttonAddTagList - // - this._buttonAddTagList.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagList.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagList.Image"))); - this._buttonAddTagList.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagList.Name = "_buttonAddTagList"; - this._buttonAddTagList.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagList.Text = "Add List Tag"; - // - // _buttonAddTagCompound - // - this._buttonAddTagCompound.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonAddTagCompound.Image = ((System.Drawing.Image)(resources.GetObject("_buttonAddTagCompound.Image"))); - this._buttonAddTagCompound.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonAddTagCompound.Name = "_buttonAddTagCompound"; - this._buttonAddTagCompound.Size = new System.Drawing.Size(23, 22); - this._buttonAddTagCompound.Text = "Add Compound Tag"; - // - // toolStripSeparator5 - // - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); - // - // _buttonFindNext - // - this._buttonFindNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._buttonFindNext.Image = ((System.Drawing.Image)(resources.GetObject("_buttonFindNext.Image"))); - this._buttonFindNext.ImageTransparentColor = System.Drawing.Color.Magenta; - this._buttonFindNext.Name = "_buttonFindNext"; - this._buttonFindNext.Size = new System.Drawing.Size(23, 22); - this._buttonFindNext.Text = "Find / Find Next"; - // - // BottomToolStripPanel - // - this.BottomToolStripPanel.Location = new System.Drawing.Point(0, 0); - this.BottomToolStripPanel.Name = "BottomToolStripPanel"; - this.BottomToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal; - this.BottomToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.BottomToolStripPanel.Size = new System.Drawing.Size(0, 0); - // - // TopToolStripPanel - // - this.TopToolStripPanel.Location = new System.Drawing.Point(0, 0); - this.TopToolStripPanel.Name = "TopToolStripPanel"; - this.TopToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal; - this.TopToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.TopToolStripPanel.Size = new System.Drawing.Size(0, 0); - // - // RightToolStripPanel - // - this.RightToolStripPanel.Location = new System.Drawing.Point(0, 0); - this.RightToolStripPanel.Name = "RightToolStripPanel"; - this.RightToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal; - this.RightToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.RightToolStripPanel.Size = new System.Drawing.Size(0, 0); - // - // LeftToolStripPanel - // - this.LeftToolStripPanel.Location = new System.Drawing.Point(0, 0); - this.LeftToolStripPanel.Name = "LeftToolStripPanel"; - this.LeftToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal; - this.LeftToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.LeftToolStripPanel.Size = new System.Drawing.Size(0, 0); - // - // ContentPanel - // - this.ContentPanel.Size = new System.Drawing.Size(562, 376); - // - // contextMenuStrip1 - // - this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.testToolStripMenuItem}); - this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(97, 26); - // - // testToolStripMenuItem - // - this.testToolStripMenuItem.Name = "testToolStripMenuItem"; - this.testToolStripMenuItem.Size = new System.Drawing.Size(96, 22); - this.testToolStripMenuItem.Text = "Test"; - // - // _menuItemRecentFiles - // - this._menuItemRecentFiles.Name = "_menuItemRecentFiles"; - this._menuItemRecentFiles.Size = new System.Drawing.Size(223, 22); - this._menuItemRecentFiles.Text = "Recent Files"; - // - // _menuItemRecentFolders - // - this._menuItemRecentFolders.Name = "_menuItemRecentFolders"; - this._menuItemRecentFolders.Size = new System.Drawing.Size(223, 22); - this._menuItemRecentFolders.Text = "Recent Folders"; - // - // toolStripSeparator8 - // - this.toolStripSeparator8.Name = "toolStripSeparator8"; - this.toolStripSeparator8.Size = new System.Drawing.Size(220, 6); - // - // MainForm - // - this.AllowDrop = true; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(619, 423); - this.Controls.Add(this.toolStrip1); - this.Controls.Add(this._nodeTree); - this.Controls.Add(this.menuStrip1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MainMenuStrip = this.menuStrip1; - this.Name = "MainForm"; - this.Text = "NBTExplorer"; - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - this.contextMenuStrip1.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem searchToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; - private System.Windows.Forms.TreeView _nodeTree; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripButton _buttonOpen; - private System.Windows.Forms.ToolStripButton _buttonSave; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripButton _buttonRename; - private System.Windows.Forms.ToolStripButton _buttonEdit; - private System.Windows.Forms.ToolStripButton _buttonDelete; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripButton _buttonAddTagByte; - private System.Windows.Forms.ToolStripButton _buttonAddTagShort; - private System.Windows.Forms.ToolStripButton _buttonAddTagInt; - private System.Windows.Forms.ToolStripButton _buttonAddTagLong; - private System.Windows.Forms.ToolStripButton _buttonAddTagFloat; - private System.Windows.Forms.ToolStripButton _buttonAddTagDouble; - private System.Windows.Forms.ToolStripButton _buttonAddTagByteArray; - private System.Windows.Forms.ToolStripButton _buttonAddTagList; - private System.Windows.Forms.ToolStripButton _buttonAddTagCompound; - private System.Windows.Forms.ImageList imageList1; - private System.Windows.Forms.ToolStripButton _buttonAddTagString; - private System.Windows.Forms.ToolStripMenuItem _menuItemAbout; - private System.Windows.Forms.ToolStripMenuItem _menuItemOpen; - private System.Windows.Forms.ToolStripMenuItem _menuItemOpenFolder; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripMenuItem _menuItemSave; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; - private System.Windows.Forms.ToolStripMenuItem _menuItemExit; - private System.Windows.Forms.ToolStripMenuItem _menuItemFind; - private System.Windows.Forms.ToolStripMenuItem _menuItemFindNext; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; - private System.Windows.Forms.ToolStripButton _buttonFindNext; - private System.Windows.Forms.ToolStripButton _buttonOpenFolder; - private System.Windows.Forms.ToolStripMenuItem _menuItemOpenMinecraftSaveFolder; - private System.Windows.Forms.ToolStripPanel BottomToolStripPanel; - private System.Windows.Forms.ToolStripPanel TopToolStripPanel; - private System.Windows.Forms.ToolStripPanel RightToolStripPanel; - private System.Windows.Forms.ToolStripPanel LeftToolStripPanel; - private System.Windows.Forms.ToolStripContentPanel ContentPanel; - private System.Windows.Forms.ToolStripButton _buttonAddTagIntArray; - private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem _menuItemCut; - private System.Windows.Forms.ToolStripMenuItem _menuItemCopy; - private System.Windows.Forms.ToolStripMenuItem _menuItemPaste; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; - private System.Windows.Forms.ToolStripMenuItem _menuItemRename; - private System.Windows.Forms.ToolStripMenuItem _menuItemEditValue; - private System.Windows.Forms.ToolStripMenuItem _menuItemDelete; - private System.Windows.Forms.ToolStripButton _buttonCut; - private System.Windows.Forms.ToolStripButton _buttonCopy; - private System.Windows.Forms.ToolStripButton _buttonPaste; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; - private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; - private System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem _menuItemRecentFiles; - private System.Windows.Forms.ToolStripMenuItem _menuItemRecentFolders; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; - } -} - diff --git a/NBTExplorerMac/MainForm.cs b/NBTExplorerMac/MainForm.cs deleted file mode 100644 index b6847ef..0000000 --- a/NBTExplorerMac/MainForm.cs +++ /dev/null @@ -1,983 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Threading; -using System.Windows.Forms; -using NBTExplorer.Forms; -using NBTExplorer.Model; -using Substrate.Nbt; -using NBTExplorer.Properties; -using System.Collections.Specialized; - -namespace NBTExplorer -{ - public partial class MainForm : Form - { - private static Dictionary _tagIconIndex; - - private IconRegistry _iconRegistry; - - private string _openFolderPath = null; - - static MainForm () - { - try { - _tagIconIndex = new Dictionary(); - _tagIconIndex[TagType.TAG_BYTE] = 0; - _tagIconIndex[TagType.TAG_SHORT] = 1; - _tagIconIndex[TagType.TAG_INT] = 2; - _tagIconIndex[TagType.TAG_LONG] = 3; - _tagIconIndex[TagType.TAG_FLOAT] = 4; - _tagIconIndex[TagType.TAG_DOUBLE] = 5; - _tagIconIndex[TagType.TAG_BYTE_ARRAY] = 6; - _tagIconIndex[TagType.TAG_STRING] = 7; - _tagIconIndex[TagType.TAG_LIST] = 8; - _tagIconIndex[TagType.TAG_COMPOUND] = 9; - _tagIconIndex[TagType.TAG_INT_ARRAY] = 14; - } - catch (Exception e) { - //Program.StaticInitFailure(e); - } - } - - public MainForm () - { - InitializeComponent(); - InitializeIconRegistry(); - - FormClosing += MainForm_Closing; - - _nodeTree.BeforeExpand += _nodeTree_BeforeExpand; - _nodeTree.AfterCollapse += _nodeTree_AfterCollapse; - _nodeTree.AfterSelect += _nodeTree_AfterSelect; - _nodeTree.NodeMouseDoubleClick += _nodeTree_NodeMouseDoubleClick; - _nodeTree.NodeMouseClick += _nodeTree_NodeMouseClick; - _nodeTree.DragEnter += _nodeTree_DragEnter; - _nodeTree.DragDrop += _nodeTree_DragDrop; - - _buttonOpen.Click += _buttonOpen_Click; - _buttonOpenFolder.Click += _buttonOpenFolder_Click; - _buttonSave.Click += _buttonSave_Click; - _buttonEdit.Click += _buttonEdit_Click; - _buttonRename.Click += _buttonRename_Click; - _buttonDelete.Click += _buttonDelete_Click; - _buttonCopy.Click += _buttonCopy_Click; - _buttonCut.Click += _buttonCut_Click; - _buttonPaste.Click += _buttonPaste_Click; - _buttonAddTagByte.Click += _buttonAddTagByte_Click; - _buttonAddTagByteArray.Click += _buttonAddTagByteArray_Click; - _buttonAddTagCompound.Click += _buttonAddTagCompound_Click; - _buttonAddTagDouble.Click += _buttonAddTagDouble_Click; - _buttonAddTagFloat.Click += _buttonAddTagFloat_Click; - _buttonAddTagInt.Click += _buttonAddTagInt_Click; - _buttonAddTagIntArray.Click += _buttonAddTagIntArray_Click; - _buttonAddTagList.Click += _buttonAddTagList_Click; - _buttonAddTagLong.Click += _buttonAddTagLong_Click; - _buttonAddTagShort.Click += _buttonAddTagShort_Click; - _buttonAddTagString.Click += _buttonAddTagString_Click; - _buttonFindNext.Click += _buttonFindNext_Click; - - _menuItemOpen.Click += _menuItemOpen_Click; - _menuItemOpenFolder.Click += _menuItemOpenFolder_Click; - _menuItemOpenMinecraftSaveFolder.Click += _menuItemOpenMinecraftSaveFolder_Click; - _menuItemSave.Click += _menuItemSave_Click; - _menuItemExit.Click += _menuItemExit_Click; - _menuItemEditValue.Click += _menuItemEditValue_Click; - _menuItemRename.Click += _menuItemRename_Click; - _menuItemDelete.Click += _menuItemDelete_Click; - _menuItemCopy.Click += _menuItemCopy_Click; - _menuItemCut.Click += _menuItemCut_Click; - _menuItemPaste.Click += _menuItemPaste_Click; - _menuItemFind.Click += _menuItemFind_Click; - _menuItemFindNext.Click += _menuItemFindNext_Click; - _menuItemAbout.Click += _menuItemAbout_Click; - - string[] args = Environment.GetCommandLineArgs(); - if (args.Length > 1) { - string[] paths = new string[args.Length - 1]; - Array.Copy(args, 1, paths, 0, paths.Length); - OpenPaths(paths); - } - else { - OpenMinecraftDirectory(); - } - - UpdateOpenMenu(); - } - - private void InitializeIconRegistry () - { - _iconRegistry = new IconRegistry(); - _iconRegistry.DefaultIcon = 15; - - _iconRegistry.Register(typeof(TagByteDataNode), 0); - _iconRegistry.Register(typeof(TagShortDataNode), 1); - _iconRegistry.Register(typeof(TagIntDataNode), 2); - _iconRegistry.Register(typeof(TagLongDataNode), 3); - _iconRegistry.Register(typeof(TagFloatDataNode), 4); - _iconRegistry.Register(typeof(TagDoubleDataNode), 5); - _iconRegistry.Register(typeof(TagByteArrayDataNode), 6); - _iconRegistry.Register(typeof(TagStringDataNode), 7); - _iconRegistry.Register(typeof(TagListDataNode), 8); - _iconRegistry.Register(typeof(TagCompoundDataNode), 9); - _iconRegistry.Register(typeof(RegionChunkDataNode), 9); - _iconRegistry.Register(typeof(DirectoryDataNode), 10); - _iconRegistry.Register(typeof(RegionFileDataNode), 11); - _iconRegistry.Register(typeof(CubicRegionDataNode), 11); - _iconRegistry.Register(typeof(NbtFileDataNode), 12); - _iconRegistry.Register(typeof(TagIntArrayDataNode), 14); - } - - private void OpenFile () - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.RestoreDirectory = true; - ofd.Multiselect = true; - - if (ofd.ShowDialog() == DialogResult.OK) { - OpenPaths(ofd.FileNames); - } - - UpdateUI(); - } - - private void OpenFolder () - { - FolderBrowserDialog ofd = new FolderBrowserDialog(); - if (_openFolderPath != null) - ofd.SelectedPath = _openFolderPath; - - if (ofd.ShowDialog() == DialogResult.OK) { - _openFolderPath = ofd.SelectedPath; - OpenPaths(new string[] { ofd.SelectedPath }); - } - - UpdateUI(); - } - - private void OpenPaths (string[] paths) - { - _nodeTree.Nodes.Clear(); - - foreach (string path in paths) { - if (Directory.Exists(path)) { - DirectoryDataNode node = new DirectoryDataNode(path); - _nodeTree.Nodes.Add(CreateUnexpandedNode(node)); - - AddPathToHistory(Settings.Default.RecentDirectories, path); - } - else if (File.Exists(path)) { - DataNode node = null; - foreach (var item in FileTypeRegistry.RegisteredTypes) { - if (item.Value.NamePatternTest(path)) - node = item.Value.NodeCreate(path); - } - - if (node != null) { - _nodeTree.Nodes.Add(CreateUnexpandedNode(node)); - AddPathToHistory(Settings.Default.RecentFiles, path); - } - } - } - - if (_nodeTree.Nodes.Count > 0) { - _nodeTree.Nodes[0].Expand(); - } - - UpdateUI(); - UpdateOpenMenu(); - } - - private void OpenMinecraftDirectory () - { - try { - string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); - path = Path.Combine(path, ".minecraft"); - path = Path.Combine(path, "saves"); - - if (!Directory.Exists(path)) { - path = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer); - } - - OpenPaths(new string[] { path }); - } - catch (Exception e) { - MessageBox.Show("Could not open default Minecraft save directory"); - Console.WriteLine(e.Message); - - try { - OpenPaths(new string[] { Directory.GetCurrentDirectory() }); - } - catch (Exception) { - MessageBox.Show("Could not open current directory, this tool is probably not compatible with your platform."); - Console.WriteLine(e.Message); - Application.Exit(); - } - } - - UpdateUI(); - } - - private TreeNode CreateUnexpandedNode (DataNode node) - { - TreeNode frontNode = new TreeNode(node.NodeDisplay); - frontNode.ImageIndex = _iconRegistry.Lookup(node.GetType()); - frontNode.SelectedImageIndex = frontNode.ImageIndex; - frontNode.Tag = node; - frontNode.ContextMenuStrip = BuildNodeContextMenu(node); - - if (node.HasUnexpandedChildren || node.Nodes.Count > 0) - frontNode.Nodes.Add(new TreeNode()); - - return frontNode; - } - - private ContextMenuStrip BuildNodeContextMenu (DataNode node) - { - if (node == null) - return null; - - ContextMenuStrip menu = new ContextMenuStrip(); - - if (node.CanReoderNode) { - ToolStripMenuItem itemUp = new ToolStripMenuItem("Move &Up", Properties.Resources.ArrowUp, _contextMoveUp_Click); - ToolStripMenuItem itemDn = new ToolStripMenuItem("Move &Down", Properties.Resources.ArrowDown, _contextMoveDown_Click); - - itemUp.Enabled = node.CanMoveNodeUp; - itemDn.Enabled = node.CanMoveNodeDown; - - menu.Items.Add(itemUp); - menu.Items.Add(itemDn); - } - - return (menu.Items.Count > 0) ? menu : null; - } - - private void _contextMoveUp_Click (object sender, EventArgs e) - { - TreeNode frontNode = _nodeTree.SelectedNode; - if (frontNode == null) - return; - - DataNode node = frontNode.Tag as DataNode; - if (node == null || !node.CanMoveNodeUp) - return; - - node.ChangeRelativePosition(-1); - RefreshChildNodes(frontNode.Parent, node.Parent); - } - - private void _contextMoveDown_Click (object sender, EventArgs e) - { - TreeNode frontNode = _nodeTree.SelectedNode; - if (frontNode == null) - return; - - DataNode node = frontNode.Tag as DataNode; - if (node == null || !node.CanMoveNodeDown) - return; - - node.ChangeRelativePosition(1); - RefreshChildNodes(frontNode.Parent, node.Parent); - } - - private void ExpandNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - if (node.IsExpanded) - return; - - node.Nodes.Clear(); - - DataNode backNode = node.Tag as DataNode; - if (!backNode.IsExpanded) - backNode.Expand(); - - foreach (DataNode child in backNode.Nodes) - node.Nodes.Add(CreateUnexpandedNode(child)); - } - - private void CollapseNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode backNode = node.Tag as DataNode; - if (backNode.IsModified) - return; - - backNode.Collapse(); - - node.Nodes.Clear(); - if (backNode.HasUnexpandedChildren) - node.Nodes.Add(new TreeNode()); - } - - private void CreateNode (TreeNode node, TagType type) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanCreateTag(type)) - return; - - if (dataNode.CreateNode(type)) { - node.Text = dataNode.NodeDisplay; - RefreshChildNodes(node, dataNode); - UpdateUI(dataNode); - } - } - - private void RefreshChildNodes (TreeNode node, DataNode dataNode) - { - Dictionary currentNodes = new Dictionary(); - foreach (TreeNode child in node.Nodes) { - if (child.Tag is DataNode) - currentNodes.Add(child.Tag as DataNode, child); - } - - node.Nodes.Clear(); - foreach (DataNode child in dataNode.Nodes) { - if (!currentNodes.ContainsKey(child)) - node.Nodes.Add(CreateUnexpandedNode(child)); - else - node.Nodes.Add(currentNodes[child]); - } - - foreach (TreeNode child in node.Nodes) - child.ContextMenuStrip = BuildNodeContextMenu(child.Tag as DataNode); - - if (node.Nodes.Count == 0 && dataNode.HasUnexpandedChildren) { - ExpandNode(node); - node.Expand(); - } - } - - private void EditNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanEditNode) - return; - - if (dataNode.EditNode()) { - node.Text = dataNode.NodeDisplay; - UpdateUI(dataNode); - } - } - - private void RenameNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanRenameNode) - return; - - if (dataNode.RenameNode()) { - node.Text = dataNode.NodeDisplay; - UpdateUI(dataNode); - } - } - - private void DeleteNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanDeleteNode) - return; - - if (dataNode.DeleteNode()) { - UpdateUI(node.Parent.Tag as DataNode); - UpdateNodeText(node.Parent); - node.Remove(); - } - } - - private void CopyNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanCopyNode) - return; - - dataNode.CopyNode(); - } - - private void CutNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanCutNode) - return; - - if (dataNode.CutNode()) { - UpdateUI(node.Parent.Tag as DataNode); - UpdateNodeText(node.Parent); - node.Remove(); - } - } - - private void PasteNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanPasteIntoNode) - return; - - if (dataNode.PasteNode()) { - node.Text = dataNode.NodeDisplay; - RefreshChildNodes(node, dataNode); - UpdateUI(dataNode); - } - } - - private void Save () - { - foreach (TreeNode node in _nodeTree.Nodes) { - DataNode dataNode = node.Tag as DataNode; - if (dataNode != null) - dataNode.Save(); - } - - UpdateUI(); - } - - private bool ConfirmExit () - { - if (CheckModifications()) { - if (MessageBox.Show("You currently have unsaved changes. Close anyway?", "Unsaved Changes", MessageBoxButtons.OKCancel) != DialogResult.OK) - return false; - } - - return true; - } - - private CancelSearchForm _searchForm; - private SearchState _searchState; - - private void SearchNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanSearchNode) - return; - - Find form = new Find(); - if (form.ShowDialog() != DialogResult.OK) - return; - - _searchState = new SearchState() { - RootNode = dataNode, - SearchName = form.NameToken, - SearchValue = form.ValueToken, - DiscoverCallback = SearchDiscoveryCallback, - CollapseCallback = SearchCollapseCallback, - EndCallback = SearchEndCallback, - }; - - SearchNextNode(); - } - - private void SearchNextNode () - { - if (_searchState == null) - return; - - SearchWorker worker = new SearchWorker(_searchState, this); - - Thread t = new Thread(new ThreadStart(worker.Run)); - t.IsBackground = true; - t.Start(); - - _searchForm = new CancelSearchForm(); - if (_searchForm.ShowDialog(this) == DialogResult.Cancel) { - worker.Cancel(); - _searchState = null; - } - - t.Join(); - } - - private void SearchDiscoveryCallback (DataNode node) - { - _nodeTree.SelectedNode = FindFrontNode(node); - - if (_searchForm != null) { - _searchForm.DialogResult = DialogResult.OK; - _searchForm = null; - } - } - - private void SearchCollapseCallback (DataNode node) - { - CollapseBelow(node); - } - - private void SearchEndCallback (DataNode node) - { - _searchForm.DialogResult = DialogResult.OK; - _searchForm = null; - - MessageBox.Show("End of results"); - } - - private TreeNode GetRootFromDataNodePath (DataNode node, out Stack hierarchy) - { - hierarchy = new Stack(); - while (node != null) { - hierarchy.Push(node); - node = node.Parent; - } - - DataNode rootDataNode = hierarchy.Pop(); - TreeNode frontNode = null; - foreach (TreeNode child in _nodeTree.Nodes) { - if (child.Tag == rootDataNode) - frontNode = child; - } - - return frontNode; - } - - private TreeNode FindFrontNode (DataNode node) - { - Stack hierarchy; - TreeNode frontNode = GetRootFromDataNodePath(node, out hierarchy); - - if (frontNode == null) - return null; - - while (hierarchy.Count > 0) { - if (!frontNode.IsExpanded) { - frontNode.Nodes.Add(new TreeNode()); - frontNode.Expand(); - } - - DataNode childData = hierarchy.Pop(); - foreach (TreeNode childFront in frontNode.Nodes) { - if (childFront.Tag == childData) { - frontNode = childFront; - break; - } - } - } - - return frontNode; - } - - private void CollapseBelow (DataNode node) - { - Stack hierarchy; - TreeNode frontNode = GetRootFromDataNodePath(node, out hierarchy); - - if (frontNode == null) - return; - - while (hierarchy.Count > 0) { - if (!frontNode.IsExpanded) - return; - - DataNode childData = hierarchy.Pop(); - foreach (TreeNode childFront in frontNode.Nodes) { - if (childFront.Tag == childData) { - frontNode = childFront; - break; - } - } - } - - if (frontNode.IsExpanded) - frontNode.Collapse(); - } - - private void UpdateNodeText (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - node.Text = dataNode.NodeDisplay; - } - - private bool CheckModifications () - { - foreach (TreeNode node in _nodeTree.Nodes) { - DataNode dataNode = node.Tag as DataNode; - if (dataNode != null && dataNode.IsModified) - return true; - } - - return false; - } - - private void UpdateUI () - { - TreeNode selected = _nodeTree.SelectedNode; - if (selected != null && selected.Tag is DataNode) { - UpdateUI(selected.Tag as DataNode); - } - else { - _buttonSave.Enabled = CheckModifications(); - _buttonFindNext.Enabled = false; - - _menuItemSave.Enabled = _buttonSave.Enabled; - _menuItemFind.Enabled = false; - _menuItemFindNext.Enabled = _searchState != null; - } - } - - private void UpdateUI (DataNode node) - { - if (node == null) - return; - - _buttonAddTagByte.Enabled = node.CanCreateTag(TagType.TAG_BYTE); - _buttonAddTagByteArray.Enabled = node.CanCreateTag(TagType.TAG_BYTE_ARRAY); - _buttonAddTagCompound.Enabled = node.CanCreateTag(TagType.TAG_COMPOUND); - _buttonAddTagDouble.Enabled = node.CanCreateTag(TagType.TAG_DOUBLE); - _buttonAddTagFloat.Enabled = node.CanCreateTag(TagType.TAG_FLOAT); - _buttonAddTagInt.Enabled = node.CanCreateTag(TagType.TAG_INT); - _buttonAddTagIntArray.Enabled = node.CanCreateTag(TagType.TAG_INT_ARRAY); - _buttonAddTagList.Enabled = node.CanCreateTag(TagType.TAG_LIST); - _buttonAddTagLong.Enabled = node.CanCreateTag(TagType.TAG_LONG); - _buttonAddTagShort.Enabled = node.CanCreateTag(TagType.TAG_SHORT); - _buttonAddTagString.Enabled = node.CanCreateTag(TagType.TAG_STRING); - - _buttonSave.Enabled = CheckModifications(); - _buttonCopy.Enabled = node.CanCopyNode; - _buttonCut.Enabled = node.CanCutNode; - _buttonDelete.Enabled = node.CanDeleteNode; - _buttonEdit.Enabled = node.CanEditNode; - _buttonFindNext.Enabled = node.CanSearchNode || _searchState != null; - _buttonPaste.Enabled = node.CanPasteIntoNode; - _buttonRename.Enabled = node.CanRenameNode; - - _menuItemSave.Enabled = _buttonSave.Enabled; - _menuItemCopy.Enabled = node.CanCopyNode; - _menuItemCut.Enabled = node.CanCutNode; - _menuItemDelete.Enabled = node.CanDeleteNode; - _menuItemEditValue.Enabled = node.CanEditNode; - _menuItemFind.Enabled = node.CanSearchNode; - _menuItemPaste.Enabled = node.CanPasteIntoNode; - _menuItemRename.Enabled = node.CanRenameNode; - _menuItemFind.Enabled = node.CanSearchNode; - _menuItemFindNext.Enabled = _searchState != null; - } - - private void UpdateOpenMenu () - { - try { - if (Settings.Default.RecentDirectories == null) - Settings.Default.RecentDirectories = new StringCollection(); - if (Settings.Default.RecentFiles == null) - Settings.Default.RecentFiles = new StringCollection(); - } - catch { - return; - } - - _menuItemRecentFolders.DropDown = BuildRecentEntriesDropDown(Settings.Default.RecentDirectories); - _menuItemRecentFiles.DropDown = BuildRecentEntriesDropDown(Settings.Default.RecentFiles); - } - - private ToolStripDropDown BuildRecentEntriesDropDown (StringCollection list) - { - if (list == null || list.Count == 0) - return new ToolStripDropDown(); - - ToolStripDropDown menu = new ToolStripDropDown(); - foreach (string entry in list) { - ToolStripMenuItem item = new ToolStripMenuItem("&" + (menu.Items.Count + 1) + " " + entry); - item.Tag = entry; - item.Click += _menuItemRecentPaths_Click; - - menu.Items.Add(item); - } - - return menu; - } - - private void AddPathToHistory (StringCollection list, string entry) - { - foreach (string item in list) { - if (item == entry) { - list.Remove(item); - break; - } - } - - while (list.Count >= 5) - list.RemoveAt(list.Count - 1); - - list.Insert(0, entry); - } - - #region Event Handlers - - private void MainForm_Closing (object sender, CancelEventArgs e) - { - Settings.Default.RecentFiles = Settings.Default.RecentFiles; - Settings.Default.Save(); - if (!ConfirmExit()) - e.Cancel = true; - } - - #region TreeView Event Handlers - - private void _nodeTree_BeforeExpand (object sender, TreeViewCancelEventArgs e) - { - ExpandNode(e.Node); - } - - private void _nodeTree_AfterCollapse (object sender, TreeViewEventArgs e) - { - CollapseNode(e.Node); - } - - private void _nodeTree_AfterSelect (object sender, TreeViewEventArgs e) - { - if (e.Node != null) - UpdateUI(e.Node.Tag as DataNode); - } - - private void _nodeTree_NodeMouseDoubleClick (object sender, TreeNodeMouseClickEventArgs e) - { - EditNode(e.Node); - } - - private void _nodeTree_NodeMouseClick (object sender, TreeNodeMouseClickEventArgs e) - { - if (e.Button == MouseButtons.Right) - _nodeTree.SelectedNode = e.Node; - } - - private void _nodeTree_DragDrop (object sender, DragEventArgs e) - { - OpenPaths((string[])e.Data.GetData(DataFormats.FileDrop)); - } - - private void _nodeTree_DragEnter (object sender, DragEventArgs e) - { - if (e.Data.GetDataPresent(DataFormats.FileDrop)) - e.Effect = DragDropEffects.Copy; - } - - #endregion - - #region Toolstrip Event Handlers - - private void _buttonOpen_Click (object sender, EventArgs e) - { - OpenFile(); - } - - private void _buttonOpenFolder_Click (object sender, EventArgs e) - { - OpenFolder(); - } - - private void _buttonSave_Click (object sender, EventArgs e) - { - Save(); - } - - private void _buttonEdit_Click (object sender, EventArgs e) - { - EditNode(_nodeTree.SelectedNode); - } - - private void _buttonRename_Click (object sender, EventArgs e) - { - RenameNode(_nodeTree.SelectedNode); - } - - private void _buttonDelete_Click (object sender, EventArgs e) - { - DeleteNode(_nodeTree.SelectedNode); - } - - private void _buttonCopy_Click (object sernder, EventArgs e) - { - CopyNode(_nodeTree.SelectedNode); - } - - private void _buttonCut_Click (object sernder, EventArgs e) - { - CutNode(_nodeTree.SelectedNode); - } - - private void _buttonPaste_Click (object sernder, EventArgs e) - { - PasteNode(_nodeTree.SelectedNode); - } - - private void _buttonAddTagByteArray_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_BYTE_ARRAY); - } - - private void _buttonAddTagByte_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_BYTE); - } - - private void _buttonAddTagCompound_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_COMPOUND); - } - - private void _buttonAddTagDouble_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_DOUBLE); - } - - private void _buttonAddTagFloat_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_FLOAT); - } - - private void _buttonAddTagInt_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_INT); - } - - private void _buttonAddTagIntArray_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_INT_ARRAY); - } - - private void _buttonAddTagList_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_LIST); - } - - private void _buttonAddTagLong_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_LONG); - } - - private void _buttonAddTagShort_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_SHORT); - } - - private void _buttonAddTagString_Click (object sender, EventArgs e) - { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_STRING); - } - - private void _buttonFindNext_Click (object sender, EventArgs e) - { - if (_searchState != null) - SearchNextNode(); - else - SearchNode(_nodeTree.SelectedNode); - } - - #endregion - - #region Menu Event Handlers - - private void _menuItemOpen_Click (object sender, EventArgs e) - { - OpenFile(); - } - - private void _menuItemOpenFolder_Click (object sender, EventArgs e) - { - OpenFolder(); - } - - private void _menuItemOpenMinecraftSaveFolder_Click (object sender, EventArgs e) - { - OpenMinecraftDirectory(); - } - - private void _menuItemSave_Click (object sender, EventArgs e) - { - Save(); - } - - private void _menuItemExit_Click (object sender, EventArgs e) - { - Settings.Default.Save(); - Close(); - } - - private void _menuItemEditValue_Click (object sender, EventArgs e) - { - EditNode(_nodeTree.SelectedNode); - } - - private void _menuItemRename_Click (object sender, EventArgs e) - { - RenameNode(_nodeTree.SelectedNode); - } - - private void _menuItemDelete_Click (object sender, EventArgs e) - { - DeleteNode(_nodeTree.SelectedNode); - } - - private void _menuItemCopy_Click (object sender, EventArgs e) - { - CopyNode(_nodeTree.SelectedNode); - } - - private void _menuItemCut_Click (object sender, EventArgs e) - { - CutNode(_nodeTree.SelectedNode); - } - - private void _menuItemPaste_Click (object sender, EventArgs e) - { - PasteNode(_nodeTree.SelectedNode); - } - - private void _menuItemFind_Click (object sender, EventArgs e) - { - SearchNode(_nodeTree.SelectedNode); - } - - private void _menuItemFindNext_Click (object sender, EventArgs e) - { - SearchNextNode(); - } - - private void _menuItemAbout_Click (object sender, EventArgs e) - { - new About().ShowDialog(); - } - - private void _menuItemRecentPaths_Click (object sender, EventArgs e) - { - ToolStripMenuItem item = sender as ToolStripMenuItem; - if (item == null || !(item.Tag is string)) - return; - - OpenPaths(new string[] { item.Tag as string }); - } - - #endregion - - #endregion - } -} diff --git a/NBTExplorerMac/MainForm.resources b/NBTExplorerMac/MainForm.resources deleted file mode 100644 index 9c8c28e..0000000 Binary files a/NBTExplorerMac/MainForm.resources and /dev/null differ diff --git a/NBTExplorerMac/MainForm.resx b/NBTExplorerMac/MainForm.resx deleted file mode 100644 index f77388b..0000000 --- a/NBTExplorerMac/MainForm.resx +++ /dev/null @@ -1,1146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAACkklEQVQ4T43SX0hTURzA8d9b - 9O/BHjP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PhvAAD8PwAA+AcAAPMD - AADmBwAA/nMAAP53AAD/fwAA/38AAA== - - - \ No newline at end of file diff --git a/NBTExplorerMac/Model/CompoundTagContainer.cs b/NBTExplorerMac/Model/CompoundTagContainer.cs deleted file mode 100644 index 7df9f75..0000000 --- a/NBTExplorerMac/Model/CompoundTagContainer.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class CompoundTagContainer : INamedTagContainer - { - private TagNodeCompound _tag; - - public CompoundTagContainer (TagNodeCompound tag) - { - _tag = tag; - } - - public int TagCount - { - get { return _tag.Count; } - } - - public IEnumerable TagNamesInUse - { - get { return _tag.Keys; } - } - - public string GetTagName (TagNode tag) - { - foreach (String name in _tag.Keys) - if (_tag[name] == tag) - return name; - - return null; - } - - public bool AddTag (TagNode tag, string name) - { - if (_tag.ContainsKey(name)) - return false; - - _tag.Add(name, tag); - return true; - } - - public bool RenameTag (TagNode tag, string name) - { - if (_tag.ContainsKey(name)) - return false; - - string oldName = GetTagName(tag); - _tag.Remove(oldName); - _tag.Add(name, tag); - - return true; - } - - public bool DeleteTag (TagNode tag) - { - foreach (String name in _tag.Keys) - if (_tag[name] == tag) - return _tag.Remove(name); - - return false; - } - } -} diff --git a/NBTExplorerMac/Model/CubicRegionDataNode.cs b/NBTExplorerMac/Model/CubicRegionDataNode.cs deleted file mode 100644 index 51de6f5..0000000 --- a/NBTExplorerMac/Model/CubicRegionDataNode.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.IO; -using System.Text.RegularExpressions; -using System.Windows.Forms; - -namespace NBTExplorer.Model -{ - public class CubicRegionDataNode : DataNode - { - private string _path; - private CubicRegionFile _region; - - private static Regex _namePattern = new Regex(@"^r2(\.-?\d+){3}\.(mcr|mca)$"); - - private CubicRegionDataNode (string path) - { - _path = path; - } - - public static CubicRegionDataNode TryCreateFrom (string path) - { - return new CubicRegionDataNode(path); - } - - public static bool SupportedNamePattern (string path) - { - path = Path.GetFileName(path); - return _namePattern.IsMatch(path); - } - - protected override NodeCapabilities Capabilities - { - get - { - return NodeCapabilities.Search; - } - } - - public override bool HasUnexpandedChildren - { - get { return !IsExpanded; } - } - - public override string NodeDisplay - { - get { return Path.GetFileName(_path); } - } - - protected override void ExpandCore () - { - try { - if (_region == null) - _region = new CubicRegionFile(_path); - - for (int x = 0; x < 32; x++) { - for (int z = 0; z < 32; z++) { - if (_region.HasChunk(x, z)) { - Nodes.Add(new RegionChunkDataNode(_region, x, z)); - } - } - } - } - catch { - MessageBox.Show("Not a valid cubic region file.", "Read Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } - } - - protected override void ReleaseCore () - { - if (_region != null) - _region.Close(); - _region = null; - Nodes.Clear(); - } - } -} diff --git a/NBTExplorerMac/Model/CubicRegionFile.cs b/NBTExplorerMac/Model/CubicRegionFile.cs deleted file mode 100644 index c54cf7a..0000000 --- a/NBTExplorerMac/Model/CubicRegionFile.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Substrate.Core; - -namespace NBTExplorer.Model -{ - public class CubicRegionFile : RegionFile - { - private const int _sectorBytes = 256; - private static byte[] _emptySector = new byte[_sectorBytes]; - - public CubicRegionFile (string path) - : base(path) - { } - - protected override int SectorBytes - { - get { return _sectorBytes; } - } - - protected override byte[] EmptySector - { - get { return _emptySector; } - } - } -} diff --git a/NBTExplorerMac/Model/DataNode.cs b/NBTExplorerMac/Model/DataNode.cs deleted file mode 100644 index bfe356e..0000000 --- a/NBTExplorerMac/Model/DataNode.cs +++ /dev/null @@ -1,215 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class DataNode - { - private DataNode _parent; - private DataNodeCollection _children; - - private bool _expanded; - private bool _modified; - - public DataNode () - { - _children = new DataNodeCollection(this); - } - - public DataNode Parent - { - get { return _parent; } - internal set { _parent = value; } - } - - public DataNodeCollection Nodes - { - get { return _children; } - } - - public bool IsModified - { - get { return _modified; } - set - { - if (value && Parent != null) - Parent.IsModified = value; - _modified = value; - } - } - - public bool IsExpanded - { - get { return _expanded; } - private set { _expanded = value; } - } - - public void Expand () - { - if (!IsExpanded) { - ExpandCore(); - IsExpanded = true; - } - } - - protected virtual void ExpandCore () { } - - public void Collapse () - { - if (IsExpanded && !IsModified) { - Release(); - IsExpanded = false; - } - } - - public void Release () - { - foreach (DataNode node in Nodes) - node.Release(); - - ReleaseCore(); - IsExpanded = false; - } - - protected virtual void ReleaseCore () - { - Nodes.Clear(); - } - - public void Save () - { - foreach (DataNode node in Nodes) - if (node.IsModified) - node.Save(); - - SaveCore(); - IsModified = false; - } - - protected virtual void SaveCore () - { - } - - public virtual string NodeName - { - get { return ""; } - } - - public virtual string NodeDisplay - { - get { return ""; } - } - - public virtual bool HasUnexpandedChildren - { - get { return false; } - } - - #region Capabilities - - protected virtual NodeCapabilities Capabilities - { - get { return NodeCapabilities.None; } - } - - public virtual bool CanRenameNode - { - get { return (Capabilities & NodeCapabilities.Rename) != NodeCapabilities.None; } - } - - public virtual bool CanEditNode - { - get { return (Capabilities & NodeCapabilities.Edit) != NodeCapabilities.None; } - } - - public virtual bool CanDeleteNode - { - get { return (Capabilities & NodeCapabilities.Delete) != NodeCapabilities.None; } - } - - public virtual bool CanCopyNode - { - get { return (Capabilities & NodeCapabilities.Copy) != NodeCapabilities.None; } - } - - public virtual bool CanCutNode - { - get { return (Capabilities & NodeCapabilities.Cut) != NodeCapabilities.None; } - } - - public virtual bool CanPasteIntoNode - { - get { return (Capabilities & NodeCapabilities.PasteInto) != NodeCapabilities.None; } - } - - public virtual bool CanSearchNode - { - get { return (Capabilities & NodeCapabilities.Search) != NodeCapabilities.None; } - } - - public virtual bool CanReoderNode - { - get { return (Capabilities & NodeCapabilities.Reorder) != NodeCapabilities.None; } - } - - public virtual bool CanMoveNodeUp - { - get { return false; } - } - - public virtual bool CanMoveNodeDown - { - get { return false; } - } - - public virtual bool CanCreateTag (TagType type) - { - return false; - } - - #endregion - - #region Operations - - public virtual bool CreateNode (TagType type) - { - return false; - } - - public virtual bool RenameNode () - { - return false; - } - - public virtual bool EditNode () - { - return false; - } - - public virtual bool DeleteNode () - { - return false; - } - - public virtual bool CopyNode () - { - return false; - } - - public virtual bool CutNode () - { - return false; - } - - public virtual bool PasteNode () - { - return false; - } - - public virtual bool ChangeRelativePosition (int offset) - { - return false; - } - - #endregion - } -} diff --git a/NBTExplorerMac/Model/DataNodeCollection.cs b/NBTExplorerMac/Model/DataNodeCollection.cs deleted file mode 100644 index 52ffbcf..0000000 --- a/NBTExplorerMac/Model/DataNodeCollection.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NBTExplorer.Model -{ - public class DataNodeCollection : IList - { - private List _nodes; - private DataNode _parent; - - internal DataNodeCollection (DataNode parent) - { - _parent = parent; - _nodes = new List(); - } - - public int IndexOf (DataNode item) - { - return _nodes.IndexOf(item); - } - - public void Insert (int index, DataNode item) - { - if (item == null) - throw new ArgumentNullException("item"); - if (item.Parent != null) - throw new ArgumentException("The item is already assigned to another DataNode."); - - item.Parent = _parent; - - _nodes.Insert(index, item); - } - - public void RemoveAt (int index) - { - if (index < 0 || index >= _nodes.Count) - throw new ArgumentOutOfRangeException("index"); - - DataNode node = _nodes[index]; - node.Parent = null; - - _nodes.RemoveAt(index); - } - - DataNode IList.this[int index] - { - get { return _nodes[index]; } - set - { - if (index < 0 || index > _nodes.Count) - throw new ArgumentOutOfRangeException("index"); - if (value == null) - throw new ArgumentNullException("item"); - if (value.Parent != null) - throw new ArgumentException("The item is already assigned to another DataNode."); - - _nodes[index].Parent = null; - _nodes[index] = value; - _nodes[index].Parent = _parent; - } - } - - public void Add (DataNode item) - { - if (item == null) - throw new ArgumentNullException("item"); - if (item.Parent != null) - throw new ArgumentException("The item is already assigned to another DataNode."); - - item.Parent = _parent; - - _nodes.Add(item); - } - - public void Clear () - { - foreach (DataNode node in _nodes) - node.Parent = null; - - _nodes.Clear(); - } - - public bool Contains (DataNode item) - { - return _nodes.Contains(item); - } - - public void CopyTo (DataNode[] array, int arrayIndex) - { - _nodes.CopyTo(array, arrayIndex); - } - - public int Count - { - get { return _nodes.Count; } - } - - bool ICollection.IsReadOnly - { - get { return (_nodes as IList).IsReadOnly; } - } - - public bool Remove (DataNode item) - { - if (_nodes.Contains(item)) - item.Parent = null; - - return _nodes.Remove(item); - } - - public IEnumerator GetEnumerator () - { - return _nodes.GetEnumerator(); - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator () - { - return _nodes.GetEnumerator(); - } - } -} diff --git a/NBTExplorerMac/Model/DirectoryDataNode.cs b/NBTExplorerMac/Model/DirectoryDataNode.cs deleted file mode 100644 index 8d2d272..0000000 --- a/NBTExplorerMac/Model/DirectoryDataNode.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.IO; - -namespace NBTExplorer.Model -{ - public class DirectoryDataNode : DataNode - { - private string _path; - - public DirectoryDataNode (string path) - { - _path = path; - } - - protected override NodeCapabilities Capabilities - { - get - { - return NodeCapabilities.Search; - } - } - - public override string NodeDisplay - { - get { return Path.GetFileName(_path); } - } - - public override bool HasUnexpandedChildren - { - get { return !IsExpanded; } - } - - protected override void ExpandCore () - { - foreach (string dirpath in Directory.GetDirectories(_path)) { - Nodes.Add(new DirectoryDataNode(dirpath)); - } - - foreach (string filepath in Directory.GetFiles(_path)) { - DataNode node = null; - foreach (var item in FileTypeRegistry.RegisteredTypes) { - if (item.Value.NamePatternTest(filepath)) - node = item.Value.NodeCreate(filepath); - } - - if (node != null) - Nodes.Add(node); - } - } - - protected override void ReleaseCore () - { - Nodes.Clear(); - } - } -} diff --git a/NBTExplorerMac/Model/FileTypeRegistry.cs b/NBTExplorerMac/Model/FileTypeRegistry.cs deleted file mode 100644 index c2d2cef..0000000 --- a/NBTExplorerMac/Model/FileTypeRegistry.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NBTExplorer.Model -{ - public delegate bool NamePatternTestFunc (string path); - public delegate DataNode NodeCreateFunc (string path); - - public class FileTypeRecord - { - public NamePatternTestFunc NamePatternTest { get; set; } - public NodeCreateFunc NodeCreate { get; set; } - } - - public class FileTypeRegistry - { - private static Dictionary _registry = new Dictionary(); - - public static FileTypeRecord Lookup (Type type) - { - if (_registry.ContainsKey(type)) - return _registry[type]; - else - return null; - } - - public static void Register (Type type, FileTypeRecord record) - { - _registry[type] = record; - } - - public static void Register (FileTypeRecord record) - { - Register(typeof(T), record); - } - - public static IEnumerable> RegisteredTypes - { - get - { - foreach (var item in _registry) - yield return item; - } - } - - static FileTypeRegistry () - { - try { - Register(new FileTypeRecord() { - NamePatternTest = NbtFileDataNode.SupportedNamePattern, - NodeCreate = NbtFileDataNode.TryCreateFrom, - }); - - Register(new FileTypeRecord() { - NamePatternTest = RegionFileDataNode.SupportedNamePattern, - NodeCreate = RegionFileDataNode.TryCreateFrom, - }); - - Register(new FileTypeRecord() { - NamePatternTest = CubicRegionDataNode.SupportedNamePattern, - NodeCreate = CubicRegionDataNode.TryCreateFrom, - }); - } - catch (Exception e) { - //Program.StaticInitFailure(e); - } - } - } -} diff --git a/NBTExplorerMac/Model/ListTagContainer.cs b/NBTExplorerMac/Model/ListTagContainer.cs deleted file mode 100644 index 1f4f3cd..0000000 --- a/NBTExplorerMac/Model/ListTagContainer.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class ListTagContainer : IOrderedTagContainer - { - private TagNodeList _tag; - - public ListTagContainer (TagNodeList tag) - { - _tag = tag; - } - - public int TagCount - { - get { return _tag.Count; } - } - - public bool DeleteTag (TagNode tag) - { - return _tag.Remove(tag); - } - - public int GetTagIndex (TagNode tag) - { - return _tag.IndexOf(tag); - } - - public bool InsertTag (TagNode tag, int index) - { - if (index < 0 || index > _tag.Count) - return false; - - _tag.Insert(index, tag); - return true; - } - } -} diff --git a/NBTExplorerMac/Model/NbtFileDataNode.cs b/NBTExplorerMac/Model/NbtFileDataNode.cs deleted file mode 100644 index 6d4681f..0000000 --- a/NBTExplorerMac/Model/NbtFileDataNode.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System.IO; -using Substrate.Core; -using Substrate.Nbt; -using System.Text.RegularExpressions; - -namespace NBTExplorer.Model -{ - public class NbtFileDataNode : DataNode, IMetaTagContainer - { - private NbtTree _tree; - private string _path; - private CompressionType _compressionType; - - private CompoundTagContainer _container; - - private static Regex _namePattern = new Regex(@"\.(dat|nbt|schematic)$"); - - private NbtFileDataNode (string path, CompressionType compressionType) - { - _path = path; - _compressionType = compressionType; - _container = new CompoundTagContainer(new TagNodeCompound()); - } - - public static NbtFileDataNode TryCreateFrom (string path) - { - return TryCreateFrom(path, CompressionType.GZip) - ?? TryCreateFrom(path, CompressionType.None); - } - - private static NbtFileDataNode TryCreateFrom (string path, CompressionType compressionType) - { - try { - NBTFile file = new NBTFile(path); - NbtTree tree = new NbtTree(); - tree.ReadFrom(file.GetDataInputStream(compressionType)); - - if (tree.Root == null) - return null; - - return new NbtFileDataNode(path, compressionType); - } - catch { - return null; - } - } - - public static bool SupportedNamePattern (string path) - { - path = Path.GetFileName(path); - return _namePattern.IsMatch(path); - } - - protected override NodeCapabilities Capabilities - { - get - { - return NodeCapabilities.CreateTag - | NodeCapabilities.PasteInto - | NodeCapabilities.Search; - } - } - - public override string NodeName - { - get { return Path.GetFileName(_path); } - } - - public override string NodeDisplay - { - get { return NodeName; } - } - - public override bool HasUnexpandedChildren - { - get { return !IsExpanded; } - } - - protected override void ExpandCore () - { - if (_tree == null) { - NBTFile file = new NBTFile(_path); - _tree = new NbtTree(); - _tree.ReadFrom(file.GetDataInputStream(_compressionType)); - - if (_tree.Root != null) - _container = new CompoundTagContainer(_tree.Root); - } - - foreach (TagNode tag in _tree.Root.Values) { - TagDataNode node = TagDataNode.CreateFromTag(tag); - if (node != null) - Nodes.Add(node); - } - } - - protected override void ReleaseCore () - { - _tree = null; - Nodes.Clear(); - } - - protected override void SaveCore () - { - NBTFile file = new NBTFile(_path); - using (Stream str = file.GetDataOutputStream(_compressionType)) { - _tree.WriteTo(str); - } - } - - public bool IsNamedContainer - { - get { return true; } - } - - public bool IsOrderedContainer - { - get { return false; } - } - - public INamedTagContainer NamedTagContainer - { - get { return _container; } - } - - public IOrderedTagContainer OrderedTagContainer - { - get { return null; } - } - - public int TagCount - { - get { return _container.TagCount; } - } - - public bool DeleteTag (TagNode tag) - { - return _container.DeleteTag(tag); - } - } -} diff --git a/NBTExplorerMac/Model/NodeCapabilities.cs b/NBTExplorerMac/Model/NodeCapabilities.cs deleted file mode 100644 index 9588730..0000000 --- a/NBTExplorerMac/Model/NodeCapabilities.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace NBTExplorer.Model -{ - [Flags] - public enum NodeCapabilities - { - None = 0, - Cut = 0x1, - Copy = 0x2, - PasteInto = 0x4, - Rename = 0x8, - Edit = 0x10, - Delete = 0x20, - CreateTag = 0x40, - Search = 0x80, - Reorder = 0x100, - } -} diff --git a/NBTExplorerMac/Model/RegionChunkDataNode.cs b/NBTExplorerMac/Model/RegionChunkDataNode.cs deleted file mode 100644 index 02be164..0000000 --- a/NBTExplorerMac/Model/RegionChunkDataNode.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Substrate.Core; -using Substrate.Nbt; -using System.IO; - -namespace NBTExplorer.Model -{ - public class RegionChunkDataNode : DataNode, IMetaTagContainer - { - private RegionFile _regionFile; - private NbtTree _tree; - private int _x; - private int _z; - - private CompoundTagContainer _container; - - public RegionChunkDataNode (RegionFile regionFile, int x, int z) - { - _regionFile = regionFile; - _x = x; - _z = z; - _container = new CompoundTagContainer(new TagNodeCompound()); - } - - protected override NodeCapabilities Capabilities - { - get - { - return NodeCapabilities.CreateTag - | NodeCapabilities.PasteInto - | NodeCapabilities.Search; - } - } - - public override bool HasUnexpandedChildren - { - get { return !IsExpanded; } - } - - public override string NodeDisplay - { - get { return "Chunk [" + _x + ", " + _z + "]"; } - } - - protected override void ExpandCore () - { - if (_tree == null) { - _tree = new NbtTree(); - _tree.ReadFrom(_regionFile.GetChunkDataInputStream(_x, _z)); - - if (_tree.Root != null) - _container = new CompoundTagContainer(_tree.Root); - } - - foreach (TagNode tag in _tree.Root.Values) { - TagDataNode node = TagDataNode.CreateFromTag(tag); - if (node != null) - Nodes.Add(node); - } - } - - protected override void ReleaseCore () - { - _tree = null; - Nodes.Clear(); - } - - protected override void SaveCore () - { - using (Stream str = _regionFile.GetChunkDataOutputStream(_x, _z)) { - _tree.WriteTo(str); - } - } - - public bool IsNamedContainer - { - get { return true; } - } - - public bool IsOrderedContainer - { - get { return false; } - } - - public INamedTagContainer NamedTagContainer - { - get { return _container; } - } - - public IOrderedTagContainer OrderedTagContainer - { - get { return null; } - } - - public int TagCount - { - get { return _container.TagCount; } - } - - public bool DeleteTag (TagNode tag) - { - return _container.DeleteTag(tag); - } - } -} diff --git a/NBTExplorerMac/Model/RegionFileDataNode.cs b/NBTExplorerMac/Model/RegionFileDataNode.cs deleted file mode 100644 index 4fb1a2d..0000000 --- a/NBTExplorerMac/Model/RegionFileDataNode.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System.IO; -using System.Windows.Forms; -using Substrate.Core; -using System.Text.RegularExpressions; - -namespace NBTExplorer.Model -{ - public class RegionFileDataNode : DataNode - { - private string _path; - private RegionFile _region; - - private static Regex _namePattern = new Regex(@"^r(\.-?\d+){2}\.(mcr|mca)$"); - - private RegionFileDataNode (string path) - { - _path = path; - } - - public static RegionFileDataNode TryCreateFrom (string path) - { - return new RegionFileDataNode(path); - } - - public static bool SupportedNamePattern (string path) - { - path = Path.GetFileName(path); - return _namePattern.IsMatch(path); - } - - protected override NodeCapabilities Capabilities - { - get - { - return NodeCapabilities.Search; - } - } - - public override bool HasUnexpandedChildren - { - get { return !IsExpanded; } - } - - public override string NodeDisplay - { - get { return Path.GetFileName(_path); } - } - - protected override void ExpandCore () - { - try { - if (_region == null) - _region = new RegionFile(_path); - - for (int x = 0; x < 32; x++) { - for (int z = 0; z < 32; z++) { - if (_region.HasChunk(x, z)) { - Nodes.Add(new RegionChunkDataNode(_region, x, z)); - } - } - } - } - catch { - MessageBox.Show("Not a valid region file.", "Read Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } - } - - protected override void ReleaseCore () - { - if (_region != null) - _region.Close(); - _region = null; - Nodes.Clear(); - } - } -} diff --git a/NBTExplorerMac/Model/TagByteArrayDataNode.cs b/NBTExplorerMac/Model/TagByteArrayDataNode.cs deleted file mode 100644 index 0ed183b..0000000 --- a/NBTExplorerMac/Model/TagByteArrayDataNode.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagByteArrayDataNode : TagDataNode - { - public TagByteArrayDataNode (TagNodeByteArray tag) - : base(tag) - { } - - protected new TagNodeByteArray Tag - { - get { return base.Tag as TagNodeByteArray; } - } - - public override bool CanEditNode - { - get { return !IsMono(); } - } - - public override bool EditNode () - { - return EditByteHexValue(Tag); - } - - public override string NodeDisplay - { - get { return NodeDisplayPrefix + Tag.Data.Length + " bytes"; } - } - - private bool IsMono () - { - return Type.GetType("Mono.Runtime") != null; - } - } -} diff --git a/NBTExplorerMac/Model/TagByteDataNode.cs b/NBTExplorerMac/Model/TagByteDataNode.cs deleted file mode 100644 index cfc803a..0000000 --- a/NBTExplorerMac/Model/TagByteDataNode.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagByteDataNode : TagDataNode - { - public TagByteDataNode (TagNodeByte tag) - : base(tag) - { } - - protected new TagNodeByte Tag - { - get { return base.Tag as TagNodeByte; } - } - - public override bool EditNode () - { - return EditScalarValue(Tag); - } - - public override string NodeDisplay - { - get { return NodeDisplayPrefix + unchecked((sbyte)Tag.Data).ToString(); } - } - } -} diff --git a/NBTExplorerMac/Model/TagCompoundDataNode.cs b/NBTExplorerMac/Model/TagCompoundDataNode.cs deleted file mode 100644 index d4810ae..0000000 --- a/NBTExplorerMac/Model/TagCompoundDataNode.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagCompoundDataNode : TagDataNode.Container - { - private CompoundTagContainer _container; - - public TagCompoundDataNode (TagNodeCompound tag) - : base(tag) - { - _container = new CompoundTagContainer(tag); - } - - protected new TagNodeCompound Tag - { - get { return base.Tag as TagNodeCompound; } - } - - protected override void ExpandCore () - { - var list = new SortedList(); - foreach (var item in Tag) { - list.Add(new TagKey(item.Key, item.Value.GetTagType()), item.Value); - } - - foreach (var item in list) { - TagDataNode node = TagDataNode.CreateFromTag(item.Value); - if (node != null) - Nodes.Add(node); - } - } - - public override bool CanCreateTag (TagType type) - { - return Enum.IsDefined(typeof(TagType), type) && type != TagType.TAG_END; - } - - public override bool CanPasteIntoNode - { - get { return NbtClipboardData.ContainsData; } - } - - public override bool CreateNode (TagType type) - { - if (!CanCreateTag(type)) - return false; - - CreateNodeForm form = new CreateNodeForm(type, true); - form.InvalidNames.AddRange(_container.TagNamesInUse); - - if (form.ShowDialog() == DialogResult.OK) { - AddTag(form.TagNode, form.TagName); - return true; - } - - return false; - } - - public override bool PasteNode () - { - if (!CanPasteIntoNode) - return false; - - NbtClipboardData clipboard = NbtClipboardData.CopyFromClipboard(); - if (clipboard.Node == null) - return false; - - string name = clipboard.Name; - if (String.IsNullOrEmpty(name)) - name = "UNNAMED"; - - AddTag(clipboard.Node, MakeUniqueName(name)); - return true; - } - - public override bool IsNamedContainer - { - get { return true; } - } - - public override INamedTagContainer NamedTagContainer - { - get { return _container; } - } - - public override int TagCount - { - get { return _container.TagCount; } - } - - public override bool DeleteTag (TagNode tag) - { - return _container.DeleteTag(tag); - } - - private void AddTag (TagNode tag, string name) - { - _container.AddTag(tag, name); - IsModified = true; - - if (IsExpanded) { - TagDataNode node = TagDataNode.CreateFromTag(tag); - if (node != null) - Nodes.Add(node); - } - } - - private string MakeUniqueName (string name) - { - List names = new List(_container.TagNamesInUse); - if (!names.Contains(name)) - return name; - - int index = 1; - while (names.Contains(MakeCandidateName(name, index))) - index++; - - return MakeCandidateName(name, index); - } - - private string MakeCandidateName (string name, int index) - { - return name + " (Copy " + index + ")"; - } - } -} diff --git a/NBTExplorerMac/Model/TagContainerInterface.cs b/NBTExplorerMac/Model/TagContainerInterface.cs deleted file mode 100644 index 35c56b2..0000000 --- a/NBTExplorerMac/Model/TagContainerInterface.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections.Generic; -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public interface ITagContainer - { - int TagCount { get; } - - bool DeleteTag (TagNode tag); - } - - public interface IMetaTagContainer : ITagContainer - { - bool IsNamedContainer { get; } - bool IsOrderedContainer { get; } - - INamedTagContainer NamedTagContainer { get; } - IOrderedTagContainer OrderedTagContainer { get; } - } - - public interface INamedTagContainer : ITagContainer - { - IEnumerable TagNamesInUse { get; } - - string GetTagName (TagNode tag); - bool AddTag (TagNode tag, string name); - bool RenameTag (TagNode tag, string name); - } - - public interface IOrderedTagContainer : ITagContainer - { - int GetTagIndex (TagNode tag); - bool InsertTag (TagNode tag, int index); - } -} diff --git a/NBTExplorerMac/Model/TagDataNode.cs b/NBTExplorerMac/Model/TagDataNode.cs deleted file mode 100644 index 9ddc61f..0000000 --- a/NBTExplorerMac/Model/TagDataNode.cs +++ /dev/null @@ -1,344 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public abstract class TagDataNode : DataNode - { - public abstract class Container : TagDataNode, IMetaTagContainer - { - protected Container (TagNode tag) - : base(tag) - { } - - #region ITagContainer - - public virtual int TagCount - { - get { return 0; } - } - - public virtual bool IsNamedContainer - { - get { return false; } - } - - public virtual bool IsOrderedContainer - { - get { return false; } - } - - public virtual INamedTagContainer NamedTagContainer - { - get { return null; } - } - - public virtual IOrderedTagContainer OrderedTagContainer - { - get { return null; } - } - - public virtual bool DeleteTag (TagNode tag) - { - return false; - } - - #endregion - - protected override NodeCapabilities Capabilities - { - get - { - return NodeCapabilities.Copy - | NodeCapabilities.CreateTag - | NodeCapabilities.Cut - | NodeCapabilities.Delete - | NodeCapabilities.PasteInto - | (TagParent.IsNamedContainer ? NodeCapabilities.Rename : NodeCapabilities.None) - | (TagParent.IsOrderedContainer ? NodeCapabilities.Reorder : NodeCapabilities.None) - | NodeCapabilities.Search; - } - } - - public override bool HasUnexpandedChildren - { - get { return !IsExpanded && TagCount > 0; } - } - - public override string NodeDisplay - { - get { return NodeDisplayPrefix + TagCount + ((TagCount == 1) ? " entry" : " entries"); } - } - } - - private static Dictionary _tagRegistry; - - static TagDataNode () - { - _tagRegistry = new Dictionary(); - _tagRegistry[TagType.TAG_BYTE] = typeof(TagByteDataNode); - _tagRegistry[TagType.TAG_BYTE_ARRAY] = typeof(TagByteArrayDataNode); - _tagRegistry[TagType.TAG_COMPOUND] = typeof(TagCompoundDataNode); - _tagRegistry[TagType.TAG_DOUBLE] = typeof(TagDoubleDataNode); - _tagRegistry[TagType.TAG_FLOAT] = typeof(TagFloatDataNode); - _tagRegistry[TagType.TAG_INT] = typeof(TagIntDataNode); - _tagRegistry[TagType.TAG_INT_ARRAY] = typeof(TagIntArrayDataNode); - _tagRegistry[TagType.TAG_LIST] = typeof(TagListDataNode); - _tagRegistry[TagType.TAG_LONG] = typeof(TagLongDataNode); - _tagRegistry[TagType.TAG_SHORT] = typeof(TagShortDataNode); - _tagRegistry[TagType.TAG_STRING] = typeof(TagStringDataNode); - } - - static public TagDataNode CreateFromTag (TagNode tag) - { - if (tag == null || !_tagRegistry.ContainsKey(tag.GetTagType())) - return null; - - return Activator.CreateInstance(_tagRegistry[tag.GetTagType()], tag) as TagDataNode; - } - - static public TagNode DefaultTag (TagType type) - { - switch (type) { - case TagType.TAG_BYTE: - return new TagNodeByte(0); - case TagType.TAG_BYTE_ARRAY: - return new TagNodeByteArray(new byte[0]); - case TagType.TAG_COMPOUND: - return new TagNodeCompound(); - case TagType.TAG_DOUBLE: - return new TagNodeDouble(0); - case TagType.TAG_FLOAT: - return new TagNodeFloat(0); - case TagType.TAG_INT: - return new TagNodeInt(0); - case TagType.TAG_INT_ARRAY: - return new TagNodeIntArray(new int[0]); - case TagType.TAG_LIST: - return new TagNodeList(TagType.TAG_BYTE); - case TagType.TAG_LONG: - return new TagNodeLong(0); - case TagType.TAG_SHORT: - return new TagNodeShort(0); - case TagType.TAG_STRING: - return new TagNodeString(""); - default: - return new TagNodeByte(0); - } - } - - private TagNode _tag; - - protected TagDataNode (TagNode tag) - { - _tag = tag; - } - - protected IMetaTagContainer TagParent - { - get { return base.Parent as IMetaTagContainer; } - } - - protected TagNode Tag - { - get { return _tag; } - set - { - if (_tag.GetTagType() == value.GetTagType()) - _tag = value; - } - } - - protected override NodeCapabilities Capabilities - { - get - { - return NodeCapabilities.Copy - | NodeCapabilities.Cut - | NodeCapabilities.Delete - | NodeCapabilities.Edit - | (TagParent.IsNamedContainer ? NodeCapabilities.Rename : NodeCapabilities.None) - | (TagParent.IsOrderedContainer ? NodeCapabilities.Reorder : NodeCapabilities.None); - } - } - - public override bool CanMoveNodeUp - { - get - { - if (TagParent.IsOrderedContainer) - return TagParent.OrderedTagContainer.GetTagIndex(Tag) > 0; - return false; - } - } - - public override bool CanMoveNodeDown - { - get - { - if (TagParent.IsOrderedContainer) - return TagParent.OrderedTagContainer.GetTagIndex(Tag) < (TagParent.TagCount - 1); - return false; - } - } - - public override string NodeName - { - get - { - if (TagParent == null || !TagParent.IsNamedContainer) - return null; - - return TagParent.NamedTagContainer.GetTagName(Tag); - } - } - - protected string NodeDisplayPrefix - { - get - { - string name = NodeName; - return String.IsNullOrEmpty(name) ? "" : name + ": "; - } - } - - public override string NodeDisplay - { - get { return NodeDisplayPrefix + Tag.ToString(); } - } - - public override bool DeleteNode () - { - if (CanDeleteNode) { - TagParent.DeleteTag(Tag); - return Parent.Nodes.Remove(this); - } - - return false; - } - - public override bool RenameNode () - { - if (CanRenameNode && TagParent.IsNamedContainer) { - EditName form = new EditName(TagParent.NamedTagContainer.GetTagName(Tag)); - form.InvalidNames.AddRange(TagParent.NamedTagContainer.TagNamesInUse); - if (form.ShowDialog() == DialogResult.OK && form.IsModified) { - if (TagParent.NamedTagContainer.RenameTag(Tag, form.TagName)) { - IsModified = true; - return true; - } - } - } - - return false; - } - - public override bool CopyNode () - { - if (CanCopyNode) { - NbtClipboardData clip = new NbtClipboardData(NodeName, Tag); - clip.CopyToClipboard(); - return true; - } - - return false; - } - - public override bool CutNode () - { - if (CanCutNode) { - NbtClipboardData clip = new NbtClipboardData(NodeName, Tag); - clip.CopyToClipboard(); - - TagParent.DeleteTag(Tag); - Parent.Nodes.Remove(this); - return true; - } - - return false; - } - - public override bool ChangeRelativePosition (int offset) - { - if (CanReoderNode) { - int curIndex = TagParent.OrderedTagContainer.GetTagIndex(Tag); - int newIndex = curIndex + offset; - - if (newIndex < 0 || newIndex >= TagParent.OrderedTagContainer.TagCount) - return false; - - TagParent.OrderedTagContainer.DeleteTag(Tag); - TagParent.OrderedTagContainer.InsertTag(Tag, newIndex); - - DataNode parent = Parent; - parent.Nodes.Remove(this); - parent.Nodes.Insert(newIndex, this); - parent.IsModified = true; - return true; - } - - return false; - } - - protected bool EditScalarValue (TagNode tag) - { - EditValue form = new EditValue(tag); - if (form.ShowDialog() == DialogResult.OK) { - IsModified = true; - return true; - } - else - return false; - } - - protected bool EditStringValue (TagNode tag) - { - EditString form = new EditString(tag.ToTagString().Data); - if (form.ShowDialog() == DialogResult.OK) { - tag.ToTagString().Data = form.StringValue; - - IsModified = true; - return true; - } - else - return false; - } - - protected bool EditByteHexValue (TagNode tag) - { - HexEditor form = new HexEditor(NodeName, tag.ToTagByteArray().Data, 1); - if (form.ShowDialog() == DialogResult.OK && form.Modified) { - Array.Copy(form.Data, tag.ToTagByteArray().Data, tag.ToTagByteArray().Length); - - IsModified = true; - return true; - } - else - return false; - } - - protected bool EditIntHexValue (TagNode tag) - { - TagNodeIntArray iatag = tag.ToTagIntArray(); - byte[] data = new byte[iatag.Length * 4]; - for (int i = 0; i < iatag.Length; i++) { - byte[] buf = BitConverter.GetBytes(iatag.Data[i]); - Array.Copy(buf, 0, data, 4 * i, 4); - } - - HexEditor form = new HexEditor(NodeName, data, 4); - if (form.ShowDialog() == DialogResult.OK && form.Modified) { - for (int i = 0; i < iatag.Length; i++) { - iatag.Data[i] = BitConverter.ToInt32(form.Data, i * 4); - } - - IsModified = true; - return true; - } - else - return false; - } - } -} diff --git a/NBTExplorerMac/Model/TagDoubleDataNode.cs b/NBTExplorerMac/Model/TagDoubleDataNode.cs deleted file mode 100644 index e1fd990..0000000 --- a/NBTExplorerMac/Model/TagDoubleDataNode.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagDoubleDataNode : TagDataNode - { - public TagDoubleDataNode (TagNodeDouble tag) - : base(tag) - { } - - public override bool EditNode () - { - return EditScalarValue(Tag); - } - } -} diff --git a/NBTExplorerMac/Model/TagFloatDataNode.cs b/NBTExplorerMac/Model/TagFloatDataNode.cs deleted file mode 100644 index 30c8946..0000000 --- a/NBTExplorerMac/Model/TagFloatDataNode.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagFloatDataNode : TagDataNode - { - public TagFloatDataNode (TagNodeFloat tag) - : base(tag) - { } - - public override bool EditNode () - { - return EditScalarValue(Tag); - } - } -} diff --git a/NBTExplorerMac/Model/TagIntArrayDataNode.cs b/NBTExplorerMac/Model/TagIntArrayDataNode.cs deleted file mode 100644 index a11bb98..0000000 --- a/NBTExplorerMac/Model/TagIntArrayDataNode.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagIntArrayDataNode : TagDataNode - { - public TagIntArrayDataNode (TagNodeIntArray tag) - : base(tag) - { } - - protected new TagNodeIntArray Tag - { - get { return base.Tag as TagNodeIntArray; } - } - - public override bool CanEditNode - { - get { return !IsMono(); } - } - - public override bool EditNode () - { - return EditIntHexValue(Tag); - } - - public override string NodeDisplay - { - get { return NodeDisplayPrefix + Tag.Data.Length + " integers"; } - } - - private bool IsMono () - { - return Type.GetType("Mono.Runtime") != null; - } - } -} diff --git a/NBTExplorerMac/Model/TagIntDataNode.cs b/NBTExplorerMac/Model/TagIntDataNode.cs deleted file mode 100644 index 2cda6c3..0000000 --- a/NBTExplorerMac/Model/TagIntDataNode.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagIntDataNode : TagDataNode - { - public TagIntDataNode (TagNodeInt tag) - : base(tag) - { } - - public override bool EditNode () - { - return EditScalarValue(Tag); - } - } -} diff --git a/NBTExplorerMac/Model/TagListDataNode.cs b/NBTExplorerMac/Model/TagListDataNode.cs deleted file mode 100644 index ecc630b..0000000 --- a/NBTExplorerMac/Model/TagListDataNode.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagListDataNode : TagDataNode.Container - { - private ListTagContainer _container; - - public TagListDataNode (TagNodeList tag) - : base(tag) - { - _container = new ListTagContainer(tag); - } - - protected new TagNodeList Tag - { - get { return base.Tag as TagNodeList; } - set { base.Tag = value; } - } - - protected override void ExpandCore () - { - foreach (TagNode tag in Tag) { - TagDataNode node = TagDataNode.CreateFromTag(tag); - if (node != null) - Nodes.Add(node); - } - } - - public override bool CanCreateTag (TagType type) - { - if (Tag.Count > 0) - return Tag.ValueType == type; - else - return Enum.IsDefined(typeof(TagType), type) && type != TagType.TAG_END; - } - - public override bool CanPasteIntoNode - { - get - { - if (NbtClipboardData.ContainsData) { - TagNode node = NbtClipboardData.CopyFromClipboard().Node; - if (node != null && node.GetTagType() == Tag.ValueType) - return true; - } - - return false; - } - } - - public override bool CreateNode (TagType type) - { - if (!CanCreateTag(type)) - return false; - - if (Tag.Count == 0) { - Tag.ChangeValueType(type); - } - - AppendTag(TagDataNode.DefaultTag(type)); - return true; - } - - public override bool PasteNode () - { - if (!CanPasteIntoNode) - return false; - - NbtClipboardData clipboard = NbtClipboardData.CopyFromClipboard(); - if (clipboard.Node == null) - return false; - - AppendTag(clipboard.Node); - return true; - } - - public override bool IsOrderedContainer - { - get { return true; } - } - - public override IOrderedTagContainer OrderedTagContainer - { - get { return _container; } - } - - public override int TagCount - { - get { return _container.TagCount; } - } - - public override bool DeleteTag (TagNode tag) - { - return _container.DeleteTag(tag); - } - - private void AppendTag (TagNode tag) - { - _container.InsertTag(tag, _container.TagCount); - IsModified = true; - - if (IsExpanded) { - TagDataNode node = TagDataNode.CreateFromTag(tag); - if (node != null) - Nodes.Add(node); - } - } - } -} diff --git a/NBTExplorerMac/Model/TagLongDataNode.cs b/NBTExplorerMac/Model/TagLongDataNode.cs deleted file mode 100644 index 3051802..0000000 --- a/NBTExplorerMac/Model/TagLongDataNode.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagLongDataNode : TagDataNode - { - public TagLongDataNode (TagNodeLong tag) - : base(tag) - { } - - public override bool EditNode () - { - return EditScalarValue(Tag); - } - } -} diff --git a/NBTExplorerMac/Model/TagShortDataNode.cs b/NBTExplorerMac/Model/TagShortDataNode.cs deleted file mode 100644 index beff379..0000000 --- a/NBTExplorerMac/Model/TagShortDataNode.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagShortDataNode : TagDataNode - { - public TagShortDataNode (TagNodeShort tag) - : base(tag) - { } - - public override bool EditNode () - { - return EditScalarValue(Tag); - } - } -} diff --git a/NBTExplorerMac/Model/TagStringDataNode.cs b/NBTExplorerMac/Model/TagStringDataNode.cs deleted file mode 100644 index 1624073..0000000 --- a/NBTExplorerMac/Model/TagStringDataNode.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Substrate.Nbt; - -namespace NBTExplorer.Model -{ - public class TagStringDataNode : TagDataNode - { - public TagStringDataNode (TagNodeString tag) - : base(tag) - { } - - public override bool EditNode () - { - return EditStringValue(Tag); - } - - public override string NodeDisplay - { - get { return NodeDisplayPrefix + Tag.ToString().Replace('\n', (char)0x00B6); } - } - } -} diff --git a/NBTExplorerMac/NBTExplorerMac.csproj b/NBTExplorerMac/NBTExplorerMac.csproj deleted file mode 100644 index d8255dd..0000000 --- a/NBTExplorerMac/NBTExplorerMac.csproj +++ /dev/null @@ -1,266 +0,0 @@ - - - - Debug - AnyCPU - 10.0.0 - 2.0 - {01F9A296-C477-4CBF-A0D0-41E697048257} - {948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Exe - NBTExplorer - Resources - NBTExplorer - - - True - full - False - bin\Debug - DEBUG; - prompt - 4 - False - False - False - False - False - Mac Developer - 3rd Party Mac Developer Installer - - - none - True - bin\Release - prompt - 4 - False - True - Full - False - False - False - Mac Developer - 3rd Party Mac Developer Installer - - - none - True - bin\AppStore - prompt - 4 - 3rd Party Mac Developer Installer - True - Full - True - False - True - True - 3rd Party Mac Developer Application - - - - - - - - - ..\..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MainWindow.cs - - - - AppDelegate.cs - - - - - - - - EditValue.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/NBTExplorerMac/NbtClipboardData.cs b/NBTExplorerMac/NbtClipboardData.cs deleted file mode 100644 index 02ea8bf..0000000 --- a/NBTExplorerMac/NbtClipboardData.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.IO; -using System.Windows.Forms; -using Substrate.Nbt; - -namespace NBTExplorer -{ - [Serializable] - public class NbtClipboardData - { - public string Name; - - private byte[] _data; - - [NonSerialized] - public TagNode Node; - - public NbtClipboardData (String name, TagNode node) - { - Name = name; - - TagNodeCompound root = new TagNodeCompound(); - root.Add("root", node); - NbtTree tree = new NbtTree(root); - - using (MemoryStream ms = new MemoryStream()) { - tree.WriteTo(ms); - _data = new byte[ms.Length]; - Array.Copy(ms.GetBuffer(), _data, ms.Length); - } - } - - public static bool ContainsData - { - get { return Clipboard.ContainsData(typeof(NbtClipboardData).FullName); } - } - - public void CopyToClipboard () - { - Clipboard.SetData(typeof(NbtClipboardData).FullName, this); - } - - public static NbtClipboardData CopyFromClipboard () - { - NbtClipboardData clip = Clipboard.GetData(typeof(NbtClipboardData).FullName) as NbtClipboardData; - if (clip == null) - return null; - - NbtTree tree = new NbtTree(); - using (MemoryStream ms = new MemoryStream(clip._data)) { - tree.ReadFrom(ms); - } - - TagNodeCompound root = tree.Root; - if (root == null || !root.ContainsKey("root")) - return null; - - clip.Node = root["root"]; - return clip; - } - } -} diff --git a/NBTExplorerMac/Program.cs b/NBTExplorerMac/Program.cs deleted file mode 100644 index 509525b..0000000 --- a/NBTExplorerMac/Program.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ObjCRuntime; - -namespace NBTExplorer -{ - static class Program - { - /// - /// The main entry point for the application. - /// - //[STAThread] - static void Main (string[] args) - { - NSApplication.Init (); - NSApplication.Main (args); - - //Application.EnableVisualStyles(); - //Application.SetCompatibleTextRenderingDefault(false); - ///Application.Run(new MainForm()); - } - - /*public static void StaticInitFailure (Exception e) - { - Console.WriteLine("Static Initialization Failure:"); - - Exception original = e; - while (e != null) { - Console.WriteLine(e.Message); - Console.WriteLine(e.StackTrace); - e = e.InnerException; - } - - MessageBox.Show("Application failed during static initialization: " + original.Message); - Application.Exit(); - }*/ - } -} diff --git a/NBTExplorerMac/Properties/AssemblyInfo.cs b/NBTExplorerMac/Properties/AssemblyInfo.cs deleted file mode 100644 index 66baf9f..0000000 --- a/NBTExplorerMac/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NBTExplorer")] -[assembly: AssemblyDescription("Graphical editor for most NBT data sources. NBT is used by Minecraft.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NBTExplorer")] -[assembly: AssemblyCopyright("Copyright © Justin Aquadro 2011-2012")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("11f3587a-6155-499e-b7b5-ebd48fdca479")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.2.0")] -[assembly: AssemblyFileVersion("2.0.2.0")] diff --git a/NBTExplorerMac/Properties/Resources.Designer.cs b/NBTExplorerMac/Properties/Resources.Designer.cs deleted file mode 100644 index 0d3bc07..0000000 --- a/NBTExplorerMac/Properties/Resources.Designer.cs +++ /dev/null @@ -1,77 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.269 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NBTExplorer.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NBTExplorer.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static System.Drawing.Bitmap ArrowDown { - get { - object obj = ResourceManager.GetObject("ArrowDown", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - internal static System.Drawing.Bitmap ArrowUp { - get { - object obj = ResourceManager.GetObject("ArrowUp", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/NBTExplorerMac/Properties/Resources.resources b/NBTExplorerMac/Properties/Resources.resources deleted file mode 100644 index b0ac470..0000000 Binary files a/NBTExplorerMac/Properties/Resources.resources and /dev/null differ diff --git a/NBTExplorerMac/Properties/Resources.resx b/NBTExplorerMac/Properties/Resources.resx deleted file mode 100644 index 2ef62d6..0000000 --- a/NBTExplorerMac/Properties/Resources.resx +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\arrow-270.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\arrow-090.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/NBTExplorerMac/Properties/Settings.Designer.cs b/NBTExplorerMac/Properties/Settings.Designer.cs deleted file mode 100644 index 029c8a1..0000000 --- a/NBTExplorerMac/Properties/Settings.Designer.cs +++ /dev/null @@ -1,48 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.269 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NBTExplorer.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Collections.Specialized.StringCollection RecentFiles { - get { - return ((global::System.Collections.Specialized.StringCollection)(this["RecentFiles"])); - } - set { - this["RecentFiles"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Collections.Specialized.StringCollection RecentDirectories { - get { - return ((global::System.Collections.Specialized.StringCollection)(this["RecentDirectories"])); - } - set { - this["RecentDirectories"] = value; - } - } - } -} diff --git a/NBTExplorerMac/Properties/Settings.settings b/NBTExplorerMac/Properties/Settings.settings deleted file mode 100644 index 86f5808..0000000 --- a/NBTExplorerMac/Properties/Settings.settings +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/NBTExplorerMac/Resources/24/box-24.png b/NBTExplorerMac/Resources/24/box-24.png deleted file mode 100644 index b10ed76..0000000 Binary files a/NBTExplorerMac/Resources/24/box-24.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/cross.png b/NBTExplorerMac/Resources/24/cross.png deleted file mode 100644 index 87b6373..0000000 Binary files a/NBTExplorerMac/Resources/24/cross.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/document-b.png b/NBTExplorerMac/Resources/24/document-b.png deleted file mode 100644 index 9fde514..0000000 Binary files a/NBTExplorerMac/Resources/24/document-b.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/document-d.png b/NBTExplorerMac/Resources/24/document-d.png deleted file mode 100644 index 1d31f1b..0000000 Binary files a/NBTExplorerMac/Resources/24/document-d.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/document-f.png b/NBTExplorerMac/Resources/24/document-f.png deleted file mode 100644 index 05d904e..0000000 Binary files a/NBTExplorerMac/Resources/24/document-f.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/document-i.png b/NBTExplorerMac/Resources/24/document-i.png deleted file mode 100644 index 04136ef..0000000 Binary files a/NBTExplorerMac/Resources/24/document-i.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/document-l.png b/NBTExplorerMac/Resources/24/document-l.png deleted file mode 100644 index fc0ff47..0000000 Binary files a/NBTExplorerMac/Resources/24/document-l.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/document-s.png b/NBTExplorerMac/Resources/24/document-s.png deleted file mode 100644 index 988adcd..0000000 Binary files a/NBTExplorerMac/Resources/24/document-s.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/document.png b/NBTExplorerMac/Resources/24/document.png deleted file mode 100644 index e732270..0000000 Binary files a/NBTExplorerMac/Resources/24/document.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/edit-code-i.png b/NBTExplorerMac/Resources/24/edit-code-i.png deleted file mode 100644 index f5e5526..0000000 Binary files a/NBTExplorerMac/Resources/24/edit-code-i.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/edit-code.png b/NBTExplorerMac/Resources/24/edit-code.png deleted file mode 100644 index 726b643..0000000 Binary files a/NBTExplorerMac/Resources/24/edit-code.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/edit-list.png b/NBTExplorerMac/Resources/24/edit-list.png deleted file mode 100644 index 12c8087..0000000 Binary files a/NBTExplorerMac/Resources/24/edit-list.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/edit-smallcaps.png b/NBTExplorerMac/Resources/24/edit-smallcaps.png deleted file mode 100644 index 4843716..0000000 Binary files a/NBTExplorerMac/Resources/24/edit-smallcaps.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/pencil.png b/NBTExplorerMac/Resources/24/pencil.png deleted file mode 100644 index f98aeda..0000000 Binary files a/NBTExplorerMac/Resources/24/pencil.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/scissors.png b/NBTExplorerMac/Resources/24/scissors.png deleted file mode 100644 index 71890a0..0000000 Binary files a/NBTExplorerMac/Resources/24/scissors.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/24/selection-input.png b/NBTExplorerMac/Resources/24/selection-input.png deleted file mode 100644 index 6f50201..0000000 Binary files a/NBTExplorerMac/Resources/24/selection-input.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/Dead_Bush.png b/NBTExplorerMac/Resources/Dead_Bush.png deleted file mode 100644 index 3b6b59b..0000000 Binary files a/NBTExplorerMac/Resources/Dead_Bush.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/arrow-090.png b/NBTExplorerMac/Resources/arrow-090.png deleted file mode 100644 index 4e4f5b8..0000000 Binary files a/NBTExplorerMac/Resources/arrow-090.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/arrow-270.png b/NBTExplorerMac/Resources/arrow-270.png deleted file mode 100644 index 8d5209b..0000000 Binary files a/NBTExplorerMac/Resources/arrow-270.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/binocular--arrow.png b/NBTExplorerMac/Resources/binocular--arrow.png deleted file mode 100644 index 28d9db5..0000000 Binary files a/NBTExplorerMac/Resources/binocular--arrow.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/binocular.png b/NBTExplorerMac/Resources/binocular.png deleted file mode 100644 index d199572..0000000 Binary files a/NBTExplorerMac/Resources/binocular.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/block.png b/NBTExplorerMac/Resources/block.png deleted file mode 100644 index ed7ec0e..0000000 Binary files a/NBTExplorerMac/Resources/block.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/box.png b/NBTExplorerMac/Resources/box.png deleted file mode 100644 index 3ec0ceb..0000000 Binary files a/NBTExplorerMac/Resources/box.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/clipboard-paste.png b/NBTExplorerMac/Resources/clipboard-paste.png deleted file mode 100644 index 0cf8887..0000000 Binary files a/NBTExplorerMac/Resources/clipboard-paste.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/cross.png b/NBTExplorerMac/Resources/cross.png deleted file mode 100644 index 6b9fa6d..0000000 Binary files a/NBTExplorerMac/Resources/cross.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/disk--pencil.png b/NBTExplorerMac/Resources/disk--pencil.png deleted file mode 100644 index 47bf953..0000000 Binary files a/NBTExplorerMac/Resources/disk--pencil.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/disk-24.png b/NBTExplorerMac/Resources/disk-24.png deleted file mode 100644 index c8e67af..0000000 Binary files a/NBTExplorerMac/Resources/disk-24.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/disk.png b/NBTExplorerMac/Resources/disk.png deleted file mode 100644 index c619461..0000000 Binary files a/NBTExplorerMac/Resources/disk.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/document-attribute-b.png b/NBTExplorerMac/Resources/document-attribute-b.png deleted file mode 100644 index cbcdeff..0000000 Binary files a/NBTExplorerMac/Resources/document-attribute-b.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/document-attribute-d.png b/NBTExplorerMac/Resources/document-attribute-d.png deleted file mode 100644 index 0328dcc..0000000 Binary files a/NBTExplorerMac/Resources/document-attribute-d.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/document-attribute-f.png b/NBTExplorerMac/Resources/document-attribute-f.png deleted file mode 100644 index 7918504..0000000 Binary files a/NBTExplorerMac/Resources/document-attribute-f.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/document-attribute-i.png b/NBTExplorerMac/Resources/document-attribute-i.png deleted file mode 100644 index 53d0f31..0000000 Binary files a/NBTExplorerMac/Resources/document-attribute-i.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/document-attribute-l.png b/NBTExplorerMac/Resources/document-attribute-l.png deleted file mode 100644 index b3f5798..0000000 Binary files a/NBTExplorerMac/Resources/document-attribute-l.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/document-attribute-s.png b/NBTExplorerMac/Resources/document-attribute-s.png deleted file mode 100644 index 20dfae0..0000000 Binary files a/NBTExplorerMac/Resources/document-attribute-s.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/document-copy.png b/NBTExplorerMac/Resources/document-copy.png deleted file mode 100644 index 3836257..0000000 Binary files a/NBTExplorerMac/Resources/document-copy.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/door.png b/NBTExplorerMac/Resources/door.png deleted file mode 100644 index f868d02..0000000 Binary files a/NBTExplorerMac/Resources/door.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/edit-code-b.png b/NBTExplorerMac/Resources/edit-code-b.png deleted file mode 100644 index 8b29bde..0000000 Binary files a/NBTExplorerMac/Resources/edit-code-b.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/edit-code-i.png b/NBTExplorerMac/Resources/edit-code-i.png deleted file mode 100644 index 87238dd..0000000 Binary files a/NBTExplorerMac/Resources/edit-code-i.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/edit-code.png b/NBTExplorerMac/Resources/edit-code.png deleted file mode 100644 index 29bac66..0000000 Binary files a/NBTExplorerMac/Resources/edit-code.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/edit-list.png b/NBTExplorerMac/Resources/edit-list.png deleted file mode 100644 index 2ad2087..0000000 Binary files a/NBTExplorerMac/Resources/edit-list.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/edit-small-caps.png b/NBTExplorerMac/Resources/edit-small-caps.png deleted file mode 100644 index af6ee6e..0000000 Binary files a/NBTExplorerMac/Resources/edit-small-caps.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/folder-open-24.png b/NBTExplorerMac/Resources/folder-open-24.png deleted file mode 100644 index 7303582..0000000 Binary files a/NBTExplorerMac/Resources/folder-open-24.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/folder-open-document.png b/NBTExplorerMac/Resources/folder-open-document.png deleted file mode 100644 index c02157b..0000000 Binary files a/NBTExplorerMac/Resources/folder-open-document.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/folder-open.png b/NBTExplorerMac/Resources/folder-open.png deleted file mode 100644 index adc99d5..0000000 Binary files a/NBTExplorerMac/Resources/folder-open.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/information-frame.png b/NBTExplorerMac/Resources/information-frame.png deleted file mode 100644 index 6205729..0000000 Binary files a/NBTExplorerMac/Resources/information-frame.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/pencil.png b/NBTExplorerMac/Resources/pencil.png deleted file mode 100644 index 3ef2fa6..0000000 Binary files a/NBTExplorerMac/Resources/pencil.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/question-frame.png b/NBTExplorerMac/Resources/question-frame.png deleted file mode 100644 index 4db0f08..0000000 Binary files a/NBTExplorerMac/Resources/question-frame.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/question-white.png b/NBTExplorerMac/Resources/question-white.png deleted file mode 100644 index f806468..0000000 Binary files a/NBTExplorerMac/Resources/question-white.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/scissors.png b/NBTExplorerMac/Resources/scissors.png deleted file mode 100644 index 85f80b5..0000000 Binary files a/NBTExplorerMac/Resources/scissors.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/selection-input.png b/NBTExplorerMac/Resources/selection-input.png deleted file mode 100644 index 18e2d70..0000000 Binary files a/NBTExplorerMac/Resources/selection-input.png and /dev/null differ diff --git a/NBTExplorerMac/Resources/wooden-box.png b/NBTExplorerMac/Resources/wooden-box.png deleted file mode 100644 index f64d761..0000000 Binary files a/NBTExplorerMac/Resources/wooden-box.png and /dev/null differ diff --git a/NBTExplorerMac/SearchWorker.cs b/NBTExplorerMac/SearchWorker.cs deleted file mode 100644 index b424e79..0000000 --- a/NBTExplorerMac/SearchWorker.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using NBTExplorer.Model; - -namespace NBTExplorer -{ - internal class SearchState - { - public DataNode RootNode { get; set; } - public string SearchName { get; set; } - public string SearchValue { get; set; } - - public IEnumerator State { get; set; } - - public Action DiscoverCallback { get; set; } - public Action ProgressCallback { get; set; } - public Action CollapseCallback { get; set; } - public Action EndCallback { get; set; } - } - - internal class SearchWorker - { - private ContainerControl _sender; - private SearchState _state; - private bool _cancel; - private object _lock; - - public SearchWorker (SearchState state, ContainerControl sender) - { - _state = state; - _sender = sender; - _lock = new object(); - } - - public void Cancel () - { - lock (_lock) { - _cancel = true; - } - } - - public void Run () - { - if (_state.State == null) - _state.State = FindNode(_state.RootNode).GetEnumerator(); - - if (!_state.State.MoveNext()) - InvokeEndCallback(); - } - - private IEnumerable FindNode (DataNode node) - { - lock (_lock) { - if (_cancel) - yield break; - } - - if (node == null) - yield break; - - bool searchExpanded = false; - if (!node.IsExpanded) { - node.Expand(); - searchExpanded = true; - } - - TagDataNode tagNode = node as TagDataNode; - if (tagNode != null) { - bool mName = _state.SearchName == null; - bool mValue = _state.SearchValue == null; - - if (_state.SearchName != null) { - string tagName = node.NodeName; - if (tagName != null) - mName = tagName.Contains(_state.SearchName); - } - if (_state.SearchValue != null) { - string tagValue = node.NodeDisplay; - if (tagValue != null) - mValue = tagValue.Contains(_state.SearchValue); - } - - if (mName && mValue) { - InvokeDiscoverCallback(node); - yield return node; - } - } - - foreach (DataNode sub in node.Nodes) { - foreach (DataNode s in FindNode(sub)) - yield return s; - } - - if (searchExpanded) { - if (!node.IsModified) { - node.Collapse(); - InvokeCollapseCallback(node); - } - } - } - - private void InvokeDiscoverCallback (DataNode node) - { - if (_sender != null && _state.DiscoverCallback != null) - _sender.BeginInvoke(_state.DiscoverCallback, new object[] { node }); - } - - private void InvokeCollapseCallback (DataNode node) - { - if (_sender != null && _state.CollapseCallback != null) - _sender.BeginInvoke(_state.CollapseCallback, new object[] { node }); - } - - private void InvokeEndCallback () - { - if (_sender != null && _state.EndCallback != null) - _sender.BeginInvoke(_state.EndCallback, new object[] { null }); - } - } -} diff --git a/NBTExplorerMac/TagKey.cs b/NBTExplorerMac/TagKey.cs deleted file mode 100644 index d9279f1..0000000 --- a/NBTExplorerMac/TagKey.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Substrate.Nbt; - -namespace NBTExplorer -{ - public class TagKey : IComparable - { - public TagKey (string name, TagType type) - { - Name = name; - TagType = type; - } - - public string Name { get; set; } - public TagType TagType { get; set; } - - #region IComparer Members - - public int Compare (TagKey x, TagKey y) - { - int typeDiff = (int)x.TagType - (int)y.TagType; - if (typeDiff != 0) - return typeDiff; - - return String.Compare(x.Name, y.Name, true); - } - - #endregion - - #region IComparable Members - - public int CompareTo (TagKey other) - { - return Compare(this, other); - } - - #endregion - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/AssemblyInfo.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/AssemblyInfo.cs deleted file mode 100644 index 3d83c21..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/AssemblyInfo.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Security.Permissions; -using System.Runtime.InteropServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("Be.Windows.Forms.HexBox")] -[assembly: AssemblyDescription("hex edit control (C# DOTNET)")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Be")] -[assembly: AssemblyProduct("Be.Windows.Forms.HexBox")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.4.7.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] - -//[assembly: AssemblyKeyFile("../../HexBox.snk")] -//[assembly: AssemblyKeyName("")] - -//[assembly:IsolatedStorageFilePermission(SecurityAction.RequestRefuse, UserQuota=1048576)] -//[assembly:SecurityPermission(SecurityAction.RequestRefuse, UnmanagedCode=true)] -//[assembly:FileIOPermission(SecurityAction.RequestOptional, Unrestricted=true)] - -[assembly:CLSCompliant(true)] - -[assembly:ComVisible(false)] \ No newline at end of file diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/BuiltInContextMenu.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/BuiltInContextMenu.cs deleted file mode 100644 index a333075..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/BuiltInContextMenu.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Drawing; -using System.ComponentModel; -using System.Windows.Forms; - -namespace Be.Windows.Forms -{ - /// - /// Defines a build-in ContextMenuStrip manager for HexBox control to show Copy, Cut, Paste menu in contextmenu of the control. - /// - [TypeConverterAttribute(typeof(ExpandableObjectConverter))] - public sealed class BuiltInContextMenu : Component - { - /// - /// Contains the HexBox control. - /// - HexBox _hexBox; - /// - /// Contains the ContextMenuStrip control. - /// - ContextMenuStrip _contextMenuStrip; - /// - /// Contains the "Cut"-ToolStripMenuItem object. - /// - ToolStripMenuItem _cutToolStripMenuItem; - /// - /// Contains the "Copy"-ToolStripMenuItem object. - /// - ToolStripMenuItem _copyToolStripMenuItem; - /// - /// Contains the "Paste"-ToolStripMenuItem object. - /// - ToolStripMenuItem _pasteToolStripMenuItem; - /// - /// Contains the "Select All"-ToolStripMenuItem object. - /// - ToolStripMenuItem _selectAllToolStripMenuItem; - /// - /// Initializes a new instance of BuildInContextMenu class. - /// - /// the HexBox control - internal BuiltInContextMenu(HexBox hexBox) - { - _hexBox = hexBox; - _hexBox.ByteProviderChanged += new EventHandler(HexBox_ByteProviderChanged); - } - /// - /// If ByteProvider - /// - /// the sender object - /// the event data - void HexBox_ByteProviderChanged(object sender, EventArgs e) - { - CheckBuiltInContextMenu(); - } - /// - /// Assigns the ContextMenuStrip control to the HexBox control. - /// - void CheckBuiltInContextMenu() - { - if (Util.DesignMode) - return; - - if (this._contextMenuStrip == null) - { - ContextMenuStrip cms = new ContextMenuStrip(); - _cutToolStripMenuItem = new ToolStripMenuItem(CutMenuItemTextInternal, CutMenuItemImage, new EventHandler(CutMenuItem_Click)); - cms.Items.Add(_cutToolStripMenuItem); - _copyToolStripMenuItem = new ToolStripMenuItem(CopyMenuItemTextInternal, CopyMenuItemImage, new EventHandler(CopyMenuItem_Click)); - cms.Items.Add(_copyToolStripMenuItem); - _pasteToolStripMenuItem = new ToolStripMenuItem(PasteMenuItemTextInternal, PasteMenuItemImage, new EventHandler(PasteMenuItem_Click)); - cms.Items.Add(_pasteToolStripMenuItem); - - cms.Items.Add(new ToolStripSeparator()); - - _selectAllToolStripMenuItem = new ToolStripMenuItem(SelectAllMenuItemTextInternal, SelectAllMenuItemImage, new EventHandler(SelectAllMenuItem_Click)); - cms.Items.Add(_selectAllToolStripMenuItem); - cms.Opening += new CancelEventHandler(BuildInContextMenuStrip_Opening); - - _contextMenuStrip = cms; - } - - if (this._hexBox.ByteProvider == null && this._hexBox.ContextMenuStrip != null) - this._hexBox.ContextMenuStrip = null; - else if (this._hexBox.ByteProvider != null && this._hexBox.ContextMenuStrip == null) - this._hexBox.ContextMenuStrip = _contextMenuStrip; - } - /// - /// Before opening the ContextMenuStrip, we manage the availability of the items. - /// - /// the sender object - /// the event data - void BuildInContextMenuStrip_Opening(object sender, CancelEventArgs e) - { - _cutToolStripMenuItem.Enabled = this._hexBox.CanCut(); - _copyToolStripMenuItem.Enabled = this._hexBox.CanCopy(); - _pasteToolStripMenuItem.Enabled = this._hexBox.CanPaste(); - _selectAllToolStripMenuItem.Enabled = this._hexBox.CanSelectAll(); - } - /// - /// The handler for the "Cut"-Click event - /// - /// the sender object - /// the event data - void CutMenuItem_Click(object sender, EventArgs e) { this._hexBox.Cut(); } - /// - /// The handler for the "Copy"-Click event - /// - /// the sender object - /// the event data - void CopyMenuItem_Click(object sender, EventArgs e) { this._hexBox.Copy(); } - /// - /// The handler for the "Paste"-Click event - /// - /// the sender object - /// the event data - void PasteMenuItem_Click(object sender, EventArgs e) { this._hexBox.Paste(); } - /// - /// The handler for the "Select All"-Click event - /// - /// the sender object - /// the event data - void SelectAllMenuItem_Click(object sender, EventArgs e) { this._hexBox.SelectAll(); } - /// - /// Gets or sets the custom text of the "Copy" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null), Localizable(true)] - public string CopyMenuItemText - { - get { return _copyMenuItemText; } - set { _copyMenuItemText = value; } - } string _copyMenuItemText; - - /// - /// Gets or sets the custom text of the "Cut" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null), Localizable(true)] - public string CutMenuItemText - { - get { return _cutMenuItemText; } - set { _cutMenuItemText = value; } - } string _cutMenuItemText; - - /// - /// Gets or sets the custom text of the "Paste" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null), Localizable(true)] - public string PasteMenuItemText - { - get { return _pasteMenuItemText; } - set { _pasteMenuItemText = value; } - } string _pasteMenuItemText; - - /// - /// Gets or sets the custom text of the "Select All" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null), Localizable(true)] - public string SelectAllMenuItemText - { - get { return _selectAllMenuItemText; } - set { _selectAllMenuItemText = value; } - } string _selectAllMenuItemText = null; - - /// - /// Gets the text of the "Cut" ContextMenuStrip item. - /// - internal string CutMenuItemTextInternal { get { return !string.IsNullOrEmpty(CutMenuItemText) ? CutMenuItemText : "Cut"; } } - /// - /// Gets the text of the "Copy" ContextMenuStrip item. - /// - internal string CopyMenuItemTextInternal { get { return !string.IsNullOrEmpty(CopyMenuItemText) ? CopyMenuItemText : "Copy"; } } - /// - /// Gets the text of the "Paste" ContextMenuStrip item. - /// - internal string PasteMenuItemTextInternal { get { return !string.IsNullOrEmpty(PasteMenuItemText) ? PasteMenuItemText : "Paste"; } } - /// - /// Gets the text of the "Select All" ContextMenuStrip item. - /// - internal string SelectAllMenuItemTextInternal { get { return !string.IsNullOrEmpty(SelectAllMenuItemText) ? SelectAllMenuItemText : "SelectAll"; } } - - /// - /// Gets or sets the image of the "Cut" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null)] - public Image CutMenuItemImage - { - get { return _cutMenuItemImage; } - set { _cutMenuItemImage = value; } - } Image _cutMenuItemImage = null; - /// - /// Gets or sets the image of the "Copy" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null)] - public Image CopyMenuItemImage - { - get { return _copyMenuItemImage; } - set { _copyMenuItemImage = value; } - } Image _copyMenuItemImage = null; - /// - /// Gets or sets the image of the "Paste" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null)] - public Image PasteMenuItemImage - { - get { return _pasteMenuItemImage; } - set { _pasteMenuItemImage = value; } - } Image _pasteMenuItemImage = null; - /// - /// Gets or sets the image of the "Select All" ContextMenuStrip item. - /// - [Category("BuiltIn-ContextMenu"), DefaultValue(null)] - public Image SelectAllMenuItemImage - { - get { return _selectAllMenuItemImage; } - set { _selectAllMenuItemImage = value; } - } Image _selectAllMenuItemImage = null; - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/ByteCharConverters.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/ByteCharConverters.cs deleted file mode 100644 index 072753f..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/ByteCharConverters.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Be.Windows.Forms -{ - /// - /// The interface for objects that can translate between characters and bytes. - /// - public interface IByteCharConverter - { - /// - /// Returns the character to display for the byte passed across. - /// - /// - /// - char ToChar(byte b); - - /// - /// Returns the byte to use when the character passed across is entered during editing. - /// - /// - /// - byte ToByte(char c); - } - - /// - /// The default implementation. - /// - public class DefaultByteCharConverter : IByteCharConverter - { - /// - /// Returns the character to display for the byte passed across. - /// - /// - /// - public virtual char ToChar(byte b) - { - return b > 0x1F && !(b > 0x7E && b < 0xA0) ? (char)b : '.'; - } - - /// - /// Returns the byte to use for the character passed across. - /// - /// - /// - public virtual byte ToByte(char c) - { - return (byte)c; - } - - /// - /// Returns a description of the byte char provider. - /// - /// - public override string ToString() - { - return "Default"; - } - } - - /// - /// A byte char provider that can translate bytes encoded in codepage 500 EBCDIC - /// - public class EbcdicByteCharProvider : IByteCharConverter - { - /// - /// The IBM EBCDIC code page 500 encoding. Note that this is not always supported by .NET, - /// the underlying platform has to provide support for it. - /// - private Encoding _ebcdicEncoding = Encoding.GetEncoding(500); - - /// - /// Returns the EBCDIC character corresponding to the byte passed across. - /// - /// - /// - public virtual char ToChar(byte b) - { - string encoded = _ebcdicEncoding.GetString(new byte[] { b }); - return encoded.Length > 0 ? encoded[0] : '.'; - } - - /// - /// Returns the byte corresponding to the EBCDIC character passed across. - /// - /// - /// - public virtual byte ToByte(char c) - { - byte[] decoded = _ebcdicEncoding.GetBytes(new char[] { c }); - return decoded.Length > 0 ? decoded[0] : (byte)0; - } - - /// - /// Returns a description of the byte char provider. - /// - /// - public override string ToString() - { - return "EBCDIC (Code Page 500)"; - } - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/ByteCollection.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/ByteCollection.cs deleted file mode 100644 index c7d2d37..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/ByteCollection.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; - -using System.Collections; - -namespace Be.Windows.Forms -{ - /// - /// Represents a collection of bytes. - /// - public class ByteCollection : CollectionBase - { - /// - /// Initializes a new instance of ByteCollection class. - /// - public ByteCollection() { } - - /// - /// Initializes a new instance of ByteCollection class. - /// - /// an array of bytes to add to collection - public ByteCollection(byte[] bs) - { AddRange(bs); } - - /// - /// Gets or sets the value of a byte - /// - public byte this[int index] - { - get { return (byte)List[index]; } - set { List[index] = value; } - } - - /// - /// Adds a byte into the collection. - /// - /// the byte to add - public void Add(byte b) - { List.Add(b); } - - /// - /// Adds a range of bytes to the collection. - /// - /// the bytes to add - public void AddRange(byte[] bs) - { InnerList.AddRange(bs); } - - /// - /// Removes a byte from the collection. - /// - /// the byte to remove - public void Remove(byte b) - { List.Remove(b); } - - /// - /// Removes a range of bytes from the collection. - /// - /// the index of the start byte - /// the count of the bytes to remove - public void RemoveRange(int index, int count) - { InnerList.RemoveRange(index, count); } - - /// - /// Inserts a range of bytes to the collection. - /// - /// the index of start byte - /// an array of bytes to insert - public void InsertRange(int index, byte[] bs) - { InnerList.InsertRange(index, bs); } - - /// - /// Gets all bytes in the array - /// - /// an array of bytes. - public byte[] GetBytes() - { - byte[] bytes = new byte[Count]; - InnerList.CopyTo(0, bytes, 0, bytes.Length); - return bytes; - } - - /// - /// Inserts a byte to the collection. - /// - /// the index - /// a byte to insert - public void Insert(int index, byte b) - { - InnerList.Insert(index, b); - } - - /// - /// Returns the index of the given byte. - /// - public int IndexOf(byte b) - { - return InnerList.IndexOf(b); - } - - /// - /// Returns true, if the byte exists in the collection. - /// - public bool Contains(byte b) - { - return InnerList.Contains(b); - } - - /// - /// Copies the content of the collection into the given array. - /// - public void CopyTo(byte[] bs, int index) - { - InnerList.CopyTo(bs, index); - } - - /// - /// Copies the content of the collection into an array. - /// - /// the array containing all bytes. - public byte[] ToArray() - { - byte[] data = new byte[this.Count]; - this.CopyTo(data, 0); - return data; - } - - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/BytePositionInfo.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/BytePositionInfo.cs deleted file mode 100644 index 9302376..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/BytePositionInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Be.Windows.Forms -{ - /// - /// Represents a position in the HexBox control - /// - struct BytePositionInfo - { - public BytePositionInfo(long index, int characterPosition) - { - _index = index; - _characterPosition = characterPosition; - } - - public int CharacterPosition - { - get { return _characterPosition; } - } int _characterPosition; - - public long Index - { - get { return _index; } - } long _index; - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DataBlock.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DataBlock.cs deleted file mode 100644 index e5ea58f..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DataBlock.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace Be.Windows.Forms -{ - internal abstract class DataBlock - { - internal DataMap _map; - internal DataBlock _nextBlock; - internal DataBlock _previousBlock; - - public abstract long Length - { - get; - } - - public DataMap Map - { - get - { - return _map; - } - } - - public DataBlock NextBlock - { - get - { - return _nextBlock; - } - } - - public DataBlock PreviousBlock - { - get - { - return _previousBlock; - } - } - - public abstract void RemoveBytes(long position, long count); - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DataMap.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DataMap.cs deleted file mode 100644 index 2876b08..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DataMap.cs +++ /dev/null @@ -1,318 +0,0 @@ -using System; -using System.Collections; -using System.Text; - -namespace Be.Windows.Forms -{ - internal class DataMap : ICollection, IEnumerable - { - readonly object _syncRoot = new object(); - internal int _count; - internal DataBlock _firstBlock; - internal int _version; - - public DataMap() - { - } - - public DataMap(IEnumerable collection) - { - if (collection == null) - { - throw new ArgumentNullException("collection"); - } - - foreach (DataBlock item in collection) - { - AddLast(item); - } - } - - public DataBlock FirstBlock - { - get - { - return _firstBlock; - } - } - - public void AddAfter(DataBlock block, DataBlock newBlock) - { - AddAfterInternal(block, newBlock); - } - - public void AddBefore(DataBlock block, DataBlock newBlock) - { - AddBeforeInternal(block, newBlock); - } - - public void AddFirst(DataBlock block) - { - if (_firstBlock == null) - { - AddBlockToEmptyMap(block); - } - else - { - AddBeforeInternal(_firstBlock, block); - } - } - - public void AddLast(DataBlock block) - { - if (_firstBlock == null) - { - AddBlockToEmptyMap(block); - } - else - { - AddAfterInternal(GetLastBlock(), block); - } - } - - public void Remove(DataBlock block) - { - RemoveInternal(block); - } - - public void RemoveFirst() - { - if (_firstBlock == null) - { - throw new InvalidOperationException("The collection is empty."); - } - RemoveInternal(_firstBlock); - } - - public void RemoveLast() - { - if (_firstBlock == null) - { - throw new InvalidOperationException("The collection is empty."); - } - RemoveInternal(GetLastBlock()); - } - - public DataBlock Replace(DataBlock block, DataBlock newBlock) - { - AddAfterInternal(block, newBlock); - RemoveInternal(block); - return newBlock; - } - - public void Clear() - { - DataBlock block = FirstBlock; - while (block != null) - { - DataBlock nextBlock = block.NextBlock; - InvalidateBlock(block); - block = nextBlock; - } - _firstBlock = null; - _count = 0; - _version++; - } - - void AddAfterInternal(DataBlock block, DataBlock newBlock) - { - newBlock._previousBlock = block; - newBlock._nextBlock = block._nextBlock; - newBlock._map = this; - - if (block._nextBlock != null) - { - block._nextBlock._previousBlock = newBlock; - } - block._nextBlock = newBlock; - - this._version++; - this._count++; - } - - void AddBeforeInternal(DataBlock block, DataBlock newBlock) - { - newBlock._nextBlock = block; - newBlock._previousBlock = block._previousBlock; - newBlock._map = this; - - if (block._previousBlock != null) - { - block._previousBlock._nextBlock = newBlock; - } - block._previousBlock = newBlock; - - if (_firstBlock == block) - { - _firstBlock = newBlock; - } - this._version++; - this._count++; - } - - void RemoveInternal(DataBlock block) - { - DataBlock previousBlock = block._previousBlock; - DataBlock nextBlock = block._nextBlock; - - if (previousBlock != null) - { - previousBlock._nextBlock = nextBlock; - } - - if (nextBlock != null) - { - nextBlock._previousBlock = previousBlock; - } - - if (_firstBlock == block) - { - _firstBlock = nextBlock; - } - - InvalidateBlock(block); - - _count--; - _version++; - } - - DataBlock GetLastBlock() - { - DataBlock lastBlock = null; - for (DataBlock block = FirstBlock; block != null; block = block.NextBlock) - { - lastBlock = block; - } - return lastBlock; - } - - void InvalidateBlock(DataBlock block) - { - block._map = null; - block._nextBlock = null; - block._previousBlock = null; - } - - void AddBlockToEmptyMap(DataBlock block) - { - block._map = this; - block._nextBlock = null; - block._previousBlock = null; - - _firstBlock = block; - _version++; - _count++; - } - - #region ICollection Members - public void CopyTo(Array array, int index) - { - DataBlock[] blockArray = array as DataBlock[]; - for (DataBlock block = FirstBlock; block != null; block = block.NextBlock) - { - blockArray[index++] = block; - } - } - - public int Count - { - get - { - return _count; - } - } - - public bool IsSynchronized - { - get - { - return false; - } - } - - public object SyncRoot - { - get - { - return _syncRoot; - } - } - #endregion - - #region IEnumerable Members - public IEnumerator GetEnumerator() - { - return new Enumerator(this); - } - #endregion - - #region Enumerator Nested Type - internal class Enumerator : IEnumerator, IDisposable - { - DataMap _map; - DataBlock _current; - int _index; - int _version; - - internal Enumerator(DataMap map) - { - _map = map; - _version = map._version; - _current = null; - _index = -1; - } - - object IEnumerator.Current - { - get - { - if (_index < 0 || _index > _map.Count) - { - throw new InvalidOperationException("Enumerator is positioned before the first element or after the last element of the collection."); - } - return _current; - } - } - - public bool MoveNext() - { - if (this._version != _map._version) - { - throw new InvalidOperationException("Collection was modified after the enumerator was instantiated."); - } - - if (_index >= _map.Count) - { - return false; - } - - if (++_index == 0) - { - _current = _map.FirstBlock; - } - else - { - _current = _current.NextBlock; - } - - return (_index < _map.Count); - } - - void IEnumerator.Reset() - { - if (this._version != this._map._version) - { - throw new InvalidOperationException("Collection was modified after the enumerator was instantiated."); - } - - this._index = -1; - this._current = null; - } - - public void Dispose() - { - } - } - #endregion - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DynamicByteProvider.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DynamicByteProvider.cs deleted file mode 100644 index 83d01ee..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DynamicByteProvider.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Be.Windows.Forms -{ - /// - /// Byte provider for a small amount of data. - /// - public class DynamicByteProvider : IByteProvider - { - /// - /// Contains information about changes. - /// - bool _hasChanges; - /// - /// Contains a byte collection. - /// - List _bytes; - - /// - /// Initializes a new instance of the DynamicByteProvider class. - /// - /// - public DynamicByteProvider(byte[] data) : this(new List(data)) - { - } - - /// - /// Initializes a new instance of the DynamicByteProvider class. - /// - /// - public DynamicByteProvider(List bytes) - { - _bytes = bytes; - } - - /// - /// Raises the Changed event. - /// - void OnChanged(EventArgs e) - { - _hasChanges = true; - - if(Changed != null) - Changed(this, e); - } - - /// - /// Raises the LengthChanged event. - /// - void OnLengthChanged(EventArgs e) - { - if(LengthChanged != null) - LengthChanged(this, e); - } - - /// - /// Gets the byte collection. - /// - public List Bytes - { - get { return _bytes; } - } - - #region IByteProvider Members - /// - /// True, when changes are done. - /// - public bool HasChanges() - { - return _hasChanges; - } - - /// - /// Applies changes. - /// - public void ApplyChanges() - { - _hasChanges = false; - } - - /// - /// Occurs, when the write buffer contains new changes. - /// - public event EventHandler Changed; - - /// - /// Occurs, when InsertBytes or DeleteBytes method is called. - /// - public event EventHandler LengthChanged; - - - /// - /// Reads a byte from the byte collection. - /// - /// the index of the byte to read - /// the byte - public byte ReadByte(long index) - { return _bytes[(int)index]; } - - /// - /// Write a byte into the byte collection. - /// - /// the index of the byte to write. - /// the byte - public void WriteByte(long index, byte value) - { - _bytes[(int)index] = value; - OnChanged(EventArgs.Empty); - } - - /// - /// Deletes bytes from the byte collection. - /// - /// the start index of the bytes to delete. - /// the length of bytes to delete. - public void DeleteBytes(long index, long length) - { - int internal_index = (int)Math.Max(0, index); - int internal_length = (int)Math.Min((int)Length, length); - _bytes.RemoveRange(internal_index, internal_length); - - OnLengthChanged(EventArgs.Empty); - OnChanged(EventArgs.Empty); - } - - /// - /// Inserts byte into the byte collection. - /// - /// the start index of the bytes in the byte collection - /// the byte array to insert - public void InsertBytes(long index, byte[] bs) - { - _bytes.InsertRange((int)index, bs); - - OnLengthChanged(EventArgs.Empty); - OnChanged(EventArgs.Empty); - } - - /// - /// Gets the length of the bytes in the byte collection. - /// - public long Length - { - get - { - return _bytes.Count; - } - } - - /// - /// Returns true - /// - public virtual bool SupportsWriteByte() - { - return true; - } - - /// - /// Returns true - /// - public virtual bool SupportsInsertBytes() - { - return true; - } - - /// - /// Returns true - /// - public virtual bool SupportsDeleteBytes() - { - return true; - } - #endregion - - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DynamicFileByteProvider.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DynamicFileByteProvider.cs deleted file mode 100644 index a68e275..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/DynamicFileByteProvider.cs +++ /dev/null @@ -1,569 +0,0 @@ -using System; -using System.Text; -using System.IO; - -namespace Be.Windows.Forms -{ - /// - /// Implements a fully editable byte provider for file data of any size. - /// - /// - /// Only changes to the file are stored in memory with reads from the - /// original data occurring as required. - /// - public sealed class DynamicFileByteProvider : IByteProvider, IDisposable - { - const int COPY_BLOCK_SIZE = 4096; - - string _fileName; - Stream _stream; - DataMap _dataMap; - long _totalLength; - bool _readOnly; - - /// - /// Constructs a new instance. - /// - /// The name of the file from which bytes should be provided. - public DynamicFileByteProvider(string fileName) : this(fileName, false) { } - - /// - /// Constructs a new instance. - /// - /// The name of the file from which bytes should be provided. - /// True, opens the file in read-only mode. - public DynamicFileByteProvider(string fileName, bool readOnly) - { - _fileName = fileName; - - if (!readOnly) - { - _stream = File.Open(fileName, FileMode.Open, FileAccess.ReadWrite, FileShare.Read); - } - else - { - _stream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - } - - _readOnly = readOnly; - - ReInitialize(); - } - - /// - /// Constructs a new instance. - /// - /// the stream containing the data. - /// - /// The stream must supported seek operations. - /// - public DynamicFileByteProvider(Stream stream) - { - if (stream == null) - throw new ArgumentNullException("stream"); - if (!stream.CanSeek) - throw new ArgumentException("stream must supported seek operations(CanSeek)"); - - _stream = stream; - _readOnly = !stream.CanWrite; - ReInitialize(); - } - - #region IByteProvider Members - /// - /// See for more information. - /// - public event EventHandler LengthChanged; - - /// - /// See for more information. - /// - public event EventHandler Changed; - - /// - /// See for more information. - /// - public byte ReadByte(long index) - { - long blockOffset; - DataBlock block = GetDataBlock(index, out blockOffset); - FileDataBlock fileBlock = block as FileDataBlock; - if (fileBlock != null) - { - return ReadByteFromFile(fileBlock.FileOffset + index - blockOffset); - } - else - { - MemoryDataBlock memoryBlock = (MemoryDataBlock)block; - return memoryBlock.Data[index - blockOffset]; - } - } - - /// - /// See for more information. - /// - public void WriteByte(long index, byte value) - { - try - { - // Find the block affected. - long blockOffset; - DataBlock block = GetDataBlock(index, out blockOffset); - - // If the byte is already in a memory block, modify it. - MemoryDataBlock memoryBlock = block as MemoryDataBlock; - if (memoryBlock != null) - { - memoryBlock.Data[index - blockOffset] = value; - return; - } - - FileDataBlock fileBlock = (FileDataBlock)block; - - // If the byte changing is the first byte in the block and the previous block is a memory block, extend that. - if (blockOffset == index && block.PreviousBlock != null) - { - MemoryDataBlock previousMemoryBlock = block.PreviousBlock as MemoryDataBlock; - if (previousMemoryBlock != null) - { - previousMemoryBlock.AddByteToEnd(value); - fileBlock.RemoveBytesFromStart(1); - if (fileBlock.Length == 0) - { - _dataMap.Remove(fileBlock); - } - return; - } - } - - // If the byte changing is the last byte in the block and the next block is a memory block, extend that. - if (blockOffset + fileBlock.Length - 1 == index && block.NextBlock != null) - { - MemoryDataBlock nextMemoryBlock = block.NextBlock as MemoryDataBlock; - if (nextMemoryBlock != null) - { - nextMemoryBlock.AddByteToStart(value); - fileBlock.RemoveBytesFromEnd(1); - if (fileBlock.Length == 0) - { - _dataMap.Remove(fileBlock); - } - return; - } - } - - // Split the block into a prefix and a suffix and place a memory block in-between. - FileDataBlock prefixBlock = null; - if (index > blockOffset) - { - prefixBlock = new FileDataBlock(fileBlock.FileOffset, index - blockOffset); - } - - FileDataBlock suffixBlock = null; - if (index < blockOffset + fileBlock.Length - 1) - { - suffixBlock = new FileDataBlock( - fileBlock.FileOffset + index - blockOffset + 1, - fileBlock.Length - (index - blockOffset + 1)); - } - - block = _dataMap.Replace(block, new MemoryDataBlock(value)); - - if (prefixBlock != null) - { - _dataMap.AddBefore(block, prefixBlock); - } - - if (suffixBlock != null) - { - _dataMap.AddAfter(block, suffixBlock); - } - } - finally - { - OnChanged(EventArgs.Empty); - } - } - - /// - /// See for more information. - /// - public void InsertBytes(long index, byte[] bs) - { - try - { - // Find the block affected. - long blockOffset; - DataBlock block = GetDataBlock(index, out blockOffset); - - // If the insertion point is in a memory block, just insert it. - MemoryDataBlock memoryBlock = block as MemoryDataBlock; - if (memoryBlock != null) - { - memoryBlock.InsertBytes(index - blockOffset, bs); - return; - } - - FileDataBlock fileBlock = (FileDataBlock)block; - - // If the insertion point is at the start of a file block, and the previous block is a memory block, append it to that block. - if (blockOffset == index && block.PreviousBlock != null) - { - MemoryDataBlock previousMemoryBlock = block.PreviousBlock as MemoryDataBlock; - if (previousMemoryBlock != null) - { - previousMemoryBlock.InsertBytes(previousMemoryBlock.Length, bs); - return; - } - } - - // Split the block into a prefix and a suffix and place a memory block in-between. - FileDataBlock prefixBlock = null; - if (index > blockOffset) - { - prefixBlock = new FileDataBlock(fileBlock.FileOffset, index - blockOffset); - } - - FileDataBlock suffixBlock = null; - if (index < blockOffset + fileBlock.Length) - { - suffixBlock = new FileDataBlock( - fileBlock.FileOffset + index - blockOffset, - fileBlock.Length - (index - blockOffset)); - } - - block = _dataMap.Replace(block, new MemoryDataBlock(bs)); - - if (prefixBlock != null) - { - _dataMap.AddBefore(block, prefixBlock); - } - - if (suffixBlock != null) - { - _dataMap.AddAfter(block, suffixBlock); - } - } - finally - { - _totalLength += bs.Length; - OnLengthChanged(EventArgs.Empty); - OnChanged(EventArgs.Empty); - } - } - - /// - /// See for more information. - /// - public void DeleteBytes(long index, long length) - { - try - { - long bytesToDelete = length; - - // Find the first block affected. - long blockOffset; - DataBlock block = GetDataBlock(index, out blockOffset); - - // Truncate or remove each block as necessary. - while ((bytesToDelete > 0) && (block != null)) - { - long blockLength = block.Length; - DataBlock nextBlock = block.NextBlock; - - // Delete the appropriate section from the block (this may result in two blocks or a zero length block). - long count = Math.Min(bytesToDelete, blockLength - (index - blockOffset)); - block.RemoveBytes(index - blockOffset, count); - - if (block.Length == 0) - { - _dataMap.Remove(block); - if (_dataMap.FirstBlock == null) - { - _dataMap.AddFirst(new MemoryDataBlock(new byte[0])); - } - } - - bytesToDelete -= count; - blockOffset += block.Length; - block = (bytesToDelete > 0) ? nextBlock : null; - } - } - finally - { - _totalLength -= length; - OnLengthChanged(EventArgs.Empty); - OnChanged(EventArgs.Empty); - } - } - - /// - /// See for more information. - /// - public long Length - { - get - { - return _totalLength; - } - } - - /// - /// See for more information. - /// - public bool HasChanges() - { - if (_readOnly) - return false; - - if (_totalLength != _stream.Length) - { - return true; - } - - long offset = 0; - for (DataBlock block = _dataMap.FirstBlock; block != null; block = block.NextBlock) - { - FileDataBlock fileBlock = block as FileDataBlock; - if (fileBlock == null) - { - return true; - } - - if (fileBlock.FileOffset != offset) - { - return true; - } - - offset += fileBlock.Length; - } - return (offset != _stream.Length); - } - - /// - /// See for more information. - /// - public void ApplyChanges() - { - if (_readOnly) - throw new OperationCanceledException("File is in read-only mode"); - - // This method is implemented to efficiently save the changes to the same file stream opened for reading. - // Saving to a separate file would be a much simpler implementation. - - // Firstly, extend the file length (if necessary) to ensure that there is enough disk space. - if (_totalLength > _stream.Length) - { - _stream.SetLength(_totalLength); - } - - // Secondly, shift around any file sections that have moved. - long dataOffset = 0; - for (DataBlock block = _dataMap.FirstBlock; block != null; block = block.NextBlock) - { - FileDataBlock fileBlock = block as FileDataBlock; - if (fileBlock != null && fileBlock.FileOffset != dataOffset) - { - MoveFileBlock(fileBlock, dataOffset); - } - dataOffset += block.Length; - } - - // Next, write in-memory changes. - dataOffset = 0; - for (DataBlock block = _dataMap.FirstBlock; block != null; block = block.NextBlock) - { - MemoryDataBlock memoryBlock = block as MemoryDataBlock; - if (memoryBlock != null) - { - _stream.Position = dataOffset; - for (int memoryOffset = 0; memoryOffset < memoryBlock.Length; memoryOffset += COPY_BLOCK_SIZE) - { - _stream.Write(memoryBlock.Data, memoryOffset, (int)Math.Min(COPY_BLOCK_SIZE, memoryBlock.Length - memoryOffset)); - } - } - dataOffset += block.Length; - } - - // Finally, if the file has shortened, truncate the stream. - _stream.SetLength(_totalLength); - ReInitialize(); - } - - /// - /// See for more information. - /// - public bool SupportsWriteByte() - { - return !_readOnly; - } - - /// - /// See for more information. - /// - public bool SupportsInsertBytes() - { - return !_readOnly; - } - - /// - /// See for more information. - /// - public bool SupportsDeleteBytes() - { - return !_readOnly; - } - #endregion - - #region IDisposable Members - /// - /// See for more information. - /// - ~DynamicFileByteProvider() - { - Dispose(); - } - - /// - /// See for more information. - /// - public void Dispose() - { - if (_stream != null) - { - _stream.Close(); - _stream = null; - } - _fileName = null; - _dataMap = null; - GC.SuppressFinalize(this); - } - #endregion - - /// - /// Gets a value, if the file is opened in read-only mode. - /// - public bool ReadOnly - { - get { return _readOnly; } - } - - void OnLengthChanged(EventArgs e) - { - if (LengthChanged != null) - LengthChanged(this, e); - } - - void OnChanged(EventArgs e) - { - if (Changed != null) - { - Changed(this, e); - } - } - - DataBlock GetDataBlock(long findOffset, out long blockOffset) - { - if (findOffset < 0 || findOffset > _totalLength) - { - throw new ArgumentOutOfRangeException("findOffset"); - } - - // Iterate over the blocks until the block containing the required offset is encountered. - blockOffset = 0; - for (DataBlock block = _dataMap.FirstBlock; block != null; block = block.NextBlock) - { - if ((blockOffset <= findOffset && blockOffset + block.Length > findOffset) || block.NextBlock == null) - { - return block; - } - blockOffset += block.Length; - } - return null; - } - - FileDataBlock GetNextFileDataBlock(DataBlock block, long dataOffset, out long nextDataOffset) - { - // Iterate over the remaining blocks until a file block is encountered. - nextDataOffset = dataOffset + block.Length; - block = block.NextBlock; - while (block != null) - { - FileDataBlock fileBlock = block as FileDataBlock; - if (fileBlock != null) - { - return fileBlock; - } - nextDataOffset += block.Length; - block = block.NextBlock; - } - return null; - } - - byte ReadByteFromFile(long fileOffset) - { - // Move to the correct position and read the byte. - if (_stream.Position != fileOffset) - { - _stream.Position = fileOffset; - } - return (byte)_stream.ReadByte(); - } - - void MoveFileBlock(FileDataBlock fileBlock, long dataOffset) - { - // First, determine whether the next file block needs to move before this one. - long nextDataOffset; - FileDataBlock nextFileBlock = GetNextFileDataBlock(fileBlock, dataOffset, out nextDataOffset); - if (nextFileBlock != null && dataOffset + fileBlock.Length > nextFileBlock.FileOffset) - { - // The next block needs to move first, so do that now. - MoveFileBlock(nextFileBlock, nextDataOffset); - } - - // Now, move the block. - if (fileBlock.FileOffset > dataOffset) - { - // Move the section to earlier in the file stream (done in chunks starting at the beginning of the section). - byte[] buffer = new byte[COPY_BLOCK_SIZE]; - for (long relativeOffset = 0; relativeOffset < fileBlock.Length; relativeOffset += buffer.Length) - { - long readOffset = fileBlock.FileOffset + relativeOffset; - int bytesToRead = (int)Math.Min(buffer.Length, fileBlock.Length - relativeOffset); - _stream.Position = readOffset; - _stream.Read(buffer, 0, bytesToRead); - - long writeOffset = dataOffset + relativeOffset; - _stream.Position = writeOffset; - _stream.Write(buffer, 0, bytesToRead); - } - } - else - { - // Move the section to later in the file stream (done in chunks starting at the end of the section). - byte[] buffer = new byte[COPY_BLOCK_SIZE]; - for (long relativeOffset = 0; relativeOffset < fileBlock.Length; relativeOffset += buffer.Length) - { - int bytesToRead = (int)Math.Min(buffer.Length, fileBlock.Length - relativeOffset); - long readOffset = fileBlock.FileOffset + fileBlock.Length - relativeOffset - bytesToRead; - _stream.Position = readOffset; - _stream.Read(buffer, 0, bytesToRead); - - long writeOffset = dataOffset + fileBlock.Length - relativeOffset - bytesToRead; - _stream.Position = writeOffset; - _stream.Write(buffer, 0, bytesToRead); - } - } - - // This block now points to a different position in the file. - fileBlock.SetFileOffset(dataOffset); - } - - void ReInitialize() - { - _dataMap = new DataMap(); - _dataMap.AddFirst(new FileDataBlock(0, _stream.Length)); - _totalLength = _stream.Length; - } - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/FileByteProvider.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/FileByteProvider.cs deleted file mode 100644 index c3f89c5..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/FileByteProvider.cs +++ /dev/null @@ -1,271 +0,0 @@ -using System; -using System.IO; -using System.Collections; - -namespace Be.Windows.Forms -{ - /// - /// Byte provider for (big) files. - /// - public class FileByteProvider : IByteProvider, IDisposable - { - #region WriteCollection class - /// - /// Represents the write buffer class - /// - class WriteCollection : DictionaryBase - { - /// - /// Gets or sets a byte in the collection - /// - public byte this[long index] - { - get { return (byte)this.Dictionary[index]; } - set { Dictionary[index] = value; } - } - - /// - /// Adds a byte into the collection - /// - /// the index of the byte - /// the value of the byte - public void Add(long index, byte value) - { Dictionary.Add(index, value); } - - /// - /// Determines if a byte with the given index exists. - /// - /// the index of the byte - /// true, if the is in the collection - public bool Contains(long index) - { return Dictionary.Contains(index); } - - } - #endregion - - /// - /// Occurs, when the write buffer contains new changes. - /// - public event EventHandler Changed; - - /// - /// Contains all changes - /// - WriteCollection _writes = new WriteCollection(); - - /// - /// Contains the file name. - /// - string _fileName; - /// - /// Contains the file stream. - /// - FileStream _fileStream; - /// - /// Read-only access. - /// - bool _readOnly; - - /// - /// Initializes a new instance of the FileByteProvider class. - /// - /// - public FileByteProvider(string fileName) - { - _fileName = fileName; - - try - { - // try to open in write mode - _fileStream = File.Open(fileName, FileMode.Open, FileAccess.ReadWrite, FileShare.Read); - } - catch - { - // write mode failed, try to open in read-only and fileshare friendly mode. - try - { - _fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - _readOnly = true; - } - catch - { - throw; - } - } - } - - /// - /// Terminates the instance of the FileByteProvider class. - /// - ~FileByteProvider() - { - Dispose(); - } - - /// - /// Raises the Changed event. - /// - /// Never used. - void OnChanged(EventArgs e) - { - if(Changed != null) - Changed(this, e); - } - - /// - /// Gets the name of the file the byte provider is using. - /// - public string FileName - { - get { return _fileName; } - } - - /// - /// Returns a value if there are some changes. - /// - /// true, if there are some changes - public bool HasChanges() - { - return (_writes.Count > 0); - } - - /// - /// Updates the file with all changes the write buffer contains. - /// - public void ApplyChanges() - { - if (this._readOnly) - { - throw new Exception("File is in read-only mode."); - } - - if(!HasChanges()) - return; - - IDictionaryEnumerator en = _writes.GetEnumerator(); - while(en.MoveNext()) - { - long index = (long)en.Key; - byte value = (byte)en.Value; - if(_fileStream.Position != index) - _fileStream.Position = index; - _fileStream.Write(new byte[] { value }, 0, 1); - } - _writes.Clear(); - } - - /// - /// Clears the write buffer and reject all changes made. - /// - public void RejectChanges() - { - _writes.Clear(); - } - - #region IByteProvider Members - /// - /// Never used. - /// - public event EventHandler LengthChanged; - - /// - /// Reads a byte from the file. - /// - /// the index of the byte to read - /// the byte - public byte ReadByte(long index) - { - if(_writes.Contains(index)) - return _writes[index]; - - if(_fileStream.Position != index) - _fileStream.Position = index; - - byte res = (byte)_fileStream.ReadByte(); - return res; - } - - /// - /// Gets the length of the file. - /// - public long Length - { - get - { - return _fileStream.Length; - } - } - - /// - /// Writes a byte into write buffer - /// - public void WriteByte(long index, byte value) - { - if(_writes.Contains(index)) - _writes[index] = value; - else - _writes.Add(index, value); - - OnChanged(EventArgs.Empty); - } - - /// - /// Not supported - /// - public void DeleteBytes(long index, long length) - { - throw new NotSupportedException("FileByteProvider.DeleteBytes"); - } - - /// - /// Not supported - /// - public void InsertBytes(long index, byte[] bs) - { - throw new NotSupportedException("FileByteProvider.InsertBytes"); - } - - /// - /// Returns true - /// - public bool SupportsWriteByte() - { - return !_readOnly; - } - - /// - /// Returns false - /// - public bool SupportsInsertBytes() - { - return false; - } - - /// - /// Returns false - /// - public bool SupportsDeleteBytes() - { - return false; - } - #endregion - - #region IDisposable Members - /// - /// Releases the file handle used by the FileByteProvider. - /// - public void Dispose() - { - if(_fileStream != null) - { - _fileName = null; - - _fileStream.Close(); - _fileStream = null; - } - - GC.SuppressFinalize(this); - } - #endregion - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/FileDataBlock.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/FileDataBlock.cs deleted file mode 100644 index 40e0b0e..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/FileDataBlock.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; - -namespace Be.Windows.Forms -{ - internal sealed class FileDataBlock : DataBlock - { - long _length; - long _fileOffset; - - public FileDataBlock(long fileOffset, long length) - { - _fileOffset = fileOffset; - _length = length; - } - - public long FileOffset - { - get - { - return _fileOffset; - } - } - - public override long Length - { - get - { - return _length; - } - } - - public void SetFileOffset(long value) - { - _fileOffset = value; - } - - public void RemoveBytesFromEnd(long count) - { - if (count > _length) - { - throw new ArgumentOutOfRangeException("count"); - } - - _length -= count; - } - - public void RemoveBytesFromStart(long count) - { - if (count > _length) - { - throw new ArgumentOutOfRangeException("count"); - } - - _fileOffset += count; - _length -= count; - } - - public override void RemoveBytes(long position, long count) - { - if (position > _length) - { - throw new ArgumentOutOfRangeException("position"); - } - - if (position + count > _length) - { - throw new ArgumentOutOfRangeException("count"); - } - - long prefixLength = position; - long prefixFileOffset = _fileOffset; - - long suffixLength = _length - count - prefixLength; - long suffixFileOffset = _fileOffset + position + count; - - if (prefixLength > 0 && suffixLength > 0) - { - _fileOffset = prefixFileOffset; - _length = prefixLength; - _map.AddAfter(this, new FileDataBlock(suffixFileOffset, suffixLength)); - return; - } - - if (prefixLength > 0) - { - _fileOffset = prefixFileOffset; - _length = prefixLength; - } - else - { - _fileOffset = suffixFileOffset; - _length = suffixLength; - } - } - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.bmp b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.bmp deleted file mode 100644 index 02699d9..0000000 Binary files a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.bmp and /dev/null differ diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.cs deleted file mode 100644 index 5767fef..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.cs +++ /dev/null @@ -1,3701 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using System.Runtime.InteropServices; -using System.ComponentModel; -using System.Security.Permissions; -using System.Windows.Forms.VisualStyles; -using System.Text; -using System.Collections.Generic; - -namespace Be.Windows.Forms -{ - /// - /// Represents a hex box control. - /// - [ToolboxBitmap(typeof(HexBox), "HexBox.bmp")] - public class HexBox : Control - { - #region IKeyInterpreter interface - /// - /// Defines a user input handler such as for mouse and keyboard input - /// - interface IKeyInterpreter - { - /// - /// Activates mouse events - /// - void Activate(); - /// - /// Deactivate mouse events - /// - void Deactivate(); - /// - /// Preprocesses WM_KEYUP window message. - /// - /// the Message object to process. - /// True, if the message was processed. - bool PreProcessWmKeyUp(ref Message m); - /// - /// Preprocesses WM_CHAR window message. - /// - /// the Message object to process. - /// True, if the message was processed. - bool PreProcessWmChar(ref Message m); - /// - /// Preprocesses WM_KEYDOWN window message. - /// - /// the Message object to process. - /// True, if the message was processed. - bool PreProcessWmKeyDown(ref Message m); - /// - /// Gives some information about where to place the caret. - /// - /// the index of the byte - /// the position where the caret is to place. - PointF GetCaretPointF(long byteIndex); - } - #endregion - - #region EmptyKeyInterpreter class - /// - /// Represents an empty input handler without any functionality. - /// If is set ByteProvider to null, then this interpreter is used. - /// - class EmptyKeyInterpreter : IKeyInterpreter - { - HexBox _hexBox; - - public EmptyKeyInterpreter(HexBox hexBox) - { - _hexBox = hexBox; - } - - #region IKeyInterpreter Members - public void Activate(){} - public void Deactivate(){} - - public bool PreProcessWmKeyUp(ref Message m) - { return _hexBox.BasePreProcessMessage(ref m); } - - public bool PreProcessWmChar(ref Message m) - { return _hexBox.BasePreProcessMessage(ref m); } - - public bool PreProcessWmKeyDown(ref Message m) - { return _hexBox.BasePreProcessMessage(ref m); } - - public PointF GetCaretPointF(long byteIndex) - { return new PointF (); } - - #endregion - } - #endregion - - #region KeyInterpreter class - /// - /// Handles user input such as mouse and keyboard input during hex view edit - /// - class KeyInterpreter : IKeyInterpreter - { - /// - /// Delegate for key-down processing. - /// - /// the message object contains key data information - /// True, if the message was processed - delegate bool MessageDelegate(ref Message m); - - #region Fields - /// - /// Contains the parent HexBox control - /// - protected HexBox _hexBox; - - /// - /// Contains True, if shift key is down - /// - protected bool _shiftDown; - /// - /// Contains True, if mouse is down - /// - bool _mouseDown; - /// - /// Contains the selection start position info - /// - BytePositionInfo _bpiStart; - /// - /// Contains the current mouse selection position info - /// - BytePositionInfo _bpi; - /// - /// Contains all message handlers of key interpreter key down message - /// - Dictionary _messageHandlers; - #endregion - - #region Ctors - public KeyInterpreter(HexBox hexBox) - { - _hexBox = hexBox; - } - #endregion - - #region Activate, Deactive methods - public virtual void Activate() - { - _hexBox.MouseDown += new MouseEventHandler(BeginMouseSelection); - _hexBox.MouseMove += new MouseEventHandler(UpdateMouseSelection); - _hexBox.MouseUp += new MouseEventHandler(EndMouseSelection); - } - - public virtual void Deactivate() - { - _hexBox.MouseDown -= new MouseEventHandler(BeginMouseSelection); - _hexBox.MouseMove -= new MouseEventHandler(UpdateMouseSelection); - _hexBox.MouseUp -= new MouseEventHandler(EndMouseSelection); - } - #endregion - - #region Mouse selection methods - void BeginMouseSelection(object sender, MouseEventArgs e) - { - System.Diagnostics.Debug.WriteLine("BeginMouseSelection()", "KeyInterpreter"); - - if (e.Button != MouseButtons.Left) - return; - - _mouseDown = true; - - if(!_shiftDown) - { - _bpiStart = new BytePositionInfo(_hexBox._bytePos, _hexBox._byteCharacterPos); - _hexBox.ReleaseSelection(); - } - else - { - UpdateMouseSelection(this, e); - } - } - - void UpdateMouseSelection(object sender, MouseEventArgs e) - { - if(!_mouseDown) - return; - - _bpi = GetBytePositionInfo(new Point(e.X, e.Y)); - long selEnd = _bpi.Index; - long realselStart; - long realselLength; - - if(selEnd < _bpiStart.Index) - { - realselStart = selEnd; - realselLength = _bpiStart.Index - selEnd; - } - else if(selEnd > _bpiStart.Index) - { - realselStart = _bpiStart.Index; - realselLength = selEnd - realselStart; - } - else - { - realselStart = _hexBox._bytePos; - realselLength = 0; - } - - if(realselStart != _hexBox._bytePos || realselLength != _hexBox._selectionLength) - { - _hexBox.InternalSelect(realselStart, realselLength); - _hexBox.ScrollByteIntoView(_bpi.Index); - } - } - - void EndMouseSelection(object sender, MouseEventArgs e) - { - _mouseDown = false; - } - #endregion - - #region PrePrcessWmKeyDown methods - public virtual bool PreProcessWmKeyDown(ref Message m) - { - System.Diagnostics.Debug.WriteLine("PreProcessWmKeyDown(ref Message m)", "KeyInterpreter"); - - Keys vc = (Keys)m.WParam.ToInt32(); - - Keys keyData = vc | Control.ModifierKeys; - - // detect whether key down event should be raised - var hasMessageHandler = this.MessageHandlers.ContainsKey(keyData); - if (hasMessageHandler && RaiseKeyDown(keyData)) - return true; - - MessageDelegate messageHandler = hasMessageHandler - ? this.MessageHandlers[keyData] - : messageHandler = new MessageDelegate(PreProcessWmKeyDown_Default); - - return messageHandler(ref m); - } - - protected bool PreProcessWmKeyDown_Default(ref Message m) - { - _hexBox.ScrollByteIntoView(); - return _hexBox.BasePreProcessMessage(ref m); - } - - protected bool RaiseKeyDown(Keys keyData) - { - KeyEventArgs e = new KeyEventArgs(keyData); - _hexBox.OnKeyDown(e); - return e.Handled; - } - - protected virtual bool PreProcessWmKeyDown_Left(ref Message m) - { - return PerformPosMoveLeft(); - } - - protected virtual bool PreProcessWmKeyDown_Up(ref Message m) - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if( !(pos == 0 && cp == 0) ) - { - pos = Math.Max(-1, pos-_hexBox._iHexMaxHBytes); - if(pos == -1) - return true; - - _hexBox.SetPosition(pos); - - if(pos < _hexBox._startByte) - { - _hexBox.PerformScrollLineUp(); - } - - _hexBox.UpdateCaret(); - _hexBox.Invalidate(); - } - - _hexBox.ScrollByteIntoView(); - _hexBox.ReleaseSelection(); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_Right(ref Message m) - { - return PerformPosMoveRight(); - } - - protected virtual bool PreProcessWmKeyDown_Down(ref Message m) - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if(pos == _hexBox._byteProvider.Length && cp == 0) - return true; - - pos = Math.Min(_hexBox._byteProvider.Length, pos+_hexBox._iHexMaxHBytes); - - if(pos == _hexBox._byteProvider.Length) - cp = 0; - - _hexBox.SetPosition(pos, cp); - - if(pos > _hexBox._endByte-1) - { - _hexBox.PerformScrollLineDown(); - } - - _hexBox.UpdateCaret(); - _hexBox.ScrollByteIntoView(); - _hexBox.ReleaseSelection(); - _hexBox.Invalidate(); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_PageUp(ref Message m) - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if(pos == 0 && cp == 0) - return true; - - pos = Math.Max(0, pos-_hexBox._iHexMaxBytes); - if(pos == 0) - return true; - - _hexBox.SetPosition(pos); - - if(pos < _hexBox._startByte) - { - _hexBox.PerformScrollPageUp(); - } - - _hexBox.ReleaseSelection(); - _hexBox.UpdateCaret(); - _hexBox.Invalidate(); - return true; - } - - protected virtual bool PreProcessWmKeyDown_PageDown(ref Message m) - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if(pos == _hexBox._byteProvider.Length && cp == 0) - return true; - - pos = Math.Min(_hexBox._byteProvider.Length, pos+_hexBox._iHexMaxBytes); - - if(pos == _hexBox._byteProvider.Length) - cp = 0; - - _hexBox.SetPosition(pos, cp); - - if(pos > _hexBox._endByte-1) - { - _hexBox.PerformScrollPageDown(); - } - - _hexBox.ReleaseSelection(); - _hexBox.UpdateCaret(); - _hexBox.Invalidate(); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_ShiftLeft(ref Message m) - { - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - - if(pos + sel < 1) - return true; - - if(pos+sel <= _bpiStart.Index) - { - if(pos == 0) - return true; - - pos--; - sel++; - } - else - { - sel = Math.Max(0, sel-1); - } - - _hexBox.ScrollByteIntoView(); - _hexBox.InternalSelect(pos, sel); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_ShiftUp(ref Message m) - { - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - - if(pos-_hexBox._iHexMaxHBytes < 0 && pos <= _bpiStart.Index) - return true; - - if(_bpiStart.Index >= pos+sel) - { - pos = pos - _hexBox._iHexMaxHBytes; - sel += _hexBox._iHexMaxHBytes; - _hexBox.InternalSelect(pos, sel); - _hexBox.ScrollByteIntoView(); - } - else - { - sel -= _hexBox._iHexMaxHBytes; - if(sel < 0) - { - pos = _bpiStart.Index + sel; - sel = -sel; - _hexBox.InternalSelect(pos, sel); - _hexBox.ScrollByteIntoView(); - } - else - { - sel -= _hexBox._iHexMaxHBytes; - _hexBox.InternalSelect(pos, sel); - _hexBox.ScrollByteIntoView(pos+sel); - } - } - - return true; - } - - protected virtual bool PreProcessWmKeyDown_ShiftRight(ref Message m) - { - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - - if(pos+sel >= _hexBox._byteProvider.Length) - return true; - - if(_bpiStart.Index <= pos) - { - sel++; - _hexBox.InternalSelect(pos, sel); - _hexBox.ScrollByteIntoView(pos+sel); - } - else - { - pos++; - sel = Math.Max(0, sel-1); - _hexBox.InternalSelect(pos, sel); - _hexBox.ScrollByteIntoView(); - } - - return true; - } - - protected virtual bool PreProcessWmKeyDown_ShiftDown(ref Message m) - { - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - - long max = _hexBox._byteProvider.Length; - - if(pos+sel+_hexBox._iHexMaxHBytes > max) - return true; - - if(_bpiStart.Index <= pos) - { - sel += _hexBox._iHexMaxHBytes; - _hexBox.InternalSelect(pos, sel); - _hexBox.ScrollByteIntoView(pos+sel); - } - else - { - sel -= _hexBox._iHexMaxHBytes; - if (sel < 0) - { - pos = _bpiStart.Index; - sel = -sel; - } - else - { - pos += _hexBox._iHexMaxHBytes; - //sel -= _hexBox._iHexMaxHBytes; - } - - _hexBox.InternalSelect(pos, sel); - _hexBox.ScrollByteIntoView(); - } - - return true; - } - - protected virtual bool PreProcessWmKeyDown_Tab(ref Message m) - { - if(_hexBox._stringViewVisible && _hexBox._keyInterpreter.GetType() == typeof(KeyInterpreter)) - { - _hexBox.ActivateStringKeyInterpreter(); - _hexBox.ScrollByteIntoView(); - _hexBox.ReleaseSelection(); - _hexBox.UpdateCaret(); - _hexBox.Invalidate(); - return true; - } - - if(_hexBox.Parent == null) return true; - _hexBox.Parent.SelectNextControl(_hexBox, true, true, true, true); - return true; - } - - protected virtual bool PreProcessWmKeyDown_ShiftTab(ref Message m) - { - if(_hexBox._keyInterpreter is StringKeyInterpreter) - { - _shiftDown = false; - _hexBox.ActivateKeyInterpreter(); - _hexBox.ScrollByteIntoView(); - _hexBox.ReleaseSelection(); - _hexBox.UpdateCaret(); - _hexBox.Invalidate(); - return true; - } - - if(_hexBox.Parent == null) return true; - _hexBox.Parent.SelectNextControl(_hexBox, false, true, true, true); - return true; - } - - protected virtual bool PreProcessWmKeyDown_Back(ref Message m) - { - if(!_hexBox._byteProvider.SupportsDeleteBytes()) - return true; - - if (_hexBox.ReadOnly) - return true; - - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - int cp = _hexBox._byteCharacterPos; - - long startDelete = (cp == 0 && sel == 0) ? pos-1 : pos; - if(startDelete < 0 && sel < 1) - return true; - - long bytesToDelete = (sel > 0) ? sel : 1; - _hexBox._byteProvider.DeleteBytes(Math.Max(0, startDelete), bytesToDelete); - _hexBox.UpdateScrollSize(); - - if(sel == 0) - PerformPosMoveLeftByte(); - - _hexBox.ReleaseSelection(); - _hexBox.Invalidate(); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_Delete(ref Message m) - { - if(!_hexBox._byteProvider.SupportsDeleteBytes()) - return true; - - if (_hexBox.ReadOnly) - return true; - - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - - if(pos >= _hexBox._byteProvider.Length) - return true; - - long bytesToDelete = (sel > 0) ? sel : 1; - _hexBox._byteProvider.DeleteBytes(pos, bytesToDelete); - - _hexBox.UpdateScrollSize(); - _hexBox.ReleaseSelection(); - _hexBox.Invalidate(); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_Home(ref Message m) - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if(pos < 1) - return true; - - pos = 0; - cp = 0; - _hexBox.SetPosition(pos, cp); - - _hexBox.ScrollByteIntoView(); - _hexBox.UpdateCaret(); - _hexBox.ReleaseSelection(); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_End(ref Message m) - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if(pos >= _hexBox._byteProvider.Length-1) - return true; - - pos = _hexBox._byteProvider.Length; - cp = 0; - _hexBox.SetPosition(pos, cp); - - _hexBox.ScrollByteIntoView(); - _hexBox.UpdateCaret(); - _hexBox.ReleaseSelection(); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_ShiftShiftKey(ref Message m) - { - if(_mouseDown) - return true; - if(_shiftDown) - return true; - - _shiftDown = true; - - if(_hexBox._selectionLength > 0) - return true; - - _bpiStart = new BytePositionInfo(_hexBox._bytePos, _hexBox._byteCharacterPos); - - return true; - } - - protected virtual bool PreProcessWmKeyDown_ControlC(ref Message m) - { - _hexBox.Copy(); - return true; - } - - protected virtual bool PreProcessWmKeyDown_ControlX(ref Message m) - { - _hexBox.Cut(); - return true; - } - - protected virtual bool PreProcessWmKeyDown_ControlV(ref Message m) - { - _hexBox.Paste(); - return true; - } - - #endregion - - #region PreProcessWmChar methods - public virtual bool PreProcessWmChar(ref Message m) - { - if(Control.ModifierKeys == Keys.Control) - { - return _hexBox.BasePreProcessMessage(ref m); - } - - bool sw = _hexBox._byteProvider.SupportsWriteByte(); - bool si = _hexBox._byteProvider.SupportsInsertBytes(); - bool sd = _hexBox._byteProvider.SupportsDeleteBytes(); - - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - int cp = _hexBox._byteCharacterPos; - - if( - (!sw && pos != _hexBox._byteProvider.Length) || - (!si && pos == _hexBox._byteProvider.Length)) - { - return _hexBox.BasePreProcessMessage(ref m); - } - - char c = (char)m.WParam.ToInt32(); - - if(Uri.IsHexDigit(c)) - { - if(RaiseKeyPress(c)) - return true; - - if(_hexBox.ReadOnly) - return true; - - bool isInsertMode = (pos == _hexBox._byteProvider.Length); - - // do insert when insertActive = true - if(!isInsertMode && si && _hexBox.InsertActive && cp == 0) - isInsertMode = true; - - if(sd && si && sel > 0) - { - _hexBox._byteProvider.DeleteBytes(pos, sel); - isInsertMode = true; - cp = 0; - _hexBox.SetPosition(pos, cp); - } - - _hexBox.ReleaseSelection(); - - byte currentByte; - if(isInsertMode) - currentByte = 0; - else - currentByte = _hexBox._byteProvider.ReadByte(pos); - - string sCb = currentByte.ToString("X", System.Threading.Thread.CurrentThread.CurrentCulture); - if(sCb.Length == 1) - sCb = "0" + sCb; - - string sNewCb = c.ToString(); - if(cp == 0) - sNewCb += sCb.Substring(1, 1); - else - sNewCb = sCb.Substring(0, 1) + sNewCb; - byte newcb = byte.Parse(sNewCb, System.Globalization.NumberStyles.AllowHexSpecifier, System.Threading.Thread.CurrentThread.CurrentCulture); - - if(isInsertMode) - _hexBox._byteProvider.InsertBytes(pos, new byte[]{newcb}); - else - _hexBox._byteProvider.WriteByte(pos, newcb); - - PerformPosMoveRight(); - - _hexBox.Invalidate(); - return true; - } - else - { - return _hexBox.BasePreProcessMessage(ref m); - } - } - - protected bool RaiseKeyPress(char keyChar) - { - KeyPressEventArgs e = new KeyPressEventArgs(keyChar); - _hexBox.OnKeyPress(e); - return e.Handled; - } - #endregion - - #region PreProcessWmKeyUp methods - public virtual bool PreProcessWmKeyUp(ref Message m) - { - System.Diagnostics.Debug.WriteLine("PreProcessWmKeyUp(ref Message m)", "KeyInterpreter"); - - Keys vc = (Keys)m.WParam.ToInt32(); - - Keys keyData = vc | Control.ModifierKeys; - - switch(keyData) - { - case Keys.ShiftKey: - case Keys.Insert: - if(RaiseKeyUp(keyData)) - return true; - break; - } - - switch(keyData) - { - case Keys.ShiftKey: - _shiftDown = false; - return true; - case Keys.Insert: - return PreProcessWmKeyUp_Insert(ref m); - default: - return _hexBox.BasePreProcessMessage(ref m); - } - } - - protected virtual bool PreProcessWmKeyUp_Insert(ref Message m) - { - _hexBox.InsertActive = !_hexBox.InsertActive; - return true; - } - - protected bool RaiseKeyUp(Keys keyData) - { - KeyEventArgs e = new KeyEventArgs(keyData); - _hexBox.OnKeyUp(e); - return e.Handled; - } - #endregion - - #region Misc - Dictionary MessageHandlers - { - get - { - if (_messageHandlers == null) - { - _messageHandlers = new Dictionary(); - _messageHandlers.Add(Keys.Left, new MessageDelegate(PreProcessWmKeyDown_Left)); // move left - _messageHandlers.Add(Keys.Up, new MessageDelegate(PreProcessWmKeyDown_Up)); // move up - _messageHandlers.Add(Keys.Right, new MessageDelegate(PreProcessWmKeyDown_Right)); // move right - _messageHandlers.Add(Keys.Down, new MessageDelegate(PreProcessWmKeyDown_Down)); // move down - _messageHandlers.Add(Keys.PageUp, new MessageDelegate(PreProcessWmKeyDown_PageUp)); // move pageup - _messageHandlers.Add(Keys.PageDown, new MessageDelegate(PreProcessWmKeyDown_PageDown)); // move page down - _messageHandlers.Add(Keys.Left | Keys.Shift, new MessageDelegate(PreProcessWmKeyDown_ShiftLeft)); // move left with selection - _messageHandlers.Add(Keys.Up | Keys.Shift, new MessageDelegate(PreProcessWmKeyDown_ShiftUp)); // move up with selection - _messageHandlers.Add(Keys.Right | Keys.Shift, new MessageDelegate(PreProcessWmKeyDown_ShiftRight)); // move right with selection - _messageHandlers.Add(Keys.Down | Keys.Shift, new MessageDelegate(PreProcessWmKeyDown_ShiftDown)); // move down with selection - _messageHandlers.Add(Keys.Tab, new MessageDelegate(PreProcessWmKeyDown_Tab)); // switch to string view - _messageHandlers.Add(Keys.Back, new MessageDelegate(PreProcessWmKeyDown_Back)); // back - _messageHandlers.Add(Keys.Delete, new MessageDelegate(PreProcessWmKeyDown_Delete)); // delete - _messageHandlers.Add(Keys.Home, new MessageDelegate(PreProcessWmKeyDown_Home)); // move to home - _messageHandlers.Add(Keys.End, new MessageDelegate(PreProcessWmKeyDown_End)); // move to end - _messageHandlers.Add(Keys.ShiftKey | Keys.Shift, new MessageDelegate(PreProcessWmKeyDown_ShiftShiftKey)); // begin selection process - _messageHandlers.Add(Keys.C | Keys.Control, new MessageDelegate(PreProcessWmKeyDown_ControlC)); // copy - _messageHandlers.Add(Keys.X | Keys.Control, new MessageDelegate(PreProcessWmKeyDown_ControlX)); // cut - _messageHandlers.Add(Keys.V | Keys.Control, new MessageDelegate(PreProcessWmKeyDown_ControlV)); // paste - } - return _messageHandlers; - } - } - - protected virtual bool PerformPosMoveLeft() - { - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - int cp = _hexBox._byteCharacterPos; - - if(sel != 0) - { - cp = 0; - _hexBox.SetPosition(pos, cp); - _hexBox.ReleaseSelection(); - } - else - { - if(pos == 0 && cp == 0) - return true; - - if(cp > 0) - { - cp--; - } - else - { - pos = Math.Max(0, pos-1); - cp++; - } - - _hexBox.SetPosition(pos, cp); - - if(pos < _hexBox._startByte) - { - _hexBox.PerformScrollLineUp(); - } - _hexBox.UpdateCaret(); - _hexBox.Invalidate(); - } - - _hexBox.ScrollByteIntoView(); - return true; - } - protected virtual bool PerformPosMoveRight() - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - long sel = _hexBox._selectionLength; - - if(sel != 0) - { - pos += sel; - cp = 0; - _hexBox.SetPosition(pos, cp); - _hexBox.ReleaseSelection(); - } - else - { - if( !(pos == _hexBox._byteProvider.Length && cp == 0) ) - { - - if(cp > 0) - { - pos = Math.Min(_hexBox._byteProvider.Length, pos+1); - cp = 0; - } - else - { - cp++; - } - - _hexBox.SetPosition(pos, cp); - - if(pos > _hexBox._endByte-1) - { - _hexBox.PerformScrollLineDown(); - } - _hexBox.UpdateCaret(); - _hexBox.Invalidate(); - } - } - - _hexBox.ScrollByteIntoView(); - return true; - } - protected virtual bool PerformPosMoveLeftByte() - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if(pos == 0) - return true; - - pos = Math.Max(0, pos-1); - cp = 0; - - _hexBox.SetPosition(pos, cp); - - if(pos < _hexBox._startByte) - { - _hexBox.PerformScrollLineUp(); - } - _hexBox.UpdateCaret(); - _hexBox.ScrollByteIntoView(); - _hexBox.Invalidate(); - - return true; - } - - protected virtual bool PerformPosMoveRightByte() - { - long pos = _hexBox._bytePos; - int cp = _hexBox._byteCharacterPos; - - if(pos == _hexBox._byteProvider.Length) - return true; - - pos = Math.Min(_hexBox._byteProvider.Length, pos+1); - cp = 0; - - _hexBox.SetPosition(pos, cp); - - if(pos > _hexBox._endByte-1) - { - _hexBox.PerformScrollLineDown(); - } - _hexBox.UpdateCaret(); - _hexBox.ScrollByteIntoView(); - _hexBox.Invalidate(); - - return true; - } - - - public virtual PointF GetCaretPointF(long byteIndex) - { - System.Diagnostics.Debug.WriteLine("GetCaretPointF()", "KeyInterpreter"); - - return _hexBox.GetBytePointF(byteIndex); - } - - protected virtual BytePositionInfo GetBytePositionInfo(Point p) - { - return _hexBox.GetHexBytePositionInfo(p); - } - #endregion - } - #endregion - - #region StringKeyInterpreter class - /// - /// Handles user input such as mouse and keyboard input during string view edit - /// - class StringKeyInterpreter : KeyInterpreter - { - #region Ctors - public StringKeyInterpreter(HexBox hexBox) : base(hexBox) - { - _hexBox._byteCharacterPos = 0; - } - #endregion - - #region PreProcessWmKeyDown methods - public override bool PreProcessWmKeyDown(ref Message m) - { - Keys vc = (Keys)m.WParam.ToInt32(); - - Keys keyData = vc | Control.ModifierKeys; - - switch(keyData) - { - case Keys.Tab | Keys.Shift: - case Keys.Tab: - if(RaiseKeyDown(keyData)) - return true; - break; - } - - switch(keyData) - { - case Keys.Tab | Keys.Shift: - return PreProcessWmKeyDown_ShiftTab(ref m); - case Keys.Tab: - return PreProcessWmKeyDown_Tab(ref m); - default: - return base.PreProcessWmKeyDown(ref m); - } - } - - protected override bool PreProcessWmKeyDown_Left(ref Message m) - { - return PerformPosMoveLeftByte(); - } - - protected override bool PreProcessWmKeyDown_Right(ref Message m) - { - return PerformPosMoveRightByte(); - } - - #endregion - - #region PreProcessWmChar methods - public override bool PreProcessWmChar(ref Message m) - { - if(Control.ModifierKeys == Keys.Control) - { - return _hexBox.BasePreProcessMessage(ref m); - } - - bool sw = _hexBox._byteProvider.SupportsWriteByte(); - bool si = _hexBox._byteProvider.SupportsInsertBytes(); - bool sd = _hexBox._byteProvider.SupportsDeleteBytes(); - - long pos = _hexBox._bytePos; - long sel = _hexBox._selectionLength; - int cp = _hexBox._byteCharacterPos; - - if( - (!sw && pos != _hexBox._byteProvider.Length) || - (!si && pos == _hexBox._byteProvider.Length)) - { - return _hexBox.BasePreProcessMessage(ref m); - } - - char c = (char)m.WParam.ToInt32(); - - if(RaiseKeyPress(c)) - return true; - - if(_hexBox.ReadOnly) - return true; - - bool isInsertMode = (pos == _hexBox._byteProvider.Length); - - // do insert when insertActive = true - if(!isInsertMode && si && _hexBox.InsertActive) - isInsertMode = true; - - if(sd && si && sel > 0) - { - _hexBox._byteProvider.DeleteBytes(pos, sel); - isInsertMode = true; - cp = 0; - _hexBox.SetPosition(pos, cp); - } - - _hexBox.ReleaseSelection(); - - byte b = _hexBox.ByteCharConverter.ToByte(c); - if(isInsertMode) - _hexBox._byteProvider.InsertBytes(pos, new byte[]{b}); - else - _hexBox._byteProvider.WriteByte(pos, b); - - PerformPosMoveRightByte(); - _hexBox.Invalidate(); - - return true; - } - #endregion - - #region Misc - public override PointF GetCaretPointF(long byteIndex) - { - System.Diagnostics.Debug.WriteLine("GetCaretPointF()", "StringKeyInterpreter"); - - Point gp = _hexBox.GetGridBytePoint(byteIndex); - return _hexBox.GetByteStringPointF(gp); - } - - protected override BytePositionInfo GetBytePositionInfo(Point p) - { - return _hexBox.GetStringBytePositionInfo(p); - } - #endregion - } - #endregion - - #region Fields - /// - /// Contains the hole content bounds of all text - /// - Rectangle _recContent; - /// - /// Contains the line info bounds - /// - Rectangle _recLineInfo; - /// - /// Contains the hex data bounds - /// - Rectangle _recHex; - /// - /// Contains the string view bounds - /// - Rectangle _recStringView; - - /// - /// Contains string format information for text drawing - /// - StringFormat _stringFormat; - /// - /// Contains the width and height of a single char - /// - SizeF _charSize; - - /// - /// Contains the maximum of visible horizontal bytes - /// - int _iHexMaxHBytes; - /// - /// Contains the maximum of visible vertical bytes - /// - int _iHexMaxVBytes; - /// - /// Contains the maximum of visible bytes. - /// - int _iHexMaxBytes; - - /// - /// Contains the scroll bars minimum value - /// - long _scrollVmin; - /// - /// Contains the scroll bars maximum value - /// - long _scrollVmax; - /// - /// Contains the scroll bars current position - /// - long _scrollVpos; - /// - /// Contains a vertical scroll - /// - VScrollBar _vScrollBar; - /// - /// Contains a timer for thumbtrack scrolling - /// - Timer _thumbTrackTimer = new Timer(); - /// - /// Contains the thumbtrack scrolling position - /// - long _thumbTrackPosition; - /// - /// Contains the thumptrack delay for scrolling in milliseconds. - /// - const int THUMPTRACKDELAY = 50; - /// - /// Contains the Enviroment.TickCount of the last refresh - /// - int _lastThumbtrack; - /// - /// Contains the border´s left shift - /// - int _recBorderLeft = SystemInformation.Border3DSize.Width; - /// - /// Contains the border´s right shift - /// - int _recBorderRight = SystemInformation.Border3DSize.Width; - /// - /// Contains the border´s top shift - /// - int _recBorderTop = SystemInformation.Border3DSize.Height; - /// - /// Contains the border bottom shift - /// - int _recBorderBottom = SystemInformation.Border3DSize.Height; - - /// - /// Contains the index of the first visible byte - /// - long _startByte; - /// - /// Contains the index of the last visible byte - /// - long _endByte; - - /// - /// Contains the current byte position - /// - long _bytePos = -1; - /// - /// Contains the current char position in one byte - /// - /// - /// "1A" - /// "1" = char position of 0 - /// "A" = char position of 1 - /// - int _byteCharacterPos; - - /// - /// Contains string format information for hex values - /// - string _hexStringFormat = "X"; - - - /// - /// Contains the current key interpreter - /// - IKeyInterpreter _keyInterpreter; - /// - /// Contains an empty key interpreter without functionality - /// - EmptyKeyInterpreter _eki; - /// - /// Contains the default key interpreter - /// - KeyInterpreter _ki; - /// - /// Contains the string key interpreter - /// - StringKeyInterpreter _ski; - - /// - /// Contains True if caret is visible - /// - bool _caretVisible; - - /// - /// Contains true, if the find (Find method) should be aborted. - /// - bool _abortFind; - /// - /// Contains a value of the current finding position. - /// - long _findingPos; - - /// - /// Contains a state value about Insert or Write mode. When this value is true and the ByteProvider SupportsInsert is true bytes are inserted instead of overridden. - /// - bool _insertActive; - #endregion - - #region Events - /// - /// Occurs, when the value of InsertActive property has changed. - /// - [Description("Occurs, when the value of InsertActive property has changed.")] - public event EventHandler InsertActiveChanged; - /// - /// Occurs, when the value of ReadOnly property has changed. - /// - [Description("Occurs, when the value of ReadOnly property has changed.")] - public event EventHandler ReadOnlyChanged; - /// - /// Occurs, when the value of ByteProvider property has changed. - /// - [Description("Occurs, when the value of ByteProvider property has changed.")] - public event EventHandler ByteProviderChanged; - /// - /// Occurs, when the value of SelectionStart property has changed. - /// - [Description("Occurs, when the value of SelectionStart property has changed.")] - public event EventHandler SelectionStartChanged; - /// - /// Occurs, when the value of SelectionLength property has changed. - /// - [Description("Occurs, when the value of SelectionLength property has changed.")] - public event EventHandler SelectionLengthChanged; - /// - /// Occurs, when the value of LineInfoVisible property has changed. - /// - [Description("Occurs, when the value of LineInfoVisible property has changed.")] - public event EventHandler LineInfoVisibleChanged; - /// - /// Occurs, when the value of StringViewVisible property has changed. - /// - [Description("Occurs, when the value of StringViewVisible property has changed.")] - public event EventHandler StringViewVisibleChanged; - /// - /// Occurs, when the value of BorderStyle property has changed. - /// - [Description("Occurs, when the value of BorderStyle property has changed.")] - public event EventHandler BorderStyleChanged; - /// - /// Occurs, when the value of BytesPerLine property has changed. - /// - [Description("Occurs, when the value of BytesPerLine property has changed.")] - public event EventHandler BytesPerLineChanged; - /// - /// Occurs, when the value of UseFixedBytesPerLine property has changed. - /// - [Description("Occurs, when the value of UseFixedBytesPerLine property has changed.")] - public event EventHandler UseFixedBytesPerLineChanged; - /// - /// Occurs, when the value of VScrollBarVisible property has changed. - /// - [Description("Occurs, when the value of VScrollBarVisible property has changed.")] - public event EventHandler VScrollBarVisibleChanged; - /// - /// Occurs, when the value of HexCasing property has changed. - /// - [Description("Occurs, when the value of HexCasing property has changed.")] - public event EventHandler HexCasingChanged; - /// - /// Occurs, when the value of HorizontalByteCount property has changed. - /// - [Description("Occurs, when the value of HorizontalByteCount property has changed.")] - public event EventHandler HorizontalByteCountChanged; - /// - /// Occurs, when the value of VerticalByteCount property has changed. - /// - [Description("Occurs, when the value of VerticalByteCount property has changed.")] - public event EventHandler VerticalByteCountChanged; - /// - /// Occurs, when the value of CurrentLine property has changed. - /// - [Description("Occurs, when the value of CurrentLine property has changed.")] - public event EventHandler CurrentLineChanged; - /// - /// Occurs, when the value of CurrentPositionInLine property has changed. - /// - [Description("Occurs, when the value of CurrentPositionInLine property has changed.")] - public event EventHandler CurrentPositionInLineChanged; - /// - /// Occurs, when Copy method was invoked and ClipBoardData changed. - /// - [Description("Occurs, when Copy method was invoked and ClipBoardData changed.")] - public event EventHandler Copied; - /// - /// Occurs, when CopyHex method was invoked and ClipBoardData changed. - /// - [Description("Occurs, when CopyHex method was invoked and ClipBoardData changed.")] - public event EventHandler CopiedHex; - #endregion - - #region Ctors - - /// - /// Initializes a new instance of a HexBox class. - /// - public HexBox() - { - this._vScrollBar = new VScrollBar(); - this._vScrollBar.Scroll += new ScrollEventHandler(_vScrollBar_Scroll); - - this._builtInContextMenu = new BuiltInContextMenu(this); - - BackColor = Color.White; - Font = new Font("Courier New", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); - _stringFormat = new StringFormat(StringFormat.GenericTypographic); - _stringFormat.FormatFlags = StringFormatFlags.MeasureTrailingSpaces; - - ActivateEmptyKeyInterpreter(); - - SetStyle(ControlStyles.UserPaint, true); - SetStyle(ControlStyles.DoubleBuffer, true); - SetStyle(ControlStyles.AllPaintingInWmPaint, true); - SetStyle(ControlStyles.ResizeRedraw, true); - - _thumbTrackTimer.Interval = 50; - _thumbTrackTimer.Tick += new EventHandler(PerformScrollThumbTrack); - } - - #endregion - - #region Scroll methods - void _vScrollBar_Scroll(object sender, ScrollEventArgs e) - { - switch(e.Type) - { - case ScrollEventType.Last: - break; - case ScrollEventType.EndScroll: - break; - case ScrollEventType.SmallIncrement: - PerformScrollLineDown(); - break; - case ScrollEventType.SmallDecrement: - PerformScrollLineUp(); - break; - case ScrollEventType.LargeIncrement: - PerformScrollPageDown(); - break; - case ScrollEventType.LargeDecrement: - PerformScrollPageUp(); - break; - case ScrollEventType.ThumbPosition: - long lPos = FromScrollPos(e.NewValue); - PerformScrollThumpPosition(lPos); - break; - case ScrollEventType.ThumbTrack: - // to avoid performance problems use a refresh delay implemented with a timer - if (_thumbTrackTimer.Enabled) // stop old timer - _thumbTrackTimer.Enabled = false; - - // perform scroll immediately only if last refresh is very old - int currentThumbTrack = System.Environment.TickCount; - if (currentThumbTrack - _lastThumbtrack > THUMPTRACKDELAY) - { - PerformScrollThumbTrack(null, null); - _lastThumbtrack = currentThumbTrack; - break; - } - - // start thumbtrack timer - _thumbTrackPosition = FromScrollPos(e.NewValue); - _thumbTrackTimer.Enabled = true; - break; - case ScrollEventType.First: - break; - default: - break; - } - - e.NewValue = ToScrollPos(_scrollVpos); - } - - /// - /// Performs the thumbtrack scrolling after an delay. - /// - void PerformScrollThumbTrack(object sender, EventArgs e) - { - _thumbTrackTimer.Enabled = false; - PerformScrollThumpPosition(_thumbTrackPosition); - _lastThumbtrack = Environment.TickCount; - } - - void UpdateScrollSize() - { - System.Diagnostics.Debug.WriteLine("UpdateScrollSize()", "HexBox"); - - // calc scroll bar info - if (VScrollBarVisible && _byteProvider != null && _byteProvider.Length > 0 && _iHexMaxHBytes != 0) - { - long scrollmax = (long)Math.Ceiling((double)(_byteProvider.Length + 1) / (double)_iHexMaxHBytes - (double)_iHexMaxVBytes); - scrollmax = Math.Max(0, scrollmax); - - long scrollpos = _startByte / _iHexMaxHBytes; - - if (scrollmax < _scrollVmax) - { - /* Data size has been decreased. */ - if (_scrollVpos == _scrollVmax) - /* Scroll one line up if we at bottom. */ - PerformScrollLineUp(); - } - - if (scrollmax == _scrollVmax && scrollpos == _scrollVpos) - return; - - _scrollVmin = 0; - _scrollVmax = scrollmax; - _scrollVpos = Math.Min(scrollpos, scrollmax); - UpdateVScroll(); - } - else if (VScrollBarVisible) - { - // disable scroll bar - _scrollVmin = 0; - _scrollVmax = 0; - _scrollVpos = 0; - UpdateVScroll(); - } - } - - void UpdateVScroll() - { - System.Diagnostics.Debug.WriteLine("UpdateVScroll()", "HexBox"); - - int max = ToScrollMax(_scrollVmax); - - if(max > 0) - { - _vScrollBar.Minimum = 0; - _vScrollBar.Maximum = max; - _vScrollBar.Value = ToScrollPos(_scrollVpos); - _vScrollBar.Enabled = true; - } - else - { - _vScrollBar.Enabled = false; - } - } - - int ToScrollPos(long value) - { - int max = 65535; - - if(_scrollVmax < max) - return (int)value; - else - { - double valperc = (double)value / (double)_scrollVmax * (double)100; - int res = (int)Math.Floor((double)max / (double)100 * valperc); - res = (int)Math.Max(_scrollVmin, res); - res = (int)Math.Min(_scrollVmax, res); - return res; - } - } - - long FromScrollPos(int value) - { - int max = 65535; - if(_scrollVmax < max) - { - return (long)value; - } - else - { - double valperc = (double)value / (double)max * (double)100; - long res = (int)Math.Floor((double)_scrollVmax / (double)100 * valperc); - return res; - } - } - - int ToScrollMax(long value) - { - long max = 65535; - if(value > max) - return (int)max; - else - return (int)value; - } - - void PerformScrollToLine(long pos) - { - if(pos < _scrollVmin || pos > _scrollVmax || pos == _scrollVpos ) - return; - - _scrollVpos = pos; - - UpdateVScroll(); - UpdateVisibilityBytes(); - UpdateCaret(); - Invalidate(); - } - - void PerformScrollLines(int lines) - { - long pos; - if(lines > 0) - { - pos = Math.Min(_scrollVmax, _scrollVpos+lines); - } - else if(lines < 0) - { - pos = Math.Max(_scrollVmin, _scrollVpos+lines); - } - else - { - return; - } - - PerformScrollToLine(pos); - } - - void PerformScrollLineDown() - { - this.PerformScrollLines(1); - } - - void PerformScrollLineUp() - { - this.PerformScrollLines(-1); - } - - void PerformScrollPageDown() - { - this.PerformScrollLines(_iHexMaxVBytes); - } - - void PerformScrollPageUp() - { - this.PerformScrollLines(-_iHexMaxVBytes); - } - - void PerformScrollThumpPosition(long pos) - { - // Bug fix: Scroll to end, do not scroll to end - int difference = (_scrollVmax > 65535) ? 10 : 9; - - if(ToScrollPos(pos) == ToScrollMax(_scrollVmax)-difference) - pos = _scrollVmax; - // End Bug fix - - - PerformScrollToLine(pos); - } - - /// - /// Scrolls the selection start byte into view - /// - public void ScrollByteIntoView() - { - System.Diagnostics.Debug.WriteLine("ScrollByteIntoView()", "HexBox"); - - ScrollByteIntoView(_bytePos); - } - - /// - /// Scrolls the specific byte into view - /// - /// the index of the byte - public void ScrollByteIntoView(long index) - { - System.Diagnostics.Debug.WriteLine("ScrollByteIntoView(long index)", "HexBox"); - - if(_byteProvider == null || _keyInterpreter == null) - return; - - if(index < _startByte) - { - long line = (long)Math.Floor((double)index / (double)_iHexMaxHBytes); - PerformScrollThumpPosition(line); - } - else if(index > _endByte) - { - long line = (long)Math.Floor((double)index / (double)_iHexMaxHBytes); - line -= _iHexMaxVBytes-1; - PerformScrollThumpPosition(line); - } - } - #endregion - - #region Selection methods - void ReleaseSelection() - { - System.Diagnostics.Debug.WriteLine("ReleaseSelection()", "HexBox"); - - if(_selectionLength == 0) - return; - _selectionLength = 0; - OnSelectionLengthChanged(EventArgs.Empty); - - if(!_caretVisible) - CreateCaret(); - else - UpdateCaret(); - - Invalidate(); - } - - /// - /// Returns true if Select method could be invoked. - /// - public bool CanSelectAll() - { - if (!this.Enabled) - return false; - if (_byteProvider == null) - return false; - - return true; - } - - /// - /// Selects all bytes. - /// - public void SelectAll() - { - if (this.ByteProvider == null) - return; - this.Select(0, this.ByteProvider.Length); - } - - /// - /// Selects the hex box. - /// - /// the start index of the selection - /// the length of the selection - public void Select(long start, long length) - { - if (this.ByteProvider == null) - return; - if (!this.Enabled) - return; - - InternalSelect(start, length); - ScrollByteIntoView(); - } - - void InternalSelect(long start, long length) - { - long pos = start; - long sel = length; - int cp = 0; - - if(sel > 0 && _caretVisible) - DestroyCaret(); - else if(sel == 0 && !_caretVisible) - CreateCaret(); - - SetPosition(pos, cp); - SetSelectionLength(sel); - - UpdateCaret(); - Invalidate(); - } - #endregion - - #region Key interpreter methods - void ActivateEmptyKeyInterpreter() - { - if(_eki == null) - _eki = new EmptyKeyInterpreter(this); - - if(_eki == _keyInterpreter) - return; - - if(_keyInterpreter != null) - _keyInterpreter.Deactivate(); - - _keyInterpreter = _eki; - _keyInterpreter.Activate(); - } - - void ActivateKeyInterpreter() - { - if(_ki == null) - _ki = new KeyInterpreter(this); - - if(_ki == _keyInterpreter) - return; - - if(_keyInterpreter != null) - _keyInterpreter.Deactivate(); - - _keyInterpreter = _ki; - _keyInterpreter.Activate(); - } - - void ActivateStringKeyInterpreter() - { - if(_ski == null) - _ski = new StringKeyInterpreter(this); - - if(_ski == _keyInterpreter) - return; - - if(_keyInterpreter != null) - _keyInterpreter.Deactivate(); - - _keyInterpreter = _ski; - _keyInterpreter.Activate(); - } - #endregion - - #region Caret methods - void CreateCaret() - { - if(_byteProvider == null || _keyInterpreter == null || _caretVisible || !this.Focused) - return; - - System.Diagnostics.Debug.WriteLine("CreateCaret()", "HexBox"); - - // define the caret width depending on InsertActive mode - int caretWidth = (this.InsertActive) ? 1 : (int)_charSize.Width; - int caretHeight = (int)_charSize.Height; - NativeMethods.CreateCaret(Handle, IntPtr.Zero, caretWidth, caretHeight); - - UpdateCaret(); - - NativeMethods.ShowCaret(Handle); - - _caretVisible = true; - } - - void UpdateCaret() - { - if (_byteProvider == null || _keyInterpreter == null) - return; - - System.Diagnostics.Debug.WriteLine("UpdateCaret()", "HexBox"); - - long byteIndex =_bytePos - _startByte; - PointF p = _keyInterpreter.GetCaretPointF(byteIndex); - p.X += _byteCharacterPos*_charSize.Width; - NativeMethods.SetCaretPos((int)p.X, (int)p.Y); - } - - void DestroyCaret() - { - if (!_caretVisible) - return; - - System.Diagnostics.Debug.WriteLine("DestroyCaret()", "HexBox"); - - NativeMethods.DestroyCaret(); - _caretVisible = false; - } - - void SetCaretPosition(Point p) - { - System.Diagnostics.Debug.WriteLine("SetCaretPosition()", "HexBox"); - - if (_byteProvider == null || _keyInterpreter == null) - return; - - long pos = _bytePos; - int cp = _byteCharacterPos; - - if(_recHex.Contains(p)) - { - BytePositionInfo bpi = GetHexBytePositionInfo(p); - pos = bpi.Index; - cp = bpi.CharacterPosition; - - SetPosition(pos, cp); - - ActivateKeyInterpreter(); - UpdateCaret(); - Invalidate(); - } - else if(_recStringView.Contains(p)) - { - BytePositionInfo bpi = GetStringBytePositionInfo(p); - pos = bpi.Index; - cp = bpi.CharacterPosition; - - SetPosition(pos, cp); - - ActivateStringKeyInterpreter(); - UpdateCaret(); - Invalidate(); - } - } - - BytePositionInfo GetHexBytePositionInfo(Point p) - { - System.Diagnostics.Debug.WriteLine("GetHexBytePositionInfo()", "HexBox"); - - long bytePos; - int byteCharaterPos; - - float x = ((float)(p.X - _recHex.X) / _charSize.Width); - float y = ((float)(p.Y - _recHex.Y) / _charSize.Height); - int iX = (int)x; - int iY = (int)y; - - int hPos = (iX / 3 + 1); - - bytePos = Math.Min(_byteProvider.Length, - _startByte + (_iHexMaxHBytes * (iY+1) - _iHexMaxHBytes) + hPos - 1); - byteCharaterPos = (iX % 3); - if(byteCharaterPos > 1) - byteCharaterPos = 1; - - if(bytePos == _byteProvider.Length) - byteCharaterPos = 0; - - if(bytePos < 0) - return new BytePositionInfo(0, 0); - return new BytePositionInfo(bytePos, byteCharaterPos); - } - - BytePositionInfo GetStringBytePositionInfo(Point p) - { - System.Diagnostics.Debug.WriteLine("GetStringBytePositionInfo()", "HexBox"); - - long bytePos; - int byteCharacterPos; - - float x = ((float)(p.X - _recStringView.X) / _charSize.Width); - float y = ((float)(p.Y - _recStringView.Y) / _charSize.Height); - int iX = (int)x; - int iY = (int)y; - - int hPos = iX+1; - - bytePos = Math.Min(_byteProvider.Length, - _startByte + (_iHexMaxHBytes * (iY+1) - _iHexMaxHBytes) + hPos - 1); - byteCharacterPos = 0; - - if(bytePos < 0) - return new BytePositionInfo(0, 0); - return new BytePositionInfo(bytePos, byteCharacterPos); - } - #endregion - - #region PreProcessMessage methods - /// - /// Preprocesses windows messages. - /// - /// the message to process. - /// true, if the message was processed - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode=true), SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode=true)] - public override bool PreProcessMessage(ref Message m) - { - switch(m.Msg) - { - case NativeMethods.WM_KEYDOWN: - return _keyInterpreter.PreProcessWmKeyDown(ref m); - case NativeMethods.WM_CHAR: - return _keyInterpreter.PreProcessWmChar(ref m); - case NativeMethods.WM_KEYUP: - return _keyInterpreter.PreProcessWmKeyUp(ref m); - default: - return base.PreProcessMessage (ref m); - } - } - - bool BasePreProcessMessage(ref Message m) - { - return base.PreProcessMessage(ref m); - } - #endregion - - #region Find methods - /// - /// Searches the current ByteProvider - /// - /// the array of bytes to find - /// the start index - /// the SelectionStart property value if find was successfull or - /// -1 if there is no match - /// -2 if Find was aborted. - public long Find(byte[] bytes, long startIndex) - { - int match = 0; - int bytesLength = bytes.Length; - - _abortFind = false; - - for(long pos = startIndex; pos < _byteProvider.Length; pos++) - { - if(_abortFind) - return -2; - - if(pos % 1000 == 0) // for performance reasons: DoEvents only 1 times per 1000 loops - Application.DoEvents(); - - if(_byteProvider.ReadByte(pos) != bytes[match]) - { - pos -= match; - match = 0; - _findingPos = pos; - continue; - } - - match++; - - if(match == bytesLength) - { - long bytePos = pos-bytesLength+1; - Select(bytePos, bytesLength); - ScrollByteIntoView(_bytePos+_selectionLength); - ScrollByteIntoView(_bytePos); - - return bytePos; - } - } - - return -1; - } - - /// - /// Aborts a working Find method. - /// - public void AbortFind() - { - _abortFind = true; - } - - /// - /// Gets a value that indicates the current position during Find method execution. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public long CurrentFindingPosition - { - get - { - return _findingPos; - } - } - #endregion - - #region Copy, Cut and Paste methods - byte[] GetCopyData() - { - if (!CanCopy()) return new byte[0]; - - // put bytes into buffer - byte[] buffer = new byte[_selectionLength]; - int id = -1; - for (long i = _bytePos; i < _bytePos + _selectionLength; i++) - { - id++; - - buffer[id] = _byteProvider.ReadByte(i); - } - return buffer; - } - /// - /// Copies the current selection in the hex box to the Clipboard. - /// - public void Copy() - { - if(!CanCopy()) return; - - // put bytes into buffer - byte[] buffer = GetCopyData(); - - DataObject da = new DataObject(); - - // set string buffer clipbard data - string sBuffer = System.Text.Encoding.ASCII.GetString(buffer, 0, buffer.Length); - da.SetData(typeof(string), sBuffer); - - //set memorystream (BinaryData) clipboard data - System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer, 0, buffer.Length, false, true); - da.SetData("BinaryData", ms); - - Clipboard.SetDataObject(da, true); - UpdateCaret(); - ScrollByteIntoView(); - Invalidate(); - - OnCopied(EventArgs.Empty); - } - - /// - /// Return true if Copy method could be invoked. - /// - public bool CanCopy() - { - if(_selectionLength < 1 || _byteProvider == null) - return false; - - return true; - } - - /// - /// Moves the current selection in the hex box to the Clipboard. - /// - public void Cut() - { - if(!CanCut()) return; - - Copy(); - - _byteProvider.DeleteBytes(_bytePos, _selectionLength); - _byteCharacterPos = 0; - UpdateCaret(); - ScrollByteIntoView(); - ReleaseSelection(); - Invalidate(); - Refresh(); - } - - /// - /// Return true if Cut method could be invoked. - /// - public bool CanCut() - { - if (ReadOnly || !this.Enabled) - return false; - if(_byteProvider == null) - return false; - if(_selectionLength < 1 || !_byteProvider.SupportsDeleteBytes()) - return false; - - return true; - } - - /// - /// Replaces the current selection in the hex box with the contents of the Clipboard. - /// - public void Paste() - { - if(!CanPaste()) return; - - if(_selectionLength > 0) - _byteProvider.DeleteBytes(_bytePos, _selectionLength); - - byte[] buffer = null; - IDataObject da = Clipboard.GetDataObject(); - if(da.GetDataPresent("BinaryData")) - { - System.IO.MemoryStream ms = (System.IO.MemoryStream)da.GetData("BinaryData"); - buffer = new byte[ms.Length]; - ms.Read(buffer, 0, buffer.Length); - } - else if(da.GetDataPresent(typeof(string))) - { - string sBuffer = (string)da.GetData(typeof(string)); - buffer = System.Text.Encoding.ASCII.GetBytes(sBuffer); - } - else - { - return; - } - - _byteProvider.InsertBytes(_bytePos, buffer); - - SetPosition(_bytePos + buffer.Length, 0); - - ReleaseSelection(); - ScrollByteIntoView(); - UpdateCaret(); - Invalidate(); - } - - /// - /// Return true if Paste method could be invoked. - /// - public bool CanPaste() - { - if (ReadOnly || !this.Enabled) return false; - - if(_byteProvider == null || !_byteProvider.SupportsInsertBytes()) - return false; - - if(!_byteProvider.SupportsDeleteBytes() && _selectionLength > 0) - return false; - - IDataObject da = Clipboard.GetDataObject(); - if(da.GetDataPresent("BinaryData")) - return true; - else if(da.GetDataPresent(typeof(string))) - return true; - else - return false; - } - /// - /// Return true if PasteHex method could be invoked. - /// - public bool CanPasteHex() - { - if (!CanPaste()) return false; - - byte[] buffer = null; - IDataObject da = Clipboard.GetDataObject(); - if (da.GetDataPresent(typeof(string))) - { - string hexString = (string)da.GetData(typeof(string)); - buffer = ConvertHexToBytes(hexString); - return (buffer != null); - } - return false; - } - - /// - /// Replaces the current selection in the hex box with the hex string data of the Clipboard. - /// - public void PasteHex() - { - if (!CanPaste()) return; - - byte[] buffer = null; - IDataObject da = Clipboard.GetDataObject(); - if (da.GetDataPresent(typeof(string))) - { - string hexString = (string)da.GetData(typeof(string)); - buffer = ConvertHexToBytes(hexString); - if (buffer == null) - return; - } - else - { - return; - } - - if (_selectionLength > 0) - _byteProvider.DeleteBytes(_bytePos, _selectionLength); - - _byteProvider.InsertBytes(_bytePos, buffer); - - SetPosition(_bytePos + buffer.Length, 0); - - ReleaseSelection(); - ScrollByteIntoView(); - UpdateCaret(); - Invalidate(); - } - - /// - /// Copies the current selection in the hex box to the Clipboard in hex format. - /// - public void CopyHex() - { - if (!CanCopy()) return; - - // put bytes into buffer - byte[] buffer = GetCopyData(); - - DataObject da = new DataObject(); - - // set string buffer clipbard data - string hexString = ConvertBytesToHex(buffer); ; - da.SetData(typeof(string), hexString); - - //set memorystream (BinaryData) clipboard data - System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer, 0, buffer.Length, false, true); - da.SetData("BinaryData", ms); - - Clipboard.SetDataObject(da, true); - UpdateCaret(); - ScrollByteIntoView(); - Invalidate(); - - OnCopiedHex(EventArgs.Empty); - } - - - #endregion - - #region Paint methods - /// - /// Paints the background. - /// - /// A PaintEventArgs that contains the event data. - protected override void OnPaintBackground(PaintEventArgs e) - { - switch(_borderStyle) - { - case BorderStyle.Fixed3D: - { - if(TextBoxRenderer.IsSupported) - { - VisualStyleElement state = VisualStyleElement.TextBox.TextEdit.Normal; - Color backColor = this.BackColor; - - if (this.Enabled) - { - if (this.ReadOnly) - state = VisualStyleElement.TextBox.TextEdit.ReadOnly; - else if (this.Focused) - state = VisualStyleElement.TextBox.TextEdit.Focused; - } - else - { - state = VisualStyleElement.TextBox.TextEdit.Disabled; - backColor = this.BackColorDisabled; - } - - VisualStyleRenderer vsr = new VisualStyleRenderer(state); - vsr.DrawBackground(e.Graphics, this.ClientRectangle); - - Rectangle rectContent = vsr.GetBackgroundContentRectangle(e.Graphics, this.ClientRectangle); - e.Graphics.FillRectangle(new SolidBrush(backColor), rectContent); - } - else - { - // draw background - e.Graphics.FillRectangle(new SolidBrush(BackColor), ClientRectangle); - - // draw default border - ControlPaint.DrawBorder3D(e.Graphics, ClientRectangle, Border3DStyle.Sunken); - } - - break; - } - case BorderStyle.FixedSingle: - { - // draw background - e.Graphics.FillRectangle(new SolidBrush(BackColor), ClientRectangle); - - // draw fixed single border - ControlPaint.DrawBorder(e.Graphics, ClientRectangle, Color.Black, ButtonBorderStyle.Solid); - break; - } - default: - { - // draw background - e.Graphics.FillRectangle(new SolidBrush(BackColor), ClientRectangle); - break; - } - } - } - - - /// - /// Paints the hex box. - /// - /// A PaintEventArgs that contains the event data. - protected override void OnPaint(PaintEventArgs e) - { - base.OnPaint(e); - - if(_byteProvider == null) - return; - - System.Diagnostics.Debug.WriteLine("OnPaint " + DateTime.Now.ToString(), "HexBox"); - - // draw only in the content rectangle, so exclude the border and the scrollbar. - Region r = new Region(ClientRectangle); - r.Exclude(_recContent); - e.Graphics.ExcludeClip(r); - - UpdateVisibilityBytes(); - - if(_lineInfoVisible) - PaintLineInfo(e.Graphics, _startByte, _endByte); - - if(!_stringViewVisible) - { - PaintHex(e.Graphics, _startByte, _endByte); - } - else - { - PaintHexAndStringView(e.Graphics, _startByte, _endByte); - if(_shadowSelectionVisible) - PaintCurrentBytesSign(e.Graphics); - } - } - - - void PaintLineInfo(Graphics g, long startByte, long endByte) - { - // Ensure endByte isn't > length of array. - endByte = Math.Min(_byteProvider.Length-1, endByte); - - Color lineInfoColor = (this.LineInfoForeColor != Color.Empty) ? this.LineInfoForeColor : this.ForeColor; - Brush brush = new SolidBrush(lineInfoColor); - - int maxLine = GetGridBytePoint(endByte-startByte).Y+1; - - for(int i = 0; i < maxLine; i++) - { - long firstLineByte = (startByte + (_iHexMaxHBytes)*i) + _lineInfoOffset; - - PointF bytePointF = GetBytePointF(new Point(0, 0+i)); - string info = firstLineByte.ToString(_hexStringFormat, System.Threading.Thread.CurrentThread.CurrentCulture); - int nulls = 8-info.Length; - string formattedInfo; - if(nulls > -1) - { - formattedInfo = new string('0', 8-info.Length) + info; - } - else - { - formattedInfo = new string('~', 8); - } - - g.DrawString(formattedInfo, Font, brush, new PointF(_recLineInfo.X, bytePointF.Y), _stringFormat); - } - } - - void PaintHex(Graphics g, long startByte, long endByte) - { - Brush brush = new SolidBrush(GetDefaultForeColor()); - Brush selBrush = new SolidBrush(_selectionForeColor); - Brush selBrushBack = new SolidBrush(_selectionBackColor); - - int counter = -1; - long intern_endByte = Math.Min(_byteProvider.Length-1, endByte+_iHexMaxHBytes); - - bool isKeyInterpreterActive = _keyInterpreter == null || _keyInterpreter.GetType() == typeof(KeyInterpreter); - - for(long i = startByte; i < intern_endByte+1; i++) - { - counter++; - Point gridPoint = GetGridBytePoint(counter); - byte b = _byteProvider.ReadByte(i); - - bool isSelectedByte = i >= _bytePos && i <= (_bytePos + _selectionLength-1) && _selectionLength != 0; - - if(isSelectedByte && isKeyInterpreterActive) - { - PaintHexStringSelected(g, b, selBrush, selBrushBack, gridPoint); - } - else - { - PaintHexString(g, b, brush, gridPoint); - } - } - } - - void PaintHexString(Graphics g, byte b, Brush brush, Point gridPoint) - { - PointF bytePointF = GetBytePointF(gridPoint); - - string sB = ConvertByteToHex(b); - - g.DrawString(sB.Substring(0,1), Font, brush, bytePointF, _stringFormat); - bytePointF.X += _charSize.Width; - g.DrawString(sB.Substring(1,1), Font, brush, bytePointF, _stringFormat); - } - - void PaintHexStringSelected(Graphics g, byte b, Brush brush, Brush brushBack, Point gridPoint) - { - string sB = b.ToString(_hexStringFormat, System.Threading.Thread.CurrentThread.CurrentCulture); - if(sB.Length == 1) - sB = "0" + sB; - - PointF bytePointF = GetBytePointF(gridPoint); - - bool isLastLineChar = (gridPoint.X+1 == _iHexMaxHBytes); - float bcWidth = (isLastLineChar) ? _charSize.Width*2 : _charSize.Width*3; - - g.FillRectangle(brushBack, bytePointF.X, bytePointF.Y, bcWidth, _charSize.Height); - g.DrawString(sB.Substring(0,1), Font, brush, bytePointF, _stringFormat); - bytePointF.X += _charSize.Width; - g.DrawString(sB.Substring(1,1), Font, brush, bytePointF, _stringFormat); - } - - void PaintHexAndStringView(Graphics g, long startByte, long endByte) - { - Brush brush = new SolidBrush(GetDefaultForeColor()); - Brush selBrush = new SolidBrush(_selectionForeColor); - Brush selBrushBack = new SolidBrush(_selectionBackColor); - - int counter = -1; - long intern_endByte = Math.Min(_byteProvider.Length-1, endByte+_iHexMaxHBytes); - - bool isKeyInterpreterActive = _keyInterpreter == null || _keyInterpreter.GetType() == typeof(KeyInterpreter); - bool isStringKeyInterpreterActive = _keyInterpreter != null && _keyInterpreter.GetType() == typeof(StringKeyInterpreter); - - for(long i = startByte; i < intern_endByte+1; i++) - { - counter++; - Point gridPoint = GetGridBytePoint(counter); - PointF byteStringPointF = GetByteStringPointF(gridPoint); - byte b = _byteProvider.ReadByte(i); - - bool isSelectedByte = i >= _bytePos && i <= (_bytePos + _selectionLength-1) && _selectionLength != 0; - - if(isSelectedByte && isKeyInterpreterActive) - { - PaintHexStringSelected(g, b, selBrush, selBrushBack, gridPoint); - } - else - { - PaintHexString(g, b, brush, gridPoint); - } - - string s = new String(ByteCharConverter.ToChar(b), 1); - - if(isSelectedByte && isStringKeyInterpreterActive) - { - g.FillRectangle(selBrushBack, byteStringPointF.X, byteStringPointF.Y, _charSize.Width, _charSize.Height); - g.DrawString(s, Font, selBrush, byteStringPointF, _stringFormat); - } - else - { - g.DrawString(s, Font, brush, byteStringPointF, _stringFormat); - } - } - } - - void PaintCurrentBytesSign(Graphics g) - { - if(_keyInterpreter != null && Focused && _bytePos != -1 && Enabled) - { - if(_keyInterpreter.GetType() == typeof(KeyInterpreter)) - { - if(_selectionLength == 0) - { - Point gp = GetGridBytePoint(_bytePos - _startByte); - PointF pf = GetByteStringPointF(gp); - Size s = new Size((int)_charSize.Width, (int)_charSize.Height); - Rectangle r = new Rectangle((int)pf.X, (int)pf.Y, s.Width, s.Height); - if(r.IntersectsWith(_recStringView)) - { - r.Intersect(_recStringView); - PaintCurrentByteSign(g, r); - } - } - else - { - int lineWidth = (int)(_recStringView.Width-_charSize.Width); - - Point startSelGridPoint = GetGridBytePoint(_bytePos-_startByte); - PointF startSelPointF = GetByteStringPointF(startSelGridPoint); - - Point endSelGridPoint = GetGridBytePoint(_bytePos-_startByte+_selectionLength-1); - PointF endSelPointF = GetByteStringPointF(endSelGridPoint); - - int multiLine = endSelGridPoint.Y - startSelGridPoint.Y; - if(multiLine == 0) - { - Rectangle singleLine = new Rectangle( - (int)startSelPointF.X, - (int)startSelPointF.Y, - (int)(endSelPointF.X-startSelPointF.X+_charSize.Width), - (int)_charSize.Height); - if(singleLine.IntersectsWith(_recStringView)) - { - singleLine.Intersect(_recStringView); - PaintCurrentByteSign(g, singleLine); - } - } - else - { - Rectangle firstLine = new Rectangle( - (int)startSelPointF.X, - (int)startSelPointF.Y, - (int)(_recStringView.X+lineWidth-startSelPointF.X+_charSize.Width), - (int)_charSize.Height); - if(firstLine.IntersectsWith(_recStringView)) - { - firstLine.Intersect(_recStringView); - PaintCurrentByteSign(g, firstLine); - } - - if(multiLine > 1) - { - Rectangle betweenLines = new Rectangle( - _recStringView.X, - (int)(startSelPointF.Y+_charSize.Height), - (int)(_recStringView.Width), - (int)(_charSize.Height*(multiLine-1))); - if(betweenLines.IntersectsWith(_recStringView)) - { - betweenLines.Intersect(_recStringView); - PaintCurrentByteSign(g, betweenLines); - } - - } - - Rectangle lastLine = new Rectangle( - _recStringView.X, - (int)endSelPointF.Y, - (int)(endSelPointF.X-_recStringView.X+_charSize.Width), - (int)_charSize.Height); - if(lastLine.IntersectsWith(_recStringView)) - { - lastLine.Intersect(_recStringView); - PaintCurrentByteSign(g, lastLine); - } - } - } - } - else - { - if(_selectionLength == 0) - { - Point gp = GetGridBytePoint(_bytePos - _startByte); - PointF pf = GetBytePointF(gp); - Size s = new Size((int)_charSize.Width * 2, (int)_charSize.Height); - Rectangle r = new Rectangle((int)pf.X, (int)pf.Y, s.Width, s.Height); - PaintCurrentByteSign(g, r); - } - else - { - int lineWidth = (int)(_recHex.Width-_charSize.Width*5); - - Point startSelGridPoint = GetGridBytePoint(_bytePos-_startByte); - PointF startSelPointF = GetBytePointF(startSelGridPoint); - - Point endSelGridPoint = GetGridBytePoint(_bytePos-_startByte+_selectionLength-1); - PointF endSelPointF = GetBytePointF(endSelGridPoint); - - int multiLine = endSelGridPoint.Y - startSelGridPoint.Y; - if(multiLine == 0) - { - Rectangle singleLine = new Rectangle( - (int)startSelPointF.X, - (int)startSelPointF.Y, - (int)(endSelPointF.X-startSelPointF.X+_charSize.Width*2), - (int)_charSize.Height); - if(singleLine.IntersectsWith(_recHex)) - { - singleLine.Intersect(_recHex); - PaintCurrentByteSign(g, singleLine); - } - } - else - { - Rectangle firstLine = new Rectangle( - (int)startSelPointF.X, - (int)startSelPointF.Y, - (int)(_recHex.X+lineWidth-startSelPointF.X+_charSize.Width*2), - (int)_charSize.Height); - if(firstLine.IntersectsWith(_recHex)) - { - firstLine.Intersect(_recHex); - PaintCurrentByteSign(g, firstLine); - } - - if(multiLine > 1) - { - Rectangle betweenLines = new Rectangle( - _recHex.X, - (int)(startSelPointF.Y+_charSize.Height), - (int)(lineWidth+_charSize.Width*2), - (int)(_charSize.Height*(multiLine-1))); - if(betweenLines.IntersectsWith(_recHex)) - { - betweenLines.Intersect(_recHex); - PaintCurrentByteSign(g, betweenLines); - } - - } - - Rectangle lastLine = new Rectangle( - _recHex.X, - (int)endSelPointF.Y, - (int)(endSelPointF.X-_recHex.X+_charSize.Width*2), - (int)_charSize.Height); - if(lastLine.IntersectsWith(_recHex)) - { - lastLine.Intersect(_recHex); - PaintCurrentByteSign(g, lastLine); - } - } - } - } - } - } - - void PaintCurrentByteSign(Graphics g, Rectangle rec) - { - // stack overflowexception on big files - workaround - if(rec.Top < 0 || rec.Left < 0 || rec.Width <= 0 || rec.Height <= 0) - return; - - Bitmap myBitmap = new Bitmap(rec.Width, rec.Height); - Graphics bitmapGraphics = Graphics.FromImage(myBitmap); - - SolidBrush greenBrush = new SolidBrush(_shadowSelectionColor); - - bitmapGraphics.FillRectangle(greenBrush, 0, - 0, rec.Width, rec.Height); - - g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.GammaCorrected; - - g.DrawImage(myBitmap, rec.Left, rec.Top); - } - - Color GetDefaultForeColor() - { - if(Enabled) - return ForeColor; - else - return Color.Gray; - } - void UpdateVisibilityBytes() - { - if(_byteProvider == null || _byteProvider.Length == 0) - return; - - _startByte = (_scrollVpos+1) * _iHexMaxHBytes - _iHexMaxHBytes; - _endByte = (long)Math.Min(_byteProvider.Length - 1, _startByte + _iHexMaxBytes); - } - #endregion - - #region Positioning methods - void UpdateRectanglePositioning() - { - // calc char size - SizeF charSize = this.CreateGraphics().MeasureString("A", Font, 100, _stringFormat); - _charSize = new SizeF((float)Math.Ceiling(charSize.Width), (float)Math.Ceiling(charSize.Height)); - - // calc content bounds - _recContent = ClientRectangle; - _recContent.X += _recBorderLeft; - _recContent.Y += _recBorderTop; - _recContent.Width -= _recBorderRight+_recBorderLeft; - _recContent.Height -= _recBorderBottom+_recBorderTop; - - if(_vScrollBarVisible) - { - _recContent.Width -= _vScrollBar.Width; - _vScrollBar.Left = _recContent.X+_recContent.Width; - _vScrollBar.Top = _recContent.Y; - _vScrollBar.Height = _recContent.Height; - } - - int marginLeft = 4; - - // calc line info bounds - if(_lineInfoVisible) - { - _recLineInfo = new Rectangle(_recContent.X+marginLeft, - _recContent.Y, - (int)(_charSize.Width*10), - _recContent.Height); - } - else - { - _recLineInfo = Rectangle.Empty; - _recLineInfo.X = marginLeft; - } - - // calc hex bounds and grid - _recHex = new Rectangle(_recLineInfo.X + _recLineInfo.Width, - _recLineInfo.Y, - _recContent.Width - _recLineInfo.Width, - _recContent.Height); - - if(UseFixedBytesPerLine) - { - SetHorizontalByteCount(_bytesPerLine); - _recHex.Width = (int)Math.Floor(((double)_iHexMaxHBytes)*_charSize.Width*3+(2*_charSize.Width)); - } - else - { - int hmax = (int)Math.Floor((double)_recHex.Width/(double)_charSize.Width); - if(hmax > 1) - SetHorizontalByteCount((int)Math.Floor((double)hmax/3)); - else - SetHorizontalByteCount(hmax); - } - - if(_stringViewVisible) - { - _recStringView = new Rectangle(_recHex.X + _recHex.Width, - _recHex.Y, - (int)(_charSize.Width*_iHexMaxHBytes), - _recHex.Height); - } - else - { - _recStringView = Rectangle.Empty; - } - - int vmax = (int)Math.Floor((double)_recHex.Height/(double)_charSize.Height); - SetVerticalByteCount(vmax); - - _iHexMaxBytes = _iHexMaxHBytes * _iHexMaxVBytes; - - UpdateScrollSize(); - } - - PointF GetBytePointF(long byteIndex) - { - Point gp = GetGridBytePoint(byteIndex); - - return GetBytePointF(gp); - } - - PointF GetBytePointF(Point gp) - { - float x = (3 * _charSize.Width) * gp.X + _recHex.X; - float y = (gp.Y+1)*_charSize.Height-_charSize.Height+_recHex.Y; - - return new PointF(x,y); - } - - PointF GetByteStringPointF(Point gp) - { - float x = (_charSize.Width) * gp.X + _recStringView.X; - float y = (gp.Y+1)*_charSize.Height-_charSize.Height+_recStringView.Y; - - return new PointF(x,y); - } - - Point GetGridBytePoint(long byteIndex) - { - int row = (int)Math.Floor((double)byteIndex/(double)_iHexMaxHBytes); - int column = (int)(byteIndex+_iHexMaxHBytes-_iHexMaxHBytes*(row+1)); - - Point res = new Point(column, row); - return res; - } - #endregion - - #region Overridden properties - /// - /// Gets or sets the background color for the control. - /// - [DefaultValue(typeof(Color), "White")] - public override Color BackColor - { - get - { - return base.BackColor; - } - set - { - base.BackColor = value; - } - } - - /// - /// The font used to display text in the hexbox. - /// - public override Font Font - { - get - { - return base.Font; - } - set - { - base.Font = value; - } - } - - /// - /// Not used. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Bindable(false)] - public override string Text - { - get - { - return base.Text; - } - set - { - base.Text = value; - } - } - - /// - /// Not used. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Bindable(false)] - public override RightToLeft RightToLeft - { - get - { - return base.RightToLeft; - } - set - { - base.RightToLeft = value; - } - } - #endregion - - #region Properties - /// - /// Gets or sets the background color for the disabled control. - /// - [Category("Appearance"), DefaultValue(typeof(Color), "WhiteSmoke")] - public Color BackColorDisabled - { - get - { - return _backColorDisabled; - } - set - { - _backColorDisabled = value; - } - } Color _backColorDisabled = Color.FromName("WhiteSmoke"); - - /// - /// Gets or sets if the count of bytes in one line is fix. - /// - /// - /// When set to True, BytesPerLine property determine the maximum count of bytes in one line. - /// - [DefaultValue(false), Category("Hex"), Description("Gets or sets if the count of bytes in one line is fix.")] - public bool ReadOnly - { - get { return _readOnly; } - set - { - if(_readOnly == value) - return; - - _readOnly = value; - OnReadOnlyChanged(EventArgs.Empty); - Invalidate(); - } - } bool _readOnly; - - /// - /// Gets or sets the maximum count of bytes in one line. - /// - /// - /// UsedFixedBytesPerLine property must set to true - /// - [DefaultValue(16), Category("Hex"), Description("Gets or sets the maximum count of bytes in one line.")] - public int BytesPerLine - { - get { return _bytesPerLine; } - set - { - if(_bytesPerLine == value) - return; - - _bytesPerLine = value; - OnBytesPerLineChanged(EventArgs.Empty); - - UpdateRectanglePositioning(); - Invalidate(); - } - } int _bytesPerLine = 16; - - /// - /// Gets or sets if the count of bytes in one line is fix. - /// - /// - /// When set to True, BytesPerLine property determine the maximum count of bytes in one line. - /// - [DefaultValue(false), Category("Hex"), Description("Gets or sets if the count of bytes in one line is fix.")] - public bool UseFixedBytesPerLine - { - get { return _useFixedBytesPerLine; } - set - { - if(_useFixedBytesPerLine == value) - return; - - _useFixedBytesPerLine = value; - OnUseFixedBytesPerLineChanged(EventArgs.Empty); - - UpdateRectanglePositioning(); - Invalidate(); - } - } bool _useFixedBytesPerLine; - - /// - /// Gets or sets the visibility of a vertical scroll bar. - /// - [DefaultValue(false), Category("Hex"), Description("Gets or sets the visibility of a vertical scroll bar.")] - public bool VScrollBarVisible - { - get { return this._vScrollBarVisible; } - set - { - if(_vScrollBarVisible == value) - return; - - _vScrollBarVisible = value; - - if(_vScrollBarVisible) - Controls.Add(_vScrollBar); - else - Controls.Remove(_vScrollBar); - - UpdateRectanglePositioning(); - UpdateScrollSize(); - - OnVScrollBarVisibleChanged(EventArgs.Empty); - } - } bool _vScrollBarVisible; - - /// - /// Gets or sets the ByteProvider. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public IByteProvider ByteProvider - { - get { return _byteProvider; } - set - { - if(_byteProvider == value) - return; - - if(value == null) - ActivateEmptyKeyInterpreter(); - else - ActivateKeyInterpreter(); - - if(_byteProvider != null) - _byteProvider.LengthChanged -= new EventHandler(_byteProvider_LengthChanged); - - _byteProvider = value; - if(_byteProvider != null) - _byteProvider.LengthChanged += new EventHandler(_byteProvider_LengthChanged); - - OnByteProviderChanged(EventArgs.Empty); - - if(value == null) // do not raise events if value is null - { - _bytePos = -1; - _byteCharacterPos = 0; - _selectionLength = 0; - - DestroyCaret(); - } - else - { - SetPosition(0, 0); - SetSelectionLength(0); - - if(_caretVisible && Focused) - UpdateCaret(); - else - CreateCaret(); - } - - CheckCurrentLineChanged(); - CheckCurrentPositionInLineChanged(); - - _scrollVpos = 0; - - UpdateVisibilityBytes(); - UpdateRectanglePositioning(); - - Invalidate(); - } - } - - IByteProvider _byteProvider; - - /// - /// Gets or sets the visibility of a line info. - /// - [DefaultValue(false), Category("Hex"), Description("Gets or sets the visibility of a line info.")] - public bool LineInfoVisible - { - get { return _lineInfoVisible; } - set - { - if(_lineInfoVisible == value) - return; - - _lineInfoVisible = value; - OnLineInfoVisibleChanged(EventArgs.Empty); - - UpdateRectanglePositioning(); - Invalidate(); - } - } bool _lineInfoVisible; - - /// - /// Gets or sets the offset of a line info. - /// - [DefaultValue((long)0), Category("Hex"), Description("Gets or sets the offset of the line info.")] - public long LineInfoOffset - { - get { return _lineInfoOffset; } - set - { - if (_lineInfoOffset == value) - return; - - _lineInfoOffset = value; - - Invalidate(); - } - } long _lineInfoOffset; - - /// - /// Gets or sets the hex box´s border style. - /// - [DefaultValue(typeof(BorderStyle), "Fixed3D"), Category("Hex"), Description("Gets or sets the hex box´s border style.")] - public BorderStyle BorderStyle - { - get { return _borderStyle;} - set - { - if(_borderStyle == value) - return; - - _borderStyle = value; - switch(_borderStyle) - { - case BorderStyle.None: - _recBorderLeft = _recBorderTop = _recBorderRight = _recBorderBottom = 0; - break; - case BorderStyle.Fixed3D: - _recBorderLeft = _recBorderRight = SystemInformation.Border3DSize.Width; - _recBorderTop = _recBorderBottom = SystemInformation.Border3DSize.Height; - break; - case BorderStyle.FixedSingle: - _recBorderLeft = _recBorderTop = _recBorderRight = _recBorderBottom = 1; - break; - } - - UpdateRectanglePositioning(); - - OnBorderStyleChanged(EventArgs.Empty); - - } - } BorderStyle _borderStyle = BorderStyle.Fixed3D; - - /// - /// Gets or sets the visibility of the string view. - /// - [DefaultValue(false), Category("Hex"), Description("Gets or sets the visibility of the string view.")] - public bool StringViewVisible - { - get { return _stringViewVisible; } - set - { - if(_stringViewVisible == value) - return; - - _stringViewVisible = value; - OnStringViewVisibleChanged(EventArgs.Empty); - - UpdateRectanglePositioning(); - Invalidate(); - } - } bool _stringViewVisible; - - /// - /// Gets or sets whether the HexBox control displays the hex characters in upper or lower case. - /// - [DefaultValue(typeof(HexCasing), "Upper"), Category("Hex"), Description("Gets or sets whether the HexBox control displays the hex characters in upper or lower case.")] - public HexCasing HexCasing - { - get - { - if(_hexStringFormat == "X") - return HexCasing.Upper; - else - return HexCasing.Lower; - } - set - { - string format; - if(value == HexCasing.Upper) - format = "X"; - else - format = "x"; - - if(_hexStringFormat == format) - return; - - _hexStringFormat = format; - OnHexCasingChanged(EventArgs.Empty); - - Invalidate(); - } - } - - /// - /// Gets and sets the starting point of the bytes selected in the hex box. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public long SelectionStart - { - get { return _bytePos; } - set - { - SetPosition(value, 0); - ScrollByteIntoView(); - Invalidate(); - } - } - - /// - /// Gets and sets the number of bytes selected in the hex box. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public long SelectionLength - { - get { return _selectionLength; } - set - { - SetSelectionLength(value); - ScrollByteIntoView(); - Invalidate(); - } - } long _selectionLength; - - - /// - /// Gets or sets the line info color. When this property is null, then ForeColor property is used. - /// - [DefaultValue(typeof(Color), "Empty"), Category("Hex"), Description("Gets or sets the line info color. When this property is null, then ForeColor property is used.")] - public Color LineInfoForeColor - { - get { return _lineInfoForeColor; } - set { _lineInfoForeColor = value; Invalidate(); } - } Color _lineInfoForeColor = Color.Empty; - - /// - /// Gets or sets the background color for the selected bytes. - /// - [DefaultValue(typeof(Color), "Blue"), Category("Hex"), Description("Gets or sets the background color for the selected bytes.")] - public Color SelectionBackColor - { - get { return _selectionBackColor; } - set { _selectionBackColor = value; Invalidate(); } - } Color _selectionBackColor = Color.Blue; - - /// - /// Gets or sets the foreground color for the selected bytes. - /// - [DefaultValue(typeof(Color), "White"), Category("Hex"), Description("Gets or sets the foreground color for the selected bytes.")] - public Color SelectionForeColor - { - get { return _selectionForeColor; } - set { _selectionForeColor = value; Invalidate(); } - } Color _selectionForeColor = Color.White; - - /// - /// Gets or sets the visibility of a shadow selection. - /// - [DefaultValue(true), Category("Hex"), Description("Gets or sets the visibility of a shadow selection.")] - public bool ShadowSelectionVisible - { - get { return _shadowSelectionVisible; } - set - { - if(_shadowSelectionVisible == value) - return; - _shadowSelectionVisible = value; - Invalidate(); - } - } bool _shadowSelectionVisible = true; - - /// - /// Gets or sets the color of the shadow selection. - /// - /// - /// A alpha component must be given! - /// Default alpha = 100 - /// - [Category("Hex"), Description("Gets or sets the color of the shadow selection.")] - public Color ShadowSelectionColor - { - get { return _shadowSelectionColor; } - set { _shadowSelectionColor = value; Invalidate(); } - } Color _shadowSelectionColor = Color.FromArgb(100, 60, 188, 255); - - /// - /// Gets the number bytes drawn horizontally. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public int HorizontalByteCount - { - get { return _iHexMaxHBytes; } - } - - /// - /// Gets the number bytes drawn vertically. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public int VerticalByteCount - { - get { return _iHexMaxVBytes; } - } - - /// - /// Gets the current line - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public long CurrentLine - { - get { return _currentLine; } - } long _currentLine; - - /// - /// Gets the current position in the current line - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public long CurrentPositionInLine - { - get { return _currentPositionInLine; } - } int _currentPositionInLine; - - /// - /// Gets the a value if insertion mode is active or not. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public bool InsertActive - { - get { return _insertActive; } - set - { - if (_insertActive == value) - return; - - _insertActive = value; - - // recreate caret - DestroyCaret(); - CreateCaret(); - - // raise change event - OnInsertActiveChanged(EventArgs.Empty); - } - } - - /// - /// Gets or sets the built-in context menu. - /// - [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] - public BuiltInContextMenu BuiltInContextMenu - { - get { return _builtInContextMenu; } - } BuiltInContextMenu _builtInContextMenu; - - - /// - /// Gets or sets the converter that will translate between byte and character values. - /// - [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public IByteCharConverter ByteCharConverter - { - get - { - if (_byteCharConverter == null) - _byteCharConverter = new DefaultByteCharConverter(); - return _byteCharConverter; - } - set - { - if (value != null && value != _byteCharConverter) - { - _byteCharConverter = value; - Invalidate(); - } - } - } IByteCharConverter _byteCharConverter; - - #endregion - - #region Misc - /// - /// Converts a byte array to a hex string. For example: {10,11} = "0A 0B" - /// - /// the byte array - /// the hex string - string ConvertBytesToHex(byte[] data) - { - StringBuilder sb = new StringBuilder(); - foreach (byte b in data) - { - string hex = ConvertByteToHex(b); - sb.Append(hex); - sb.Append(" "); - } - if (sb.Length > 0) - sb.Remove(sb.Length - 1, 1); - string result = sb.ToString(); - return result; - } - /// - /// Converts the byte to a hex string. For example: "10" = "0A"; - /// - /// the byte to format - /// the hex string - string ConvertByteToHex(byte b) - { - string sB = b.ToString(_hexStringFormat, System.Threading.Thread.CurrentThread.CurrentCulture); - if (sB.Length == 1) - sB = "0" + sB; - return sB; - } - /// - /// Converts the hex string to an byte array. The hex string must be separated by a space char ' '. If there is any invalid hex information in the string the result will be null. - /// - /// the hex string separated by ' '. For example: "0A 0B 0C" - /// the byte array. null if hex is invalid or empty - byte[] ConvertHexToBytes(string hex) - { - if (string.IsNullOrEmpty(hex)) - return null; - hex = hex.Trim(); - var hexArray = hex.Split(' '); - var byteArray = new byte[hexArray.Length]; - - for(int i = 0; i < hexArray.Length; i++) - { - var hexValue = hexArray[i]; - - byte b; - var isByte = ConvertHexToByte(hexValue, out b); - if (!isByte) - return null; - byteArray[i] = b; - } - - return byteArray; - } - - bool ConvertHexToByte(string hex, out byte b) - { - bool isByte = byte.TryParse(hex, System.Globalization.NumberStyles.HexNumber, System.Threading.Thread.CurrentThread.CurrentCulture, out b); - return isByte; - } - - void SetPosition(long bytePos) - { - SetPosition(bytePos, _byteCharacterPos); - } - - void SetPosition(long bytePos, int byteCharacterPos) - { - if(_byteCharacterPos != byteCharacterPos) - { - _byteCharacterPos = byteCharacterPos; - } - - if(bytePos != _bytePos) - { - _bytePos = bytePos; - CheckCurrentLineChanged(); - CheckCurrentPositionInLineChanged(); - - OnSelectionStartChanged(EventArgs.Empty); - } - } - - void SetSelectionLength(long selectionLength) - { - if(selectionLength != _selectionLength) - { - _selectionLength = selectionLength; - OnSelectionLengthChanged(EventArgs.Empty); - } - } - - void SetHorizontalByteCount(int value) - { - if(_iHexMaxHBytes == value) - return; - - _iHexMaxHBytes = value; - OnHorizontalByteCountChanged(EventArgs.Empty); - } - - void SetVerticalByteCount(int value) - { - if(_iHexMaxVBytes == value) - return; - - _iHexMaxVBytes = value; - OnVerticalByteCountChanged(EventArgs.Empty); - } - - void CheckCurrentLineChanged() - { - long currentLine = (long)Math.Floor((double)_bytePos / (double)_iHexMaxHBytes) + 1; - - if(_byteProvider == null && _currentLine != 0) - { - _currentLine = 0; - OnCurrentLineChanged(EventArgs.Empty); - } - else if(currentLine != _currentLine) - { - _currentLine = currentLine; - OnCurrentLineChanged(EventArgs.Empty); - } - } - - void CheckCurrentPositionInLineChanged() - { - Point gb = GetGridBytePoint(_bytePos); - int currentPositionInLine = gb.X + 1; - - if(_byteProvider == null && _currentPositionInLine != 0) - { - _currentPositionInLine = 0; - OnCurrentPositionInLineChanged(EventArgs.Empty); - } - else if(currentPositionInLine != _currentPositionInLine) - { - _currentPositionInLine = currentPositionInLine; - OnCurrentPositionInLineChanged(EventArgs.Empty); - } - } - - /// - /// Raises the InsertActiveChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnInsertActiveChanged(EventArgs e) - { - if(InsertActiveChanged != null) - InsertActiveChanged(this, e); - } - - /// - /// Raises the ReadOnlyChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnReadOnlyChanged(EventArgs e) - { - if(ReadOnlyChanged != null) - ReadOnlyChanged(this, e); - } - - /// - /// Raises the ByteProviderChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnByteProviderChanged(EventArgs e) - { - if(ByteProviderChanged != null) - ByteProviderChanged(this, e); - } - - /// - /// Raises the SelectionStartChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnSelectionStartChanged(EventArgs e) - { - if(SelectionStartChanged != null) - SelectionStartChanged(this, e); - } - - /// - /// Raises the SelectionLengthChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnSelectionLengthChanged(EventArgs e) - { - if(SelectionLengthChanged != null) - SelectionLengthChanged(this, e); - } - - /// - /// Raises the LineInfoVisibleChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnLineInfoVisibleChanged(EventArgs e) - { - if(LineInfoVisibleChanged != null) - LineInfoVisibleChanged(this, e); - } - - /// - /// Raises the StringViewVisibleChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnStringViewVisibleChanged(EventArgs e) - { - if(StringViewVisibleChanged != null) - StringViewVisibleChanged(this, e); - } - - /// - /// Raises the BorderStyleChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnBorderStyleChanged(EventArgs e) - { - if(BorderStyleChanged != null) - BorderStyleChanged(this, e); - } - - /// - /// Raises the UseFixedBytesPerLineChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnUseFixedBytesPerLineChanged(EventArgs e) - { - if(UseFixedBytesPerLineChanged != null) - UseFixedBytesPerLineChanged(this, e); - } - - /// - /// Raises the BytesPerLineChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnBytesPerLineChanged(EventArgs e) - { - if(BytesPerLineChanged != null) - BytesPerLineChanged(this, e); - } - - /// - /// Raises the VScrollBarVisibleChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnVScrollBarVisibleChanged(EventArgs e) - { - if(VScrollBarVisibleChanged != null) - VScrollBarVisibleChanged(this, e); - } - - /// - /// Raises the HexCasingChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnHexCasingChanged(EventArgs e) - { - if(HexCasingChanged != null) - HexCasingChanged(this, e); - } - - /// - /// Raises the HorizontalByteCountChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnHorizontalByteCountChanged(EventArgs e) - { - if(HorizontalByteCountChanged != null) - HorizontalByteCountChanged(this, e); - } - - /// - /// Raises the VerticalByteCountChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnVerticalByteCountChanged(EventArgs e) - { - if(VerticalByteCountChanged != null) - VerticalByteCountChanged(this, e); - } - - /// - /// Raises the CurrentLineChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnCurrentLineChanged(EventArgs e) - { - if(CurrentLineChanged != null) - CurrentLineChanged(this, e); - } - - /// - /// Raises the CurrentPositionInLineChanged event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnCurrentPositionInLineChanged(EventArgs e) - { - if(CurrentPositionInLineChanged != null) - CurrentPositionInLineChanged(this, e); - } - - - /// - /// Raises the Copied event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnCopied(EventArgs e) - { - if (Copied != null) - Copied(this, e); - } - - /// - /// Raises the CopiedHex event. - /// - /// An EventArgs that contains the event data. - protected virtual void OnCopiedHex(EventArgs e) - { - if (CopiedHex != null) - CopiedHex(this, e); - } - - /// - /// Raises the MouseDown event. - /// - /// An EventArgs that contains the event data. - protected override void OnMouseDown(MouseEventArgs e) - { - System.Diagnostics.Debug.WriteLine("OnMouseDown()", "HexBox"); - - if(!Focused) - Focus(); - - if(e.Button == MouseButtons.Left) - SetCaretPosition(new Point(e.X, e.Y)); - - base.OnMouseDown (e); - } - - /// - /// Raises the MouseWhell event - /// - /// An EventArgs that contains the event data. - protected override void OnMouseWheel(MouseEventArgs e) - { - int linesToScroll = -(e.Delta * SystemInformation.MouseWheelScrollLines / 120); - this.PerformScrollLines(linesToScroll); - - base.OnMouseWheel (e); - } - - - /// - /// Raises the Resize event. - /// - /// An EventArgs that contains the event data. - protected override void OnResize(EventArgs e) - { - base.OnResize (e); - UpdateRectanglePositioning(); - } - - /// - /// Raises the GotFocus event. - /// - /// An EventArgs that contains the event data. - protected override void OnGotFocus(EventArgs e) - { - System.Diagnostics.Debug.WriteLine("OnGotFocus()", "HexBox"); - - base.OnGotFocus (e); - - CreateCaret(); - } - - /// - /// Raises the LostFocus event. - /// - /// An EventArgs that contains the event data. - protected override void OnLostFocus(EventArgs e) - { - System.Diagnostics.Debug.WriteLine("OnLostFocus()", "HexBox"); - - base.OnLostFocus (e); - - DestroyCaret(); - } - - void _byteProvider_LengthChanged(object sender, EventArgs e) - { - UpdateScrollSize(); - } - #endregion - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.resources b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.resources and /dev/null differ diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.resx b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.resx deleted file mode 100644 index 90f8d2d..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexBox.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - False - - \ No newline at end of file diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexCasing.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexCasing.cs deleted file mode 100644 index bf007ee..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/HexCasing.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Be.Windows.Forms -{ - /// - /// Specifies the case of hex characters in the HexBox control - /// - public enum HexCasing - { - /// - /// Converts all characters to uppercase. - /// - Upper = 0, - /// - /// Converts all characters to lowercase. - /// - Lower = 1 - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/IByteProvider.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/IByteProvider.cs deleted file mode 100644 index 7847ae5..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/IByteProvider.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; - -namespace Be.Windows.Forms -{ - /// - /// Defines a byte provider for HexBox control - /// - public interface IByteProvider - { - /// - /// Reads a byte from the provider - /// - /// the index of the byte to read - /// the byte to read - byte ReadByte(long index); - /// - /// Writes a byte into the provider - /// - /// the index of the byte to write - /// the byte to write - void WriteByte(long index, byte value); - /// - /// Inserts bytes into the provider - /// - /// - /// - /// This method must raise the LengthChanged event. - void InsertBytes(long index, byte[] bs); - /// - /// Deletes bytes from the provider - /// - /// the start index of the bytes to delete - /// the length of the bytes to delete - /// This method must raise the LengthChanged event. - void DeleteBytes(long index, long length); - - /// - /// Returns the total length of bytes the byte provider is providing. - /// - long Length { get; } - /// - /// Occurs, when the Length property changed. - /// - event EventHandler LengthChanged; - - /// - /// True, when changes are done. - /// - bool HasChanges(); - /// - /// Applies changes. - /// - void ApplyChanges(); - /// - /// Occurs, when bytes are changed. - /// - event EventHandler Changed; - - /// - /// Returns a value if the WriteByte methods is supported by the provider. - /// - /// True, when it´s supported. - bool SupportsWriteByte(); - /// - /// Returns a value if the InsertBytes methods is supported by the provider. - /// - /// True, when it´s supported. - bool SupportsInsertBytes(); - /// - /// Returns a value if the DeleteBytes methods is supported by the provider. - /// - /// True, when it´s supported. - bool SupportsDeleteBytes(); - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/MemoryDataBlock.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/MemoryDataBlock.cs deleted file mode 100644 index 9729267..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/MemoryDataBlock.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; - -namespace Be.Windows.Forms -{ - internal sealed class MemoryDataBlock : DataBlock - { - byte[] _data; - - public MemoryDataBlock(byte data) - { - _data = new byte[] { data }; - } - - public MemoryDataBlock(byte[] data) - { - if (data == null) - { - throw new ArgumentNullException("data"); - } - - _data = (byte[])data.Clone(); - } - - public override long Length - { - get - { - return _data.LongLength; - } - } - - public byte[] Data - { - get - { - return _data; - } - } - - public void AddByteToEnd(byte value) - { - byte[] newData = new byte[_data.LongLength + 1]; - _data.CopyTo(newData, 0); - newData[newData.LongLength - 1] = value; - _data = newData; - } - - public void AddByteToStart(byte value) - { - byte[] newData = new byte[_data.LongLength + 1]; - newData[0] = value; - _data.CopyTo(newData, 1); - _data = newData; - } - - public void InsertBytes(long position, byte[] data) - { - byte[] newData = new byte[_data.LongLength + data.LongLength]; - if (position > 0) - { - Array.Copy(_data, 0, newData, 0, position); - } - Array.Copy(data, 0, newData, position, data.LongLength); - if (position < _data.LongLength) - { - Array.Copy(_data, position, newData, position + data.LongLength, _data.LongLength - position); - } - _data = newData; - } - - public override void RemoveBytes(long position, long count) - { - byte[] newData = new byte[_data.LongLength - count]; - - if (position > 0) - { - Array.Copy(_data, 0, newData, 0, position); - } - if (position + count < _data.LongLength) - { - Array.Copy(_data, position + count, newData, position, newData.LongLength - position); - } - - _data = newData; - } - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/NativeMethods.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/NativeMethods.cs deleted file mode 100644 index e678da4..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/NativeMethods.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace Be.Windows.Forms -{ - internal static class NativeMethods - { - // Caret definitions - [DllImport("user32.dll", SetLastError=true)] - public static extern bool CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth, int nHeight); - - [DllImport("user32.dll", SetLastError=true)] - public static extern bool ShowCaret(IntPtr hWnd); - - [DllImport("user32.dll", SetLastError=true)] - public static extern bool DestroyCaret(); - - [DllImport("user32.dll", SetLastError=true)] - public static extern bool SetCaretPos(int X, int Y); - - // Key definitions - public const int WM_KEYDOWN = 0x100; - public const int WM_KEYUP = 0x101; - public const int WM_CHAR = 0x102; - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs deleted file mode 100644 index f23b8c5..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Be.Windows.Forms.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Be.Windows.Forms.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Properties/Resources.resx b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Properties/Resources.resx deleted file mode 100644 index 7080a7d..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Properties/Resources.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Util.cs b/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Util.cs deleted file mode 100644 index 1408878..0000000 --- a/NBTExplorerMac/Vendor/Be.Windows.Forms.HexBox/Util.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Be.Windows.Forms -{ - static class Util - { - /// - /// Contains true, if we are in design mode of Visual Studio - /// - private static bool _designMode; - - /// - /// Initializes an instance of Util class - /// - static Util() - { - _designMode = (System.Diagnostics.Process.GetCurrentProcess().ProcessName.ToLower() == "devenv"); - } - - /// - /// Gets true, if we are in design mode of Visual Studio - /// - /// - /// In Visual Studio 2008 SP1 the designer is crashing sometimes on windows forms. - /// The DesignMode property of Control class is buggy and cannot be used, so use our own implementation instead. - /// - public static bool DesignMode - { - get - { - return _designMode; - } - } - - } -} diff --git a/NBTExplorerMac/app.config b/NBTExplorerMac/app.config deleted file mode 100644 index 0a7adb0..0000000 --- a/NBTExplorerMac/app.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/NBTExplorerMac/dead_bush.icns b/NBTExplorerMac/dead_bush.icns deleted file mode 100644 index 7c08f84..0000000 Binary files a/NBTExplorerMac/dead_bush.icns and /dev/null differ diff --git a/NBTExplorerMac/dead_bush.ico b/NBTExplorerMac/dead_bush.ico deleted file mode 100644 index 64aa5a0..0000000 Binary files a/NBTExplorerMac/dead_bush.ico and /dev/null differ diff --git a/NBTExplorerMac/forms/About.Designer.cs b/NBTExplorerMac/forms/About.Designer.cs deleted file mode 100644 index 4e30769..0000000 --- a/NBTExplorerMac/forms/About.Designer.cs +++ /dev/null @@ -1,85 +0,0 @@ -namespace NBTExplorer -{ - partial class About - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About)); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // linkLabel1 - // - this.linkLabel1.AutoSize = true; - this.linkLabel1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkLabel1.LinkArea = new System.Windows.Forms.LinkArea(0, 0); - this.linkLabel1.Location = new System.Drawing.Point(96, 12); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(245, 120); - this.linkLabel1.TabIndex = 0; - this.linkLabel1.Text = "NBTExplorer\r\nCopyright ©2011-2012 Justin Aquadro\r\n\r\nNBTExplorer is based on NBTEd" + - "it by copyboy\r\nFugue icon set: p.yusukekamiyamane.com\r\n\r\nEmail: jaquadro@gmail.c" + - "om\r\nNBTExplorer Github Project Page"; - this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); - // - // pictureBox1 - // - this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); - this.pictureBox1.Location = new System.Drawing.Point(12, 12); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(78, 78); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBox1.TabIndex = 1; - this.pictureBox1.TabStop = false; - // - // About - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(350, 144); - this.Controls.Add(this.pictureBox1); - this.Controls.Add(this.linkLabel1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "About"; - this.Text = "About NBTExplorer"; - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.LinkLabel linkLabel1; - private System.Windows.Forms.PictureBox pictureBox1; - - - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/About.cs b/NBTExplorerMac/forms/About.cs deleted file mode 100644 index 701e584..0000000 --- a/NBTExplorerMac/forms/About.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace NBTExplorer -{ - public partial class About : Form - { - public About () - { - InitializeComponent(); - } - - private void linkLabel1_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e) - { - - } - } -} diff --git a/NBTExplorerMac/forms/About.resources b/NBTExplorerMac/forms/About.resources deleted file mode 100644 index 874989c..0000000 Binary files a/NBTExplorerMac/forms/About.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/About.resx b/NBTExplorerMac/forms/About.resx deleted file mode 100644 index 12983ad..0000000 --- a/NBTExplorerMac/forms/About.resx +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAZdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41Ljg3O4Bd - AAAGm0lEQVR4Xu2dS3LbQAwFvcpZcoDcJtscRIfIfZ2wJLkklVzToPCGpN0Lr/gEgDONh5Gsz9vpdHrz - j63B3z8/38mf63l6E6pCYxGoFo1gCVapsQSLOfvSWKWF/e6dKFiCFWkYwRIswSqcHROTKLIBiUL3EFPH - 0rEiDSNYgiVYjkLeBVuPQx2L71Wks7cGIJVfsAQr0jCCJViC5RmLd0FqxNG4Ohbfq0hn0406mk6wBCvS - MIIlWILlGYt3wdajU8fiexXp7K0BSOUXLMEqNwyB5vevH+/kLwX2Z3FJ7bNrKm/A7AJn5SObQ6BaNLNq - vuYhtc+uSbAuh1yyOYLlKCw3jGBxaIj7lTeABD2iRrAEK9IMgiVYgvXw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PpWJ0dtSbW - bAeZnW/NmuzGsboscolDFr5TQ2rv3JzZtXfmI+tA1hO/QEqCUU3nQpBYpC6yoFRDaqIaUjuNRXTkHklN - grXzn+4lm0iAoRrBunxsiywY2RyyoFRDaqIaUjuNRXTkHklNOpaOdfeDB4KlY32YAnEiqhEswRKsx5lM - u6dLR84EpFOppqvuJQ6pvTMfuUdSk2csz1iesdZ2Jukw0qlUs7bOZ48jtXfmI/dIatrEsUhhXTdIclEN - qWnRdG40ra1LR+6R5BKswsekyKIL1s6/FIRsIumcTg2pSbAEq+zWgnX+bUfSrOXFJUE7NGQTO/JUYpCa - dCwdq9xUgqVjlaEhziVYgiVYhWe7t01Fmoc0YWQDSOKRpusGR3kq10lNnrE8Y901FXlRsxOsCtBH1OpY - zb+3Qx3riLBUahYswYowEAlaIfszLRk7HXmuMRyF/LuvyLoLlo4VYSASlBA90uhYvQ4yWu/u64KlY0UY - iATtoF/H0rEicAqWYEXA6nC9SgwCMtWQZ5iV2o6o/RJQdCw8hYboBKvwHaQdm7fnGAQYqhEswfpwbAoN - 0QmWYAnWyrfXjKaPZ6yNPrA62pijXxcswYowEAl6xG4jZyeq8YzlGcszlmes7CvR1I2ITsfSsXQsHUvH - OtLZ1cO7zwojDESCHqmzrrWSsxPVeMbyjOUZyzOWZ6wjTQJHoWesCAORoEfqLM9YmUkgWDpWhIFI0CM6 - Fnkm57NC7m6C5ce/IgxEgupYP4ZfyX3ENarULFg6VoSBSNAK2XvResbi5yeyZ4KlY0UYiAQlRO9No2Pp - WJFmECzBEqzQP447p8g/Ns7ZMHZ1QY8AAAAASUVORK5CYII= - - - \ No newline at end of file diff --git a/NBTExplorerMac/forms/CancelSearchForm.Designer.cs b/NBTExplorerMac/forms/CancelSearchForm.Designer.cs deleted file mode 100644 index 8a8c5de..0000000 --- a/NBTExplorerMac/forms/CancelSearchForm.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace NBTExplorer.Forms -{ - partial class CancelSearchForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this._buttonCancel = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // _buttonCancel - // - this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this._buttonCancel.Location = new System.Drawing.Point(124, 57); - this._buttonCancel.Name = "_buttonCancel"; - this._buttonCancel.Size = new System.Drawing.Size(75, 23); - this._buttonCancel.TabIndex = 0; - this._buttonCancel.Text = "Cancel"; - this._buttonCancel.UseVisualStyleBackColor = true; - // - // CancelSearchForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this._buttonCancel; - this.ClientSize = new System.Drawing.Size(322, 92); - this.Controls.Add(this._buttonCancel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "CancelSearchForm"; - this.Text = "Searching..."; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Button _buttonCancel; - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/CancelSearchForm.cs b/NBTExplorerMac/forms/CancelSearchForm.cs deleted file mode 100644 index 8d97d5c..0000000 --- a/NBTExplorerMac/forms/CancelSearchForm.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace NBTExplorer.Forms -{ - public partial class CancelSearchForm : Form - { - public CancelSearchForm () - { - InitializeComponent(); - } - } -} diff --git a/NBTExplorerMac/forms/CancelSearchForm.resources b/NBTExplorerMac/forms/CancelSearchForm.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/forms/CancelSearchForm.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/CancelSearchForm.resx b/NBTExplorerMac/forms/CancelSearchForm.resx deleted file mode 100644 index 1af7de1..0000000 --- a/NBTExplorerMac/forms/CancelSearchForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/NBTExplorerMac/forms/CreateNode.Designer.cs b/NBTExplorerMac/forms/CreateNode.Designer.cs deleted file mode 100644 index 4435b37..0000000 --- a/NBTExplorerMac/forms/CreateNode.Designer.cs +++ /dev/null @@ -1,126 +0,0 @@ -namespace NBTExplorer -{ - partial class CreateNodeForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this._sizeField = new System.Windows.Forms.TextBox(); - this._sizeFieldLabel = new System.Windows.Forms.Label(); - this._nameFieldLabel = new System.Windows.Forms.Label(); - this._nameField = new System.Windows.Forms.TextBox(); - this._buttonCancel = new System.Windows.Forms.Button(); - this._buttonOK = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // _sizeField - // - this._sizeField.Location = new System.Drawing.Point(56, 26); - this._sizeField.Name = "_sizeField"; - this._sizeField.Size = new System.Drawing.Size(67, 20); - this._sizeField.TabIndex = 7; - // - // _sizeFieldLabel - // - this._sizeFieldLabel.AutoSize = true; - this._sizeFieldLabel.Location = new System.Drawing.Point(12, 29); - this._sizeFieldLabel.Name = "_sizeFieldLabel"; - this._sizeFieldLabel.Size = new System.Drawing.Size(30, 13); - this._sizeFieldLabel.TabIndex = 6; - this._sizeFieldLabel.Text = "Size:"; - // - // _nameFieldLabel - // - this._nameFieldLabel.AutoSize = true; - this._nameFieldLabel.Location = new System.Drawing.Point(12, 9); - this._nameFieldLabel.Name = "_nameFieldLabel"; - this._nameFieldLabel.Size = new System.Drawing.Size(38, 13); - this._nameFieldLabel.TabIndex = 5; - this._nameFieldLabel.Text = "Name:"; - // - // _nameField - // - this._nameField.Location = new System.Drawing.Point(56, 6); - this._nameField.Name = "_nameField"; - this._nameField.Size = new System.Drawing.Size(209, 20); - this._nameField.TabIndex = 4; - // - // _buttonCancel - // - this._buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this._buttonCancel.Location = new System.Drawing.Point(109, 57); - this._buttonCancel.Name = "_buttonCancel"; - this._buttonCancel.Size = new System.Drawing.Size(75, 23); - this._buttonCancel.TabIndex = 9; - this._buttonCancel.Text = "Cancel"; - this._buttonCancel.UseVisualStyleBackColor = true; - // - // _buttonOK - // - this._buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonOK.Location = new System.Drawing.Point(190, 57); - this._buttonOK.Name = "_buttonOK"; - this._buttonOK.Size = new System.Drawing.Size(75, 23); - this._buttonOK.TabIndex = 8; - this._buttonOK.Text = "OK"; - this._buttonOK.UseVisualStyleBackColor = true; - this._buttonOK.Click += new System.EventHandler(this._buttonOK_Click); - // - // CreateNode - // - this.AcceptButton = this._buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this._buttonCancel; - this.ClientSize = new System.Drawing.Size(277, 92); - this.Controls.Add(this._buttonCancel); - this.Controls.Add(this._buttonOK); - this.Controls.Add(this._sizeField); - this.Controls.Add(this._sizeFieldLabel); - this.Controls.Add(this._nameFieldLabel); - this.Controls.Add(this._nameField); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "CreateNode"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.Text = "Create Tag..."; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox _sizeField; - private System.Windows.Forms.Label _sizeFieldLabel; - private System.Windows.Forms.Label _nameFieldLabel; - private System.Windows.Forms.TextBox _nameField; - private System.Windows.Forms.Button _buttonCancel; - private System.Windows.Forms.Button _buttonOK; - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/CreateNode.cs b/NBTExplorerMac/forms/CreateNode.cs deleted file mode 100644 index e4418c0..0000000 --- a/NBTExplorerMac/forms/CreateNode.cs +++ /dev/null @@ -1,182 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using Substrate.Nbt; - -namespace NBTExplorer -{ - public partial class CreateNodeForm : Form - { - private string _name; - private int _size; - private TagType _type; - private TagNode _tag; - - private bool _hasName; - - private List _invalidNames = new List(); - - public CreateNodeForm (TagType tagType) - : this(tagType, true) - { } - - public CreateNodeForm (TagType tagType, bool hasName) - { - InitializeComponent(); - - _type = tagType; - _hasName = hasName; - - SetNameBoxState(); - SetSizeBoxState(); - } - - private void SetNameBoxState () - { - if (HasName) { - _nameFieldLabel.Enabled = true; - _nameField.Enabled = true; - } - else { - _nameFieldLabel.Enabled = false; - _nameField.Enabled = false; - } - } - - private void SetSizeBoxState () - { - if (IsTagSizedType) { - _sizeFieldLabel.Enabled = true; - _sizeField.Enabled = true; - } - else { - _sizeFieldLabel.Enabled = false; - _sizeField.Enabled = false; - } - } - - public string TagName - { - get { return _name; } - } - - public TagNode TagNode - { - get { return _tag; } - } - - public List InvalidNames - { - get { return _invalidNames; } - } - - public bool HasName - { - get { return _hasName; } - } - - private void Apply () - { - if (ValidateInput()) { - _tag = CreateTag(); - - DialogResult = DialogResult.OK; - Close(); - return; - } - } - - private TagNode CreateTag () - { - switch (_type) { - case TagType.TAG_BYTE: - return new TagNodeByte(); - case TagType.TAG_BYTE_ARRAY: - return new TagNodeByteArray(new byte[_size]); - case TagType.TAG_COMPOUND: - return new TagNodeCompound(); - case TagType.TAG_DOUBLE: - return new TagNodeDouble(); - case TagType.TAG_FLOAT: - return new TagNodeFloat(); - case TagType.TAG_INT: - return new TagNodeInt(); - case TagType.TAG_INT_ARRAY: - return new TagNodeIntArray(new int[_size]); - case TagType.TAG_LIST: - return new TagNodeList(TagType.TAG_BYTE); - case TagType.TAG_LONG: - return new TagNodeLong(); - case TagType.TAG_SHORT: - return new TagNodeShort(); - case TagType.TAG_STRING: - return new TagNodeString(); - default: - return new TagNodeByte(); - } - } - - private bool ValidateInput () - { - return ValidateNameInput() - && ValidateSizeInput(); - } - - private bool ValidateNameInput () - { - if (!HasName) - return true; - - string text = _nameField.Text.Trim(); - if (String.IsNullOrEmpty(text)) { - MessageBox.Show("You must provide a nonempty name."); - return false; - } - - if (_invalidNames.Contains(text)) { - MessageBox.Show("Duplicate name provided."); - return false; - } - - _name = _nameField.Text.Trim(); - return true; - } - - private bool ValidateSizeInput () - { - if (!IsTagSizedType) - return true; - - if (!Int32.TryParse(_sizeField.Text.Trim(), out _size)) { - MessageBox.Show("Size must be a valid integer value."); - return false; - } - - _size = Math.Max(0, _size); - return true; - } - - private bool IsTagSizedType - { - get - { - switch (_type) { - case TagType.TAG_BYTE_ARRAY: - case TagType.TAG_INT_ARRAY: - return true; - default: - return false; - } - } - } - - private void _buttonOK_Click (object sender, EventArgs e) - { - Apply(); - } - } -} diff --git a/NBTExplorerMac/forms/CreateNode.resources b/NBTExplorerMac/forms/CreateNode.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/forms/CreateNode.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/CreateNode.resx b/NBTExplorerMac/forms/CreateNode.resx deleted file mode 100644 index 7080a7d..0000000 --- a/NBTExplorerMac/forms/CreateNode.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditHex.Designer.cs b/NBTExplorerMac/forms/EditHex.Designer.cs deleted file mode 100644 index f85faf2..0000000 --- a/NBTExplorerMac/forms/EditHex.Designer.cs +++ /dev/null @@ -1,130 +0,0 @@ -namespace NBTExplorer -{ - partial class HexEditor - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this.hexBox1 = new Be.Windows.Forms.HexBox(); - this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this._curPositionLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this._buttonCancel = new System.Windows.Forms.Button(); - this._buttonOK = new System.Windows.Forms.Button(); - this._curElementLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.statusStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // hexBox1 - // - this.hexBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.hexBox1.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.hexBox1.LineInfoForeColor = System.Drawing.Color.Empty; - this.hexBox1.LineInfoVisible = true; - this.hexBox1.Location = new System.Drawing.Point(12, 12); - this.hexBox1.Name = "hexBox1"; - this.hexBox1.ReadOnly = true; - this.hexBox1.ShadowSelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(60)))), ((int)(((byte)(188)))), ((int)(((byte)(255))))); - this.hexBox1.Size = new System.Drawing.Size(492, 289); - this.hexBox1.TabIndex = 0; - this.hexBox1.VScrollBarVisible = true; - // - // statusStrip1 - // - this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this._curPositionLabel, - this._curElementLabel}); - this.statusStrip1.Location = new System.Drawing.Point(0, 333); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(516, 22); - this.statusStrip1.TabIndex = 1; - this.statusStrip1.Text = "statusStrip1"; - // - // _curPositionLabel - // - this._curPositionLabel.AutoSize = false; - this._curPositionLabel.Name = "_curPositionLabel"; - this._curPositionLabel.Size = new System.Drawing.Size(100, 17); - this._curPositionLabel.Text = "0000"; - // - // _buttonCancel - // - this._buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this._buttonCancel.Location = new System.Drawing.Point(348, 307); - this._buttonCancel.Name = "_buttonCancel"; - this._buttonCancel.Size = new System.Drawing.Size(75, 23); - this._buttonCancel.TabIndex = 13; - this._buttonCancel.Text = "Cancel"; - this._buttonCancel.UseVisualStyleBackColor = true; - // - // _buttonOK - // - this._buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonOK.Location = new System.Drawing.Point(429, 307); - this._buttonOK.Name = "_buttonOK"; - this._buttonOK.Size = new System.Drawing.Size(75, 23); - this._buttonOK.TabIndex = 12; - this._buttonOK.Text = "OK"; - this._buttonOK.UseVisualStyleBackColor = true; - this._buttonOK.Click += new System.EventHandler(this._buttonOK_Click); - // - // _curElementLabel - // - this._curElementLabel.Name = "_curElementLabel"; - this._curElementLabel.Size = new System.Drawing.Size(59, 17); - this._curElementLabel.Text = "Element 0"; - this._curElementLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // HexEditor - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this._buttonCancel; - this.ClientSize = new System.Drawing.Size(516, 355); - this.Controls.Add(this._buttonCancel); - this.Controls.Add(this._buttonOK); - this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.hexBox1); - this.Name = "HexEditor"; - this.Text = "HexEditor"; - this.statusStrip1.ResumeLayout(false); - this.statusStrip1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private Be.Windows.Forms.HexBox hexBox1; - private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.ToolStripStatusLabel _curPositionLabel; - private System.Windows.Forms.Button _buttonCancel; - private System.Windows.Forms.Button _buttonOK; - private System.Windows.Forms.ToolStripStatusLabel _curElementLabel; - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditHex.cs b/NBTExplorerMac/forms/EditHex.cs deleted file mode 100644 index ff922cd..0000000 --- a/NBTExplorerMac/forms/EditHex.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using Be.Windows.Forms; - -namespace NBTExplorer -{ - public partial class HexEditor : Form - { - private int _bytesPerElem; - private byte[] _data; - private bool _modified; - DynamicByteProvider _byteProvider; - - private class FixedByteProvider : DynamicByteProvider - { - public FixedByteProvider (byte[] data) - : base(data) - { } - - public override bool SupportsInsertBytes () - { - return false; - } - } - - public HexEditor (string tagName, byte[] data, int bytesPerElem) - { - InitializeComponent(); - - this.Text = "Editing: " + tagName; - - _bytesPerElem = bytesPerElem; - _curPositionLabel.Text = "0x0000"; - _curElementLabel.Text = "Element 0"; - - _data = new byte[data.Length]; - Array.Copy(data, _data, data.Length); - - _byteProvider = new FixedByteProvider(_data); - _byteProvider.Changed += (o, e) => { _modified = true; }; - - hexBox1.ByteProvider = _byteProvider; - - hexBox1.HorizontalByteCountChanged += HexBox_HorizontalByteCountChanged; - hexBox1.CurrentLineChanged += HexBox_CurrentLineChanged; - hexBox1.CurrentPositionInLineChanged += HexBox_CurrentPositionInLineChanged; - - hexBox1.ReadOnly = false; - } - - public byte[] Data - { - get { return _data; } - } - - public bool Modified - { - get { return _modified; } - } - - private void HexBox_HorizontalByteCountChanged (object sender, EventArgs e) - { - UpdatePosition(); - } - - private void HexBox_CurrentLineChanged (object sender, EventArgs e) - { - UpdatePosition(); - } - - private void HexBox_CurrentPositionInLineChanged (object sender, EventArgs e) - { - UpdatePosition(); - } - - private void UpdatePosition () - { - long pos = (hexBox1.CurrentLine - 1) * hexBox1.HorizontalByteCount + hexBox1.CurrentPositionInLine - 1; - - _curPositionLabel.Text = "0x" + pos.ToString("X4"); - _curElementLabel.Text = "Element " + pos / _bytesPerElem; - } - - private void Apply () - { - long len = Math.Min(_data.Length, _byteProvider.Length); - - for (int i = 0; i < len; i++) { - _data[i] = _byteProvider.Bytes[i]; - } - - DialogResult = DialogResult.OK; - Close(); - } - - private void _buttonOK_Click (object sender, EventArgs e) - { - Apply(); - } - } -} diff --git a/NBTExplorerMac/forms/EditHex.resources b/NBTExplorerMac/forms/EditHex.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/forms/EditHex.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/EditHex.resx b/NBTExplorerMac/forms/EditHex.resx deleted file mode 100644 index d26a846..0000000 --- a/NBTExplorerMac/forms/EditHex.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditName.Designer.cs b/NBTExplorerMac/forms/EditName.Designer.cs deleted file mode 100644 index b817f36..0000000 --- a/NBTExplorerMac/forms/EditName.Designer.cs +++ /dev/null @@ -1,91 +0,0 @@ -namespace NBTExplorer -{ - partial class EditName - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this._nameField = new System.Windows.Forms.TextBox(); - this._buttonCancel = new System.Windows.Forms.Button(); - this._buttonOK = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // _nameField - // - this._nameField.Location = new System.Drawing.Point(12, 10); - this._nameField.Name = "_nameField"; - this._nameField.Size = new System.Drawing.Size(196, 20); - this._nameField.TabIndex = 0; - // - // _buttonCancel - // - this._buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this._buttonCancel.Location = new System.Drawing.Point(52, 37); - this._buttonCancel.Name = "_buttonCancel"; - this._buttonCancel.Size = new System.Drawing.Size(75, 23); - this._buttonCancel.TabIndex = 11; - this._buttonCancel.Text = "Cancel"; - this._buttonCancel.UseVisualStyleBackColor = true; - // - // _buttonOK - // - this._buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonOK.Location = new System.Drawing.Point(133, 37); - this._buttonOK.Name = "_buttonOK"; - this._buttonOK.Size = new System.Drawing.Size(75, 23); - this._buttonOK.TabIndex = 10; - this._buttonOK.Text = "OK"; - this._buttonOK.UseVisualStyleBackColor = true; - this._buttonOK.Click += new System.EventHandler(this._buttonOK_Click); - // - // EditName - // - this.AcceptButton = this._buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this._buttonCancel; - this.ClientSize = new System.Drawing.Size(220, 72); - this.Controls.Add(this._buttonCancel); - this.Controls.Add(this._buttonOK); - this.Controls.Add(this._nameField); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.KeyPreview = true; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "EditName"; - this.Text = "Edit Name..."; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox _nameField; - private System.Windows.Forms.Button _buttonCancel; - private System.Windows.Forms.Button _buttonOK; - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditName.cs b/NBTExplorerMac/forms/EditName.cs deleted file mode 100644 index 1525661..0000000 --- a/NBTExplorerMac/forms/EditName.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using Substrate.Nbt; - -namespace NBTExplorer -{ - public partial class EditName : Form - { - private string _originalName; - private string _name; - - private List _invalidNames = new List(); - - public EditName (String name) - { - InitializeComponent(); - - _originalName = name; - _name = name; - - _nameField.Text = _name; - } - - public String TagName - { - get { return _name; } - } - - public List InvalidNames - { - get { return _invalidNames; } - } - - public bool IsModified - { - get { return _name != _originalName; } - } - - private void Apply () - { - if (ValidateInput()) { - DialogResult = DialogResult.OK; - Close(); - } - } - - private bool ValidateInput () - { - return ValidateNameInput(); - } - - private bool ValidateNameInput () - { - string text = _nameField.Text.Trim(); - if (String.IsNullOrEmpty(text)) { - MessageBox.Show("You must provide a nonempty name."); - return false; - } - - if (text != _originalName && _invalidNames.Contains(text)) { - MessageBox.Show("Duplicate name provided."); - return false; - } - - _name = _nameField.Text.Trim(); - return true; - } - - private void _buttonOK_Click (object sender, EventArgs e) - { - Apply(); - } - } -} diff --git a/NBTExplorerMac/forms/EditName.resources b/NBTExplorerMac/forms/EditName.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/forms/EditName.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/EditName.resx b/NBTExplorerMac/forms/EditName.resx deleted file mode 100644 index 7080a7d..0000000 --- a/NBTExplorerMac/forms/EditName.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditString.Designer.cs b/NBTExplorerMac/forms/EditString.Designer.cs deleted file mode 100644 index 62a897f..0000000 --- a/NBTExplorerMac/forms/EditString.Designer.cs +++ /dev/null @@ -1,92 +0,0 @@ -namespace NBTExplorer -{ - partial class EditString - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this._stringField = new System.Windows.Forms.TextBox(); - this._buttonCancel = new System.Windows.Forms.Button(); - this._buttonOK = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // _stringField - // - this._stringField.Location = new System.Drawing.Point(12, 12); - this._stringField.Multiline = true; - this._stringField.Name = "_stringField"; - this._stringField.Size = new System.Drawing.Size(331, 116); - this._stringField.TabIndex = 4; - // - // _buttonCancel - // - this._buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this._buttonCancel.Location = new System.Drawing.Point(187, 134); - this._buttonCancel.Name = "_buttonCancel"; - this._buttonCancel.Size = new System.Drawing.Size(75, 23); - this._buttonCancel.TabIndex = 9; - this._buttonCancel.Text = "Cancel"; - this._buttonCancel.UseVisualStyleBackColor = true; - // - // _buttonOK - // - this._buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonOK.Location = new System.Drawing.Point(268, 134); - this._buttonOK.Name = "_buttonOK"; - this._buttonOK.Size = new System.Drawing.Size(75, 23); - this._buttonOK.TabIndex = 8; - this._buttonOK.Text = "OK"; - this._buttonOK.UseVisualStyleBackColor = true; - this._buttonOK.Click += new System.EventHandler(this._buttonOK_Click); - // - // EditString - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this._buttonCancel; - this.ClientSize = new System.Drawing.Size(355, 169); - this.Controls.Add(this._buttonCancel); - this.Controls.Add(this._buttonOK); - this.Controls.Add(this._stringField); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "EditString"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.Text = "Edit String..."; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox _stringField; - private System.Windows.Forms.Button _buttonCancel; - private System.Windows.Forms.Button _buttonOK; - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditString.cs b/NBTExplorerMac/forms/EditString.cs deleted file mode 100644 index f61b976..0000000 --- a/NBTExplorerMac/forms/EditString.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using Substrate.Nbt; - -namespace NBTExplorer -{ - public partial class EditString : Form - { - private string _string; - - public EditString (string stringVal) - { - InitializeComponent(); - - _string = stringVal; - - _stringField.Text = _string; - } - - public string StringValue - { - get { return _string; } - } - - private void Apply () - { - if (ValidateInput()) { - DialogResult = DialogResult.OK; - Close(); - return; - } - } - - private bool ValidateInput () - { - return ValidateStringInput(); - } - - private bool ValidateStringInput () - { - _string = _stringField.Text.Trim(); - return true; - } - - private void _buttonOK_Click (object sender, EventArgs e) - { - Apply(); - } - } -} diff --git a/NBTExplorerMac/forms/EditString.resources b/NBTExplorerMac/forms/EditString.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/forms/EditString.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/EditString.resx b/NBTExplorerMac/forms/EditString.resx deleted file mode 100644 index 7080a7d..0000000 --- a/NBTExplorerMac/forms/EditString.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditValue.Designer.cs b/NBTExplorerMac/forms/EditValue.Designer.cs deleted file mode 100644 index eeb6d06..0000000 --- a/NBTExplorerMac/forms/EditValue.Designer.cs +++ /dev/null @@ -1,91 +0,0 @@ -namespace NBTExplorer -{ - partial class EditValue - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this.textBox1 = new System.Windows.Forms.TextBox(); - this._buttonCancel = new System.Windows.Forms.Button(); - this._buttonOK = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(12, 10); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(196, 20); - this.textBox1.TabIndex = 0; - // - // _buttonCancel - // - this._buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this._buttonCancel.Location = new System.Drawing.Point(52, 37); - this._buttonCancel.Name = "_buttonCancel"; - this._buttonCancel.Size = new System.Drawing.Size(75, 23); - this._buttonCancel.TabIndex = 11; - this._buttonCancel.Text = "Cancel"; - this._buttonCancel.UseVisualStyleBackColor = true; - // - // _buttonOK - // - this._buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonOK.Location = new System.Drawing.Point(133, 37); - this._buttonOK.Name = "_buttonOK"; - this._buttonOK.Size = new System.Drawing.Size(75, 23); - this._buttonOK.TabIndex = 10; - this._buttonOK.Text = "OK"; - this._buttonOK.UseVisualStyleBackColor = true; - this._buttonOK.Click += new System.EventHandler(this._buttonOK_Click); - // - // EditValue - // - this.AcceptButton = this._buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this._buttonCancel; - this.ClientSize = new System.Drawing.Size(220, 72); - this.Controls.Add(this._buttonCancel); - this.Controls.Add(this._buttonOK); - this.Controls.Add(this.textBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.KeyPreview = true; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "EditValue"; - this.Text = "Edit Value..."; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox textBox1; - private System.Windows.Forms.Button _buttonCancel; - private System.Windows.Forms.Button _buttonOK; - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/EditValue.cs b/NBTExplorerMac/forms/EditValue.cs deleted file mode 100644 index 8d61064..0000000 --- a/NBTExplorerMac/forms/EditValue.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using Substrate.Nbt; - -namespace NBTExplorer -{ - public partial class EditValue : Form - { - 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(); - } - } -} diff --git a/NBTExplorerMac/forms/EditValue.resources b/NBTExplorerMac/forms/EditValue.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/forms/EditValue.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/EditValue.resx b/NBTExplorerMac/forms/EditValue.resx deleted file mode 100644 index 7080a7d..0000000 --- a/NBTExplorerMac/forms/EditValue.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/NBTExplorerMac/forms/Find.Designer.cs b/NBTExplorerMac/forms/Find.Designer.cs deleted file mode 100644 index 75bcd3b..0000000 --- a/NBTExplorerMac/forms/Find.Designer.cs +++ /dev/null @@ -1,133 +0,0 @@ -namespace NBTExplorer -{ - partial class Find - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose (bool disposing) - { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent () - { - this._cbName = new System.Windows.Forms.CheckBox(); - this._cbValue = new System.Windows.Forms.CheckBox(); - this._textName = new System.Windows.Forms.TextBox(); - this._textValue = new System.Windows.Forms.TextBox(); - this._buttonFind = new System.Windows.Forms.Button(); - this._buttonCancel = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // _cbName - // - this._cbName.AutoSize = true; - this._cbName.Checked = true; - this._cbName.CheckState = System.Windows.Forms.CheckState.Checked; - this._cbName.Location = new System.Drawing.Point(13, 13); - this._cbName.Name = "_cbName"; - this._cbName.Size = new System.Drawing.Size(57, 17); - this._cbName.TabIndex = 0; - this._cbName.Text = "Name:"; - this._cbName.UseVisualStyleBackColor = true; - // - // _cbValue - // - this._cbValue.AutoSize = true; - this._cbValue.Location = new System.Drawing.Point(13, 37); - this._cbValue.Name = "_cbValue"; - this._cbValue.Size = new System.Drawing.Size(56, 17); - this._cbValue.TabIndex = 1; - this._cbValue.Text = "Value:"; - this._cbValue.UseVisualStyleBackColor = true; - // - // _textName - // - this._textName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this._textName.Location = new System.Drawing.Point(76, 12); - this._textName.Name = "_textName"; - this._textName.Size = new System.Drawing.Size(273, 20); - this._textName.TabIndex = 2; - // - // _textValue - // - this._textValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this._textValue.Location = new System.Drawing.Point(76, 34); - this._textValue.Name = "_textValue"; - this._textValue.Size = new System.Drawing.Size(273, 20); - this._textValue.TabIndex = 3; - // - // _buttonFind - // - this._buttonFind.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonFind.Location = new System.Drawing.Point(274, 65); - this._buttonFind.Name = "_buttonFind"; - this._buttonFind.Size = new System.Drawing.Size(75, 23); - this._buttonFind.TabIndex = 4; - this._buttonFind.Text = "Find"; - this._buttonFind.UseVisualStyleBackColor = true; - this._buttonFind.Click += new System.EventHandler(this._buttonFind_Click); - // - // _buttonCancel - // - this._buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this._buttonCancel.Location = new System.Drawing.Point(193, 65); - this._buttonCancel.Name = "_buttonCancel"; - this._buttonCancel.Size = new System.Drawing.Size(75, 23); - this._buttonCancel.TabIndex = 5; - this._buttonCancel.Text = "Cancel"; - this._buttonCancel.UseVisualStyleBackColor = true; - this._buttonCancel.Click += new System.EventHandler(this._buttonCancel_Click); - // - // Find - // - this.AcceptButton = this._buttonFind; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this._buttonCancel; - this.ClientSize = new System.Drawing.Size(361, 100); - this.Controls.Add(this._buttonCancel); - this.Controls.Add(this._buttonFind); - this.Controls.Add(this._textValue); - this.Controls.Add(this._textName); - this.Controls.Add(this._cbValue); - this.Controls.Add(this._cbName); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "Find"; - this.Text = "Find"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.CheckBox _cbName; - private System.Windows.Forms.CheckBox _cbValue; - private System.Windows.Forms.TextBox _textName; - private System.Windows.Forms.TextBox _textValue; - private System.Windows.Forms.Button _buttonFind; - private System.Windows.Forms.Button _buttonCancel; - } -} \ No newline at end of file diff --git a/NBTExplorerMac/forms/Find.cs b/NBTExplorerMac/forms/Find.cs deleted file mode 100644 index 3226d83..0000000 --- a/NBTExplorerMac/forms/Find.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace NBTExplorer -{ - public partial class Find : Form - { - public Find () - { - InitializeComponent(); - } - - public bool MatchName - { - get { return _cbName.Checked; } - } - - public bool MatchValue - { - get { return _cbValue.Checked; } - } - - public string NameToken - { - get { return _textName.Text; } - } - - public string ValueToken - { - get { return _textValue.Text; } - } - - private void _buttonFind_Click (object sender, EventArgs e) - { - DialogResult = DialogResult.OK; - Close(); - } - - private void _buttonCancel_Click (object sender, EventArgs e) - { - DialogResult = DialogResult.Cancel; - Close(); - } - } -} diff --git a/NBTExplorerMac/forms/Find.resources b/NBTExplorerMac/forms/Find.resources deleted file mode 100644 index 06c24d0..0000000 Binary files a/NBTExplorerMac/forms/Find.resources and /dev/null differ diff --git a/NBTExplorerMac/forms/Find.resx b/NBTExplorerMac/forms/Find.resx deleted file mode 100644 index 1af7de1..0000000 --- a/NBTExplorerMac/forms/Find.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file