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/Form1.cs

39 lines
1.1 KiB
C#
Raw Normal View History

2023-03-24 10:17:54 +01:00
namespace Password_Manager
{
2023-03-24 11:14:49 +01:00
public partial class MainForm : Form
2023-03-24 10:17:54 +01:00
{
2023-03-24 11:14:49 +01:00
public MainForm()
2023-03-24 10:17:54 +01:00
{
InitializeComponent();
}
2023-03-24 11:14:49 +01:00
private void ChangeProfile(object sender, EventArgs e)
{
2023-03-24 12:01:08 +01:00
ComboBox cb = (ComboBox)sender;
Fields.CurrentProfile = Fields.ListOfProfiles.SearchByName(cb.Text);
2023-03-24 12:18:06 +01:00
}
2023-03-24 11:14:49 +01:00
2023-03-24 12:18:06 +01:00
private void ClearSearchBox(object sender, EventArgs e) //needed because declaring an anonymous method and subscribing that onto the delegate didn't work for some reason
{
searchBox.Clear();
2023-03-24 11:14:49 +01:00
}
private void UpdateResultList(object sender, EventArgs args)
{
2023-03-24 12:39:50 +01:00
resultList.Refresh();
}
private void ProfileChange(object sender, EventArgs e)
{
searchBox.Clear();
resultList.Refresh();
}
private void AddProfile(object sender, EventArgs e)
{
Fields.ListOfProfiles.Add(new Profile("tmp", @"C:\Users\RichardMiskolczi\pass"));
Fields.CurrentProfile = Fields.ListOfProfiles[0]; //temporary
ProfileChange(sender, e);
2023-03-24 11:14:49 +01:00
}
2023-03-24 10:17:54 +01:00
}
}