Skip to content

Commit 9075036

Browse files
committed
Add project files.
1 parent 346d5dd commit 9075036

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5316
-0
lines changed

AboutBox.Designer.cs

Lines changed: 190 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AboutBox.cs

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Drawing;
5+
using System.Linq;
6+
using System.Reflection;
7+
using System.Threading.Tasks;
8+
using System.Windows.Forms;
9+
10+
namespace TextForge
11+
{
12+
partial class AboutBox : Form
13+
{
14+
public AboutBox()
15+
{
16+
InitializeComponent();
17+
this.Text = String.Format("About {0}", AssemblyTitle);
18+
this.labelProductName.Text = AssemblyProduct;
19+
this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
20+
this.labelCopyright.Text = AssemblyCopyright;
21+
this.labelCompanyName.Text = AssemblyCompany;
22+
this.LicenseTextBox.Text = Properties.Resources.THIRD_PARTY;
23+
}
24+
25+
#region Assembly Attribute Accessors
26+
27+
public string AssemblyTitle
28+
{
29+
get
30+
{
31+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
32+
if (attributes.Length > 0)
33+
{
34+
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
35+
if (titleAttribute.Title != "")
36+
{
37+
return titleAttribute.Title;
38+
}
39+
}
40+
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
41+
}
42+
}
43+
44+
public string AssemblyVersion
45+
{
46+
get
47+
{
48+
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
49+
}
50+
}
51+
52+
public string AssemblyDescription
53+
{
54+
get
55+
{
56+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
57+
if (attributes.Length == 0)
58+
{
59+
return "";
60+
}
61+
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
62+
}
63+
}
64+
65+
public string AssemblyProduct
66+
{
67+
get
68+
{
69+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
70+
if (attributes.Length == 0)
71+
{
72+
return "";
73+
}
74+
return ((AssemblyProductAttribute)attributes[0]).Product;
75+
}
76+
}
77+
78+
public string AssemblyCopyright
79+
{
80+
get
81+
{
82+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
83+
if (attributes.Length == 0)
84+
{
85+
return "";
86+
}
87+
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
88+
}
89+
}
90+
91+
public string AssemblyCompany
92+
{
93+
get
94+
{
95+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
96+
if (attributes.Length == 0)
97+
{
98+
return "";
99+
}
100+
return ((AssemblyCompanyAttribute)attributes[0]).Company;
101+
}
102+
}
103+
#endregion
104+
}
105+
}

0 commit comments

Comments
 (0)