NBTExplorer/Model/TagByteArrayDataNode.cs

38 lines
803 B
C#
Raw Normal View History

using System;
using Substrate.Nbt;
2012-09-02 00:08:54 +00:00
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(); }
}
2012-09-02 00:08:54 +00:00
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;
}
2012-09-02 00:08:54 +00:00
}
}