Fixed save directory list

This commit is contained in:
Ray 2025-04-14 08:11:59 +01:00
parent eac10a46e6
commit 6fa75dfce1
4 changed files with 15 additions and 48 deletions

View File

@ -14,7 +14,7 @@
<Copyright>Ray Lam</Copyright>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Version>0.6.3.048</Version>
<Version>0.6.4.140</Version>
<PackageId>bukkubuddy</PackageId>
<RunAnalyzersDuringLiveAnalysis>True</RunAnalyzersDuringLiveAnalysis>
<SupportedOSPlatformVersion>8.0</SupportedOSPlatformVersion>

View File

@ -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<string> GetAllDirectories()
{
var nodes = GetAllTreeNodes();
nodes = nodes.Where(x => this.GetNodeType(x) == NodeType.Folder)?.ToList() ?? new List<TreeNode>();
var result = GetAllNodes(this.Nodes);
var result = new List<string>();
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<string>();
}
public List<KeyValuePair<TreeNode, BookmarkModel>> GetAllNodes()
@ -453,23 +436,6 @@ namespace RyzStudio.Windows.Forms
return result;
}
public List<TreeNode> GetAllTreeNodes()
{
var result = new List<TreeNode>();
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<TreeNode> result, TreeNode node)
private List<TreeNode> GetAllNodes(TreeNodeCollection nodes)
{
foreach (TreeNode node2 in node.Nodes)
{
result.Add(node2);
var result = new List<TreeNode>();
foreach (TreeNode node3 in node2.Nodes)
foreach (TreeNode node in nodes)
{
result.Add(node3);
}
result.Add(node);
result.AddRange(GetAllNodes(node.Nodes));
}
return result;
}
}

View File

@ -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"

View File

@ -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"