24 lines
723 B
C#
24 lines
723 B
C#
namespace Password_Manager
|
|
{
|
|
public partial class MainForm : Form
|
|
{
|
|
public MainForm()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void ChangeProfile(object sender, EventArgs e)
|
|
{
|
|
ComboBox cb = (ComboBox)sender;
|
|
ProfileHandler.CurrentProfile = ProfileHandler.ListOfProfiles.SearchByName(cb.Text);
|
|
searchBox.Clear();
|
|
this.Text = ProfileHandler.CurrentProfile == null ? "Password Manager" : $"Current profile: {ProfileHandler.CurrentProfile.Name}";
|
|
}
|
|
|
|
private void AddProfile(object sender, EventArgs e)
|
|
{
|
|
NewProfileForm npf = new NewProfileForm();
|
|
npf.Show();
|
|
}
|
|
}
|
|
} |