This repository has been archived on 2025-09-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Password-Manager-Legacy/Password Manager/ResultListBox.cs
2023-03-24 12:40:10 +01:00

24 lines
584 B
C#

using System;
namespace Password_Manager
{
public class ResultListBox : ListBox
{
public ResultListBox() : base() { }
public void Refresh()
{
DirectoryInfo d = new DirectoryInfo(Fields.CurrentProfile.Path); //Assuming Test is your Folder
FileInfo[] files = d.GetFiles("*.gpg");
string[] elements = new string[files.Length];
for (int i = 0; i < elements.Length; i++)
{
elements[i] = files[i].Name;
}
this.DataSource = elements;
}
}
}