oops forgot to add new class
This commit is contained in:
23
Password Manager/ResultListBox.cs
Normal file
23
Password Manager/ResultListBox.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user