bro check it out
This commit is contained in:
Binary file not shown.
28
Password Manager/Form1.Designer.cs
generated
28
Password Manager/Form1.Designer.cs
generated
@@ -29,10 +29,10 @@
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
searchBox = new TextBox();
|
searchBox = new TextBox();
|
||||||
resultList = new ListBox();
|
resultList = new ResultListBox();
|
||||||
profileSelection = new ComboBox();
|
profileSelection = new ComboBox();
|
||||||
addProfile = new Button();
|
addProfile = new Button();
|
||||||
button2 = new Button();
|
removeProfile = new Button();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// searchBox
|
// searchBox
|
||||||
@@ -65,30 +65,32 @@
|
|||||||
profileSelection.TabIndex = 2;
|
profileSelection.TabIndex = 2;
|
||||||
profileSelection.SelectedIndexChanged += ClearSearchBox;
|
profileSelection.SelectedIndexChanged += ClearSearchBox;
|
||||||
//
|
//
|
||||||
// button1
|
// addProfile
|
||||||
//
|
//
|
||||||
addProfile.Location = new Point(586, 60);
|
addProfile.Location = new Point(586, 60);
|
||||||
addProfile.Name = "button1";
|
addProfile.Name = "addProfile";
|
||||||
addProfile.Size = new Size(95, 29);
|
addProfile.Size = new Size(95, 29);
|
||||||
addProfile.TabIndex = 3;
|
addProfile.TabIndex = 3;
|
||||||
addProfile.Text = "Add";
|
addProfile.Text = "Add";
|
||||||
addProfile.UseVisualStyleBackColor = true;
|
addProfile.UseVisualStyleBackColor = true;
|
||||||
|
addProfile.Click += AddProfile;
|
||||||
|
|
||||||
//
|
//
|
||||||
// button2
|
// button2
|
||||||
//
|
//
|
||||||
button2.Location = new Point(691, 60);
|
removeProfile.Location = new Point(691, 60);
|
||||||
button2.Name = "button2";
|
removeProfile.Name = "button2";
|
||||||
button2.Size = new Size(95, 29);
|
removeProfile.Size = new Size(95, 29);
|
||||||
button2.TabIndex = 4;
|
removeProfile.TabIndex = 4;
|
||||||
button2.Text = "Delete";
|
removeProfile.Text = "Delete";
|
||||||
button2.UseVisualStyleBackColor = true;
|
removeProfile.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(800, 450);
|
ClientSize = new Size(800, 450);
|
||||||
Controls.Add(button2);
|
Controls.Add(removeProfile);
|
||||||
Controls.Add(addProfile);
|
Controls.Add(addProfile);
|
||||||
Controls.Add(profileSelection);
|
Controls.Add(profileSelection);
|
||||||
Controls.Add(resultList);
|
Controls.Add(resultList);
|
||||||
@@ -102,9 +104,9 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public TextBox searchBox;
|
public TextBox searchBox;
|
||||||
public ListBox resultList;
|
public ResultListBox resultList;
|
||||||
public ComboBox profileSelection;
|
public ComboBox profileSelection;
|
||||||
private Button addProfile;
|
private Button addProfile;
|
||||||
private Button button2;
|
private Button removeProfile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,20 @@ namespace Password_Manager
|
|||||||
|
|
||||||
private void UpdateResultList(object sender, EventArgs args)
|
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">
|
<Compile Update="Form1.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="ResultListBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</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 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 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;
|
Name = name;
|
||||||
Path = path;
|
Path = path;
|
||||||
Change = change;
|
//Change = change;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ namespace Password_Manager
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
// To customize application configuration such as set high DPI settings or default font,
|
Fields.ListOfProfiles = new ProfileList();
|
||||||
// see https://aka.ms/applicationconfiguration.
|
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(new MainForm());
|
Application.Run(new MainForm());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user