bro i can't even keep track anymore

This commit is contained in:
2023-03-27 09:17:06 +02:00
parent df33170f71
commit 311a5cc4ca
12 changed files with 248 additions and 131 deletions

View File

@@ -1,14 +1,16 @@
namespace Password_Manager
{
public delegate void NewProfile(string profileName, string profilePath);
public delegate void ReloadPasswords();
public partial class NewProfileForm : Form
{
public event NewProfile NewProfileRequest;
public event ReloadPasswords ReloadPasswordsRequest;
public event NewProfile? NewProfileRequest;
public event ReloadPasswords? ReloadMainFormRequest;
public event Save? SaveRequest;
public NewProfileForm()
{
//test
MessageBox.Show(this.Parent.Text, this.Parent.Text);
InitializeComponent();
}
@@ -26,13 +28,15 @@
if (nameTextBox.Text != "" && pathTextBox.Text != "")
{
NewProfileRequest?.Invoke(nameTextBox.Text, pathTextBox.Text);
ReloadPasswordsRequest?.Invoke();
ReloadMainFormRequest?.Invoke();
this.Close();
}
else
{
MessageBox.Show("You must fill in all fields to continue.", "Error: Empty fields", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
SaveRequest?.Invoke();
}
private void Cancel(object sender, EventArgs e)