diff --git a/Controllers/NodeTreeController.cs b/Controllers/NodeTreeController.cs index 2c103d2..fbfc160 100644 --- a/Controllers/NodeTreeController.cs +++ b/Controllers/NodeTreeController.cs @@ -5,24 +5,152 @@ using System.Windows.Forms; using NBTExplorer.Model; using Substrate.Nbt; using NBTExplorer.Windows; +using NBTExplorer.Vendor.MultiSelectTreeView; +using System.IO; namespace NBTExplorer.Controllers { + public class MessageBoxEventArgs : EventArgs + { + public bool Cancel { get; set; } + public string Message { get; set; } + + public MessageBoxEventArgs (string message) + { + Message = message; + } + } + public class NodeTreeController { private TreeView _nodeTree; + private MultiSelectTreeView _multiTree; + private IconRegistry _iconRegistry; - private TagCompoundDataNode _rootData; + //private TagCompoundDataNode _rootData; + private RootDataNode _rootData; public NodeTreeController (TreeView nodeTree) { _nodeTree = nodeTree; - InitializeIconRegistry(); + _multiTree = nodeTree as MultiSelectTreeView; - _rootData = new TagCompoundDataNode(new TagNodeCompound()); + InitializeIconRegistry(); + ShowVirtualRoot = true; + + //_rootData = new TagCompoundDataNode(new TagNodeCompound()); + _rootData = new RootDataNode(); + RefreshRootNodes(); } + public RootDataNode Root + { + get { return _rootData; } + } + + public TreeView Tree + { + get { return _nodeTree; } + } + + public bool ShowVirtualRoot { get; set; } + + public string VirtualRootDisplay + { + get { return _rootData.NodeDisplay; } + set + { + _rootData.SetDisplayName(value); + if (ShowVirtualRoot && _nodeTree.Nodes.Count > 0) + UpdateNodeText(_nodeTree.Nodes[0]); + } + } + + public event EventHandler SelectionInvalidated; + + protected virtual void OnSelectionInvalidated (EventArgs e) + { + if (SelectionInvalidated != null) + SelectionInvalidated(this, e); + } + + private void OnSelectionInvalidated () + { + OnSelectionInvalidated(EventArgs.Empty); + } + + public event EventHandler ConfirmAction; + + protected virtual void OnConfirmAction (MessageBoxEventArgs e) + { + if (ConfirmAction != null) + ConfirmAction(this, e); + } + + private bool OnConfirmAction (string message) + { + MessageBoxEventArgs e = new MessageBoxEventArgs(message); + OnConfirmAction(e); + return !e.Cancel; + } + + + private TreeNode SelectedNode + { + get + { + if (_multiTree != null) + return _multiTree.SelectedNode; + else + return _nodeTree.SelectedNode; + } + } + + #region Load / Save + + public void Save () + { + foreach (TreeNode node in _nodeTree.Nodes) { + DataNode dataNode = node.Tag as DataNode; + if (dataNode != null) + dataNode.Save(); + } + + OnSelectionInvalidated(); + } + + public 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)); + } + 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)); + } + } + } + + if (_nodeTree.Nodes.Count > 0) { + _nodeTree.Nodes[0].Expand(); + } + + OnSelectionInvalidated(); + } + + #endregion + public void CreateNode (TreeNode node, TagType type) { if (node == null || !(node.Tag is DataNode)) @@ -35,19 +163,19 @@ namespace NBTExplorer.Controllers if (dataNode.CreateNode(type)) { node.Text = dataNode.NodeDisplay; RefreshChildNodes(node, dataNode); - UpdateUI(dataNode); + OnSelectionInvalidated(); } } - public void CreateRootNode (TagType type) + public void CreateNode (TagType type) { - if (_rootData.CreateNode(type)) { - RefreshRootNodes(); - UpdateUI(_rootData); - } + if (_nodeTree.SelectedNode == null) + return; + + CreateNode(_nodeTree.SelectedNode, type); } - private void DeleteNode (TreeNode node) + public void DeleteNode (TreeNode node) { if (node == null || !(node.Tag is DataNode)) return; @@ -57,13 +185,263 @@ namespace NBTExplorer.Controllers return; if (dataNode.DeleteNode()) { - UpdateUI(node.Parent.Tag as DataNode); UpdateNodeText(node.Parent); node.Remove(); + + RemoveNodeFromSelection(node); + OnSelectionInvalidated(); } } - private void ExpandNode (TreeNode node) + private bool DeleteNode (IList nodes) + { + bool? elideChildren = null; + if (!CanOperateOnNodesEx(nodes, Predicates.DeleteNodePred, out elideChildren)) + return false; + + if (elideChildren == true) + nodes = ElideChildren(nodes); + + bool selectionModified = false; + foreach (TreeNode node in nodes) { + DataNode dataNode = node.Tag as DataNode; + if (dataNode.DeleteNode()) { + UpdateNodeText(node.Parent); + node.Remove(); + + RemoveNodeFromSelection(node); + selectionModified = true; + } + } + + if (selectionModified) + OnSelectionInvalidated(); + + return true; + } + + private bool RemoveNodeFromSelection (TreeNode node) + { + bool selectionModified = false; + + if (_multiTree != null) { + if (_multiTree.SelectedNodes.Contains(node)) { + _multiTree.SelectedNodes.Remove(node); + selectionModified = true; + } + + if (_multiTree.SelectedNode == node) { + _multiTree.SelectedNode = null; + selectionModified = true; + } + } + + if (_nodeTree.SelectedNode == node) { + _nodeTree.SelectedNode = null; + selectionModified = true; + } + + return selectionModified; + } + + public void DeleteSelection () + { + if (_multiTree != null) + DeleteNode(_multiTree.SelectedNodes); + else + DeleteNode(SelectedNode); + } + + public 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; + OnSelectionInvalidated(); + } + } + + public void EditSelection () + { + EditNode(SelectedNode); + } + + 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; + OnSelectionInvalidated(); + } + } + + public void RenameSelection () + { + RenameNode(SelectedNode); + } + + private void RefreshNode (TreeNode node) + { + if (node == null || !(node.Tag is DataNode)) + return; + + DataNode dataNode = node.Tag as DataNode; + if (!dataNode.CanRefreshNode) + return; + + if (!OnConfirmAction("Refresh data anyway?")) + return; + + if (dataNode.RefreshNode()) { + RefreshChildNodes(node, dataNode); + ExpandToEdge(node); + OnSelectionInvalidated(); + } + } + + public void RefreshSelection () + { + RefreshNode(SelectedNode); + } + + private void ExpandToEdge (TreeNode node) + { + if (node == null || !(node.Tag is DataNode)) + return; + + DataNode dataNode = node.Tag as DataNode; + if (dataNode.IsExpanded) { + if (!node.IsExpanded) + node.Expand(); + + foreach (TreeNode child in node.Nodes) + ExpandToEdge(child); + } + } + + 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()) { + UpdateNodeText(node.Parent); + node.Remove(); + + RemoveNodeFromSelection(node); + OnSelectionInvalidated(); + } + } + + 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); + + OnSelectionInvalidated(); + } + } + + public void CopySelection () + { + CopyNode(SelectedNode); + } + + public void CutSelection () + { + CutNode(SelectedNode); + } + + public void PasteIntoSelection () + { + PasteNode(SelectedNode); + } + + public void MoveNodeUp (TreeNode node) + { + if (node == null) + return; + + DataNode datanode = node.Tag as DataNode; + if (datanode == null || !datanode.CanMoveNodeUp) + return; + + if (datanode.ChangeRelativePosition(-1)) { + RefreshChildNodes(node.Parent, datanode.Parent); + OnSelectionInvalidated(); + } + } + + public void MoveNodeDown (TreeNode node) + { + if (node == null) + return; + + DataNode datanode = node.Tag as DataNode; + if (datanode == null || !datanode.CanMoveNodeDown) + return; + + if (datanode.ChangeRelativePosition(1)) { + RefreshChildNodes(node.Parent, datanode.Parent); + OnSelectionInvalidated(); + } + } + + public void MoveSelectionUp () + { + MoveNodeUp(SelectedNode); + } + + public void MoveSelectionDown () + { + MoveNodeDown(SelectedNode); + } + + /*public void CreateRootNode (TagType type) + { + if (_rootData.CreateNode(type)) { + RefreshRootNodes(); + UpdateUI(_rootData); + } + }*/ + + public void ExpandNode (TreeNode node) { if (node == null || !(node.Tag is DataNode)) return; @@ -81,8 +459,121 @@ namespace NBTExplorer.Controllers node.Nodes.Add(CreateUnexpandedNode(child)); } + public void ExpandSelectedNode () + { + ExpandNode(SelectedNode); + if (SelectedNode != null) + SelectedNode.Expand(); + } + + public 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()); + } + + public void CollapseSelectedNode () + { + CollapseNode(SelectedNode); + } + + 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; + } + + public 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(); + } + + public void SelectNode (DataNode node) + { + if (_multiTree != null) { + _multiTree.SelectedNode = FindFrontNode(node); + } + else { + _nodeTree.SelectedNode = FindFrontNode(node); + } + } + public void RefreshRootNodes () { + if (ShowVirtualRoot) { + _nodeTree.Nodes.Clear(); + _nodeTree.Nodes.Add(CreateUnexpandedNode(_rootData)); + return; + } + if (_rootData.HasUnexpandedChildren) _rootData.Expand(); @@ -131,8 +622,10 @@ namespace NBTExplorer.Controllers } } - public virtual void UpdateUI (DataNode node) + public void RefreshTreeNode (DataNode dataNode) { + TreeNode node = FindFrontNode(dataNode); + RefreshChildNodes(node, dataNode); } private void InitializeIconRegistry () @@ -168,6 +661,17 @@ namespace NBTExplorer.Controllers node.Text = dataNode.NodeDisplay; } + public bool CheckModifications () + { + foreach (TreeNode node in _nodeTree.Nodes) { + DataNode dataNode = node.Tag as DataNode; + if (dataNode != null && dataNode.IsModified) + return true; + } + + return false; + } + private TreeNode CreateUnexpandedNode (DataNode node) { TreeNode frontNode = new TreeNode(node.NodeDisplay); @@ -181,5 +685,264 @@ namespace NBTExplorer.Controllers return frontNode; } + + #region Capability Checking + + #region Capability Predicates + + public delegate bool DataNodePredicate (DataNode dataNode, out GroupCapabilities caps); + + public static class Predicates + { + public static bool CreateByteNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_BYTE); + } + + public static bool CreateShortNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_SHORT); + } + + public static bool CreateIntNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_INT); + } + + public static bool CreateLongNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LONG); + } + + public static bool CreateFloatNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_FLOAT); + } + + public static bool CreateDoubleNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_DOUBLE); + } + + public static bool CreateByteArrayNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_BYTE_ARRAY); + } + + public static bool CreateIntArrayNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_INT_ARRAY); + } + + public static bool CreateStringNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_STRING); + } + + public static bool CreateListNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LIST); + } + + public static bool CreateCompoundNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = GroupCapabilities.Single; + return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_COMPOUND); + } + + public static bool RenameNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.RenameNodeCapabilities; + return (dataNode != null) && dataNode.CanRenameNode; + } + + public static bool EditNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.EditNodeCapabilities; + return (dataNode != null) && dataNode.CanEditNode; + } + + public static bool DeleteNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.DeleteNodeCapabilities; + return (dataNode != null) && dataNode.CanDeleteNode; + } + + public static bool MoveNodeUpPred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.ReorderNodeCapabilities; + return (dataNode != null) && dataNode.CanMoveNodeUp; + } + + public static bool MoveNodeDownPred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.ReorderNodeCapabilities; + return (dataNode != null) && dataNode.CanMoveNodeDown; + } + + public static bool CutNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.CutNodeCapabilities; + return (dataNode != null) && dataNode.CanCutNode; + } + + public static bool CopyNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.CopyNodeCapabilities; + return (dataNode != null) && dataNode.CanCopyNode; + } + + public static bool PasteIntoNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.PasteIntoNodeCapabilities; + return (dataNode != null) && dataNode.CanPasteIntoNode; + } + + public static bool SearchNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.SearchNodeCapabilites; + return (dataNode != null) && dataNode.CanSearchNode; + } + + public static bool ReorderNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.ReorderNodeCapabilities; + return (dataNode != null) && dataNode.CanReoderNode; + } + + public static bool RefreshNodePred (DataNode dataNode, out GroupCapabilities caps) + { + caps = dataNode.RefreshNodeCapabilites; + return (dataNode != null) && dataNode.CanRefreshNode; + } + } + + #endregion + + public bool CanOperateOnSelection (DataNodePredicate pred) + { + if (_multiTree != null) + return CanOperateOnNodes(_multiTree.SelectedNodes, pred); + else + return CanOperateOnNodes(new List() { _nodeTree.SelectedNode }, pred); + } + + private bool CanOperateOnNodes (IList nodes, DataNodePredicate pred) + { + bool? elideChildren = null; + return CanOperateOnNodesEx(nodes, pred, out elideChildren); + } + + private bool CanOperateOnNodesEx (IList nodes, DataNodePredicate pred, out bool? elideChildren) + { + GroupCapabilities caps = GroupCapabilities.All; + elideChildren = null; + + foreach (TreeNode node in nodes) { + if (node == null || !(node.Tag is DataNode)) + return false; + + DataNode dataNode = node.Tag as DataNode; + GroupCapabilities dataCaps; + if (!pred(dataNode, out dataCaps)) + return false; + + caps &= dataCaps; + + bool elideChildrenFlag = (dataNode.DeleteNodeCapabilities & GroupCapabilities.ElideChildren) == GroupCapabilities.ElideChildren; + if (elideChildren == null) + elideChildren = elideChildrenFlag; + if (elideChildren != elideChildrenFlag) + return false; + } + + if (nodes.Count > 1 && !SufficientCapabilities(nodes, caps)) + return false; + + return true; + } + + private IList ElideChildren (IList nodes) + { + List filtered = new List(); + + foreach (TreeNode node in nodes) { + TreeNode parent = node.Parent; + bool foundParent = false; + + while (parent != null) { + if (nodes.Contains(parent)) { + foundParent = true; + break; + } + parent = parent.Parent; + } + + if (!foundParent) + filtered.Add(node); + } + + return filtered; + } + + private bool CommonContainer (IEnumerable nodes) + { + object container = null; + foreach (TreeNode node in nodes) { + DataNode dataNode = node.Tag as DataNode; + if (container == null) + container = dataNode.Parent; + + if (container != dataNode.Parent) + return false; + } + + return true; + } + + private bool CommonType (IEnumerable nodes) + { + Type datatype = null; + foreach (TreeNode node in nodes) { + DataNode dataNode = node.Tag as DataNode; + if (datatype == null) + datatype = dataNode.GetType(); + + if (datatype != dataNode.GetType()) + return false; + } + + return true; + } + + private bool SufficientCapabilities (IEnumerable nodes, GroupCapabilities commonCaps) + { + bool commonContainer = CommonContainer(nodes); + bool commonType = CommonType(nodes); + + bool pass = true; + if (commonContainer && commonType) + pass &= ((commonCaps & GroupCapabilities.SiblingSameType) == GroupCapabilities.SiblingSameType); + else if (commonContainer && !commonType) + pass &= ((commonCaps & GroupCapabilities.SiblingMixedType) == GroupCapabilities.SiblingMixedType); + else if (!commonContainer && commonType) + pass &= ((commonCaps & GroupCapabilities.MultiSameType) == GroupCapabilities.MultiSameType); + else if (!commonContainer && !commonType) + pass &= ((commonCaps & GroupCapabilities.MultiMixedType) == GroupCapabilities.MultiMixedType); + + return pass; + } + + #endregion } } diff --git a/Model/CompoundTagContainer.cs b/Model/CompoundTagContainer.cs index 7df9f75..c4437e2 100644 --- a/Model/CompoundTagContainer.cs +++ b/Model/CompoundTagContainer.cs @@ -32,6 +32,14 @@ namespace NBTExplorer.Model return null; } + public TagNode GetTagNode (string name) + { + TagNode tag; + if (_tag.TryGetValue(name, out tag)) + return tag; + return null; + } + public bool AddTag (TagNode tag, string name) { if (_tag.ContainsKey(name)) @@ -61,5 +69,18 @@ namespace NBTExplorer.Model return false; } + + public bool DeleteTag (string name) + { + if (!_tag.ContainsKey(name)) + return false; + + return DeleteTag(_tag[name]); + } + + public bool ContainsTag (string name) + { + return _tag.ContainsKey(name); + } } } diff --git a/Model/DataNode.cs b/Model/DataNode.cs index 728e7de..a11bd70 100644 --- a/Model/DataNode.cs +++ b/Model/DataNode.cs @@ -1,24 +1,43 @@ using Substrate.Nbt; using System.Collections.Generic; +using System; namespace NBTExplorer.Model { - public class RootDataNode : DataNode + public class RootDataNode : TagCompoundDataNode { private string _name = "Root"; private string _display = ""; + public RootDataNode () + : base(new TagNodeCompound()) + { + } + public override string NodeName { get { return _name; } - set { _name = value; } } public override string NodeDisplay { get { return _display; } - set { _display = value; } } + + public void SetNodeName (string name) + { + _name = name; + } + + public void SetDisplayName (string name) + { + _display = name; + } + + /*public override bool CanCreateTag (TagType type) + { + return Enum.IsDefined(typeof(TagType), type) && type != TagType.TAG_END; + }*/ } // FilterDataNode @@ -173,8 +192,12 @@ namespace NBTExplorer.Model Dictionary dict = new Dictionary(); foreach (DataNode child in node.Nodes) { Dictionary childDict = BuildExpandSet(child); - if (childDict != null) - dict[child.NodeDisplay] = childDict; + if (childDict != null) { + if (!String.IsNullOrEmpty(child.NodeName)) + dict[child.NodeName] = childDict; + else + dict[child.NodeDisplay] = childDict; + } } return dict; @@ -185,7 +208,12 @@ namespace NBTExplorer.Model node.Expand(); foreach (DataNode child in node.Nodes) { - if (expandSet.ContainsKey(child.NodeDisplay)) { + if (expandSet.ContainsKey(child.NodeName)) { + Dictionary childDict = (Dictionary)expandSet[child.NodeName]; + if (childDict != null) + RestoreExpandSet(child, childDict); + } + else if (expandSet.ContainsKey(child.NodeDisplay)) { Dictionary childDict = (Dictionary)expandSet[child.NodeDisplay]; if (childDict != null) RestoreExpandSet(child, childDict); diff --git a/Model/TagCompoundDataNode.cs b/Model/TagCompoundDataNode.cs index 267a2fa..0c1e40c 100644 --- a/Model/TagCompoundDataNode.cs +++ b/Model/TagCompoundDataNode.cs @@ -100,6 +100,36 @@ namespace NBTExplorer.Model return _container.DeleteTag(tag); } + public bool ContainsTag (string name) + { + return _container.ContainsTag(name); + } + + public override void SyncTag () + { + Dictionary lookup = new Dictionary(); + foreach (TagDataNode node in Nodes) + lookup[node.Tag] = node; + + foreach (var kvp in lookup) { + if (!Tag.Values.Contains(kvp.Key)) + Nodes.Remove(kvp.Value); + } + + foreach (TagNode tag in Tag.Values) { + if (!lookup.ContainsKey(tag)) { + TagDataNode newnode = TagDataNode.CreateFromTag(tag); + if (newnode != null) { + Nodes.Add(newnode); + newnode.Expand(); + } + } + } + + foreach (TagDataNode node in Nodes) + node.SyncTag(); + } + private void AddTag (TagNode tag, string name) { _container.AddTag(tag, name); diff --git a/Model/TagContainerInterface.cs b/Model/TagContainerInterface.cs index 35c56b2..93c507d 100644 --- a/Model/TagContainerInterface.cs +++ b/Model/TagContainerInterface.cs @@ -24,8 +24,12 @@ namespace NBTExplorer.Model IEnumerable TagNamesInUse { get; } string GetTagName (TagNode tag); + TagNode GetTagNode (string name); + bool AddTag (TagNode tag, string name); bool RenameTag (TagNode tag, string name); + bool ContainsTag (string name); + bool DeleteTag (string name); } public interface IOrderedTagContainer : ITagContainer diff --git a/Model/TagDataNode.cs b/Model/TagDataNode.cs index 8c5a92f..8124aa2 100644 --- a/Model/TagDataNode.cs +++ b/Model/TagDataNode.cs @@ -140,10 +140,10 @@ namespace NBTExplorer.Model get { return base.Parent as IMetaTagContainer; } } - protected TagNode Tag + public TagNode Tag { get { return _tag; } - set + protected set { if (_tag.GetTagType() == value.GetTagType()) _tag = value; @@ -356,5 +356,9 @@ namespace NBTExplorer.Model return false; } + + public virtual void SyncTag () + { + } } } diff --git a/SearchWorker.cs b/SearchWorker.cs index ae2238c..e57771c 100644 --- a/SearchWorker.cs +++ b/SearchWorker.cs @@ -7,8 +7,6 @@ namespace NBTExplorer internal interface ISearchState { DataNode RootNode { get; set; } - string SearchName { get; set; } - string SearchValue { get; set; } IEnumerator State { get; set; } @@ -16,6 +14,45 @@ namespace NBTExplorer void InvokeProgressCallback (DataNode node); void InvokeCollapseCallback (DataNode node); void InvokeEndCallback (DataNode node); + + bool TestNode (DataNode node); + } + + internal abstract class NameValueSearchState : ISearchState + { + public virtual string SearchName { get; set; } + public virtual string SearchValue { get; set; } + + public DataNode RootNode { get; set; } + public IEnumerator State { get; set; } + + public abstract void InvokeDiscoverCallback (DataNode node); + public abstract void InvokeProgressCallback (DataNode node); + public abstract void InvokeCollapseCallback (DataNode node); + public abstract void InvokeEndCallback (DataNode node); + + public bool TestNode (DataNode node) + { + bool mName = SearchName == null; + bool mValue = SearchValue == null; + + if (SearchName != null) { + string tagName = node.NodeName; + if (tagName != null) + mName = tagName.Contains(SearchName); + } + if (SearchValue != null) { + string tagValue = node.NodeDisplay; + if (tagValue != null) + mValue = tagValue.Contains(SearchValue); + } + + if (mName && mValue) { + return true; + } + + return false; + } } internal class SearchWorker @@ -64,7 +101,12 @@ namespace NBTExplorer TagDataNode tagNode = node as TagDataNode; if (tagNode != null) { - bool mName = _state.SearchName == null; + if (_state.TestNode(tagNode)) { + InvokeDiscoverCallback(node); + yield return node; + } + + /*bool mName = _state.SearchName == null; bool mValue = _state.SearchValue == null; if (_state.SearchName != null) { @@ -81,7 +123,7 @@ namespace NBTExplorer if (mName && mValue) { InvokeDiscoverCallback(node); yield return node; - } + }*/ } foreach (DataNode sub in node.Nodes) { diff --git a/Vendor/MultiSelectTreeView/MultiSelectTreeview.cs b/Vendor/MultiSelectTreeView/MultiSelectTreeview.cs index a40a373..c9a1651 100644 --- a/Vendor/MultiSelectTreeView/MultiSelectTreeview.cs +++ b/Vendor/MultiSelectTreeView/MultiSelectTreeview.cs @@ -92,6 +92,8 @@ namespace NBTExplorer.Vendor.MultiSelectTreeView if( node != null ) { int leftBound = node.Bounds.X; // - 20; // Allow user to click on image + if (node.TreeView.ImageList != null) + leftBound -= 20; int rightBound = node.Bounds.Right + 10; // Give a little extra room if( e.Location.X > leftBound && e.Location.X < rightBound ) { diff --git a/Windows/FindReplace.Designer.cs b/Windows/FindReplace.Designer.cs index d7ff610..c43d437 100644 --- a/Windows/FindReplace.Designer.cs +++ b/Windows/FindReplace.Designer.cs @@ -30,23 +30,17 @@ this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FindReplace)); this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); this.panel1 = new System.Windows.Forms.Panel(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.panel2 = new System.Windows.Forms.Panel(); - this.toolStrip2 = new System.Windows.Forms.ToolStrip(); this.treeView1 = new System.Windows.Forms.TreeView(); - this.treeView2 = new System.Windows.Forms.TreeView(); + this.imageList1 = new System.Windows.Forms.ImageList(this.components); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this._tbFindEdit = new System.Windows.Forms.ToolStripButton(); this._tbFindDelete = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this._tbReplaceDelete = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.button4 = new System.Windows.Forms.Button(); - this._tbFindAny = new System.Windows.Forms.ToolStripButton(); + this._tbFindGroupAnd = new System.Windows.Forms.ToolStripButton(); + this._tbFindGroupOr = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this._tbFindAny = new System.Windows.Forms.ToolStripButton(); this._tbFindByte = new System.Windows.Forms.ToolStripButton(); this._tbFindShort = new System.Windows.Forms.ToolStripButton(); this._tbFindInt = new System.Windows.Forms.ToolStripButton(); @@ -54,6 +48,13 @@ this._tbFindFloat = new System.Windows.Forms.ToolStripButton(); this._tbFindDouble = new System.Windows.Forms.ToolStripButton(); this._tbFindString = new System.Windows.Forms.ToolStripButton(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.treeView2 = new System.Windows.Forms.TreeView(); + this.toolStrip2 = new System.Windows.Forms.ToolStrip(); + this._tbReplaceEdit = new System.Windows.Forms.ToolStripButton(); + this._tbReplaceDelete = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this._tbReplaceByte = new System.Windows.Forms.ToolStripButton(); this._tbReplaceShort = new System.Windows.Forms.ToolStripButton(); this._tbReplaceInt = new System.Windows.Forms.ToolStripButton(); @@ -65,13 +66,14 @@ this._tbReplaceString = new System.Windows.Forms.ToolStripButton(); this._tbReplaceList = new System.Windows.Forms.ToolStripButton(); this._tbReplaceCompound = new System.Windows.Forms.ToolStripButton(); - this.imageList1 = new System.Windows.Forms.ImageList(this.components); - this._tbFindGroupAnd = new System.Windows.Forms.ToolStripButton(); - this._tbFindGroupOr = new System.Windows.Forms.ToolStripButton(); + this._buttonFind = new System.Windows.Forms.Button(); + this._buttonReplace = new System.Windows.Forms.Button(); + this._buttonReplaceAll = new System.Windows.Forms.Button(); + this._buttonCancel = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); this.panel1.SuspendLayout(); this.toolStrip1.SuspendLayout(); + this.groupBox2.SuspendLayout(); this.panel2.SuspendLayout(); this.toolStrip2.SuspendLayout(); this.SuspendLayout(); @@ -88,19 +90,6 @@ this.groupBox1.TabStop = false; this.groupBox1.Text = "Find"; // - // groupBox2 - // - this.groupBox2.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.groupBox2.Controls.Add(this.panel2); - this.groupBox2.Location = new System.Drawing.Point(12, 198); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(439, 182); - this.groupBox2.TabIndex = 1; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Replace"; - // // panel1 // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -112,9 +101,45 @@ this.panel1.Size = new System.Drawing.Size(427, 155); this.panel1.TabIndex = 0; // + // treeView1 + // + this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeView1.ImageIndex = 0; + this.treeView1.ImageList = this.imageList1; + this.treeView1.Location = new System.Drawing.Point(0, 25); + this.treeView1.Name = "treeView1"; + this.treeView1.SelectedImageIndex = 0; + this.treeView1.ShowPlusMinus = false; + this.treeView1.ShowRootLines = false; + this.treeView1.Size = new System.Drawing.Size(427, 130); + this.treeView1.TabIndex = 1; + // + // 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"); + this.imageList1.Images.SetKeyName(16, "arrow-315.png"); + // // toolStrip1 // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this._tbFindEdit, this._tbFindDelete, this.toolStripSeparator1, this._tbFindGroupAnd, @@ -134,65 +159,15 @@ this.toolStrip1.TabIndex = 0; this.toolStrip1.Text = "toolStrip1"; // - // panel2 + // _tbFindEdit // - this.panel2.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.panel2.Controls.Add(this.treeView2); - this.panel2.Controls.Add(this.toolStrip2); - this.panel2.Location = new System.Drawing.Point(6, 19); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(427, 157); - this.panel2.TabIndex = 0; - // - // toolStrip2 - // - this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this._tbReplaceDelete, - this.toolStripSeparator2, - this._tbReplaceByte, - this._tbReplaceShort, - this._tbReplaceInt, - this._tbReplaceLong, - this._tbReplaceFloat, - this._tbReplaceDouble, - this._tbReplaceByteArray, - this._tbReplaceIntArray, - this._tbReplaceString, - this._tbReplaceList, - this._tbReplaceCompound}); - this.toolStrip2.Location = new System.Drawing.Point(0, 0); - this.toolStrip2.Name = "toolStrip2"; - this.toolStrip2.Size = new System.Drawing.Size(427, 25); - this.toolStrip2.TabIndex = 0; - this.toolStrip2.Text = "toolStrip2"; - // - // treeView1 - // - this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.treeView1.ImageIndex = 0; - this.treeView1.ImageList = this.imageList1; - this.treeView1.Location = new System.Drawing.Point(0, 25); - this.treeView1.Name = "treeView1"; - this.treeView1.SelectedImageIndex = 0; - this.treeView1.ShowPlusMinus = false; - this.treeView1.ShowRootLines = false; - this.treeView1.Size = new System.Drawing.Size(427, 130); - this.treeView1.TabIndex = 1; - // - // treeView2 - // - this.treeView2.Dock = System.Windows.Forms.DockStyle.Fill; - this.treeView2.ImageIndex = 0; - this.treeView2.ImageList = this.imageList1; - this.treeView2.Location = new System.Drawing.Point(0, 25); - this.treeView2.Name = "treeView2"; - this.treeView2.SelectedImageIndex = 0; - this.treeView2.ShowPlusMinus = false; - this.treeView2.ShowRootLines = false; - this.treeView2.Size = new System.Drawing.Size(427, 132); - this.treeView2.TabIndex = 1; + this._tbFindEdit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this._tbFindEdit.Image = ((System.Drawing.Image)(resources.GetObject("_tbFindEdit.Image"))); + this._tbFindEdit.ImageTransparentColor = System.Drawing.Color.Magenta; + this._tbFindEdit.Name = "_tbFindEdit"; + this._tbFindEdit.Size = new System.Drawing.Size(23, 22); + this._tbFindEdit.Text = "toolStripButton1"; + this._tbFindEdit.Click += new System.EventHandler(this._tbFindEdit_Click); // // _tbFindDelete // @@ -209,60 +184,28 @@ this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // - // _tbReplaceDelete + // _tbFindGroupAnd // - this._tbReplaceDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._tbReplaceDelete.Image = ((System.Drawing.Image)(resources.GetObject("_tbReplaceDelete.Image"))); - this._tbReplaceDelete.ImageTransparentColor = System.Drawing.Color.Magenta; - this._tbReplaceDelete.Name = "_tbReplaceDelete"; - this._tbReplaceDelete.Size = new System.Drawing.Size(23, 22); - this._tbReplaceDelete.Text = "toolStripButton2"; - this._tbReplaceDelete.Click += new System.EventHandler(this._tbReplaceDelete_Click); + this._tbFindGroupAnd.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this._tbFindGroupAnd.Image = ((System.Drawing.Image)(resources.GetObject("_tbFindGroupAnd.Image"))); + this._tbFindGroupAnd.ImageTransparentColor = System.Drawing.Color.Magenta; + this._tbFindGroupAnd.Name = "_tbFindGroupAnd"; + this._tbFindGroupAnd.Size = new System.Drawing.Size(23, 22); + this._tbFindGroupAnd.Text = "toolStripButton1"; // - // toolStripSeparator2 + // _tbFindGroupOr // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); + this._tbFindGroupOr.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this._tbFindGroupOr.Image = ((System.Drawing.Image)(resources.GetObject("_tbFindGroupOr.Image"))); + this._tbFindGroupOr.ImageTransparentColor = System.Drawing.Color.Magenta; + this._tbFindGroupOr.Name = "_tbFindGroupOr"; + this._tbFindGroupOr.Size = new System.Drawing.Size(23, 22); + this._tbFindGroupOr.Text = "toolStripButton2"; // - // button1 + // toolStripSeparator3 // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.Location = new System.Drawing.Point(295, 386); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 2; - this.button1.Text = "Find Next"; - this.button1.UseVisualStyleBackColor = true; - // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button2.Location = new System.Drawing.Point(376, 386); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 3; - this.button2.Text = "Replace"; - this.button2.UseVisualStyleBackColor = true; - // - // button3 - // - this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button3.Location = new System.Drawing.Point(376, 415); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(75, 23); - this.button3.TabIndex = 4; - this.button3.Text = "Replace All"; - this.button3.UseVisualStyleBackColor = true; - // - // button4 - // - this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.button4.Location = new System.Drawing.Point(12, 386); - this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(75, 23); - this.button4.TabIndex = 5; - this.button4.Text = "Cancel"; - this.button4.UseVisualStyleBackColor = true; + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); // // _tbFindAny // @@ -274,11 +217,6 @@ this._tbFindAny.Text = "toolStripButton3"; this._tbFindAny.Click += new System.EventHandler(this._tbFindAny_Click); // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); - // // _tbFindByte // this._tbFindByte.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -349,6 +287,92 @@ this._tbFindString.Text = "toolStripButton10"; this._tbFindString.Click += new System.EventHandler(this._tbFindString_Click); // + // groupBox2 + // + this.groupBox2.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.groupBox2.Controls.Add(this.panel2); + this.groupBox2.Location = new System.Drawing.Point(12, 198); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(439, 182); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Replace"; + // + // panel2 + // + this.panel2.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.panel2.Controls.Add(this.treeView2); + this.panel2.Controls.Add(this.toolStrip2); + this.panel2.Location = new System.Drawing.Point(6, 19); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(427, 157); + this.panel2.TabIndex = 0; + // + // treeView2 + // + this.treeView2.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeView2.ImageIndex = 0; + this.treeView2.ImageList = this.imageList1; + this.treeView2.Location = new System.Drawing.Point(0, 25); + this.treeView2.Name = "treeView2"; + this.treeView2.SelectedImageIndex = 0; + this.treeView2.ShowPlusMinus = false; + this.treeView2.ShowRootLines = false; + this.treeView2.Size = new System.Drawing.Size(427, 132); + this.treeView2.TabIndex = 1; + // + // toolStrip2 + // + this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this._tbReplaceEdit, + this._tbReplaceDelete, + this.toolStripSeparator2, + this._tbReplaceByte, + this._tbReplaceShort, + this._tbReplaceInt, + this._tbReplaceLong, + this._tbReplaceFloat, + this._tbReplaceDouble, + this._tbReplaceByteArray, + this._tbReplaceIntArray, + this._tbReplaceString, + this._tbReplaceList, + this._tbReplaceCompound}); + this.toolStrip2.Location = new System.Drawing.Point(0, 0); + this.toolStrip2.Name = "toolStrip2"; + this.toolStrip2.Size = new System.Drawing.Size(427, 25); + this.toolStrip2.TabIndex = 0; + this.toolStrip2.Text = "toolStrip2"; + // + // _tbReplaceEdit + // + this._tbReplaceEdit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this._tbReplaceEdit.Image = ((System.Drawing.Image)(resources.GetObject("_tbReplaceEdit.Image"))); + this._tbReplaceEdit.ImageTransparentColor = System.Drawing.Color.Magenta; + this._tbReplaceEdit.Name = "_tbReplaceEdit"; + this._tbReplaceEdit.Size = new System.Drawing.Size(23, 22); + this._tbReplaceEdit.Text = "toolStripButton1"; + this._tbReplaceEdit.Click += new System.EventHandler(this._tbReplaceEdit_Click); + // + // _tbReplaceDelete + // + this._tbReplaceDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this._tbReplaceDelete.Image = ((System.Drawing.Image)(resources.GetObject("_tbReplaceDelete.Image"))); + this._tbReplaceDelete.ImageTransparentColor = System.Drawing.Color.Magenta; + this._tbReplaceDelete.Name = "_tbReplaceDelete"; + this._tbReplaceDelete.Size = new System.Drawing.Size(23, 22); + this._tbReplaceDelete.Text = "toolStripButton2"; + this._tbReplaceDelete.Click += new System.EventHandler(this._tbReplaceDelete_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); + // // _tbReplaceByte // this._tbReplaceByte.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -459,65 +483,67 @@ this._tbReplaceCompound.Text = "toolStripButton21"; this._tbReplaceCompound.Click += new System.EventHandler(this._tbReplaceCompound_Click); // - // imageList1 + // _buttonFind // - 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"); - this.imageList1.Images.SetKeyName(16, "arrow-315.png"); + this._buttonFind.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this._buttonFind.Location = new System.Drawing.Point(295, 386); + this._buttonFind.Name = "_buttonFind"; + this._buttonFind.Size = new System.Drawing.Size(75, 23); + this._buttonFind.TabIndex = 2; + this._buttonFind.Text = "Find Next"; + this._buttonFind.UseVisualStyleBackColor = true; + this._buttonFind.Click += new System.EventHandler(this._buttonFind_Click); // - // _tbFindGroupAnd + // _buttonReplace // - this._tbFindGroupAnd.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._tbFindGroupAnd.Image = ((System.Drawing.Image)(resources.GetObject("_tbFindGroupAnd.Image"))); - this._tbFindGroupAnd.ImageTransparentColor = System.Drawing.Color.Magenta; - this._tbFindGroupAnd.Name = "_tbFindGroupAnd"; - this._tbFindGroupAnd.Size = new System.Drawing.Size(23, 22); - this._tbFindGroupAnd.Text = "toolStripButton1"; + this._buttonReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this._buttonReplace.Location = new System.Drawing.Point(376, 386); + this._buttonReplace.Name = "_buttonReplace"; + this._buttonReplace.Size = new System.Drawing.Size(75, 23); + this._buttonReplace.TabIndex = 3; + this._buttonReplace.Text = "Replace"; + this._buttonReplace.UseVisualStyleBackColor = true; + this._buttonReplace.Click += new System.EventHandler(this._buttonReplace_Click); // - // _tbFindGroupOr + // _buttonReplaceAll // - this._tbFindGroupOr.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this._tbFindGroupOr.Image = ((System.Drawing.Image)(resources.GetObject("_tbFindGroupOr.Image"))); - this._tbFindGroupOr.ImageTransparentColor = System.Drawing.Color.Magenta; - this._tbFindGroupOr.Name = "_tbFindGroupOr"; - this._tbFindGroupOr.Size = new System.Drawing.Size(23, 22); - this._tbFindGroupOr.Text = "toolStripButton2"; + this._buttonReplaceAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this._buttonReplaceAll.Location = new System.Drawing.Point(376, 415); + this._buttonReplaceAll.Name = "_buttonReplaceAll"; + this._buttonReplaceAll.Size = new System.Drawing.Size(75, 23); + this._buttonReplaceAll.TabIndex = 4; + this._buttonReplaceAll.Text = "Replace All"; + this._buttonReplaceAll.UseVisualStyleBackColor = true; + // + // _buttonCancel + // + this._buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this._buttonCancel.Location = new System.Drawing.Point(12, 386); + 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; // // FindReplace // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(463, 449); - this.Controls.Add(this.button4); - this.Controls.Add(this.button3); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); + this.Controls.Add(this._buttonCancel); + this.Controls.Add(this._buttonReplaceAll); + this.Controls.Add(this._buttonReplace); + this.Controls.Add(this._buttonFind); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Name = "FindReplace"; this.Text = "Replace"; this.groupBox1.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); + this.groupBox2.ResumeLayout(false); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); this.toolStrip2.ResumeLayout(false); @@ -540,10 +566,10 @@ private System.Windows.Forms.ToolStrip toolStrip2; private System.Windows.Forms.ToolStripButton _tbReplaceDelete; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button3; - private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button _buttonFind; + private System.Windows.Forms.Button _buttonReplace; + private System.Windows.Forms.Button _buttonReplaceAll; + private System.Windows.Forms.Button _buttonCancel; private System.Windows.Forms.ToolStripButton _tbFindAny; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripButton _tbFindByte; @@ -567,5 +593,7 @@ private System.Windows.Forms.ImageList imageList1; private System.Windows.Forms.ToolStripButton _tbFindGroupAnd; private System.Windows.Forms.ToolStripButton _tbFindGroupOr; + private System.Windows.Forms.ToolStripButton _tbFindEdit; + private System.Windows.Forms.ToolStripButton _tbReplaceEdit; } } \ No newline at end of file diff --git a/Windows/FindReplace.cs b/Windows/FindReplace.cs index ccf5f7b..e9db81c 100644 --- a/Windows/FindReplace.cs +++ b/Windows/FindReplace.cs @@ -7,27 +7,40 @@ using System.Text; using System.Windows.Forms; using NBTExplorer.Controllers; using Substrate.Nbt; +using NBTExplorer.Model; +using System.Threading; namespace NBTExplorer.Windows { public partial class FindReplace : Form { + private MainForm _main; + private NodeTreeController _mainController; + private DataNode _mainSearchRoot; + private NodeTreeController _findController; private NodeTreeController _replaceController; - public FindReplace () + public FindReplace (MainForm main, NodeTreeController controller, DataNode searchRoot) { InitializeComponent(); + _main = main; + _mainController = controller; + _mainSearchRoot = searchRoot; + _findController = new NodeTreeController(treeView1); + _findController.VirtualRootDisplay = "Find Rules"; + _replaceController = new NodeTreeController(treeView2); + _replaceController.VirtualRootDisplay = "Replacement Tags"; } #region Find Toolbar Buttons private void _tbFindDelete_Click (object sender, EventArgs e) { - + _findController.DeleteSelection(); } private void _tbFindAny_Click (object sender, EventArgs e) @@ -37,37 +50,37 @@ namespace NBTExplorer.Windows private void _tbFindByte_Click (object sender, EventArgs e) { - _findController.CreateRootNode(TagType.TAG_BYTE); + _findController.CreateNode(TagType.TAG_BYTE); } private void _tbFindShort_Click (object sender, EventArgs e) { - _findController.CreateRootNode(TagType.TAG_SHORT); + _findController.CreateNode(TagType.TAG_SHORT); } private void _tbFindInt_Click (object sender, EventArgs e) { - _findController.CreateRootNode(TagType.TAG_INT); + _findController.CreateNode(TagType.TAG_INT); } private void _tbFindLong_Click (object sender, EventArgs e) { - _findController.CreateRootNode(TagType.TAG_LONG); + _findController.CreateNode(TagType.TAG_LONG); } private void _tbFindFloat_Click (object sender, EventArgs e) { - _findController.CreateRootNode(TagType.TAG_FLOAT); + _findController.CreateNode(TagType.TAG_FLOAT); } private void _tbFindDouble_Click (object sender, EventArgs e) { - _findController.CreateRootNode(TagType.TAG_DOUBLE); + _findController.CreateNode(TagType.TAG_DOUBLE); } private void _tbFindString_Click (object sender, EventArgs e) { - _findController.CreateRootNode(TagType.TAG_STRING); + _findController.CreateNode(TagType.TAG_STRING); } #endregion @@ -76,64 +89,251 @@ namespace NBTExplorer.Windows private void _tbReplaceDelete_Click (object sender, EventArgs e) { - + _replaceController.DeleteSelection(); } private void _tbReplaceByte_Click (object sender, EventArgs e) { - _replaceController.CreateRootNode(TagType.TAG_BYTE); + _replaceController.CreateNode(TagType.TAG_BYTE); } private void _tbReplaceShort_Click (object sender, EventArgs e) { - _replaceController.CreateRootNode(TagType.TAG_SHORT); + _replaceController.CreateNode(TagType.TAG_SHORT); } private void _tbReplaceInt_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_INT); } private void _tbReplaceLong_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_LONG); } private void _tbReplaceFloat_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_FLOAT); } private void _tbReplaceDouble_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_DOUBLE); } private void _tbReplaceByteArray_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_BYTE_ARRAY); } private void _tbReplaceIntArray_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_INT_ARRAY); } private void _tbReplaceString_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_STRING); } private void _tbReplaceList_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_LIST); } private void _tbReplaceCompound_Click (object sender, EventArgs e) { - + _replaceController.CreateNode(TagType.TAG_COMPOUND); } #endregion + + private CancelSearchForm _searchForm; + private ContainerRuleSearchStateWin _searchState; + + private void _buttonFind_Click (object sender, EventArgs e) + { + if (_searchState == null) { + _searchState = new ContainerRuleSearchStateWin(_main) { + RuleTags = _findController.Root, + RootNode = _mainSearchRoot, + DiscoverCallback = SearchDiscoveryCallback, + CollapseCallback = SearchCollapseCallback, + EndCallback = SearchEndCallback, + }; + } + + SearchNextNode(); + } + + private void SearchNextNode () + { + if (_searchState == null) + return; + + SearchWorker worker = new SearchWorker(_searchState); + + 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) + { + _mainController.SelectNode(node); + _mainController.ExpandSelectedNode(); + + if (_searchForm != null) { + _searchForm.DialogResult = DialogResult.OK; + _searchForm = null; + } + + _currentFindNode = node; + } + + private void SearchCollapseCallback (DataNode node) + { + _mainController.CollapseBelow(node); + } + + private void SearchEndCallback (DataNode node) + { + if (_searchForm != null) { + _searchForm.DialogResult = DialogResult.OK; + _searchForm = null; + } + + MessageBox.Show("End of Results"); + } + + private DataNode _currentFindNode; + + private void _buttonReplace_Click (object sender, EventArgs e) + { + TagCompoundDataNode node = _currentFindNode as TagCompoundDataNode; + if (node == null) + return; + + foreach (TagDataNode rule in _findController.Root.Nodes) { + if (rule == null) + continue; + + foreach (TagDataNode ruleCandidate in node.Nodes) { + if (ruleCandidate == null) + continue; + + if (ruleCandidate.NodeName == rule.NodeName) { + ruleCandidate.DeleteNode(); + break; + } + } + } + + foreach (TagDataNode tag in _replaceController.Root.Nodes) { + if (tag == null) + continue; + + node.NamedTagContainer.AddTag(tag.Tag, tag.NodeName); + node.SyncTag(); + } + + _mainController.RefreshTreeNode(node); + } + + private void _tbFindEdit_Click (object sender, EventArgs e) + { + _findController.EditSelection(); + } + + private void _tbReplaceEdit_Click (object sender, EventArgs e) + { + _replaceController.EditSelection(); + } + } + + public abstract class ContainerRuleSearchState : ISearchState + { + public TagCompoundDataNode RuleTags { get; set; } + + public DataNode RootNode { get; set; } + public IEnumerator State { get; set; } + + public abstract void InvokeDiscoverCallback (DataNode node); + public abstract void InvokeProgressCallback (DataNode node); + public abstract void InvokeCollapseCallback (DataNode node); + public abstract void InvokeEndCallback (DataNode node); + + public bool TestNode (DataNode node) + { + if (RuleTags == null) + return false; + + TagCompoundDataNode tagNode = node as TagCompoundDataNode; + if (tagNode == null) + return false; + + foreach (TagDataNode rule in RuleTags.Nodes) { + TagNode matchTag = tagNode.NamedTagContainer.GetTagNode(rule.NodeName); + if (matchTag == null) + return false; + + TagNode ruleTag = rule.Tag; + if (ruleTag.GetTagType() != matchTag.GetTagType()) + return false; + + if (ruleTag.ToString() != matchTag.ToString()) + return false; + } + + return true; + } + } + + public class ContainerRuleSearchStateWin : ContainerRuleSearchState + { + private ContainerControl _sender; + + public ContainerRuleSearchStateWin (ContainerControl sender) + { + _sender = sender; + } + + public Action DiscoverCallback { get; set; } + public Action ProgressCallback { get; set; } + public Action CollapseCallback { get; set; } + public Action EndCallback { get; set; } + + public override void InvokeDiscoverCallback (DataNode node) + { + if (_sender != null && DiscoverCallback != null) + _sender.BeginInvoke(DiscoverCallback, new object[] { node }); + } + + public override void InvokeProgressCallback (DataNode node) + { + if (_sender != null && ProgressCallback != null) + _sender.BeginInvoke(ProgressCallback, new object[] { node }); + } + + public override void InvokeCollapseCallback (DataNode node) + { + if (_sender != null && CollapseCallback != null) + _sender.BeginInvoke(CollapseCallback, new object[] { node }); + } + + public override void InvokeEndCallback (DataNode node) + { + if (_sender != null && EndCallback != null) + _sender.BeginInvoke(EndCallback, new object[] { node }); + } } } diff --git a/Windows/FindReplace.resx b/Windows/FindReplace.resx index 82627dc..ad21b6b 100644 --- a/Windows/FindReplace.resx +++ b/Windows/FindReplace.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADK - NgAAAk1TRnQBSQFMAgEBEQEAATABAQEwAQEBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA + NgAAAk1TRnQBSQFMAgEBEQEAAVABAQFQAQEBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABUAMAAQEBAAEYBgABPNUAA/8D/AP6GPgD+QP6A/yWAAP+A/kD8QG6AaIBigG2AYYBVgG2AYYBVgG2 AYYBVgG2AYYBVgG2AYYBVgG2AYYBVgG2AYYBVgG2AYYBVgG8AaQBjQP3nwAB6AHfAdQBuQGJAVkB/AG4 ARwB/AGzAQ4B/AGzAQ0B/AGzAQwB/AGyAQsB/AGyAQsB/AGzAQ4BuQGJAVmlAAHpAd8B1QG+AY4BXQH3 @@ -365,63 +365,76 @@ 17, 17 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqG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3CFtYR/XoDQ1Zg/kBYQvrdRhJ - lBYasADjKkLPGMKVtTXFadYzjs30rMjKIsJzIsuop8AEGAOT8yJL1OhBPQOY6X0D2A2D0YARrENgEFBz - gPdLd4N+31fta/gB8I2yXiCOQTQAAAAASUVORK5CYII= + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFYSURBVDhPzZG9SwNBEMXnL1BOc4KoAcFoF4houpSBFIEU + aSxC1CCkPVIkvYJWFtooWEQCfiLYCIqFlVidYCEo2IqFja1YOL633AbxjrvWgx+7M++92WNX5F99JyKl + UxGf698fi9OM9xChI4S101GurO0Qq316XkjrH9RD6Lvd1sdyWb9aLWUNSgH+e6NhtNdazWihq+vCvA/h + o9nUm3xe3+p1ZU2eKhXTuy8WTY/eyLvfgwD8l2pVL7NZvSsU9DqX067r6nE6rdToiX24XRh2YLzIZLTn + OIaDVErZo5b46lswbcN8jlPPELawRy12wCYMwL9CMApq9EQOWYewAcMtwhbWUT16Q0NWYX5A2MJ6DUYS + pYUGLMDoIfSMIVxZW1OcZj3j2EzPiqwsIjwnsox6CkyAMTA5L7JEjR7UM4CZ/jeA3TAYDRjBOgQGATUH + uL/0VNBPfNVEww/s+bJaSKBvAQAAAABJRU5ErkJggg== iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJLSURBVDhPzZLbT5JxHMbfVVdd5KmaedHaqo01u8ncvKmL - WnjRljfZcEvbXLOWm4UL7GCBtbIEO3FqDJumliAMEhL3ohhLiciR5siQlzgripRAtC666Pe4t63+gnq3 - z77PnsMLG1DUf/OUtdjy9gnpCnKryi7RNbiVoplj4E+P7eT99cVJYXvlzfHagcmoMpT8PpJM//D0j36Z - ON2+lAbQ8JChgy42ay/BJx8R2095I2l9eCVnDy7n6MnZr66aViYjN6TCABoeMnTQxQZbau8F84Fex2cl - CW3MYtZK7miTZ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S + pYUGLMDoIfSMIVxZW1OcZj3j2EzPiqwsIjwnsox6CkyAMTA5L7JEjR7UM4CZ/jeA3TAYDRjBOgQGATUH + uL/0VNBPfNVEww/s+bJaSKBvAQAAAABJRU5ErkJggg== @@ -629,10 +655,10 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADjSURBVDhPY2AYtiCMkZFxGsx3UHYYsb6NAGqYCVQshqRB - DCoWQciQKKDCOUBF4mWpd2eWp939D8IgNkgMKheFy5AYoIIFIIUwBYUJN2YWJt64iaQBZAhITQy6IQZA - iT1AQQNkiayICzMzI88jGwCSxqoWJJEINGQlkJaEGZIUeHxmYuBxZAMkoWoScXkjGahgHciQSM/9M6M8 + DCoWQciQKKDCOUBF4mWpd2eWp939D8IgNkgMKheFy5AYoIIFIIUwBYUJN2bmJd64iaQBZAhITQy6IQZA + iT1AQQNkiayICzMzIs8gGwCSxqoWJJEINGQlkJaEGZIUeGxmYuBRZAMkoWoScXkjGahgHciQCM/9M6M8 D/wHYRAbJAaVSyYUkOlAhduAiqSRFEpDxdLxaWYBSvJCA7ERSB8HYj4g5oeyG4C0BJQPUosBkA0AhYMI - kgHC0LDBawAhrw1SeQBwVTXst7jVFQAAAABJRU5ErkJggg== + kgHC0LDBawAhrw1SeQBXfTXgL01i9wAAAABJRU5ErkJggg== @@ -656,13 +682,13 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFySURBVDhPY2CgBthfz8CyP4kl40AiczcM19sznEHGyHIg - tSA9cLv3xrErn67WXPp+T+f/d7s7wHh2hikKhomD1IDUgvTADdiVwOx+c4rPEWQDlpc4/ofhJYV2cINB - akBqQXrgBuyIZ8m9vyz7wbPNDf9heEuj338YXlftARcHyYPUgvTADdgawzz1763lf//fXfUfhu+uKgcy + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFySURBVDhPY2CgBthfz8CyP4kl40AiczcM19sxnEHGyHIg + tSA9cLv3xrErn6rWXPp+T+f/d7s7wHh2hikKhomD1IDUgvTADdiVwOx+c4r3EWQDlpc4/ofhJYV2cINB + akBqQXrgBuyIZ8m9vyz7wbPNDf9heEuj338YXlftARcHyYPUgvTADdgawzz157Xlf//fXfUfhu+uKgcy IfjMzDS4OEgepBakB27A5ijmGT8vzf//+cRUON7dEfofhjc3+KLIgdSC9MAN2BDFPPvbudn/PxyZCMcg zavKXcCGLCt2QJEDqQXpgRuwOoJ5/qeT0/6/2d8DxyDNID6MRpYDqQXpgRuwPIx58btD/f9f7monCoPU gvTADVgSwrjsFTDun25tIgqD1IL0wA2YH8C4+smWxv8PN9QShUFqQXrgBkzxZNzxYF31//trq4jCILUg - PTAD5FKNGee1uTAeJQWD9AANkAMZwg/E4kAsRSIG6QHppQwAAMsf3cD9cMK9AAAAAElFTkSuQmCC + PTAD5FKNGee1uTAeJQWD9AANkAMZwg/E4kAsRSIG6QHppQwAAIR13ahrUo3PAAAAAElFTkSuQmCC \ No newline at end of file diff --git a/Windows/MainForm.Designer.cs b/Windows/MainForm.Designer.cs index 3f9069d..2ced6d5 100644 --- a/Windows/MainForm.Designer.cs +++ b/Windows/MainForm.Designer.cs @@ -31,40 +31,48 @@ 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._menuItemRefresh = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this._menuItemRecentFiles = new System.Windows.Forms.ToolStripMenuItem(); this._menuItemRecentFolders = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator8 = 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.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); + this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this._menuItemAbout = new System.Windows.Forms.ToolStripMenuItem(); this._nodeTree = new NBTExplorer.Vendor.MultiSelectTreeView.MultiSelectTreeView(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - 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._buttonOpen = new System.Windows.Forms.ToolStripButton(); this._buttonOpenFolder = new System.Windows.Forms.ToolStripButton(); this._buttonSave = new System.Windows.Forms.ToolStripButton(); this._buttonRefresh = 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(); @@ -76,23 +84,18 @@ 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._menuItemOpen = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemOpenFolder = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemSave = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemRefresh = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemExit = 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._menuItemRename = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemEditValue = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemDelete = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemFind = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemFindNext = new System.Windows.Forms.ToolStripMenuItem(); - this._menuItemAbout = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); - this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + 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._menuItemMoveUp = new System.Windows.Forms.ToolStripMenuItem(); + this._menuItemMoveDown = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); this.menuStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); @@ -129,6 +132,23 @@ 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"; @@ -140,6 +160,23 @@ 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"; + // + // _menuItemRefresh + // + this._menuItemRefresh.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemRefresh.Image"))); + this._menuItemRefresh.Name = "_menuItemRefresh"; + this._menuItemRefresh.ShortcutKeys = System.Windows.Forms.Keys.F5; + this._menuItemRefresh.Size = new System.Drawing.Size(223, 22); + this._menuItemRefresh.Text = "Refresh"; + this._menuItemRefresh.Click += new System.EventHandler(this.refreshToolStripMenuItem_Click); + // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; @@ -162,6 +199,14 @@ this.toolStripSeparator8.Name = "toolStripSeparator8"; this.toolStripSeparator8.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[] { @@ -171,15 +216,67 @@ this.toolStripSeparator7, this._menuItemRename, this._menuItemEditValue, - this._menuItemDelete}); + this._menuItemDelete, + this.toolStripSeparator10, + this._menuItemMoveUp, + this._menuItemMoveDown}); this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Up))); 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(203, 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(203, 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(203, 22); + this._menuItemPaste.Text = "&Paste"; + // // toolStripSeparator7 // this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(163, 6); + this.toolStripSeparator7.Size = new System.Drawing.Size(200, 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(203, 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(203, 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(203, 22); + this._menuItemDelete.Text = "&Delete"; // // searchToolStripMenuItem // @@ -192,6 +289,35 @@ 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(167, 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(167, 22); + this._menuItemFindNext.Text = "Find &Next"; + // + // toolStripSeparator9 + // + this.toolStripSeparator9.Name = "toolStripSeparator9"; + this.toolStripSeparator9.Size = new System.Drawing.Size(164, 6); + // + // replaceToolStripMenuItem + // + this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem"; + this.replaceToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H))); + this.replaceToolStripMenuItem.Size = new System.Drawing.Size(167, 22); + this.replaceToolStripMenuItem.Text = "&Replace..."; + this.replaceToolStripMenuItem.Click += new System.EventHandler(this.replaceToolStripMenuItem_Click); + // // helpToolStripMenuItem // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -200,6 +326,14 @@ 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; @@ -213,6 +347,7 @@ this._nodeTree.Margin = new System.Windows.Forms.Padding(0); this._nodeTree.Name = "_nodeTree"; this._nodeTree.SelectedImageIndex = 0; + this._nodeTree.SelectedNodes = ((System.Collections.Generic.List)(resources.GetObject("_nodeTree.SelectedNodes"))); this._nodeTree.Size = new System.Drawing.Size(619, 374); this._nodeTree.TabIndex = 0; // @@ -272,75 +407,6 @@ this.toolStrip1.Stretch = true; this.toolStrip1.TabIndex = 0; // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // toolStripSeparator6 - // - this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); - // - // toolStripSeparator5 - // - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); - // - // 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"; - // // _buttonOpen // this._buttonOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -378,6 +444,11 @@ this._buttonRefresh.Text = "Refresh Content From Disk"; this._buttonRefresh.Click += new System.EventHandler(this._buttonRefresh_Click); // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // // _buttonCut // this._buttonCut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -405,6 +476,11 @@ 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; @@ -432,6 +508,11 @@ 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; @@ -532,6 +613,11 @@ 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; @@ -541,132 +627,77 @@ this._buttonFindNext.Size = new System.Drawing.Size(23, 22); this._buttonFindNext.Text = "Find / Find Next"; // - // _menuItemOpen + // BottomToolStripPanel // - 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..."; + 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); // - // _menuItemOpenFolder + // TopToolStripPanel // - 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..."; + 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); // - // _menuItemSave + // RightToolStripPanel // - 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"; + 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); // - // _menuItemRefresh + // LeftToolStripPanel // - this._menuItemRefresh.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemRefresh.Image"))); - this._menuItemRefresh.Name = "_menuItemRefresh"; - this._menuItemRefresh.ShortcutKeys = System.Windows.Forms.Keys.F5; - this._menuItemRefresh.Size = new System.Drawing.Size(223, 22); - this._menuItemRefresh.Text = "Refresh"; - this._menuItemRefresh.Click += new System.EventHandler(this.refreshToolStripMenuItem_Click); + 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); // - // _menuItemExit + // ContentPanel // - 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"; + this.ContentPanel.Size = new System.Drawing.Size(562, 376); // - // _menuItemCut + // contextMenuStrip1 // - 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"; + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.testToolStripMenuItem}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(97, 26); // - // _menuItemCopy + // testToolStripMenuItem // - 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"; + this.testToolStripMenuItem.Name = "testToolStripMenuItem"; + this.testToolStripMenuItem.Size = new System.Drawing.Size(96, 22); + this.testToolStripMenuItem.Text = "Test"; // - // _menuItemPaste + // _menuItemMoveUp // - 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"; + this._menuItemMoveUp.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemMoveUp.Image"))); + this._menuItemMoveUp.Name = "_menuItemMoveUp"; + this._menuItemMoveUp.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Up))); + this._menuItemMoveUp.Size = new System.Drawing.Size(203, 22); + this._menuItemMoveUp.Text = "Move &Up"; + this._menuItemMoveUp.Click += new System.EventHandler(this._menuItemMoveUp_Click); // - // _menuItemRename + // _menuItemMoveDown // - 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"; + this._menuItemMoveDown.Image = ((System.Drawing.Image)(resources.GetObject("_menuItemMoveDown.Image"))); + this._menuItemMoveDown.Name = "_menuItemMoveDown"; + this._menuItemMoveDown.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Down))); + this._menuItemMoveDown.Size = new System.Drawing.Size(203, 22); + this._menuItemMoveDown.Text = "Move Do&wn"; + this._menuItemMoveDown.Click += new System.EventHandler(this._menuItemMoveDown_Click); // - // _menuItemEditValue + // toolStripSeparator10 // - 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"; - // - // _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(167, 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(167, 22); - this._menuItemFindNext.Text = "Find &Next"; - // - // _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"; - // - // toolStripSeparator9 - // - this.toolStripSeparator9.Name = "toolStripSeparator9"; - this.toolStripSeparator9.Size = new System.Drawing.Size(164, 6); - // - // replaceToolStripMenuItem - // - this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem"; - this.replaceToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H))); - this.replaceToolStripMenuItem.Size = new System.Drawing.Size(167, 22); - this.replaceToolStripMenuItem.Text = "&Replace..."; - this.replaceToolStripMenuItem.Click += new System.EventHandler(this.replaceToolStripMenuItem_Click); + this.toolStripSeparator10.Name = "toolStripSeparator10"; + this.toolStripSeparator10.Size = new System.Drawing.Size(200, 6); // // MainForm // @@ -757,6 +788,9 @@ private System.Windows.Forms.ToolStripMenuItem _menuItemRefresh; private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; private System.Windows.Forms.ToolStripMenuItem replaceToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator10; + private System.Windows.Forms.ToolStripMenuItem _menuItemMoveUp; + private System.Windows.Forms.ToolStripMenuItem _menuItemMoveDown; } } diff --git a/Windows/MainForm.cs b/Windows/MainForm.cs index 9777a2d..d3e596c 100644 --- a/Windows/MainForm.cs +++ b/Windows/MainForm.cs @@ -8,13 +8,17 @@ using System.Windows.Forms; using NBTExplorer.Model; using NBTExplorer.Properties; using Substrate.Nbt; +using NBTExplorer.Controllers; namespace NBTExplorer.Windows { + using Predicates = NodeTreeController.Predicates; + public partial class MainForm : Form { private static Dictionary _tagIconIndex; + private NodeTreeController _controller; private IconRegistry _iconRegistry; private string _openFolderPath = null; @@ -47,6 +51,10 @@ namespace NBTExplorer.Windows FormHandlers.Register(); NbtClipboardController.Initialize(new NbtClipboardControllerWin()); + _controller = new NodeTreeController(_nodeTree); + _controller.ConfirmAction += _controller_ConfirmAction; + _controller.SelectionInvalidated += _controller_SelectionInvalidated; + FormClosing += MainForm_Closing; _nodeTree.BeforeExpand += _nodeTree_BeforeExpand; @@ -165,31 +173,13 @@ namespace NBTExplorer.Windows private void OpenPaths (string[] paths) { - _nodeTree.Nodes.Clear(); + _controller.OpenPaths(paths); foreach (string path in paths) { - if (Directory.Exists(path)) { - DirectoryDataNode node = new DirectoryDataNode(path); - _nodeTree.Nodes.Add(CreateUnexpandedNode(node)); - + if (Directory.Exists(path)) 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(); + else if (File.Exists(path)) + AddPathToHistory(Settings.Default.RecentFiles, path); } UpdateUI(); @@ -266,533 +256,27 @@ namespace NBTExplorer.Windows 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); + _controller.MoveSelectionUp(); } 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); + _controller.MoveSelectionDown(); } 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)); + _controller.ExpandNode(node); } 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 DeleteNode (IList nodes) - { - bool? elideChildren = null; - if (!CanOperateOnNodesEx(nodes, DeleteNodePred, out elideChildren)) - return; - - if (elideChildren == true) - nodes = ElideChildren(nodes); - - foreach (TreeNode node in nodes) { - DataNode dataNode = node.Tag as DataNode; - if (dataNode.DeleteNode()) { - UpdateNodeText(node.Parent); - node.Remove(); - } - } - - UpdateUI(); - } - - /*private bool CanDeleteNodes (IList nodes) - { - bool? elideChildren = null; - return CanDeleteNodesEx(nodes, out elideChildren); - } - - private bool CanDeleteNodesEx (IList nodes, out bool? elideChildren) - { - GroupCapabilities caps = GroupCapabilities.All; - elideChildren = null; - - foreach (TreeNode node in nodes) { - if (node == null || !(node.Tag is DataNode)) - return false; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanDeleteNode) - return false; - - caps &= dataNode.DeleteNodeCapabilities; - - bool elideChildrenFlag = (dataNode.DeleteNodeCapabilities & GroupCapabilities.ElideChildren) == GroupCapabilities.ElideChildren; - if (elideChildren == null) - elideChildren = elideChildrenFlag; - if (elideChildren != elideChildrenFlag) - return false; - } - - if (nodes.Count > 1 && !SufficientCapabilities(nodes, caps)) - return false; - - return true; - }*/ - - delegate bool DataNodePredicate (DataNode dataNode, out GroupCapabilities caps); - - private bool CreateByteNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_BYTE); - } - - private bool CreateShortNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_SHORT); - } - - private bool CreateIntNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_INT); - } - - private bool CreateLongNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LONG); - } - - private bool CreateFloatNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_FLOAT); - } - - private bool CreateDoubleNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_DOUBLE); - } - - private bool CreateByteArrayNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_BYTE_ARRAY); - } - - private bool CreateIntArrayNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_INT_ARRAY); - } - - private bool CreateStringNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_STRING); - } - - private bool CreateListNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LIST); - } - - private bool CreateCompoundNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_COMPOUND); - } - - private bool RenameNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.RenameNodeCapabilities; - return (dataNode != null) && dataNode.CanRenameNode; - } - - private bool EditNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.EditNodeCapabilities; - return (dataNode != null) && dataNode.CanEditNode; - } - - private bool DeleteNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.DeleteNodeCapabilities; - return (dataNode != null) && dataNode.CanDeleteNode; - } - - private bool CutNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.CutNodeCapabilities; - return (dataNode != null) && dataNode.CanCutNode; - } - - private bool CopyNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.CopyNodeCapabilities; - return (dataNode != null) && dataNode.CanCopyNode; - } - - private bool PasteIntoNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.PasteIntoNodeCapabilities; - return (dataNode != null) && dataNode.CanPasteIntoNode; - } - - private bool SearchNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.SearchNodeCapabilites; - return (dataNode != null) && dataNode.CanSearchNode; - } - - private bool ReorderNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.ReorderNodeCapabilities; - return (dataNode != null) && dataNode.CanReoderNode; - } - - private bool RefreshNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = dataNode.RefreshNodeCapabilites; - return (dataNode != null) && dataNode.CanRefreshNode; - } - - /*private bool CreateTagNodePred (DataNode dataNode, out GroupCapabilities caps) - { - caps = GroupCapabilities.Single; - return (dataNode != null) && dataNode.CanCreateTag - }*/ - - private bool CanOperateOnNodes (IList nodes, DataNodePredicate pred) - { - bool? elideChildren = null; - return CanOperateOnNodesEx(nodes, pred, out elideChildren); - } - - private bool CanOperateOnNodesEx (IList nodes, DataNodePredicate pred, out bool? elideChildren) - { - GroupCapabilities caps = GroupCapabilities.All; - elideChildren = null; - - foreach (TreeNode node in nodes) { - if (node == null || !(node.Tag is DataNode)) - return false; - - DataNode dataNode = node.Tag as DataNode; - GroupCapabilities dataCaps; - if (!pred(dataNode, out dataCaps)) - return false; - - caps &= dataCaps; - - bool elideChildrenFlag = (dataNode.DeleteNodeCapabilities & GroupCapabilities.ElideChildren) == GroupCapabilities.ElideChildren; - if (elideChildren == null) - elideChildren = elideChildrenFlag; - if (elideChildren != elideChildrenFlag) - return false; - } - - if (nodes.Count > 1 && !SufficientCapabilities(nodes, caps)) - return false; - - return true; - } - - private IList ElideChildren (IList nodes) - { - List filtered = new List(); - - foreach (TreeNode node in nodes) { - TreeNode parent = node.Parent; - bool foundParent = false; - - while (parent != null) { - if (nodes.Contains(parent)) { - foundParent = true; - break; - } - parent = parent.Parent; - } - - if (!foundParent) - filtered.Add(node); - } - - return filtered; - } - - private bool CommonContainer (IEnumerable nodes) - { - object container = null; - foreach (TreeNode node in nodes) { - DataNode dataNode = node.Tag as DataNode; - if (container == null) - container = dataNode.Parent; - - if (container != dataNode.Parent) - return false; - } - - return true; - } - - private bool CommonType (IEnumerable nodes) - { - Type datatype = null; - foreach (TreeNode node in nodes) { - DataNode dataNode = node.Tag as DataNode; - if (datatype == null) - datatype = dataNode.GetType(); - - if (datatype != dataNode.GetType()) - return false; - } - - return true; - } - - private bool SufficientCapabilities (IEnumerable nodes, GroupCapabilities commonCaps) - { - bool commonContainer = CommonContainer(nodes); - bool commonType = CommonType(nodes); - - bool pass = true; - if (commonContainer && commonType) - pass &= ((commonCaps & GroupCapabilities.SiblingSameType) == GroupCapabilities.SiblingSameType); - else if (commonContainer && !commonType) - pass &= ((commonCaps & GroupCapabilities.SiblingMixedType) == GroupCapabilities.SiblingMixedType); - else if (!commonContainer && commonType) - pass &= ((commonCaps & GroupCapabilities.MultiSameType) == GroupCapabilities.MultiSameType); - else if (!commonContainer && !commonType) - pass &= ((commonCaps & GroupCapabilities.MultiMixedType) == GroupCapabilities.MultiMixedType); - - return pass; - } - - 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 RefreshNode (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (!dataNode.CanRefreshNode) - return; - - if (!ConfirmAction("Refresh data anyway?")) - return; - - if (dataNode.RefreshNode()) { - RefreshChildNodes(node, dataNode); - UpdateUI(dataNode); - ExpandToEdge(node); - } - } - - private void ExpandToEdge (TreeNode node) - { - if (node == null || !(node.Tag is DataNode)) - return; - - DataNode dataNode = node.Tag as DataNode; - if (dataNode.IsExpanded) { - if (!node.IsExpanded) - node.Expand(); - - foreach (TreeNode child in node.Nodes) - ExpandToEdge(child); - } - } - - private void Save () - { - foreach (TreeNode node in _nodeTree.Nodes) { - DataNode dataNode = node.Tag as DataNode; - if (dataNode != null) - dataNode.Save(); - } - - UpdateUI(); + _controller.CollapseNode(node); } private bool ConfirmExit () { - if (CheckModifications()) { + if (_controller.CheckModifications()) { if (MessageBox.Show("You currently have unsaved changes. Close anyway?", "Unsaved Changes", MessageBoxButtons.OKCancel) != DialogResult.OK) return false; } @@ -802,7 +286,7 @@ namespace NBTExplorer.Windows private bool ConfirmAction (string actionMessage) { - if (CheckModifications()) { + if (_controller.CheckModifications()) { if (MessageBox.Show("You currently have unsaved changes. " + actionMessage, "Unsaved Changes", MessageBoxButtons.OKCancel) != DialogResult.OK) return false; } @@ -810,6 +294,14 @@ namespace NBTExplorer.Windows return true; } + private void _controller_ConfirmAction (object sender, MessageBoxEventArgs e) + { + if (_controller.CheckModifications()) { + if (MessageBox.Show("You currently have unsaved changes. " + e.Message, "Unsaved Changes", MessageBoxButtons.OKCancel) != DialogResult.OK) + e.Cancel = true; + } + } + private CancelSearchForm _searchForm; private SearchStateWin _searchState; @@ -858,9 +350,9 @@ namespace NBTExplorer.Windows t.Join(); } - private void SearchDiscoveryCallback (DataNode node) + public void SearchDiscoveryCallback (DataNode node) { - _nodeTree.SelectedNode = FindFrontNode(node); + _controller.SelectNode(node); if (_searchForm != null) { _searchForm.DialogResult = DialogResult.OK; @@ -868,108 +360,21 @@ namespace NBTExplorer.Windows } } - private void SearchCollapseCallback (DataNode node) + public void SearchCollapseCallback (DataNode node) { - CollapseBelow(node); + _controller.CollapseBelow(node); } - private void SearchEndCallback (DataNode node) + public void SearchEndCallback (DataNode node) { - _searchForm.DialogResult = DialogResult.OK; - _searchForm = null; + if (_searchForm != null) { + _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; @@ -985,11 +390,11 @@ namespace NBTExplorer.Windows _buttonAddTagString, _buttonCopy, _buttonCut, _buttonDelete, _buttonEdit, _buttonPaste, _buttonRefresh, _buttonRename); - _buttonSave.Enabled = CheckModifications(); + _buttonSave.Enabled = _controller.CheckModifications(); _buttonFindNext.Enabled = false; DisableMenuItems(_menuItemCopy, _menuItemCut, _menuItemDelete, _menuItemEditValue, _menuItemPaste, _menuItemRefresh, - _menuItemRename); + _menuItemRename, _menuItemMoveUp, _menuItemMoveDown); _menuItemSave.Enabled = _buttonSave.Enabled; _menuItemFind.Enabled = false; @@ -1026,7 +431,7 @@ namespace NBTExplorer.Windows _buttonAddTagShort.Enabled = node.CanCreateTag(TagType.TAG_SHORT); _buttonAddTagString.Enabled = node.CanCreateTag(TagType.TAG_STRING); - _buttonSave.Enabled = CheckModifications(); + _buttonSave.Enabled = _controller.CheckModifications(); _buttonCopy.Enabled = node.CanCopyNode && NbtClipboardController.IsInitialized; _buttonCut.Enabled = node.CanCutNode && NbtClipboardController.IsInitialized; _buttonDelete.Enabled = node.CanDeleteNode; @@ -1047,45 +452,50 @@ namespace NBTExplorer.Windows _menuItemRefresh.Enabled = node.CanRefreshNode; _menuItemFind.Enabled = node.CanSearchNode; _menuItemFindNext.Enabled = _searchState != null; + _menuItemMoveUp.Enabled = node.CanMoveNodeUp; + _menuItemMoveDown.Enabled = node.CanMoveNodeDown; UpdateUI(_nodeTree.SelectedNodes); } private void UpdateUI (IList nodes) { + if (nodes == null) return; - _buttonAddTagByte.Enabled = CanOperateOnNodes(nodes, CreateByteNodePred); - _buttonAddTagShort.Enabled = CanOperateOnNodes(nodes, CreateShortNodePred); - _buttonAddTagInt.Enabled = CanOperateOnNodes(nodes, CreateIntNodePred); - _buttonAddTagLong.Enabled = CanOperateOnNodes(nodes, CreateLongNodePred); - _buttonAddTagFloat.Enabled = CanOperateOnNodes(nodes, CreateFloatNodePred); - _buttonAddTagDouble.Enabled = CanOperateOnNodes(nodes, CreateDoubleNodePred); - _buttonAddTagByteArray.Enabled = CanOperateOnNodes(nodes, CreateByteArrayNodePred); - _buttonAddTagIntArray.Enabled = CanOperateOnNodes(nodes, CreateIntArrayNodePred); - _buttonAddTagString.Enabled = CanOperateOnNodes(nodes, CreateStringNodePred); - _buttonAddTagList.Enabled = CanOperateOnNodes(nodes, CreateListNodePred); - _buttonAddTagCompound.Enabled = CanOperateOnNodes(nodes, CreateCompoundNodePred); + _buttonAddTagByte.Enabled = _controller.CanOperateOnSelection(Predicates.CreateByteNodePred); + _buttonAddTagShort.Enabled = _controller.CanOperateOnSelection(Predicates.CreateShortNodePred); + _buttonAddTagInt.Enabled = _controller.CanOperateOnSelection(Predicates.CreateIntNodePred); + _buttonAddTagLong.Enabled = _controller.CanOperateOnSelection(Predicates.CreateLongNodePred); + _buttonAddTagFloat.Enabled = _controller.CanOperateOnSelection(Predicates.CreateFloatNodePred); + _buttonAddTagDouble.Enabled = _controller.CanOperateOnSelection(Predicates.CreateDoubleNodePred); + _buttonAddTagByteArray.Enabled = _controller.CanOperateOnSelection(Predicates.CreateByteArrayNodePred); + _buttonAddTagIntArray.Enabled = _controller.CanOperateOnSelection(Predicates.CreateIntArrayNodePred); + _buttonAddTagString.Enabled = _controller.CanOperateOnSelection(Predicates.CreateStringNodePred); + _buttonAddTagList.Enabled = _controller.CanOperateOnSelection(Predicates.CreateListNodePred); + _buttonAddTagCompound.Enabled = _controller.CanOperateOnSelection(Predicates.CreateCompoundNodePred); - _buttonSave.Enabled = CheckModifications(); - _buttonRename.Enabled = CanOperateOnNodes(nodes, RenameNodePred); - _buttonEdit.Enabled = CanOperateOnNodes(nodes, EditNodePred); - _buttonDelete.Enabled = CanOperateOnNodes(nodes, DeleteNodePred); - _buttonCut.Enabled = CanOperateOnNodes(nodes, CutNodePred) && NbtClipboardController.IsInitialized; ; - _buttonCopy.Enabled = CanOperateOnNodes(nodes, CopyNodePred) && NbtClipboardController.IsInitialized; ; - _buttonPaste.Enabled = CanOperateOnNodes(nodes, PasteIntoNodePred) && NbtClipboardController.IsInitialized; ; - _buttonFindNext.Enabled = CanOperateOnNodes(nodes, SearchNodePred) || _searchState != null; - _buttonRefresh.Enabled = CanOperateOnNodes(nodes, RefreshNodePred); + _buttonSave.Enabled = _controller.CheckModifications(); + _buttonRename.Enabled = _controller.CanOperateOnSelection(Predicates.RenameNodePred); + _buttonEdit.Enabled = _controller.CanOperateOnSelection(Predicates.EditNodePred); + _buttonDelete.Enabled = _controller.CanOperateOnSelection(Predicates.DeleteNodePred); + _buttonCut.Enabled = _controller.CanOperateOnSelection(Predicates.CutNodePred) && NbtClipboardController.IsInitialized; ; + _buttonCopy.Enabled = _controller.CanOperateOnSelection(Predicates.CopyNodePred) && NbtClipboardController.IsInitialized; ; + _buttonPaste.Enabled = _controller.CanOperateOnSelection(Predicates.PasteIntoNodePred) && NbtClipboardController.IsInitialized; ; + _buttonFindNext.Enabled = _controller.CanOperateOnSelection(Predicates.SearchNodePred) || _searchState != null; + _buttonRefresh.Enabled = _controller.CanOperateOnSelection(Predicates.RefreshNodePred); _menuItemSave.Enabled = _buttonSave.Enabled; _menuItemRename.Enabled = _buttonRename.Enabled; _menuItemEditValue.Enabled = _buttonEdit.Enabled; _menuItemDelete.Enabled = _buttonDelete.Enabled; + _menuItemMoveUp.Enabled = _controller.CanOperateOnSelection(Predicates.MoveNodeUpPred); + _menuItemMoveDown.Enabled = _controller.CanOperateOnSelection(Predicates.MoveNodeDownPred); _menuItemCut.Enabled = _buttonCut.Enabled; _menuItemCopy.Enabled = _buttonCopy.Enabled; _menuItemPaste.Enabled = _buttonPaste.Enabled; - _menuItemFind.Enabled = CanOperateOnNodes(nodes, SearchNodePred); + _menuItemFind.Enabled = _controller.CanOperateOnSelection(Predicates.SearchNodePred); _menuItemRefresh.Enabled = _buttonRefresh.Enabled; _menuItemFindNext.Enabled = _searchState != null; } @@ -1106,6 +516,11 @@ namespace NBTExplorer.Windows _menuItemRecentFiles.DropDown = BuildRecentEntriesDropDown(Settings.Default.RecentFiles); } + private void _controller_SelectionInvalidated (object sender, EventArgs e) + { + UpdateUI(); + } + private ToolStripDropDown BuildRecentEntriesDropDown (StringCollection list) { if (list == null || list.Count == 0) @@ -1146,15 +561,6 @@ namespace NBTExplorer.Windows return caps; } - public void ActionDeleteNode () - { - DeleteNode(_nodeTree.SelectedNodes); - - _nodeTree.SelectedNodes.Clear(); - _nodeTree.SelectedNode = null; - UpdateUI(); - } - #region Event Handlers private void MainForm_Closing (object sender, CancelEventArgs e) @@ -1185,7 +591,7 @@ namespace NBTExplorer.Windows private void _nodeTree_NodeMouseDoubleClick (object sender, TreeNodeMouseClickEventArgs e) { - EditNode(e.Node); + _controller.EditNode(e.Node); } private void _nodeTree_NodeMouseClick (object sender, TreeNodeMouseClickEventArgs e) @@ -1221,92 +627,92 @@ namespace NBTExplorer.Windows private void _buttonSave_Click (object sender, EventArgs e) { - Save(); + _controller.Save(); } private void _buttonEdit_Click (object sender, EventArgs e) { - EditNode(_nodeTree.SelectedNode); + _controller.EditSelection(); } private void _buttonRename_Click (object sender, EventArgs e) { - RenameNode(_nodeTree.SelectedNode); + _controller.RenameSelection(); } private void _buttonDelete_Click (object sender, EventArgs e) { - ActionDeleteNode(); + _controller.DeleteSelection(); } private void _buttonCopy_Click (object sernder, EventArgs e) { - CopyNode(_nodeTree.SelectedNode); + _controller.CopySelection(); } private void _buttonCut_Click (object sernder, EventArgs e) { - CutNode(_nodeTree.SelectedNode); + _controller.CutSelection(); } private void _buttonPaste_Click (object sernder, EventArgs e) { - PasteNode(_nodeTree.SelectedNode); + _controller.PasteIntoSelection(); } private void _buttonAddTagByteArray_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_BYTE_ARRAY); + _controller.CreateNode(TagType.TAG_BYTE_ARRAY); } private void _buttonAddTagByte_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_BYTE); + _controller.CreateNode(TagType.TAG_BYTE); } private void _buttonAddTagCompound_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_COMPOUND); + _controller.CreateNode(TagType.TAG_COMPOUND); } private void _buttonAddTagDouble_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_DOUBLE); + _controller.CreateNode(TagType.TAG_DOUBLE); } private void _buttonAddTagFloat_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_FLOAT); + _controller.CreateNode(TagType.TAG_FLOAT); } private void _buttonAddTagInt_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_INT); + _controller.CreateNode(TagType.TAG_INT); } private void _buttonAddTagIntArray_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_INT_ARRAY); + _controller.CreateNode(TagType.TAG_INT_ARRAY); } private void _buttonAddTagList_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_LIST); + _controller.CreateNode(TagType.TAG_LIST); } private void _buttonAddTagLong_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_LONG); + _controller.CreateNode(TagType.TAG_LONG); } private void _buttonAddTagShort_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_SHORT); + _controller.CreateNode(TagType.TAG_SHORT); } private void _buttonAddTagString_Click (object sender, EventArgs e) { - CreateNode(_nodeTree.SelectedNode, TagType.TAG_STRING); + _controller.CreateNode(TagType.TAG_STRING); } private void _buttonFindNext_Click (object sender, EventArgs e) @@ -1319,7 +725,7 @@ namespace NBTExplorer.Windows private void _buttonRefresh_Click (object sender, EventArgs e) { - RefreshNode(_nodeTree.SelectedNode); + _controller.RefreshSelection(); } #endregion @@ -1343,7 +749,7 @@ namespace NBTExplorer.Windows private void _menuItemSave_Click (object sender, EventArgs e) { - Save(); + _controller.Save(); } private void _menuItemExit_Click (object sender, EventArgs e) @@ -1354,32 +760,32 @@ namespace NBTExplorer.Windows private void _menuItemEditValue_Click (object sender, EventArgs e) { - EditNode(_nodeTree.SelectedNode); + _controller.EditSelection(); } private void _menuItemRename_Click (object sender, EventArgs e) { - RenameNode(_nodeTree.SelectedNode); + _controller.RenameSelection(); } private void _menuItemDelete_Click (object sender, EventArgs e) { - ActionDeleteNode(); + _controller.DeleteSelection(); } private void _menuItemCopy_Click (object sender, EventArgs e) { - CopyNode(_nodeTree.SelectedNode); + _controller.CopySelection(); } private void _menuItemCut_Click (object sender, EventArgs e) { - CutNode(_nodeTree.SelectedNode); + _controller.CutSelection(); } private void _menuItemPaste_Click (object sender, EventArgs e) { - PasteNode(_nodeTree.SelectedNode); + _controller.PasteIntoSelection(); } private void _menuItemFind_Click (object sender, EventArgs e) @@ -1408,13 +814,23 @@ namespace NBTExplorer.Windows private void refreshToolStripMenuItem_Click (object sender, EventArgs e) { - RefreshNode(_nodeTree.SelectedNode); + _controller.RefreshSelection(); } private void replaceToolStripMenuItem_Click (object sender, EventArgs e) { - Form form = new FindReplace(); - form.ShowDialog(); + Form form = new FindReplace(this, _controller, _nodeTree.SelectedNode.Tag as DataNode); + form.Show(); + } + + private void _menuItemMoveUp_Click (object sender, EventArgs e) + { + _controller.MoveSelectionUp(); + } + + private void _menuItemMoveDown_Click (object sender, EventArgs e) + { + _controller.MoveSelectionDown(); } #endregion diff --git a/Windows/MainForm.resx b/Windows/MainForm.resx index 40cbbca..281f9fd 100644 --- a/Windows/MainForm.resx +++ b/Windows/MainForm.resx @@ -121,6 +121,217 @@ 17, 17 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAACCUlEQVQ4T6VSPWgTYRh+v/0Q + RUQ9DcJBfk6QG8IV6pJkyBASl8SlpFt0cglaSvjGqrSzIKIidKwi/g0iFiRDQZBCpByCwcGgkiGLi4OK + fX2er004RFw8eHi/9/m7H05UVf4H0mw2pdVqnQOiRqMhlUpF4jiWQqEgmUzGTe7kqdNHP3O8sSM7nY4l + 6vV69K8C6lMvc66AVzabtYPBQNvtti2Xy9HfnoA8dfroZ25WgHOUy+VskiSKR7PFYjFKvwJ38tTpo//P + Au5RPp+3w+FQa7WahTHiN+DkTp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Yq1W - q31zM4jiRi8qX4Tw6OU+ch6v4PhQftCxh9KWP51AIACLxWInl2m1WrXb/Xm52+lDXsMKKtpCMNQFoHno - /3sBZZoV24O4U7uIrv4ZjI2NLpPLNBpNKT2rxu5BeWsQWRaBo67+Drn2Ay5oXEjIHkF85hBHdW+ad+fm - ZkEuU6vVVkEQcL1kAiVPf+JWlQ8K0yQuZo9KpTn4/X7Eaz9K/2OclPxJ3p2enga5TKVS1VIxvXAcOU9W - kGhwI0E/CblunMuiKPJMM+Kq+QvvejwekMuUSmWlICygrGEcqmoBiWYf55JhisuhUIjn4/kV81fe9Xim - QC5LT0/PGhx0rXa+8+BagRupFQEkFUsvMc9y+eDggGeaEZdzJ9DR7YbD4Vwll6WlpZ0xGk3t8/PLuF0x - huRCH1Iqt5BU9IPLh4eHPCsqtpBo8vKOz7cAg8HYTi5TKBQsOTlZ29Ly3LW4uI4bhS6cz/yExCIRiqpf - HMo0o50grMFub3ORQy6LjY1lcXFxUXK5vNRmax0WxR109nyDvnoIp1K7OJRpJorbsNmeDVOXHHLpnJA4 - KZPJzsbExJQplRlvBwZGN9bW9vEvNKMddaTuOXLCLouQQoyEXCIlMjJSHRUVVRMdHd0s0RGmmWa0o45E - QtiJ+A2+oxJO8d3MEAAAAABJRU5ErkJggg== - - + + 347, 17 + AAABAAQAMDAAAAEAIACoJQAARgAAACAgAAABACAAqBAAAO4lAAAYGAAAAQAgAIgJAACWNgAAEBAAAAEA diff --git a/Windows/SearchStateWin.cs b/Windows/SearchStateWin.cs index 8a15581..f723e4b 100644 --- a/Windows/SearchStateWin.cs +++ b/Windows/SearchStateWin.cs @@ -6,7 +6,7 @@ using System.Windows.Forms; namespace NBTExplorer.Windows { - internal class SearchStateWin : ISearchState + internal class SearchStateWin : NameValueSearchState { private ContainerControl _sender; @@ -20,38 +20,28 @@ namespace NBTExplorer.Windows public Action CollapseCallback { get; set; } public Action EndCallback { get; set; } - #region ISearchState - - public DataNode RootNode { get; set; } - public string SearchName { get; set; } - public string SearchValue { get; set; } - - public IEnumerator State { get; set; } - - public void InvokeDiscoverCallback (DataNode node) + public override void InvokeDiscoverCallback (DataNode node) { if (_sender != null && DiscoverCallback != null) _sender.BeginInvoke(DiscoverCallback, new object[] { node }); } - public void InvokeProgressCallback (DataNode node) + public override void InvokeProgressCallback (DataNode node) { if (_sender != null && ProgressCallback != null) _sender.BeginInvoke(ProgressCallback, new object[] { node }); } - public void InvokeCollapseCallback (DataNode node) + public override void InvokeCollapseCallback (DataNode node) { if (_sender != null && CollapseCallback != null) _sender.BeginInvoke(CollapseCallback, new object[] { node }); } - public void InvokeEndCallback (DataNode node) + public override void InvokeEndCallback (DataNode node) { if (_sender != null && EndCallback != null) _sender.BeginInvoke(EndCallback, new object[] { node }); } - - #endregion } }