| 0: | // AboutDialog.cs | |
| 1: | // Copyright (c) 2000 Mike Krueger | |
| 2: | // | |
| 3: | // This program is free software; you can redistribute it and/or modify | |
| 4: | // it under the terms of the GNU General Public License as published by | |
| 5: | // the Free Software Foundation; either version 2 of the License, or | |
| 6: | // (at your option) any later version. | |
| 7: | // | |
| 8: | // This program is distributed in the hope that it will be useful, | |
| 9: | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10: | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 11: | // GNU General Public License for more details. | |
| 12: | // | |
| 13: | // You should have received a copy of the GNU General Public License | |
| 14: | // along with this program; if not, write to the Free Software | |
| 15: | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 16: | ||
| 17: | using System; | |
| 18: | using System.Drawing; | |
| 19: | using System.ComponentModel; | |
| 20: | using System.Windows.Forms; | |
| 21: | using System.Resources; | |
| 22: | using System.IO; | |
| 23: | ||
| 24: | using SharpDevelop.Gui; | |
| 25: | using SharpDevelop.Tool.Data; | |
| 26: | ||
| 27: | namespace SharpDevelop.Gui.Dialogs { | |
| 28: | ||
| 29: | /// <summary> | |
| 30: | /// Simple About Dialog | |
| 31: | /// </summary> | |
| 32: | public class AboutDialog : System.Windows.Forms.Form | |
| 33: | { | |
| 34: | private System.ComponentModel.Container components; | |
| 35: | private System.Windows.Forms.Label label4; | |
| 36: | private System.Windows.Forms.Button okButton; | |
| 37: | private System.Windows.Forms.Label label3; | |
| 38: | private System.Windows.Forms.RichTextBox authorsTextBox; | |
| 39: | ||
| 40: | private System.Windows.Forms.TextBox buildTextBox; | |
| 41: | private System.Windows.Forms.TextBox versionTextBox; | |
| 42: | private System.Windows.Forms.Label label2; | |
| 43: | private System.Windows.Forms.Label label1; | |
| 44: | private System.Windows.Forms.PictureBox pictureBox1; | |
| 45: | ||
| 46: | public AboutDialog() | |
| 47: | { | |
| 48: | InitializeComponent(); | |
| 49: | ||
| 50: | pictureBox1.Image = Resource.GetBitmap("Icons.AboutImage"); | |
| 51: | ||
| 52: | authorsTextBox.LoadFile(Application.StartupPath + "\\..\\doc\\AUTHORS.txt", RichTextBoxStreamType.PlainText); | |
| 53: | versionTextBox.Text = SharpDevelopMain.VERSION; | |
| 54: | buildTextBox.Text = SharpDevelopMain.BUILD; | |
| 55: | AcceptButton = okButton; | |
| 56: | ||
| 57: | MaximizeBox = MinimizeBox = false; | |
| 58: | ShowInTaskbar = false; | |
| 59: | ||
| 60: | Icon = null; | |
| 61: | } | |
| 62: | ||
| 63: | /// <summary> | |
| 64: | /// Clean up any resources being used. | |
| 65: | /// </summary> | |
| 66: | protected override void Dispose(bool disposing) | |
| 67: | { | |
| 68: | if (disposing) { | |
| 69: | if (components != null){ | |
| 70: | components.Dispose(); | |
| 71: | } | |
| 72: | } | |
| 73: | base.Dispose(disposing); | |
| 74: | } | |
| 75: | ||
| 76: | public override void Dispose() | |
| 77: | { | |
| 78: | base.Dispose(); | |
| 79: | components.Dispose(); | |
| 80: | } | |
| 81: | ||
| 82: | private void InitializeComponent() | |
| 83: | { | |
| 84: | this.components = new System.ComponentModel.Container(); | |
| 85: | this.authorsTextBox = new System.Windows.Forms.RichTextBox(); | |
| 86: | this.label4 = new System.Windows.Forms.Label(); | |
| 87: | this.label1 = new System.Windows.Forms.Label(); | |
| 88: | this.label3 = new System.Windows.Forms.Label(); | |
| 89: | this.label2 = new System.Windows.Forms.Label(); | |
| 90: | this.pictureBox1 = new System.Windows.Forms.PictureBox(); | |
| 91: | this.okButton = new System.Windows.Forms.Button(); | |
| 92: | this.versionTextBox = new System.Windows.Forms.TextBox(); | |
| 93: | this.buildTextBox = new System.Windows.Forms.TextBox(); | |
| 94: | int i = 70; | |
| 95: | authorsTextBox.ReadOnly = true; | |
| 96: | authorsTextBox.Text = ""; | |
| 97: | authorsTextBox.Size = new System.Drawing.Size(320, 120); | |
| 98: | authorsTextBox.TabIndex = 5; | |
| 99: | authorsTextBox.Location = new System.Drawing.Point(8, 192 + 32 +i); | |
| 100: | ||
| 101: | label4.Location = new System.Drawing.Point(16, 112+ 32 + i); | |
| 102: | label4.Text = "Released under the GNU General Public licens" + | |
| 103: | "e.\n\nsponsored by AlphaSierraPapa \n" + | |
| 104: | " www.AlphaSierraPapa.com"; | |
| 105: | label4.Size = new System.Drawing.Size(362, 54); | |
| 106: | label4.TabIndex = 8; | |
| 107: | ||
| 108: | label1.Location = new System.Drawing.Point(9, 83+ 32 + i); | |
| 109: | label1.Text = Resource.GetString("Dialog.About.label1Text"); | |
| 110: | label1.Size = new System.Drawing.Size(64, 16); | |
| 111: | label1.TabIndex = 1; | |
| 112: | ||
| 113: | label3.Location = new System.Drawing.Point(8, 176+ 32 + i); | |
| 114: | label3.Text = Resource.GetString("Dialog.About.label3Text"); | |
| 115: | label3.Size = new System.Drawing.Size(64, 16); | |
| 116: | label3.TabIndex = 6; | |
| 117: | ||
| 118: | label2.Location = new System.Drawing.Point(142, 83+ 32 + i); | |
| 119: | label2.Text = Resource.GetString("Dialog.About.label2Text"); | |
| 120: | label2.Size = new System.Drawing.Size(48, 16); | |
| 121: | label2.TabIndex = 2; | |
| 122: | ||
| 123: | pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; | |
| 124: | pictureBox1.Location = new System.Drawing.Point(8, 8); | |
| 125: | pictureBox1.Size = new System.Drawing.Size(320, 160); | |
| 126: | pictureBox1.TabIndex = 0; | |
| 127: | pictureBox1.TabStop = false; | |
| 128: | ||
| 129: | okButton.Location = new System.Drawing.Point(264, 320+ 32 + i); | |
| 130: | okButton.DialogResult = System.Windows.Forms.DialogResult.OK; | |
| 131: | okButton.Size = new System.Drawing.Size(64, 24); | |
| 132: | okButton.TabIndex = 7; | |
| 133: | okButton.Text = Resource.GetString("Global.OKButtonText"); | |
| 134: | ||
| 135: | versionTextBox.Location = new System.Drawing.Point(56, 80+ 32 + i); | |
| 136: | versionTextBox.ReadOnly = true; | |
| 137: | versionTextBox.Text = ""; | |
| 138: | versionTextBox.TabIndex = 3; | |
| 139: | versionTextBox.Size = new System.Drawing.Size(72, 20); | |
| 140: | ||
| 141: | buildTextBox.Location = new System.Drawing.Point(176, 80+ 32 + i); | |
| 142: | buildTextBox.Text = ""; | |
| 143: | buildTextBox.ReadOnly = true; | |
| 144: | buildTextBox.TabIndex = 4; | |
| 145: | buildTextBox.Size = new System.Drawing.Size(152, 20); | |
| 146: | ||
| 147: | this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); | |
| 148: | this.Text = Resource.GetString("Dialog.About.DialogName"); | |
| 149: | ||
| 150: | this.FormBorderStyle = FormBorderStyle.FixedDialog; | |
| 151: | ||
| 152: | this.ClientSize = new System.Drawing.Size(338, 351+ 32 + i); | |
| 153: | ||
| 154: | this.Controls.Add(label4); | |
| 155: | this.Controls.Add(okButton); | |
| 156: | this.Controls.Add(label3); | |
| 157: | this.Controls.Add(authorsTextBox); | |
| 158: | this.Controls.Add(buildTextBox); | |
| 159: | this.Controls.Add(versionTextBox); | |
| 160: | this.Controls.Add(label2); | |
| 161: | this.Controls.Add(label1); | |
| 162: | this.Controls.Add(pictureBox1); | |
| 163: | StartPosition = FormStartPosition.CenterParent; | |
| 164: | // TopMost = true; | |
| 165: | } | |
| 166: | } | |
| 167: | } |
This page was automatically generated by SharpDevelop.