frmAbout.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 // <summary> 6 // About box. 7 // </summary> 8 // <history> 9 // 2008 created by Truong Do (ductdo). 10 // 2009-... modified by Truong Do (TruongDo). 11 // 2023- Included in PowerToys. 12 // </history> 13 using System; 14 using System.Globalization; 15 using System.Reflection; 16 using System.Windows.Forms; 17 18 using MouseWithoutBorders.Core; 19 20 namespace MouseWithoutBorders 21 { 22 internal partial class FrmAbout : System.Windows.Forms.Form, IDisposable 23 { 24 internal FrmAbout() 25 { 26 InitializeComponent(); 27 Text = string.Format(CultureInfo.CurrentCulture, "About {0}", AssemblyTitle); 28 labelProductName.Text = string.Format(CultureInfo.CurrentCulture, "{0} {1}", AssemblyProduct, AssemblyVersion); 29 labelCopyright.Text = AssemblyCopyright; 30 labelCompanyName.Text = "Project creator: Truong Do (Đỗ Đức Trường)"; 31 32 textBoxContributors.Text += "* Microsoft Garage: Quinn Hawkins, Michael Low, Joe Coplen, Nino Yuniardi, Gwyneth Marshall, David Andrews, Karen Luecking"; 33 textBoxContributors.Text += "\r\n* Peter Hauge\t\t- Visual Studio"; 34 textBoxContributors.Text += "\r\n* Bruce Dawson\t\t- Windows Fundamentals"; 35 textBoxContributors.Text += "\r\n* Alan Myrvold\t\t- Office Security"; 36 textBoxContributors.Text += "\r\n* Adrian Garside\t\t- WEX"; 37 textBoxContributors.Text += "\r\n* Scott Bradner\t\t- Surface"; 38 textBoxContributors.Text += "\r\n* Aleks Gershaft\t\t- Windows Azure"; 39 textBoxContributors.Text += "\r\n* Chinh Huynh\t\t- Windows Azure"; 40 textBoxContributors.Text += "\r\n* Long Nguyen\t\t- Data Center"; 41 textBoxContributors.Text += "\r\n* Triet Le\t\t\t- Cloud Engineering"; 42 textBoxContributors.Text += "\r\n* Luke Schoen\t\t- Excel"; 43 textBoxContributors.Text += "\r\n* Bao Nguyen\t\t- Bing"; 44 textBoxContributors.Text += "\r\n* Ross Nichols\t\t- Windows"; 45 textBoxContributors.Text += "\r\n* Ryan Baltazar\t\t- Windows"; 46 textBoxContributors.Text += "\r\n* Ed Essey\t\t- The Garage"; 47 textBoxContributors.Text += "\r\n* Mario Madden\t\t- The Garage"; 48 textBoxContributors.Text += "\r\n* Karthick Mahalingam\t- ACE"; 49 textBoxContributors.Text += "\r\n* Pooja Kamra\t\t- ACE"; 50 textBoxContributors.Text += "\r\n* Justin White\t\t- SA"; 51 textBoxContributors.Text += "\r\n* Chris Ransom\t\t- SA"; 52 textBoxContributors.Text += "\r\n* Mike Ricks\t\t- Red Team"; 53 textBoxContributors.Text += "\r\n* Randy Santossio\t\t- Surface"; 54 textBoxContributors.Text += "\r\n* Ashish Sen Jaswal\t\t- Device Health"; 55 textBoxContributors.Text += "\r\n* Zoltan Harmath\t\t- Security Tools"; 56 textBoxContributors.Text += "\r\n* Luciano Krigun\t\t- Security Products"; 57 textBoxContributors.Text += "\r\n* Jo Hemmerlein\t\t- Red Team"; 58 textBoxContributors.Text += "\r\n* Chris Johnson\t\t- Surface Hub"; 59 textBoxContributors.Text += "\r\n* Loren Ponten\t\t- Surface Hub"; 60 textBoxContributors.Text += "\r\n* Paul Schmitt\t\t- WWL"; 61 62 textBoxContributors.Text += "\r\n\r\n* And many other Users!"; 63 } 64 65 internal static string AssemblyTitle 66 { 67 get 68 { 69 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); 70 if (attributes.Length > 0) 71 { 72 AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; 73 if (titleAttribute.Title != null && titleAttribute.Title.Length > 0) 74 { 75 return titleAttribute.Title; 76 } 77 } 78 79 return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location); 80 } 81 } 82 83 internal static string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString(); 84 85 internal static string AssemblyDescription 86 { 87 get 88 { 89 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); 90 return attributes.Length == 0 ? string.Empty : ((AssemblyDescriptionAttribute)attributes[0]).Description; 91 } 92 } 93 94 internal static string AssemblyProduct 95 { 96 get 97 { 98 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); 99 return attributes.Length == 0 ? string.Empty : ((AssemblyProductAttribute)attributes[0]).Product; 100 } 101 } 102 103 internal static string AssemblyCopyright 104 { 105 get 106 { 107 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); 108 return attributes.Length == 0 ? string.Empty : ((AssemblyCopyrightAttribute)attributes[0]).Copyright; 109 } 110 } 111 112 internal static string AssemblyCompany 113 { 114 get 115 { 116 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); 117 return attributes.Length == 0 ? string.Empty : ((AssemblyCompanyAttribute)attributes[0]).Company; 118 } 119 } 120 121 private void FrmAbout_FormClosed(object sender, FormClosedEventArgs e) 122 { 123 Common.AboutForm = null; 124 } 125 } 126 }