Permalink
Browse files

V 0.9.6 - SSMS Addin completed

  • Loading branch information...
1 parent a67b640 commit 98c7f271f47be281e60ee21dca70efbc83f2baaa @TaoK committed May 15, 2011
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -23,12 +23,12 @@
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("PoorMansTSqlFormatterLib")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyDescription("A simple free (AGPL) T-SQL formatting library for .Net 2.0.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PoorMansTSqlFormatterLib")]
[assembly: AssemblyCopyright("Copyright © 2011 Tao Klerks")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
-[assembly: AssemblyVersion("0.9.5.*")]
+[assembly: AssemblyVersion("0.9.6.*")]

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,140 @@
+/*
+Poor Man's T-SQL Formatter - a small free Transact-SQL formatting
+library for .Net 2.0, written in C#.
+Copyright (C) 2011 Tao Klerks
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ */
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Reflection;
+using System.IO;
+using System.Windows.Forms;
+
+namespace PoorMansTSqlFormatterSSMSAddIn
+{
+ partial class AboutBox : Form
+ {
+ public AboutBox()
+ {
+ InitializeComponent();
+ this.Text = String.Format("About {0} {0}", AssemblyTitle);
+ this.labelProductName.Text = String.Format("{0}, v{1}", AssemblyProduct, AssemblyVersion);
+ this.labelCopyright.Text = AssemblyCopyright;
+ this.textBoxDescription.Text = AssemblyDescription;
+
+ string GPLText = "";
+ try
+ {
+ Stream fileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(typeof(AddinConnector).Namespace + ".LICENSE.txt");
+ StreamReader textReader = new StreamReader(fileStream, System.Text.Encoding.ASCII);
+ GPLText = textReader.ReadToEnd();
+ textReader.Close();
+ fileStream.Close();
+ }
+ catch (Exception ex)
+ {
+#if (DEBUG)
+ MessageBox.Show("Exception! " + ex.ToString());
+#endif
+ }
+ this.textBoxDescription.Text += System.Environment.NewLine + System.Environment.NewLine + GPLText;
+ }
+
+ #region Assembly Attribute Accessors
+
+ public string AssemblyTitle
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
+ if (attributes.Length > 0)
+ {
+ AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
+ if (titleAttribute.Title != "")
+ {
+ return titleAttribute.Title;
+ }
+ }
+ return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
+ }
+ }
+
+ public string AssemblyVersion
+ {
+ get
+ {
+ return Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ }
+ }
+
+ public string AssemblyDescription
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyDescriptionAttribute)attributes[0]).Description;
+ }
+ }
+
+ public string AssemblyProduct
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyProductAttribute)attributes[0]).Product;
+ }
+ }
+
+ public string AssemblyCopyright
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
+ }
+ }
+
+ public string AssemblyCompany
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return "";
+ }
+ return ((AssemblyCompanyAttribute)attributes[0]).Company;
+ }
+ }
+ #endregion
+
+ }
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 98c7f27

Please sign in to comment.