asciipumper

- mspaint style program to create irc ascii art
git clone git://git.acid.vegas/asciipumper.git
Log | Files | Refs | Archive | README

AboutBox1.cs (5914B)

      1 #region Copyright (c) 2007, PP4L Software
      2 /************************************************************************************
      3 
      4 Copyright  2007, PP4L Software
      5 Author:	Lampiasis <lampiasis@dvolker.com>
      6 
      7 This program is free software; you can redistribute it and/or modify
      8 it under the terms of the GNU General Public License as published by
      9 the Free Software Foundation; either version 2 of the License, or
     10 (at your option) any later version.
     11 
     12 This program is distributed in the hope that it will be useful,
     13 but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     15 GNU General Public License for more details.
     16 
     17 You should have received a copy of the GNU General Public License
     18 along with this program; if not, write to the Free Software
     19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
     20 
     21 '***********************************************************************************/
     22 #endregion
     23 
     24 using System;
     25 using System.Collections.Generic;
     26 using System.ComponentModel;
     27 using System.Drawing;
     28 using System.Windows.Forms;
     29 using System.Reflection;
     30 
     31 namespace AsciiPumper
     32 {
     33 	partial class AboutBox1 : Form
     34 	{
     35 		public AboutBox1()
     36 		{
     37 			InitializeComponent();
     38 
     39 			//  Initialize the AboutBox to display the product information from the assembly information.
     40 			//  Change assembly information settings for your application through either:
     41 			//  - Project->Properties->Application->Assembly Information
     42 			//  - AssemblyInfo.cs
     43 			this.Text = String.Format("About {0}", AssemblyTitle);
     44 			//this.labelProductName.Text = AssemblyProduct;
     45 			this.labelProductName.Text = "Ascii Pumper";
     46 			this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
     47 			this.labelCopyright.Text = AssemblyCopyright;
     48 			this.labelCompanyName.Text = AssemblyCompany;
     49 			this.textBoxDescription.Text = AssemblyDescription + "\r\n\r\nya we pumpin'!\r\n\r\n";
     50 			this.textBoxDescription.Text += @"
     51 Thanks vap0r for asciipumper.txt, ramprat for bug reports and all the 
     52 pumpers for their input.
     53 
     54 http://code.google.com/p/asciipumper/
     55 Copyright (C) 2007 Lampiasis <lampiasis@dvolker.com>
     56 
     57 This program is free software; you can redistribute it and/or modify
     58 it under the terms of the GNU General Public License as published by
     59 the Free Software Foundation; either version 2 of the License, or
     60 (at your option) any later version.
     61 
     62 This program is distributed in the hope that it will be useful,
     63 but WITHOUT ANY WARRANTY; without even the implied warranty of
     64 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     65 GNU General Public License for more details.
     66 
     67 You should have received a copy of the GNU General Public License
     68 along with this program; if not, write to the Free Software
     69 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
     70 ";
     71 		}
     72 
     73 		#region Assembly Attribute Accessors
     74 
     75 		public string AssemblyTitle
     76 		{
     77 			get
     78 			{
     79 				// Get all Title attributes on this assembly
     80 				object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
     81 				// If there is at least one Title attribute
     82 				if (attributes.Length > 0)
     83 				{
     84 					// Select the first one
     85 					AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
     86 					// If it is not an empty string, return it
     87 					if (titleAttribute.Title != "")
     88 						return titleAttribute.Title;
     89 				}
     90 				// If there was no Title attribute, or if the Title attribute was the empty string, return the .exe name
     91 				return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
     92 			}
     93 		}
     94 
     95 		public string AssemblyVersion
     96 		{
     97 			get
     98 			{
     99 				return Assembly.GetExecutingAssembly().GetName().Version.ToString();
    100 			}
    101 		}
    102 
    103 		public string AssemblyDescription
    104 		{
    105 			get
    106 			{
    107 				// Get all Description attributes on this assembly
    108 				object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
    109 				// If there aren't any Description attributes, return an empty string
    110 				if (attributes.Length == 0)
    111 					return "";
    112 				// If there is a Description attribute, return its value
    113 				return ((AssemblyDescriptionAttribute)attributes[0]).Description;
    114 			}
    115 		}
    116 
    117 		public string AssemblyProduct
    118 		{
    119 			get
    120 			{
    121 				// Get all Product attributes on this assembly
    122 				object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
    123 				// If there aren't any Product attributes, return an empty string
    124 				if (attributes.Length == 0)
    125 					return "";
    126 				// If there is a Product attribute, return its value
    127 				return ((AssemblyProductAttribute)attributes[0]).Product;
    128 			}
    129 		}
    130 
    131 		public string AssemblyCopyright
    132 		{
    133 			get
    134 			{
    135 				// Get all Copyright attributes on this assembly
    136 				object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
    137 				// If there aren't any Copyright attributes, return an empty string
    138 				if (attributes.Length == 0)
    139 					return "";
    140 				// If there is a Copyright attribute, return its value
    141 				return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
    142 			}
    143 		}
    144 
    145 		public string AssemblyCompany
    146 		{
    147 			get
    148 			{
    149 				// Get all Company attributes on this assembly
    150 				object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
    151 				// If there aren't any Company attributes, return an empty string
    152 				if (attributes.Length == 0)
    153 					return "";
    154 				// If there is a Company attribute, return its value
    155 				return ((AssemblyCompanyAttribute)attributes[0]).Company;
    156 			}
    157 		}
    158 		#endregion
    159 
    160 		private void AboutBox1_Load(object sender, EventArgs e)
    161 		{
    162 
    163 		}
    164 	}
    165 }