forked from fdorg/flashdevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutDialog.cs
More file actions
157 lines (142 loc) · 5.88 KB
/
Copy pathAboutDialog.cs
File metadata and controls
157 lines (142 loc) · 5.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
using System;
using System.IO;
using System.Drawing;
using System.Diagnostics;
using System.ComponentModel;
using System.Windows.Forms;
using PluginCore.Localization;
using FlashDevelop.Helpers;
using PluginCore.Helpers;
using PluginCore;
namespace FlashDevelop.Dialogs
{
public class AboutDialog : Form
{
private System.Windows.Forms.Label copyLabel;
private System.Windows.Forms.Label versionLabel;
private System.Windows.Forms.PictureBox imageBox;
public AboutDialog()
{
this.Owner = Globals.MainForm;
this.Font = Globals.Settings.DefaultFont;
this.InitializeComponent();
this.ApplyLocalizedTexts();
this.InitializeGraphics();
}
#region Windows Forms Designer Generated Code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
public void InitializeComponent()
{
this.imageBox = new System.Windows.Forms.PictureBox();
this.copyLabel = new System.Windows.Forms.Label();
this.versionLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.imageBox)).BeginInit();
this.SuspendLayout();
//
// imageBox
//
this.imageBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.imageBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.imageBox.Location = new System.Drawing.Point(0, 0);
this.imageBox.Name = "imageBox";
this.imageBox.Size = new System.Drawing.Size(450, 244);
this.imageBox.TabIndex = 0;
this.imageBox.TabStop = false;
this.imageBox.Click += new System.EventHandler(this.DialogCloseClick);
//
// copyLabel
//
this.copyLabel.AutoSize = true;
this.copyLabel.ForeColor = System.Drawing.Color.DarkGray;
this.copyLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(37)))), ((int)(((byte)(37)))));
this.copyLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.copyLabel.Location = new System.Drawing.Point(25, 192);
this.copyLabel.Name = "copyLabel";
this.copyLabel.Size = new System.Drawing.Size(383, 30);
this.copyLabel.TabIndex = 0;
this.copyLabel.Text = "FlashDevelop logo, domain and the name are copyright of Mika Palmu.\r\nDevelopment: Mika Palmu, Philippe Elsass and all helpful contributors.";
this.copyLabel.Click += new System.EventHandler(this.DialogCloseClick);
//
// versionLabel
//
this.versionLabel.AutoSize = true;
this.versionLabel.ForeColor = System.Drawing.Color.DarkGray;
this.versionLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(37)))), ((int)(((byte)(37)))), ((int)(((byte)(37)))));
this.versionLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.versionLabel.Location = new System.Drawing.Point(25, 172);
this.versionLabel.Name = "versionLabel";
this.versionLabel.Size = new System.Drawing.Size(289, 15);
this.versionLabel.TabIndex = 0;
this.versionLabel.Text = "FlashDevelop 4.6.0.0 for .NET 2.0 (master#1234567890)";
this.versionLabel.Click += new System.EventHandler(this.DialogCloseClick);
//
// AboutDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(450, 244);
this.Controls.Add(this.copyLabel);
this.Controls.Add(this.versionLabel);
this.Controls.Add(this.imageBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutDialog";
this.ShowInTaskbar = false;
this.KeyDown += new KeyEventHandler(this.DialogKeyDown);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = " About FlashDevelop";
((System.ComponentModel.ISupportInitialize)(this.imageBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
#region Methods And Event Handlers
/// <summary>
/// Attaches the image to the imagebox
/// </summary>
private void InitializeGraphics()
{
Stream stream = ResourceHelper.GetStream("AboutDialog.jpg");
this.imageBox.Image = Image.FromStream(stream);
}
/// <summary>
/// Applies the localized texts to the form
/// </summary>
private void ApplyLocalizedTexts()
{
this.Text = " " + TextHelper.GetString("Title.AboutDialog");
this.versionLabel.Font = new Font(this.Font, FontStyle.Bold);
this.versionLabel.Text = Application.ProductName;
}
/// <summary>
/// Closes the about dialog
/// </summary>
private void DialogKeyDown(Object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Enter || e.KeyData == Keys.Escape)
{
this.Close();
}
}
/// <summary>
/// Closes the about dialog
/// </summary>
private void DialogCloseClick(Object sender, EventArgs e)
{
this.Close();
}
/// <summary>
/// Shows the about dialog
/// </summary>
public static new void Show()
{
AboutDialog aboutDialog = new AboutDialog();
aboutDialog.ShowDialog();
}
#endregion
}
}