public NbtFileNode(NbtTreeModel tree, INode parent, NbtFile file) : base(tree, parent) { File = file; File.RootTag.OnChanged += RootTag_Changed; File.RootTag.ActionPerformed += RootTag_ActionPerformed; File.OnSaved += File_OnSaved; }
public RegionFileNode(NbtTreeModel tree, INode parent, RegionFile file) : base(tree, parent) { Region = file; Region.ChunksChanged += Region_ChunksChanged; Region.ActionPerformed += Region_ActionPerformed; Region.OnSaved += Region_OnSaved; }
public static INode CreateNode(NbtTreeModel tree, INode parent, object item) { foreach (var converter in RegisteredConverters) { if (converter.Key.IsInstanceOfType(item)) { return(converter.Value(tree, parent, item)); } } throw new InvalidOperationException($"No registered converter for {item.GetType()}"); }
public ChunkNode(NbtTreeModel tree, INode parent, Chunk chunk) : base(tree, parent) { Chunk = chunk; if (Chunk.IsLoaded) { SetupEvents(); } else { Chunk.OnLoaded += Chunk_OnLoaded; } }
public ModelRootNode(NbtTreeModel tree, IEnumerable <object> children) : base(tree, null) { ChildObjects = children.ToList(); }
public static INode CreateRootNode(NbtTreeModel tree, object item) => CreateNode(tree, null, item);
public NbtTagNode(NbtTreeModel tree, INode parent, NbtTag tag) : base(tree, parent) { Tag = tag; Tag.OnChanged += Tag_Changed; Tag.ActionPerformed += Tag_ActionPerformed; }
public ModelNode(NbtTreeModel tree, INode parent) { Tree = tree; Parent = parent; }
public FolderNode(NbtTreeModel tree, INode parent, NbtFolder folder) : base(tree, parent) { Folder = folder; Folder.ContentsChanged += Folder_ContentsChanged; }