diff --git a/AssetStudio/AssetStudio-x86.csproj b/AssetStudio/AssetStudio-x86.csproj index 8dafbae..0677ef5 100644 --- a/AssetStudio/AssetStudio-x86.csproj +++ b/AssetStudio/AssetStudio-x86.csproj @@ -173,7 +173,6 @@ True - diff --git a/AssetStudio/AssetStudio.csproj b/AssetStudio/AssetStudio.csproj index 5675d9f..6f1cfca 100644 --- a/AssetStudio/AssetStudio.csproj +++ b/AssetStudio/AssetStudio.csproj @@ -167,7 +167,6 @@ - diff --git a/AssetStudio/AssetStudioForm.Designer.cs b/AssetStudio/AssetStudioForm.Designer.cs index f7dede4..81b1291 100644 --- a/AssetStudio/AssetStudioForm.Designer.cs +++ b/AssetStudio/AssetStudioForm.Designer.cs @@ -108,7 +108,6 @@ this.timerOpenTK = new System.Windows.Forms.Timer(this.components); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); - this.treeTip = new System.Windows.Forms.ToolTip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.exportSelectedAssetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exportAnimatorwithselectedAnimationClipMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -522,7 +521,6 @@ this.treeSearch.Enter += new System.EventHandler(this.treeSearch_Enter); this.treeSearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeSearch_KeyDown); this.treeSearch.Leave += new System.EventHandler(this.treeSearch_Leave); - this.treeSearch.MouseEnter += new System.EventHandler(this.treeSearch_MouseEnter); // // tabPage2 // @@ -906,7 +904,7 @@ this.jumpToSceneHierarchyToolStripMenuItem, this.showOriginalFileToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(335, 136); + this.contextMenuStrip1.Size = new System.Drawing.Size(335, 114); // // exportSelectedAssetsToolStripMenuItem // @@ -1049,7 +1047,6 @@ private System.Windows.Forms.ToolStripMenuItem openAfterExport; private System.Windows.Forms.ToolStripMenuItem showExpOpt; private GOHierarchy sceneTreeView; - private System.Windows.Forms.ToolTip treeTip; private System.Windows.Forms.ToolStripMenuItem debugMenuItem; private System.Windows.Forms.ToolStripMenuItem buildClassStructuresMenuItem; private System.Windows.Forms.ToolStripMenuItem dontLoadAssetsMenuItem; diff --git a/AssetStudio/AssetStudioForm.cs b/AssetStudio/AssetStudioForm.cs index 72f3cb1..3a0960c 100644 --- a/AssetStudio/AssetStudioForm.cs +++ b/AssetStudio/AssetStudioForm.cs @@ -515,11 +515,6 @@ namespace AssetStudio } } - private void treeSearch_MouseEnter(object sender, EventArgs e) - { - treeTip.Show("Search with * ? widcards. Enter to scroll through results, Ctrl+Enter to select all results.", treeSearch, 5000); - } - private void treeSearch_Enter(object sender, EventArgs e) { if (treeSearch.Text == " Search ") @@ -538,19 +533,6 @@ namespace AssetStudio } } - private void recurseTreeCheck(TreeNodeCollection start) - { - foreach (GameObject GObject in start) - { - if (GObject.Text.Like(treeSearch.Text)) - { - GObject.Checked = !GObject.Checked; - if (GObject.Checked) { GObject.EnsureVisible(); } - } - else { recurseTreeCheck(GObject.Nodes); } - } - } - private void treeSearch_TextChanged(object sender, EventArgs e) { treeSrcResults.Clear(); @@ -565,30 +547,24 @@ namespace AssetStudio { foreach (var aFile in assetsfileList) { - foreach (var GObject in aFile.GameObjectList.Values) + foreach (var gObject in aFile.GameObjectList.Values) { - if (GObject.Text.Like(treeSearch.Text)) { treeSrcResults.Add(GObject); } + if (gObject.Text.IndexOf(treeSearch.Text, StringComparison.CurrentCultureIgnoreCase) >= 0) + { + treeSrcResults.Add(gObject); + } } } } - - - if (e.Control) //toggle all matching nodes + if (treeSrcResults.Count > 0) { - sceneTreeView.BeginUpdate(); - //loop TreeView recursively to avoid children already checked by parent - recurseTreeCheck(sceneTreeView.Nodes); - sceneTreeView.EndUpdate(); - } - else //make visible one by one - { - if (treeSrcResults.Count > 0) + if (nextGObject >= treeSrcResults.Count) { - if (nextGObject >= treeSrcResults.Count) { nextGObject = 0; } - treeSrcResults[nextGObject].EnsureVisible(); - sceneTreeView.SelectedNode = treeSrcResults[nextGObject]; - nextGObject++; + nextGObject = 0; } + treeSrcResults[nextGObject].EnsureVisible(); + sceneTreeView.SelectedNode = treeSrcResults[nextGObject]; + nextGObject++; } } } diff --git a/AssetStudio/AssetStudioForm.resx b/AssetStudio/AssetStudioForm.resx index f6015bc..671f3e9 100644 --- a/AssetStudio/AssetStudioForm.resx +++ b/AssetStudio/AssetStudioForm.resx @@ -153,9 +153,6 @@ The quick brown fox jumps over the lazy dog. 1234567890 784, 17 - - 928, 17 - 147, 17 diff --git a/AssetStudio/StudioClasses/StringExtensions.cs b/AssetStudio/StudioClasses/StringExtensions.cs deleted file mode 100644 index 1f046a0..0000000 --- a/AssetStudio/StudioClasses/StringExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; - -namespace AssetStudio -{ - public static class StringExtensions - { - /// - /// Compares the string against a given pattern. - /// - /// The string. - /// The pattern to match, where "*" means any sequence of characters, and "?" means any single character. - /// true if the string matches the given pattern; otherwise false. - public static bool Like(this string str, string pattern) - { - return new Regex( - "^" + Regex.Escape(pattern).Replace(@"\*", ".*").Replace(@"\?", ".") + "$", - RegexOptions.IgnoreCase | RegexOptions.Singleline - ).IsMatch(str); - } - } -}