diff --git a/Password Manager/ResultListBox.cs b/Password Manager/ResultListBox.cs new file mode 100644 index 0000000..0a31a23 --- /dev/null +++ b/Password Manager/ResultListBox.cs @@ -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; + } + } +}