/[AnywhereTS-MSSQL]/trunk/TSAdminTool/frmAboutPro.cs
ViewVC logotype

Contents of /trunk/TSAdminTool/frmAboutPro.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (show annotations) (download)
Wed Jul 11 14:19:13 2012 UTC (7 years, 7 months ago) by william
File size: 5497 byte(s)
imported from https://anywherets.svn.sourceforge.net/svnroot/anywherets/trunk/
Revision: 1
Author: beartown
Date: 3:10:40 AM, Monday, June 21, 2010
Message:
First upload. Still todo in order to get a fully working product: Replace Thinstation images with vanilla Thinstation, modify ImageDesigntimeConfig.cs, ImageRuntimeConfig.cs in order to support the Thinstation image
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Windows.Forms;
6 using System.Reflection;
7
8 namespace AnywhereTS
9 {
10 partial class frmAboutPro : Form
11 {
12 public frmAboutPro()
13 {
14 InitializeComponent();
15
16 // Initialize the AboutBox to display the product information from the assembly information.
17 // Change assembly information settings for your application through either:
18 // - Project->Properties->Application->Assembly Information
19 // - AssemblyInfo.cs
20
21 // Changed, not using AssemblyTitle anymore.
22 // string applicationName = AssemblyTitle;
23
24 this.Text = String.Format("About {0}", ATSGlobals.ApplicationTitle);
25 this.labelProductName.Text = ATSGlobals.ApplicationTitle;
26 this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
27 this.labelCopyright.Text = AssemblyCopyright;
28 this.labelCompanyName.Text = AssemblyCompany;
29 // Display number of max clients:
30 this.textBoxDescription.Text = AssemblyDescription + "\r\n\r\nOpen Souce version.";
31 }
32
33 #region Assembly Attribute Accessors
34
35 public string AssemblyTitle
36 {
37 get
38 {
39 // Get all Title attributes on this assembly
40 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
41 // If there is at least one Title attribute
42 if (attributes.Length > 0)
43 {
44 // Select the first one
45 AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
46 // If it is not an empty string, return it
47 if (titleAttribute.Title != "")
48 return titleAttribute.Title;
49 }
50 // If there was no Title attribute, or if the Title attribute was the empty string, return the .exe name
51 return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
52 }
53 }
54
55 public string AssemblyVersion
56 {
57 get
58 {
59 return Assembly.GetExecutingAssembly().GetName().Version.ToString();
60 }
61 }
62
63 public string AssemblyDescription
64 {
65 get
66 {
67 // Get all Description attributes on this assembly
68 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
69 // If there aren't any Description attributes, return an empty string
70 if (attributes.Length == 0)
71 return "";
72 // If there is a Description attribute, return its value
73 return ((AssemblyDescriptionAttribute)attributes[0]).Description;
74 }
75 }
76
77 public string AssemblyProduct
78 {
79 get
80 {
81 // Get all Product attributes on this assembly
82 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
83 // If there aren't any Product attributes, return an empty string
84 if (attributes.Length == 0)
85 return "";
86 // If there is a Product attribute, return its value
87 return ((AssemblyProductAttribute)attributes[0]).Product;
88 }
89 }
90
91 public string AssemblyCopyright
92 {
93 get
94 {
95 // Get all Copyright attributes on this assembly
96 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
97 // If there aren't any Copyright attributes, return an empty string
98 if (attributes.Length == 0)
99 return "";
100 // If there is a Copyright attribute, return its value
101 return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
102 }
103 }
104
105 public string AssemblyCompany
106 {
107 get
108 {
109 // Get all Company attributes on this assembly
110 object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
111 // If there aren't any Company attributes, return an empty string
112 if (attributes.Length == 0)
113 return "";
114 // If there is a Company attribute, return its value
115 return ((AssemblyCompanyAttribute)attributes[0]).Company;
116 }
117 }
118 #endregion
119
120 private void labDebug_DoubleClick(object sender, EventArgs e)
121 {
122 Globals.WizardMode = Globals.WizardTask.USER_SELECTED_DISTRIBUTION_DATA2;
123 using (frmWizard objCustomDialogBox = new frmWizard())
124 {
125 objCustomDialogBox.ShowDialog();
126 } // Unload frmWizard, in order to run load event next time.
127
128 }
129
130 private void labDebug_Click(object sender, EventArgs e)
131 {
132
133 }
134 }
135 }

  ViewVC Help
Powered by ViewVC 1.1.22