1- using System ;
2- using System . Collections . Generic ;
3- using System . ComponentModel ;
4- using System . Drawing ;
5- using System . Linq ;
1+ #region BSD 3-Clause License
2+
3+ // <copyright file="AboutBox.cs" company="Edgerunner.org">
4+ // Copyright 2020 Thaddeus Ryker
5+ // </copyright>
6+ //
7+ // BSD 3-Clause License
8+ //
9+ // Copyright (c) 2020, Thaddeus Ryker
10+ // All rights reserved.
11+ //
12+ // Redistribution and use in source and binary forms, with or without
13+ // modification, are permitted provided that the following conditions are met:
14+ //
15+ // 1. Redistributions of source code must retain the above copyright notice, this
16+ // list of conditions and the following disclaimer.
17+ //
18+ // 2. Redistributions in binary form must reproduce the above copyright notice,
19+ // this list of conditions and the following disclaimer in the documentation
20+ // and/or other materials provided with the distribution.
21+ //
22+ // 3. Neither the name of the copyright holder nor the names of its
23+ // contributors may be used to endorse or promote products derived from
24+ // this software without specific prior written permission.
25+ //
26+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29+ // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30+ // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31+ // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32+ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33+ // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34+ // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
37+ #endregion
38+
639using System . Reflection ;
7- using System . Threading . Tasks ;
840using System . Windows . Forms ;
941
42+ using Org . Edgerunner . ANTLR4 . Tools . Testing . GrunWin . Properties ;
43+
1044namespace Org . Edgerunner . ANTLR4 . Tools . Testing . GrunWin . Dialogs
1145{
12- partial class AboutBox : Form
46+ /// <summary>
47+ /// Class that represents and about box.
48+ /// </summary>
49+ /// <seealso cref="System.Windows.Forms.Form" />
50+ public partial class AboutBox : Form
1351 {
1452 public AboutBox ( )
1553 {
1654 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 . textBoxDescription . Text = AssemblyDescription ;
55+ Text = string . Format ( Resources . AboutMessage , AssemblyTitle ) ;
56+ labelProductName . Text = AssemblyProduct ;
57+ labelVersion . Text = string . Format ( Resources . VersionMessage , AssemblyVersion ) ;
58+ labelCopyright . Text = AssemblyCopyright ;
59+ labelCompanyName . Text = AssemblyCompany ;
60+ textBoxDescription . Text = AssemblyDescription ;
2361 }
2462
2563 #region Assembly Attribute Accessors
@@ -32,7 +70,7 @@ public string AssemblyTitle
3270 if ( attributes . Length > 0 )
3371 {
3472 AssemblyTitleAttribute titleAttribute = ( AssemblyTitleAttribute ) attributes [ 0 ] ;
35- if ( titleAttribute . Title != "" )
73+ if ( titleAttribute . Title != string . Empty )
3674 {
3775 return titleAttribute . Title ;
3876 }
@@ -41,13 +79,7 @@ public string AssemblyTitle
4179 }
4280 }
4381
44- public string AssemblyVersion
45- {
46- get
47- {
48- return Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version . ToString ( ) ;
49- }
50- }
82+ public string AssemblyVersion => Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version . ToString ( ) ;
5183
5284 public string AssemblyDescription
5385 {
@@ -56,7 +88,7 @@ public string AssemblyDescription
5688 object [ ] attributes = Assembly . GetExecutingAssembly ( ) . GetCustomAttributes ( typeof ( AssemblyDescriptionAttribute ) , false ) ;
5789 if ( attributes . Length == 0 )
5890 {
59- return "" ;
91+ return string . Empty ;
6092 }
6193 return ( ( AssemblyDescriptionAttribute ) attributes [ 0 ] ) . Description ;
6294 }
@@ -69,7 +101,7 @@ public string AssemblyProduct
69101 object [ ] attributes = Assembly . GetExecutingAssembly ( ) . GetCustomAttributes ( typeof ( AssemblyProductAttribute ) , false ) ;
70102 if ( attributes . Length == 0 )
71103 {
72- return "" ;
104+ return string . Empty ;
73105 }
74106 return ( ( AssemblyProductAttribute ) attributes [ 0 ] ) . Product ;
75107 }
@@ -82,7 +114,7 @@ public string AssemblyCopyright
82114 object [ ] attributes = Assembly . GetExecutingAssembly ( ) . GetCustomAttributes ( typeof ( AssemblyCopyrightAttribute ) , false ) ;
83115 if ( attributes . Length == 0 )
84116 {
85- return "" ;
117+ return string . Empty ;
86118 }
87119 return ( ( AssemblyCopyrightAttribute ) attributes [ 0 ] ) . Copyright ;
88120 }
@@ -95,7 +127,7 @@ public string AssemblyCompany
95127 object [ ] attributes = Assembly . GetExecutingAssembly ( ) . GetCustomAttributes ( typeof ( AssemblyCompanyAttribute ) , false ) ;
96128 if ( attributes . Length == 0 )
97129 {
98- return "" ;
130+ return string . Empty ;
99131 }
100132 return ( ( AssemblyCompanyAttribute ) attributes [ 0 ] ) . Company ;
101133 }
0 commit comments