42 lines
1007 B
C#
42 lines
1007 B
C#
|
using System;
|
|||
|
using System.Drawing;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace Chapter6
|
|||
|
{
|
|||
|
public partial class frmAbout : Form
|
|||
|
{
|
|||
|
public frmAbout()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
|
|||
|
|
|||
|
Text = "About";
|
|||
|
StartPosition = FormStartPosition.CenterParent;
|
|||
|
Size = new Size(400, 300);
|
|||
|
|
|||
|
var aboutLabel = new Label
|
|||
|
{
|
|||
|
Text = "MDI Application\nVersion Alpha 0.0.1\n©2024 EggTech\nAll rights reserved.",
|
|||
|
TextAlign = ContentAlignment.MiddleCenter,
|
|||
|
Dock = DockStyle.Fill
|
|||
|
};
|
|||
|
|
|||
|
var closeButton = new Button
|
|||
|
{
|
|||
|
Text = "Close",
|
|||
|
Dock = DockStyle.Bottom
|
|||
|
};
|
|||
|
closeButton.Click += (sender, e) => { Close(); };
|
|||
|
|
|||
|
Controls.Add(aboutLabel);
|
|||
|
Controls.Add(closeButton);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
private void btnOK_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
Close();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|