Closing button works now, forgot about that
This commit is contained in:
21
Password Manager/GeneratePassword.Designer.cs
generated
21
Password Manager/GeneratePassword.Designer.cs
generated
@@ -37,10 +37,10 @@
|
|||||||
cancel = new Button();
|
cancel = new Button();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// textBox1
|
// passwordName
|
||||||
//
|
//
|
||||||
passwordName.Location = new Point(12, 33);
|
passwordName.Location = new Point(12, 33);
|
||||||
passwordName.Name = "textBox1";
|
passwordName.Name = "passwordName";
|
||||||
passwordName.PlaceholderText = "website.com";
|
passwordName.PlaceholderText = "website.com";
|
||||||
passwordName.Size = new Size(156, 23);
|
passwordName.Size = new Size(156, 23);
|
||||||
passwordName.TabIndex = 0;
|
passwordName.TabIndex = 0;
|
||||||
@@ -63,42 +63,43 @@
|
|||||||
label2.TabIndex = 2;
|
label2.TabIndex = 2;
|
||||||
label2.Text = "Length";
|
label2.Text = "Length";
|
||||||
//
|
//
|
||||||
// textBox2
|
// passwordLength
|
||||||
//
|
//
|
||||||
passwordLength.Location = new Point(12, 77);
|
passwordLength.Location = new Point(12, 77);
|
||||||
passwordLength.Name = "textBox2";
|
passwordLength.Name = "passwordLength";
|
||||||
passwordLength.PlaceholderText = "16";
|
passwordLength.PlaceholderText = "16";
|
||||||
passwordLength.Size = new Size(156, 23);
|
passwordLength.Size = new Size(156, 23);
|
||||||
passwordLength.TabIndex = 3;
|
passwordLength.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// checkBox1
|
// noSymbols
|
||||||
//
|
//
|
||||||
noSymbols.AutoSize = true;
|
noSymbols.AutoSize = true;
|
||||||
noSymbols.Location = new Point(12, 106);
|
noSymbols.Location = new Point(12, 106);
|
||||||
noSymbols.Name = "checkBox1";
|
noSymbols.Name = "noSymbols";
|
||||||
noSymbols.Size = new Size(89, 19);
|
noSymbols.Size = new Size(89, 19);
|
||||||
noSymbols.TabIndex = 4;
|
noSymbols.TabIndex = 4;
|
||||||
noSymbols.Text = "No symbols";
|
noSymbols.Text = "No symbols";
|
||||||
noSymbols.UseVisualStyleBackColor = true;
|
noSymbols.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// button1
|
// generate
|
||||||
//
|
//
|
||||||
generate.Location = new Point(93, 131);
|
generate.Location = new Point(93, 131);
|
||||||
generate.Name = "button1";
|
generate.Name = "generate";
|
||||||
generate.Size = new Size(75, 23);
|
generate.Size = new Size(75, 23);
|
||||||
generate.TabIndex = 5;
|
generate.TabIndex = 5;
|
||||||
generate.Text = "Generate";
|
generate.Text = "Generate";
|
||||||
generate.UseVisualStyleBackColor = true;
|
generate.UseVisualStyleBackColor = true;
|
||||||
generate.Click += Generate;
|
generate.Click += Generate;
|
||||||
//
|
//
|
||||||
// button2
|
// cancel
|
||||||
//
|
//
|
||||||
cancel.Location = new Point(12, 131);
|
cancel.Location = new Point(12, 131);
|
||||||
cancel.Name = "button2";
|
cancel.Name = "cancel";
|
||||||
cancel.Size = new Size(75, 23);
|
cancel.Size = new Size(75, 23);
|
||||||
cancel.TabIndex = 6;
|
cancel.TabIndex = 6;
|
||||||
cancel.Text = "Cancel";
|
cancel.Text = "Cancel";
|
||||||
cancel.UseVisualStyleBackColor = true;
|
cancel.UseVisualStyleBackColor = true;
|
||||||
|
cancel.Click += cancel_Click;
|
||||||
//
|
//
|
||||||
// GeneratePassword
|
// GeneratePassword
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ namespace Password_Manager
|
|||||||
public partial class GeneratePassword : Form
|
public partial class GeneratePassword : Form
|
||||||
{
|
{
|
||||||
private string currentPath;
|
private string currentPath;
|
||||||
private string recipient;
|
private string recipient;
|
||||||
|
|
||||||
public GeneratePassword(string name, string currentPath, string recipient)
|
public GeneratePassword(string name, string currentPath, string recipient)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
passwordName.Text = name;
|
passwordName.Text = name;
|
||||||
this.currentPath = currentPath;
|
this.currentPath = currentPath;
|
||||||
this.recipient = recipient;
|
this.recipient = recipient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Generate(object sender, EventArgs e)
|
public void Generate(object sender, EventArgs e)
|
||||||
@@ -29,7 +29,7 @@ namespace Password_Manager
|
|||||||
File.WriteAllText(
|
File.WriteAllText(
|
||||||
currentPath + $"\\{passwordName.Text}.gpg",
|
currentPath + $"\\{passwordName.Text}.gpg",
|
||||||
PasswordGenerator.New(
|
PasswordGenerator.New(
|
||||||
recipient,
|
recipient,
|
||||||
Convert.ToInt32(passwordLength.Text),
|
Convert.ToInt32(passwordLength.Text),
|
||||||
noSymbols.Checked)
|
noSymbols.Checked)
|
||||||
);
|
);
|
||||||
@@ -44,5 +44,10 @@ namespace Password_Manager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user