Листинг П1-4. Файл ch05\SimpleNotepad\HelpAboutForm.cs
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms;
namespace SimpleNotepad { /// < summary> /// Summary description for HelpAboutForm. /// < /summary> public class HelpAboutForm: System.Windows.Forms.Form { private System.Windows.Forms.Button button1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.LinkLabel linkLabel2; /// < summary> /// Required designer variable. /// < /summary> private System.ComponentModel.Container components = null;
public HelpAboutForm() { // // Required for Windows Form Designer support // InitializeComponent(); }
/// < summary> /// Clean up any resources being used. /// < /summary> protected override void Dispose(bool disposing) { if(disposing) { if(components! = null) { components.Dispose(); } } base.Dispose(disposing); }
#region Windows Form Designer generated code /// < summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// < /summary> private void InitializeComponent() { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(HelpAboutForm)); this.button1 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.linkLabel2 = new System.Windows.Forms.LinkLabel(); this.SuspendLayout(); // // button1 // this.button1.BackColor = System.Drawing.SystemColors.ControlLight; this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.button1.Location = new System.Drawing.Point(92, 128); this.button1.Name = " button1"; this.button1.TabIndex = 0; this.button1.Text = " OK"; this.button1.Click += new System.EventHandler(this.button1_Click); // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject(" pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(8, 16); this.pictureBox1.Name = " pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(40, 64); this.pictureBox1.TabIndex = 1; this.pictureBox1.TabStop = false; // // label1 // this.label1.Font = new System.Drawing.Font(" Arial", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204))); this.label1.Location = new System.Drawing.Point(72, 16); this.label1.Name = " label1"; this.label1.Size = new System.Drawing.Size(160, 24); this.label1.TabIndex = 2; this.label1.Text = " SimpleNotepad"; // // label2 // this.label2.Location = new System.Drawing.Point(72, 48); this.label2.Name = " label2"; this.label2.Size = new System.Drawing.Size(100, 16); this.label2.TabIndex = 3; this.label2.Text = " Version 1.0"; // // label3 // this.label3.Location = new System.Drawing.Point(72, 64); this.label3.Name = " label3"; this.label3.Size = new System.Drawing.Size(144, 16); this.label3.TabIndex = 4; this.label3.Text = " (c) Alexandre Frolov, 2003"; // // linkLabel1 // this.linkLabel1.Location = new System.Drawing.Point(72, 80); this.linkLabel1.Name = " linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(96, 16); this.linkLabel1.TabIndex = 5; this.linkLabel1.TabStop = true; this.linkLabel1.Text = " www.frolov.pp.ru"; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // linkLabel2 // this.linkLabel2.Location = new System.Drawing.Point(72, 96); this.linkLabel2.Name = " linkLabel2"; this.linkLabel2.Size = new System.Drawing.Size(136, 16); this.linkLabel2.TabIndex = 6; this.linkLabel2.TabStop = true; this.linkLabel2.Text = " alexandre@frolov.pp.ru"; this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); // // HelpAboutForm // this.AcceptButton = this.button1; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackColor = System.Drawing.Color.Khaki; this.CancelButton = this.button1; this.ClientSize = new System.Drawing.Size(258, 167); this.ControlBox = false; this.Controls.AddRange(new System.Windows.Forms.Control[] { this.linkLabel2, this.linkLabel1, this.label3, this.label2, this.label1, this.pictureBox1, this.button1}); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject(" $this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = " HelpAboutForm"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = " About SimpleNotepad"; this.ResumeLayout(false);
} #endregion
private void button1_Click(object sender, System.EventArgs e) { this.Close(); }
private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { linkLabel1.Links[linkLabel1.Links.IndexOf(e.Link)].Visited = true; System.Diagnostics.Process.Start(linkLabel1.Text); }
private void linkLabel2_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { linkLabel2.Links[linkLabel2.Links.IndexOf(e.Link)].Visited = true; System.Diagnostics.Process.Start( " mailto: alexandre@frolov.pp.ru"); } } }
Визуальное проектирование приложений C#
А.В. Фролов, Г.В. Фролов
Библиографический список
Фролов А.В., Фролов Г.В. Создание Web-приложений: Практическое руководство. — М.: Издательско-торговый дом «Русская Редакция», 2001.
Фролов А.В., Фролов Г.В. Практика применения PERL, PHP, Apache и MySQL для активных Web-сайтов. — М.: Издательско-торговый дом «Русская Редакция», 2002.
Фролов А.В., Фролов Г.В. Язык C#. Самоучитель. — М.: «ДИАЛОГ-МИФИ», 2002.
Фролов А.В., Фролов Г.В. Операционная система Microsoft Windows 3.1 для программиста. — М.: «ДИАЛОГ-МИФИ», 1993. — (Библиотека системного программиста; Т. 11).
Дейл Роджерсон. Основы COM. — М.: Издательско-торговый дом «Русская Редакция», 2000.
Том Армстронг. ActiveX: создание Web-приложений. — К.: Издательская группа BHV, 1998.
Фролов А.В., Фролов Г.В. Программирование видеоадаптеров CGA, EGA и VGA. — М.: «ДИАЛОГ-МИФИ», 1992. — (Библиотека системного программиста; Т. 3).
Фролов А.В., Фролов Г.В. Графический интерфейс GDI в Microsoft Windows. — М.: «ДИАЛОГ-МИФИ», 1993. — (Библиотека системного программиста; Т. 14).
Дейтел Х.М., Дейтел П. Дж. И др. Как программировать на XML. — М.: ЗАО «Издательство БИНОМ», 2001.
Петцольд Ч. Программирование для Microsoft Windows на C#. — М.: Издательско-торговый дом «Русская Редакция», 2002.
Фролов А.В., Фролов Г.В. Программирование для Windows NT. — М.: «ДИАЛОГ-МИФИ», 1996. — (Библиотека системного программиста; Т. 26).
Фролов А.В., Фролов Г.В. Программирование для Windows NT. — М.: «ДИАЛОГ-МИФИ», 1997. — (Библиотека системного программиста; Т. 27).
Найк Дилип. Стандарты и протоколы Интернета. — М.: Издательско-торговый дом «Русская Редакция», 1999.
Пройдаков Э.М., Теплицкий Л.А. Англо-русский толковый словарь по вычислительной технике, Интернету и программированию. — М.: Издательско-торговый дом «Русская Редакция», 2000.
|