diff --git a/BookmarkManager.csproj b/BookmarkManager.csproj index c8c1c61..ec5f688 100644 --- a/BookmarkManager.csproj +++ b/BookmarkManager.csproj @@ -14,7 +14,7 @@ Ray Lam 1.0.0.0 1.0.0.0 - 0.6.3.048 + 0.6.4.140 bukkubuddy True 8.0 diff --git a/Windows/Forms/BookmarkTreeView.cs b/Windows/Forms/BookmarkTreeView.cs index c1f4955..c40c7bd 100644 --- a/Windows/Forms/BookmarkTreeView.cs +++ b/Windows/Forms/BookmarkTreeView.cs @@ -39,17 +39,6 @@ namespace RyzStudio.Windows.Forms this.ImageList = new ImageList(); } - //this.PathSeparator = PATH_SEPARATOR; - - //this.AllowDrop = true; - //this.HideSelection = false; - //this.HotTracking = true; - //this.ImageIndex = 0; - //this.LabelEdit = true; - //this.PathSeparator = "\n"; - //this.SelectedImageIndex = 0; - //this.ShowNodeToolTips = true; - this.ImageList.ColorDepth = ColorDepth.Depth32Bit; this.ImageList.ImageSize = new Size(16, 16); this.ImageList.TransparentColor = Color.Transparent; @@ -424,17 +413,11 @@ namespace RyzStudio.Windows.Forms public List GetAllDirectories() { - var nodes = GetAllTreeNodes(); - nodes = nodes.Where(x => this.GetNodeType(x) == NodeType.Folder)?.ToList() ?? new List(); + var result = GetAllNodes(this.Nodes); - var result = new List(); - - foreach (var item in nodes) - { - result.Add(this.GetNodePath(item)); - } - - return result; + return result.Where(x => this.GetNodeType(x) == NodeType.Folder) + .Select(x => this.GetNodePath(x)) + ?.ToList() ?? new List(); } public List> GetAllNodes() @@ -453,23 +436,6 @@ namespace RyzStudio.Windows.Forms return result; } - public List GetAllTreeNodes() - { - var result = new List(); - if (this.Nodes.Count <= 0) - { - return result; - } - - foreach (TreeNode node in this.Nodes) - { - TraverseNodeTree(result, node); - } - - return result; - } - - private void ClearImageList() { UIControl.Invoke(this, (x) => @@ -516,17 +482,17 @@ namespace RyzStudio.Windows.Forms return this.ImageList.Images.IndexOfKey(key); } - protected void TraverseNodeTree(List result, TreeNode node) + private List GetAllNodes(TreeNodeCollection nodes) { - foreach (TreeNode node2 in node.Nodes) - { - result.Add(node2); + var result = new List(); - foreach (TreeNode node3 in node2.Nodes) - { - result.Add(node3); - } + foreach (TreeNode node in nodes) + { + result.Add(node); + result.AddRange(GetAllNodes(node.Nodes)); } + + return result; } } diff --git a/build-installer.iss b/build-installer.iss index 058679e..58c2116 100644 --- a/build-installer.iss +++ b/build-installer.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "BukkuBuddy Bookmark Manager" -#define MyAppVersion "0.6.3.048" +#define MyAppVersion "0.6.4.140" #define MyAppPublisher "Hi, I'm Ray" #define MyAppURL "https://www.hiimray.co.uk/software-bukkubuddy-bookmark-manager" #define MyAppExeName "bukkubuddy.exe" diff --git a/build.bat b/build.bat index f6cc459..46c4fa0 100644 --- a/build.bat +++ b/build.bat @@ -4,6 +4,7 @@ RMDIR /s /q "obj\" MKDIR bin dotnet restore skye.sln +dotnet build skye.sln -c Release -o ./bin/ dotnet publish skye.sln -r win-x64 -c Release /p:PublishSingleFile=true /p:SelfContained=false /p:PublishReadyToRunfalse=true /p:PublishDir="bin\" "C:\B\Portable Files (dev)\Inno Setup\v6.0.4-2\app\ISCC.exe" "build-installer.iss"