oops forgot to add new class

This commit is contained in:
Miskolczi Richárd
2023-03-24 12:40:10 +01:00
parent bb7625d2f8
commit bc08238545

View File

@@ -0,0 +1,23 @@
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;
}
}
}