New dialog for adding profiles
This commit is contained in:
38
Password Manager/MainForm.cs
Normal file
38
Password Manager/MainForm.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace Password_Manager
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ChangeProfile(object sender, EventArgs e)
|
||||
{
|
||||
ComboBox cb = (ComboBox)sender;
|
||||
Fields.CurrentProfile = Fields.ListOfProfiles.SearchByName(cb.Text);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
private void UpdateResultList(object sender, EventArgs args)
|
||||
{
|
||||
resultList.Refresh();
|
||||
}
|
||||
|
||||
private void ProfileChange(object sender, EventArgs e)
|
||||
{
|
||||
searchBox.Clear();
|
||||
resultList.Refresh();
|
||||
}
|
||||
|
||||
private void AddProfile(object sender, EventArgs e)
|
||||
{
|
||||
NewProfileForm npf = new NewProfileForm();
|
||||
npf.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user