2012-09-02 00:08:54 +00:00
|
|
|
|
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; }
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-16 07:56:27 +00:00
|
|
|
|
public override bool Parse (string value)
|
|
|
|
|
{
|
|
|
|
|
byte data;
|
|
|
|
|
if (!byte.TryParse(value, out data))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
Tag.Data = data;
|
|
|
|
|
IsDataModified = true;
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2012-09-02 00:08:54 +00:00
|
|
|
|
public override bool EditNode ()
|
|
|
|
|
{
|
|
|
|
|
return EditScalarValue(Tag);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string NodeDisplay
|
|
|
|
|
{
|
|
|
|
|
get { return NodeDisplayPrefix + unchecked((sbyte)Tag.Data).ToString(); }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|