File: UCAbout.cs

package info (click to toggle)
hexbox 1.5.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,440 kB
  • ctags: 1,210
  • sloc: cs: 6,784; makefile: 21; sh: 1
file content (236 lines) | stat: -rw-r--r-- 8,325 bytes parent folder | download | duplicates (2)
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;
using System.Reflection;
using System.IO;

namespace Be.HexEditor
{
	/// <summary>
	/// Summary description for UCAbout.
	/// </summary>
	public class UCAbout : System.Windows.Forms.UserControl
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label lblAuthor;
		private System.Windows.Forms.Label lblVersion;
		private System.Windows.Forms.TabPage tabLicense;
		private System.Windows.Forms.RichTextBox txtLicense;
		private System.Windows.Forms.TabPage tabChanges;
		private System.Windows.Forms.RichTextBox txtChanges;
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.LinkLabel lnkWorkspace;
		private System.Windows.Forms.TabControl tabControl;
		private System.Windows.Forms.TabPage tabThanksTo;
		private System.Windows.Forms.RichTextBox txtThanksTo;
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public UCAbout()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitializeComponent call

            try
            {
                Assembly ca = Assembly.GetExecutingAssembly();

                string resThanksTo = "Be.HexEditor.Resources.ThanksTo.rtf";
                txtThanksTo.LoadFile(ca.GetManifestResourceStream(resThanksTo), RichTextBoxStreamType.RichText);

                string resLicense = "Be.HexEditor.Resources.license.txt";
                txtLicense.LoadFile(ca.GetManifestResourceStream(resLicense), RichTextBoxStreamType.PlainText);

                string resChanges = "Be.HexEditor.Resources.Changes.rtf";
                txtChanges.LoadFile(ca.GetManifestResourceStream(resChanges), RichTextBoxStreamType.RichText);

                lblVersion.Text = ca.GetName().Version.ToString();
            }
            catch (Exception)
            {
                return;
            }
		}

		/// <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 Component 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UCAbout));
			this.label1 = new System.Windows.Forms.Label();
			this.lblAuthor = new System.Windows.Forms.Label();
			this.lnkWorkspace = new System.Windows.Forms.LinkLabel();
			this.label5 = new System.Windows.Forms.Label();
			this.lblVersion = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.tabControl = new System.Windows.Forms.TabControl();
			this.tabThanksTo = new System.Windows.Forms.TabPage();
			this.txtThanksTo = new System.Windows.Forms.RichTextBox();
			this.tabLicense = new System.Windows.Forms.TabPage();
			this.txtLicense = new System.Windows.Forms.RichTextBox();
			this.tabChanges = new System.Windows.Forms.TabPage();
			this.txtChanges = new System.Windows.Forms.RichTextBox();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.tabControl.SuspendLayout();
			this.tabThanksTo.SuspendLayout();
			this.tabLicense.SuspendLayout();
			this.tabChanges.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
			this.SuspendLayout();
			// 
			// label1
			// 
			resources.ApplyResources(this.label1, "label1");
			this.label1.Name = "label1";
			// 
			// lblAuthor
			// 
			resources.ApplyResources(this.lblAuthor, "lblAuthor");
			this.lblAuthor.BackColor = System.Drawing.Color.White;
			this.lblAuthor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.lblAuthor.Name = "lblAuthor";
			// 
			// lnkWorkspace
			// 
			resources.ApplyResources(this.lnkWorkspace, "lnkWorkspace");
			this.lnkWorkspace.BackColor = System.Drawing.Color.White;
			this.lnkWorkspace.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.lnkWorkspace.Name = "lnkWorkspace";
			this.lnkWorkspace.TabStop = true;
			this.lnkWorkspace.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkCompany_LinkClicked);
			// 
			// label5
			// 
			resources.ApplyResources(this.label5, "label5");
			this.label5.Name = "label5";
			// 
			// lblVersion
			// 
			resources.ApplyResources(this.lblVersion, "lblVersion");
			this.lblVersion.BackColor = System.Drawing.Color.White;
			this.lblVersion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.lblVersion.Name = "lblVersion";
			// 
			// label7
			// 
			resources.ApplyResources(this.label7, "label7");
			this.label7.Name = "label7";
			// 
			// tabControl
			// 
			resources.ApplyResources(this.tabControl, "tabControl");
			this.tabControl.Controls.Add(this.tabThanksTo);
			this.tabControl.Controls.Add(this.tabLicense);
			this.tabControl.Controls.Add(this.tabChanges);
			this.tabControl.Name = "tabControl";
			this.tabControl.SelectedIndex = 0;
			// 
			// tabThanksTo
			// 
			resources.ApplyResources(this.tabThanksTo, "tabThanksTo");
			this.tabThanksTo.Controls.Add(this.txtThanksTo);
			this.tabThanksTo.Name = "tabThanksTo";
			// 
			// txtThanksTo
			// 
			this.txtThanksTo.BackColor = System.Drawing.Color.White;
			this.txtThanksTo.BorderStyle = System.Windows.Forms.BorderStyle.None;
			resources.ApplyResources(this.txtThanksTo, "txtThanksTo");
			this.txtThanksTo.Name = "txtThanksTo";
			this.txtThanksTo.ReadOnly = true;
			// 
			// tabLicense
			// 
			this.tabLicense.Controls.Add(this.txtLicense);
			resources.ApplyResources(this.tabLicense, "tabLicense");
			this.tabLicense.Name = "tabLicense";
			// 
			// txtLicense
			// 
			this.txtLicense.BackColor = System.Drawing.Color.White;
			this.txtLicense.BorderStyle = System.Windows.Forms.BorderStyle.None;
			resources.ApplyResources(this.txtLicense, "txtLicense");
			this.txtLicense.Name = "txtLicense";
			this.txtLicense.ReadOnly = true;
			// 
			// tabChanges
			// 
			this.tabChanges.Controls.Add(this.txtChanges);
			resources.ApplyResources(this.tabChanges, "tabChanges");
			this.tabChanges.Name = "tabChanges";
			// 
			// txtChanges
			// 
			this.txtChanges.BorderStyle = System.Windows.Forms.BorderStyle.None;
			resources.ApplyResources(this.txtChanges, "txtChanges");
			this.txtChanges.Name = "txtChanges";
			// 
			// pictureBox1
			// 
			resources.ApplyResources(this.pictureBox1, "pictureBox1");
			this.pictureBox1.Image = global::Be.HexEditor.images.Logo;
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.TabStop = false;
			// 
			// UCAbout
			// 
			this.Controls.Add(this.pictureBox1);
			this.Controls.Add(this.tabControl);
			this.Controls.Add(this.lblVersion);
			this.Controls.Add(this.label7);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.lnkWorkspace);
			this.Controls.Add(this.lblAuthor);
			this.Controls.Add(this.label1);
			this.Name = "UCAbout";
			resources.ApplyResources(this, "$this");
			this.tabControl.ResumeLayout(false);
			this.tabThanksTo.ResumeLayout(false);
			this.tabLicense.ResumeLayout(false);
			this.tabChanges.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void lnkCompany_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
		{
			try
			{
				System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(this.lnkWorkspace.Text));
			}
			catch (Exception ex1)
			{
				MessageBox.Show(ex1.Message);
			}
		}
	}
}