This commit is contained in:
2023-03-27 00:19:30 +02:00
parent 01a926d316
commit df33170f71
28 changed files with 543 additions and 125 deletions

View File

@@ -1,17 +1,12 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Password_Manager
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 NewProfileForm()
{
InitializeComponent();
@@ -30,10 +25,8 @@ namespace Password_Manager
{
if (nameTextBox.Text != "" && pathTextBox.Text != "")
{
Profile profile = new Profile(nameTextBox.Text, pathTextBox.Text);
ProfileHandler.ListOfProfiles.Add(profile);
ProfileHandler.CurrentProfile = profile;
Program.mainForm.resultList.ReloadResults();
NewProfileRequest?.Invoke(nameTextBox.Text, pathTextBox.Text);
ReloadPasswordsRequest?.Invoke();
this.Close();
}
else