ben%netscape.com da57eda9c4 [NPOB] Correct location of image
git-svn-id: svn://10.0.0.236/trunk@98002 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-27 00:29:19 +00:00

60 lines
1.3 KiB
C#

namespace Silverstone.Manticore.AboutDialog
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public class AboutDialog : System.Windows.Forms.Form
{
private System.ComponentModel.Container components;
private Form parentWindow;
public AboutDialog(Form parent)
{
parentWindow = parent;
InitializeComponent();
// Show the about dialog modally.
this.ShowDialog();
}
public override void Dispose()
{
base.Dispose();
components.Dispose();
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.Width = 253;
this.Height = 195;
this.Left = parentWindow.Left + ((parentWindow.Width / 2) - (this.Width / 2));
this.Top = parentWindow.Top + ((parentWindow.Height / 2) - (this.Height / 2));
// Borderless dialog
this.FormBorderStyle = FormBorderStyle.None;
this.BackgroundImage = Image.FromFile("resources\\manticore.png");
this.Text = "About Manticore"; // XXX localize
this.Click += new EventHandler(this.CloseAboutDialog);
}
public void CloseAboutDialog(Object sender, EventArgs e)
{
this.Close();
}
}
}