diff --git a/.vs/Password Manager/v17/.suo b/.vs/Password Manager/v17/.suo index 7cf3bb7..5ec4d0e 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 75fd00a..6e4a01b 100644 --- a/Password Manager/Form1.Designer.cs +++ b/Password Manager/Form1.Designer.cs @@ -31,44 +31,69 @@ searchBox = new TextBox(); resultList = new ListBox(); profileSelection = new ComboBox(); + addProfile = new Button(); + button2 = new Button(); SuspendLayout(); // - // textBox1 + // searchBox // searchBox.Location = new Point(12, 27); - searchBox.Name = "textBox1"; + searchBox.Name = "searchBox"; searchBox.PlaceholderText = "Search for a password"; searchBox.Size = new Size(257, 27); searchBox.TabIndex = 0; searchBox.TextChanged += UpdateResultList; // - // listBox1 + // resultList // resultList.FormattingEnabled = true; resultList.ItemHeight = 20; resultList.Location = new Point(12, 99); - resultList.Name = "listBox1"; + resultList.Name = "resultList"; resultList.Size = new Size(150, 104); resultList.TabIndex = 1; // - // comboBox1 + // profileSelection // + profileSelection.DropDownHeight = 100; + profileSelection.DropDownWidth = 200; profileSelection.FormattingEnabled = true; - profileSelection.Location = new Point(637, 26); - profileSelection.Name = "comboBox1"; - profileSelection.Size = new Size(151, 28); + profileSelection.IntegralHeight = false; + profileSelection.Location = new Point(586, 26); + profileSelection.Name = "profileSelection"; + profileSelection.Size = new Size(200, 28); profileSelection.TabIndex = 2; - profileSelection.SelectedIndexChanged += ChangeProfile; + profileSelection.SelectedIndexChanged += ClearSearchBox; // - // Form1 + // button1 + // + addProfile.Location = new Point(586, 60); + addProfile.Name = "button1"; + addProfile.Size = new Size(95, 29); + addProfile.TabIndex = 3; + addProfile.Text = "Add"; + addProfile.UseVisualStyleBackColor = true; + // + // 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; + // + // MainForm // AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(800, 450); + Controls.Add(button2); + Controls.Add(addProfile); Controls.Add(profileSelection); Controls.Add(resultList); Controls.Add(searchBox); - Name = "Form1"; + Name = "MainForm"; Text = "Form1"; ResumeLayout(false); PerformLayout(); @@ -79,5 +104,7 @@ public TextBox searchBox; public ListBox resultList; public ComboBox profileSelection; + private Button addProfile; + private Button button2; } } \ No newline at end of file diff --git a/Password Manager/Form1.cs b/Password Manager/Form1.cs index 1d6c11f..c1cefce 100644 --- a/Password Manager/Form1.cs +++ b/Password Manager/Form1.cs @@ -11,13 +11,16 @@ namespace Password_Manager { ComboBox cb = (ComboBox)sender; Fields.CurrentProfile = Fields.ListOfProfiles.SearchByName(cb.Text); + } - + private void ClearSearchBox(object sender, EventArgs e) //needed because declaring an anonymous method and subscribing that onto the delegate didn't work for some reason + { + searchBox.Clear(); } private void UpdateResultList(object sender, EventArgs args) { - //TODO: + //TODO } } } \ No newline at end of file diff --git a/Password Manager/Password Manager.csproj.user b/Password Manager/Password Manager.csproj.user index 7814ea2..3a34caa 100644 --- a/Password Manager/Password Manager.csproj.user +++ b/Password Manager/Password Manager.csproj.user @@ -1,8 +1,8 @@  - - - Form - - - + + + Form + + + \ No newline at end of file diff --git a/Password Manager/PasswordList.cs b/Password Manager/PasswordList.cs deleted file mode 100644 index 22747b1..0000000 --- a/Password Manager/PasswordList.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace Password_Manager -{ - sealed class PasswordListBox : ListBox - { - public PasswordListBox() : base() { } - - public void ReadFromPath() - { - //read all files from - } - } -} diff --git a/Password Manager/Profile.cs b/Password Manager/Profile.cs index 74ce88a..f5e57fd 100644 --- a/Password Manager/Profile.cs +++ b/Password Manager/Profile.cs @@ -8,7 +8,6 @@ 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 - private Password[] Passwords; public event PasswordStoreChange Change; //runs if a new password is added, or if one is removed public Profile(string name, string path, PasswordStoreChange change) diff --git a/Password Manager/ProfileList.cs b/Password Manager/ProfileList.cs index 025f102..a8eac2c 100644 --- a/Password Manager/ProfileList.cs +++ b/Password Manager/ProfileList.cs @@ -4,7 +4,6 @@ namespace Password_Manager { sealed class ProfileList : IList { - public ProfileList() : base() { } public override void Add(Profile p)