diff --git a/Slivin_PR03_GIT/Form1.Designer.cs b/Slivin_PR03_GIT/Form1.Designer.cs index 456056a..64ebbe8 100644 --- a/Slivin_PR03_GIT/Form1.Designer.cs +++ b/Slivin_PR03_GIT/Form1.Designer.cs @@ -29,6 +29,7 @@ private void InitializeComponent() { label1 = new Label(); + button1 = new Button(); SuspendLayout(); // // label1 @@ -40,11 +41,22 @@ label1.TabIndex = 0; label1.Text = "SLIVIN"; // + // button1 + // + button1.Location = new Point(311, 239); + button1.Name = "button1"; + button1.Size = new Size(75, 23); + button1.TabIndex = 1; + button1.Text = "нажать"; + button1.UseVisualStyleBackColor = true; + button1.Click += button1_Click; + // // Form1 // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(784, 561); + Controls.Add(button1); Controls.Add(label1); Name = "Form1"; Text = "Form1"; @@ -55,5 +67,6 @@ #endregion private Label label1; + private Button button1; } } diff --git a/Slivin_PR03_GIT/Form1.cs b/Slivin_PR03_GIT/Form1.cs index c9f08d2..d0fa2be 100644 --- a/Slivin_PR03_GIT/Form1.cs +++ b/Slivin_PR03_GIT/Form1.cs @@ -6,5 +6,10 @@ namespace Slivin_PR03_GIT { InitializeComponent(); } + + private void button1_Click(object sender, EventArgs e) + { + MessageBox.Show(DateTime.Now.ToString()); + } } }