Closing button works now, forgot about that

This commit is contained in:
2023-03-28 13:10:57 +02:00
parent edd573546b
commit a799470f6a
2 changed files with 19 additions and 13 deletions

View File

@@ -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
// //

View File

@@ -44,5 +44,10 @@ namespace Password_Manager
} }
} }
} }
private void cancel_Click(object sender, EventArgs e)
{
Close();
}
} }
} }