bro check it out
This commit is contained in:
28
Password Manager/Form1.Designer.cs
generated
28
Password Manager/Form1.Designer.cs
generated
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,8 @@
|
||||
<Compile Update="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="ResultListBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user