forked from mirrors/NBTExplorer
Disable editing byte/int arrays under Mono runtime
This commit is contained in:
parent
dee77873ba
commit
e036dbfacc
3 changed files with 26 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
using Substrate.Nbt;
|
||||
using System;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
|
@ -13,6 +14,11 @@ namespace NBTExplorer.Model
|
|||
get { return base.Tag as TagNodeByteArray; }
|
||||
}
|
||||
|
||||
public override bool CanEditNode
|
||||
{
|
||||
get { return !IsMono(); }
|
||||
}
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditByteHexValue(Tag);
|
||||
|
@ -22,5 +28,10 @@ namespace NBTExplorer.Model
|
|||
{
|
||||
get { return NodeDisplayPrefix + Tag.Data.Length + " bytes"; }
|
||||
}
|
||||
|
||||
private bool IsMono ()
|
||||
{
|
||||
return Type.GetType("Mono.Runtime") != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Substrate.Nbt;
|
||||
using System;
|
||||
using Substrate.Nbt;
|
||||
|
||||
namespace NBTExplorer.Model
|
||||
{
|
||||
|
@ -13,6 +14,11 @@ namespace NBTExplorer.Model
|
|||
get { return base.Tag as TagNodeIntArray; }
|
||||
}
|
||||
|
||||
public override bool CanEditNode
|
||||
{
|
||||
get { return !IsMono(); }
|
||||
}
|
||||
|
||||
public override bool EditNode ()
|
||||
{
|
||||
return EditIntHexValue(Tag);
|
||||
|
@ -22,5 +28,10 @@ namespace NBTExplorer.Model
|
|||
{
|
||||
get { return NodeDisplayPrefix + Tag.Data.Length + " integers"; }
|
||||
}
|
||||
|
||||
private bool IsMono ()
|
||||
{
|
||||
return Type.GetType("Mono.Runtime") != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// 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.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.1.0")]
|
||||
[assembly: AssemblyVersion("2.0.2.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.2.0")]
|
||||
|
|
Loading…
Reference in a new issue