Skip to content

Commit

Permalink
V 0.9.6 - SSMS Addin completed
Browse files Browse the repository at this point in the history
  • Loading branch information
TaoK committed May 15, 2011
1 parent a67b640 commit 98c7f27
Show file tree
Hide file tree
Showing 19 changed files with 2,717 additions and 47 deletions.
225 changes: 225 additions & 0 deletions LICENSE.rtf

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions PoorMansTSqlFormatterLib/Properties/AssemblyInfo.cs
Expand Up @@ -23,12 +23,12 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;


[assembly: AssemblyTitle("PoorMansTSqlFormatterLib")] [assembly: AssemblyTitle("PoorMansTSqlFormatterLib")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("A simple free (AGPL) T-SQL formatting library for .Net 2.0.")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PoorMansTSqlFormatterLib")] [assembly: AssemblyProduct("PoorMansTSqlFormatterLib")]
[assembly: AssemblyCopyright("Copyright © 2011 Tao Klerks")] [assembly: AssemblyCopyright("Copyright © 2011 Tao Klerks")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: AssemblyVersion("0.9.5.*")] [assembly: AssemblyVersion("0.9.6.*")]

Large diffs are not rendered by default.

140 changes: 140 additions & 0 deletions PoorMansTSqlFormatterSSMSAddIn/AboutBox.cs
@@ -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

}
}
174 changes: 174 additions & 0 deletions PoorMansTSqlFormatterSSMSAddIn/AboutBox.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 98c7f27

Please sign in to comment.