I'm literally on fire rn
This commit is contained in:
@@ -18,12 +18,33 @@ namespace Password_Manager
|
||||
}
|
||||
|
||||
private void ChooseFolder(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
FolderBrowserDialog dialog = new FolderBrowserDialog();
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
pathTextBox.Text = dialog.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
private void Save(object sender, EventArgs e)
|
||||
{
|
||||
if (nameTextBox.Text != "" && pathTextBox.Text != "")
|
||||
{
|
||||
Profile profile = new Profile(nameTextBox.Text, pathTextBox.Text);
|
||||
ProfileHandler.ListOfProfiles.Add(profile);
|
||||
ProfileHandler.CurrentProfile = profile;
|
||||
Program.mainForm.resultList.ReloadResults();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("You must fill in all fields to continue.", "Error: Empty fields", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void Cancel(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user