diff --git a/.vs/Password Manager/v17/.suo b/.vs/Password Manager/v17/.suo
index 5ec4d0e..19aedba 100644
Binary files a/.vs/Password Manager/v17/.suo and b/.vs/Password Manager/v17/.suo differ
diff --git a/Password Manager/Form1.Designer.cs b/Password Manager/Form1.Designer.cs
index 6e4a01b..a8d5bb5 100644
--- a/Password Manager/Form1.Designer.cs
+++ b/Password Manager/Form1.Designer.cs
@@ -29,10 +29,10 @@
private void InitializeComponent()
{
searchBox = new TextBox();
- resultList = new ListBox();
+ resultList = new ResultListBox();
profileSelection = new ComboBox();
addProfile = new Button();
- button2 = new Button();
+ removeProfile = new Button();
SuspendLayout();
//
// searchBox
@@ -65,30 +65,32 @@
profileSelection.TabIndex = 2;
profileSelection.SelectedIndexChanged += ClearSearchBox;
//
- // button1
+ // addProfile
//
addProfile.Location = new Point(586, 60);
- addProfile.Name = "button1";
+ addProfile.Name = "addProfile";
addProfile.Size = new Size(95, 29);
addProfile.TabIndex = 3;
addProfile.Text = "Add";
addProfile.UseVisualStyleBackColor = true;
+ addProfile.Click += AddProfile;
+
//
// button2
//
- button2.Location = new Point(691, 60);
- button2.Name = "button2";
- button2.Size = new Size(95, 29);
- button2.TabIndex = 4;
- button2.Text = "Delete";
- button2.UseVisualStyleBackColor = true;
+ removeProfile.Location = new Point(691, 60);
+ removeProfile.Name = "button2";
+ removeProfile.Size = new Size(95, 29);
+ removeProfile.TabIndex = 4;
+ removeProfile.Text = "Delete";
+ removeProfile.UseVisualStyleBackColor = true;
//
// MainForm
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
- Controls.Add(button2);
+ Controls.Add(removeProfile);
Controls.Add(addProfile);
Controls.Add(profileSelection);
Controls.Add(resultList);
@@ -102,9 +104,9 @@
#endregion
public TextBox searchBox;
- public ListBox resultList;
+ public ResultListBox resultList;
public ComboBox profileSelection;
private Button addProfile;
- private Button button2;
+ private Button removeProfile;
}
}
\ No newline at end of file
diff --git a/Password Manager/Form1.cs b/Password Manager/Form1.cs
index c1cefce..87a4c3b 100644
--- a/Password Manager/Form1.cs
+++ b/Password Manager/Form1.cs
@@ -20,7 +20,20 @@ namespace Password_Manager
private void UpdateResultList(object sender, EventArgs args)
{
- //TODO
+ resultList.Refresh();
+ }
+
+ private void ProfileChange(object sender, EventArgs e)
+ {
+ searchBox.Clear();
+ resultList.Refresh();
+ }
+
+ private void AddProfile(object sender, EventArgs e)
+ {
+ Fields.ListOfProfiles.Add(new Profile("tmp", @"C:\Users\RichardMiskolczi\pass"));
+ Fields.CurrentProfile = Fields.ListOfProfiles[0]; //temporary
+ ProfileChange(sender, e);
}
}
}
\ No newline at end of file
diff --git a/Password Manager/Password Manager.csproj.user b/Password Manager/Password Manager.csproj.user
index 3a34caa..a21d47b 100644
--- a/Password Manager/Password Manager.csproj.user
+++ b/Password Manager/Password Manager.csproj.user
@@ -4,5 +4,8 @@
Form
+
+ Component
+
\ No newline at end of file
diff --git a/Password Manager/Profile.cs b/Password Manager/Profile.cs
index f5e57fd..fddb468 100644
--- a/Password Manager/Profile.cs
+++ b/Password Manager/Profile.cs
@@ -8,13 +8,13 @@ namespace Password_Manager
{
public string Name { get; } //the name of the password store profile ("personal", "work", or similar)
public string Path { get; } //path of the folder containing the password store
- public event PasswordStoreChange Change; //runs if a new password is added, or if one is removed
+ //public event PasswordStoreChange Change; //runs if a new password is added, or if one is removed
- public Profile(string name, string path, PasswordStoreChange change)
+ public Profile(string name, string path)
{
Name = name;
Path = path;
- Change = change;
+ //Change = change;
}
}
}
diff --git a/Password Manager/Program.cs b/Password Manager/Program.cs
index 2c557ae..30bed6f 100644
--- a/Password Manager/Program.cs
+++ b/Password Manager/Program.cs
@@ -8,8 +8,7 @@ namespace Password_Manager
[STAThread]
static void Main()
{
- // To customize application configuration such as set high DPI settings or default font,
- // see https://aka.ms/applicationconfiguration.
+ Fields.ListOfProfiles = new ProfileList();
ApplicationConfiguration.Initialize();
Application.Run(new MainForm());
}