bro i can't even keep track anymore
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user