diff --git a/minisqlquery-master/src/MiniSqlQuery/AboutForm.cs b/minisqlquery-master/src/MiniSqlQuery/AboutForm.cs
new file mode 100644
index 0000000..233d777
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/AboutForm.cs
@@ -0,0 +1,156 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Properties;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The about form.</summary>
+ internal partial class AboutForm : Form
+ {
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>Initializes a new instance of the <see cref="AboutForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ public AboutForm(IApplicationServices services) : this()
+ {
+ _services = services;
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="AboutForm"/> class.</summary>
+ public AboutForm()
+ {
+ InitializeComponent();
+ pic.Image = ImageResource.ApplicationIcon;
+ Text = String.Format("About {0}", AssemblyTitle);
+ labelProductName.Text = AssemblyTitle;
+ labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
+ labelCopyright.Text = AssemblyCopyright;
+ textBoxDescription.Text = AssemblyDescription;
+ }
+
+ /// <summary>Gets AssemblyCompany.</summary>
+ public string AssemblyCompany
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ return ((AssemblyCompanyAttribute)attributes[0]).Company;
+ }
+ }
+
+ /// <summary>Gets AssemblyCopyright.</summary>
+ public string AssemblyCopyright
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
+ }
+ }
+
+ /// <summary>Gets AssemblyDescription.</summary>
+ public string AssemblyDescription
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute),
+ false);
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ return ((AssemblyDescriptionAttribute)attributes[0]).Description;
+ }
+ }
+
+ /// <summary>Gets AssemblyProduct.</summary>
+ public string AssemblyProduct
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
+ if (attributes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ return ((AssemblyProductAttribute)attributes[0]).Product;
+ }
+ }
+
+ /// <summary>Gets AssemblyTitle.</summary>
+ public string AssemblyTitle
+ {
+ get
+ {
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
+ if (attributes.Length > 0)
+ {
+ AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
+ if (titleAttribute.Title != string.Empty)
+ {
+ return titleAttribute.Title;
+ }
+ }
+
+ return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
+ }
+ }
+
+ /// <summary>Gets AssemblyVersion.</summary>
+ public string AssemblyVersion
+ {
+ get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
+ }
+
+ /// <summary>The about form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void AboutForm_Load(object sender, EventArgs e)
+ {
+ List<IPlugIn> plugins = new List<IPlugIn>(_services.Plugins.Values);
+ pluginList.SetDataSource(plugins.ToArray());
+ webBrowser1.DocumentText = Resources.ReadMe;
+ txtChangeLog.Text = Resources.ChangeLog;
+ txtLicense.Text = Resources.LicenseMiniSqlQuery;
+ }
+
+ /// <summary>The label version_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void labelVersion_Click(object sender, EventArgs e)
+ {
+ }
+
+ /// <summary>The ok button_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void okButton_Click(object sender, EventArgs e)
+ {
+ Close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/AboutForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/AboutForm.Designer.cs
new file mode 100644
index 0000000..c0b6920
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/AboutForm.Designer.cs
@@ -0,0 +1,280 @@
+namespace MiniSqlQuery
+{
+ partial class AboutForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.textBoxDescription = new System.Windows.Forms.TextBox();
+ this.okButton = new System.Windows.Forms.Button();
+ this.pluginList = new MiniSqlQuery.Core.Controls.PluginListControl();
+ this.labelVersion = new System.Windows.Forms.Label();
+ this.labelProductName = new System.Windows.Forms.Label();
+ this.labelCopyright = new System.Windows.Forms.Label();
+ this.tabControl1 = new System.Windows.Forms.TabControl();
+ this.tabPageReadMe = new System.Windows.Forms.TabPage();
+ this.webBrowser1 = new System.Windows.Forms.WebBrowser();
+ this.tabPageLicense = new System.Windows.Forms.TabPage();
+ this.txtLicense = new System.Windows.Forms.TextBox();
+ this.tabPagePlugins = new System.Windows.Forms.TabPage();
+ this.pic = new System.Windows.Forms.PictureBox();
+ this.tabChangeLog = new System.Windows.Forms.TabPage();
+ this.txtChangeLog = new System.Windows.Forms.TextBox();
+ this.tabControl1.SuspendLayout();
+ this.tabPageReadMe.SuspendLayout();
+ this.tabPageLicense.SuspendLayout();
+ this.tabPagePlugins.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pic)).BeginInit();
+ this.tabChangeLog.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // textBoxDescription
+ //
+ this.textBoxDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBoxDescription.BackColor = System.Drawing.SystemColors.Window;
+ this.textBoxDescription.Location = new System.Drawing.Point(12, 77);
+ this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
+ this.textBoxDescription.Multiline = true;
+ this.textBoxDescription.Name = "textBoxDescription";
+ this.textBoxDescription.ReadOnly = true;
+ this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+ this.textBoxDescription.Size = new System.Drawing.Size(615, 54);
+ this.textBoxDescription.TabIndex = 23;
+ this.textBoxDescription.TabStop = false;
+ this.textBoxDescription.Text = "Description";
+ //
+ // okButton
+ //
+ this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.okButton.Location = new System.Drawing.Point(552, 437);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(75, 23);
+ this.okButton.TabIndex = 24;
+ this.okButton.Text = "&OK";
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // pluginList
+ //
+ this.pluginList.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pluginList.Location = new System.Drawing.Point(3, 3);
+ this.pluginList.Name = "pluginList";
+ this.pluginList.Size = new System.Drawing.Size(601, 262);
+ this.pluginList.TabIndex = 0;
+ //
+ // labelVersion
+ //
+ this.labelVersion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelVersion.Location = new System.Drawing.Point(81, 35);
+ this.labelVersion.Margin = new System.Windows.Forms.Padding(0);
+ this.labelVersion.Name = "labelVersion";
+ this.labelVersion.Size = new System.Drawing.Size(546, 17);
+ this.labelVersion.TabIndex = 0;
+ this.labelVersion.Text = "Version";
+ this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.labelVersion.Click += new System.EventHandler(this.labelVersion_Click);
+ //
+ // labelProductName
+ //
+ this.labelProductName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelProductName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelProductName.Location = new System.Drawing.Point(81, 9);
+ this.labelProductName.Margin = new System.Windows.Forms.Padding(0);
+ this.labelProductName.Name = "labelProductName";
+ this.labelProductName.Size = new System.Drawing.Size(546, 17);
+ this.labelProductName.TabIndex = 19;
+ this.labelProductName.Text = "Product Name";
+ this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelCopyright
+ //
+ this.labelCopyright.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelCopyright.Location = new System.Drawing.Point(81, 52);
+ this.labelCopyright.Margin = new System.Windows.Forms.Padding(0);
+ this.labelCopyright.Name = "labelCopyright";
+ this.labelCopyright.Size = new System.Drawing.Size(546, 17);
+ this.labelCopyright.TabIndex = 22;
+ this.labelCopyright.Text = "Copyright";
+ this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // tabControl1
+ //
+ this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tabControl1.Controls.Add(this.tabPageReadMe);
+ this.tabControl1.Controls.Add(this.tabChangeLog);
+ this.tabControl1.Controls.Add(this.tabPageLicense);
+ this.tabControl1.Controls.Add(this.tabPagePlugins);
+ this.tabControl1.Location = new System.Drawing.Point(12, 137);
+ this.tabControl1.Name = "tabControl1";
+ this.tabControl1.SelectedIndex = 0;
+ this.tabControl1.Size = new System.Drawing.Size(615, 294);
+ this.tabControl1.TabIndex = 25;
+ //
+ // tabPageReadMe
+ //
+ this.tabPageReadMe.Controls.Add(this.webBrowser1);
+ this.tabPageReadMe.Location = new System.Drawing.Point(4, 22);
+ this.tabPageReadMe.Name = "tabPageReadMe";
+ this.tabPageReadMe.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageReadMe.Size = new System.Drawing.Size(607, 268);
+ this.tabPageReadMe.TabIndex = 2;
+ this.tabPageReadMe.Text = "Read Me!";
+ this.tabPageReadMe.UseVisualStyleBackColor = true;
+ //
+ // webBrowser1
+ //
+ this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.webBrowser1.Location = new System.Drawing.Point(3, 3);
+ this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
+ this.webBrowser1.Name = "webBrowser1";
+ this.webBrowser1.Size = new System.Drawing.Size(601, 262);
+ this.webBrowser1.TabIndex = 0;
+ //
+ // tabPageLicense
+ //
+ this.tabPageLicense.Controls.Add(this.txtLicense);
+ this.tabPageLicense.Location = new System.Drawing.Point(4, 22);
+ this.tabPageLicense.Name = "tabPageLicense";
+ this.tabPageLicense.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageLicense.Size = new System.Drawing.Size(607, 268);
+ this.tabPageLicense.TabIndex = 3;
+ this.tabPageLicense.Text = "License";
+ this.tabPageLicense.UseVisualStyleBackColor = true;
+ //
+ // txtLicense
+ //
+ this.txtLicense.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtLicense.Location = new System.Drawing.Point(3, 3);
+ this.txtLicense.Multiline = true;
+ this.txtLicense.Name = "txtLicense";
+ this.txtLicense.ReadOnly = true;
+ this.txtLicense.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.txtLicense.Size = new System.Drawing.Size(601, 262);
+ this.txtLicense.TabIndex = 0;
+ //
+ // tabPagePlugins
+ //
+ this.tabPagePlugins.Controls.Add(this.pluginList);
+ this.tabPagePlugins.Location = new System.Drawing.Point(4, 22);
+ this.tabPagePlugins.Name = "tabPagePlugins";
+ this.tabPagePlugins.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPagePlugins.Size = new System.Drawing.Size(607, 268);
+ this.tabPagePlugins.TabIndex = 1;
+ this.tabPagePlugins.Text = "Plugins";
+ this.tabPagePlugins.UseVisualStyleBackColor = true;
+ //
+ // pic
+ //
+ this.pic.Location = new System.Drawing.Point(26, 20);
+ this.pic.Name = "pic";
+ this.pic.Size = new System.Drawing.Size(32, 32);
+ this.pic.TabIndex = 26;
+ this.pic.TabStop = false;
+ //
+ // tabChangeLog
+ //
+ this.tabChangeLog.Controls.Add(this.txtChangeLog);
+ this.tabChangeLog.Location = new System.Drawing.Point(4, 22);
+ this.tabChangeLog.Name = "tabChangeLog";
+ this.tabChangeLog.Padding = new System.Windows.Forms.Padding(3);
+ this.tabChangeLog.Size = new System.Drawing.Size(607, 268);
+ this.tabChangeLog.TabIndex = 4;
+ this.tabChangeLog.Text = "Change Log";
+ this.tabChangeLog.UseVisualStyleBackColor = true;
+ //
+ // txtChangeLog
+ //
+ this.txtChangeLog.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtChangeLog.Location = new System.Drawing.Point(3, 3);
+ this.txtChangeLog.Multiline = true;
+ this.txtChangeLog.Name = "txtChangeLog";
+ this.txtChangeLog.ReadOnly = true;
+ this.txtChangeLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.txtChangeLog.Size = new System.Drawing.Size(601, 262);
+ this.txtChangeLog.TabIndex = 1;
+ //
+ // AboutForm
+ //
+ this.AcceptButton = this.okButton;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.Window;
+ this.CancelButton = this.okButton;
+ this.ClientSize = new System.Drawing.Size(639, 472);
+ this.Controls.Add(this.pic);
+ this.Controls.Add(this.tabControl1);
+ this.Controls.Add(this.okButton);
+ this.Controls.Add(this.textBoxDescription);
+ this.Controls.Add(this.labelCopyright);
+ this.Controls.Add(this.labelVersion);
+ this.Controls.Add(this.labelProductName);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "AboutForm";
+ this.Padding = new System.Windows.Forms.Padding(9);
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "About";
+ this.Load += new System.EventHandler(this.AboutForm_Load);
+ this.tabControl1.ResumeLayout(false);
+ this.tabPageReadMe.ResumeLayout(false);
+ this.tabPageLicense.ResumeLayout(false);
+ this.tabPageLicense.PerformLayout();
+ this.tabPagePlugins.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.pic)).EndInit();
+ this.tabChangeLog.ResumeLayout(false);
+ this.tabChangeLog.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBoxDescription;
+ private System.Windows.Forms.Button okButton;
+ private global::MiniSqlQuery.Core.Controls.PluginListControl pluginList;
+ private System.Windows.Forms.Label labelVersion;
+ private System.Windows.Forms.Label labelProductName;
+ private System.Windows.Forms.Label labelCopyright;
+ private System.Windows.Forms.TabControl tabControl1;
+ private System.Windows.Forms.TabPage tabPagePlugins;
+ private System.Windows.Forms.PictureBox pic;
+ private System.Windows.Forms.TabPage tabPageReadMe;
+ private System.Windows.Forms.WebBrowser webBrowser1;
+ private System.Windows.Forms.TabPage tabPageLicense;
+ private System.Windows.Forms.TextBox txtLicense;
+ private System.Windows.Forms.TabPage tabChangeLog;
+ private System.Windows.Forms.TextBox txtChangeLog;
+ }
+}
diff --git a/minisqlquery-master/src/MiniSqlQuery/AboutForm.resx b/minisqlquery-master/src/MiniSqlQuery/AboutForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/AboutForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/app.config b/minisqlquery-master/src/MiniSqlQuery/app.config
new file mode 100644
index 0000000..00c8391
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/app.config
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <section name="MiniSqlQuery.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+ </sectionGroup>
+ <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <section name="MiniSqlQuery.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </sectionGroup>
+ </configSections>
+ <userSettings>
+ <MiniSqlQuery.Properties.Settings>
+ <setting name="DateTimeFormat" serializeAs="String">
+ <value>yyyy-MM-dd HH:mm:ss.fff</value>
+ </setting>
+ <setting name="DefaultConnectionDefinitionFilename" serializeAs="String">
+ <value />
+ </setting>
+ <setting name="EnableQueryBatching" serializeAs="String">
+ <value>True</value>
+ </setting>
+ <setting name="IncludeReadOnlyColumnsInExport" serializeAs="String">
+ <value>False</value>
+ </setting>
+ <setting name="LoadExternalPlugins" serializeAs="String">
+ <value>True</value>
+ </setting>
+ <setting name="NammedConnection" serializeAs="String">
+ <value>Default - MSSQL Master@localhost</value>
+ </setting>
+ <setting name="NullText" serializeAs="String">
+ <value><NULL></value>
+ </setting>
+ <setting name="PlugInFileFilter" serializeAs="String">
+ <value>*.PlugIn.dll</value>
+ </setting>
+ <setting name="CommandTimeout" serializeAs="String">
+ <value>30</value>
+ </setting>
+ </MiniSqlQuery.Properties.Settings>
+ </userSettings>
+ <!--<system.windows.forms jitDebugging="true"/>-->
+ <applicationSettings>
+ <MiniSqlQuery.Properties.Settings>
+ <setting name="FileDialogFilter" serializeAs="String">
+ <value>SQL Files (*.sql)|*.sql|Mini SQL Template Files (*.mt)|*.mt|ASPX Files (*.asp;*.aspx;*.asax;*.asmx)|*.asp;*.aspx;*.asax;*.asmx|Batch Files (*.bat;*.cmd)|*.bat;*.cmd|BOO Files (*.boo)|*.boo|Coco Files (*.atg)|*.atg|C++ Files (*.cpp;*.cc;*.c;*.h)|*.cpp;*.cc;*.c;*.h|C# Files (*.cs)|*.cs|HTML Files (*.htm*)|*.htm*|Java Files (*.java)|*.java|JavaScript Files (*.js)|*.js|Patch Files (*.patch;*.diff)|*.patch;*.diff|PHP Files (*.php*)|*.php*|TeX Files (*.tex)|*.tex|VB.NET Files (*.vb)|*.vb|XML Files (*.xml;*.resx)|*.xml;*.resx|All Files (*.*)|*.*</value>
+ </setting>
+ <setting name="SqlFileFilter" serializeAs="String">
+ <value>*.sql</value>
+ </setting>
+ <setting name="XmlFileDialogFilter" serializeAs="String">
+ <value>XML Files (*.xml)|*.xml|All Files (*.*)|*.*</value>
+ </setting>
+ </MiniSqlQuery.Properties.Settings>
+ </applicationSettings>
+ <runtime>
+ <!-- allow plugin loading after web downloads -->
+ <loadFromRemoteSources enabled="true"/>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+ <system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite" />
+ <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+ </DbProviderFactories>
+ </system.data>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
+ </startup>
+</configuration>
diff --git a/minisqlquery-master/src/MiniSqlQuery/App.cs b/minisqlquery-master/src/MiniSqlQuery/App.cs
new file mode 100644
index 0000000..40d54ba
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/App.cs
@@ -0,0 +1,132 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+
+#endregion
+
+using System;
+using System.Threading;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+using MiniSqlQuery.Core.Forms;
+using MiniSqlQuery.Core.Template;
+using MiniSqlQuery.PlugIns;
+using MiniSqlQuery.PlugIns.ConnectionStringsManager;
+using MiniSqlQuery.PlugIns.DatabaseInspector;
+using MiniSqlQuery.PlugIns.SearchTools;
+using MiniSqlQuery.PlugIns.TemplateViewer;
+using MiniSqlQuery.PlugIns.TextGenerator;
+using MiniSqlQuery.PlugIns.ViewTable;
+using MiniSqlQuery.Properties;
+
+namespace MiniSqlQuery
+{
+ /// <summary>
+ /// The application entry point.
+ /// </summary>
+ internal static class App
+ {
+ /// <summary>
+ /// The configure container.
+ /// </summary>
+ /// <param name = "services">The services.</param>
+ public static void ConfigureContainer(IApplicationServices services)
+ {
+ // singletons
+ services.RegisterSingletonComponent<IApplicationSettings, ApplicationSettings>("ApplicationSettings");
+ services.RegisterSingletonComponent<IHostWindow, MainForm>("HostWindow");
+ services.RegisterSingletonComponent<IFileEditorResolver, FileEditorResolverService>("FileEditorResolver");
+
+ // components
+ services.RegisterComponent<AboutForm>("AboutForm");
+ services.RegisterComponent<ITextFindService, BasicTextFindService>("DefaultTextFindService");
+ services.RegisterComponent<IQueryEditor, QueryForm>("QueryForm");
+ services.RegisterComponent<ISqlWriter, SqlWriter>("DefaultSqlWriter");
+ services.RegisterComponent<ITextFormatter, NVelocityWrapper>("TextFormatter");
+ services.RegisterComponent<TemplateModel>("TemplateModel");
+ services.RegisterComponent<BatchQuerySelectForm>("BatchQuerySelectForm");
+ }
+
+ /// <summary>
+ /// The application thread exception.
+ /// </summary>
+ /// <param name = "sender">The sender.</param>
+ /// <param name = "e">The e.</param>
+ private static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
+ {
+ if (!(e.Exception is ThreadAbortException))
+ {
+ HandleException(e.Exception);
+ }
+ }
+
+ /// <summary>
+ /// The current domain unhandled exception.
+ /// </summary>
+ /// <param name = "sender">The sender.</param>
+ /// <param name = "e">The e.</param>
+ private static void CurrentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
+ {
+ if (!(e.ExceptionObject is ThreadAbortException))
+ {
+ HandleException((Exception)e.ExceptionObject);
+ }
+ }
+
+ /// <summary>
+ /// The handle exception.
+ /// </summary>
+ /// <param name = "e">The e.</param>
+ private static void HandleException(Exception e)
+ {
+ ErrorForm errorForm = new ErrorForm();
+ errorForm.SetException(e);
+ errorForm.ShowDialog();
+ errorForm.Dispose();
+ }
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ /// <param name = "args">The args.</param>
+ [STAThread]
+ private static void Main(string[] args)
+ {
+#if !DEBUG
+ AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException;
+ Application.ThreadException += ApplicationThreadException;
+#endif
+
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+
+ IApplicationServices services = ApplicationServices.Instance;
+
+ ConfigureContainer(services);
+
+ services.LoadPlugIn(new CoreApplicationPlugIn());
+ services.LoadPlugIn(new ConnectionStringsManagerLoader());
+ services.LoadPlugIn(new DatabaseInspectorLoader());
+ services.LoadPlugIn(new ViewTableLoader());
+ services.LoadPlugIn(new TemplateViewerLoader());
+ services.LoadPlugIn(new SearchToolsLoader());
+ services.LoadPlugIn(new TextGeneratorLoader());
+
+ if (services.Settings.LoadExternalPlugins)
+ {
+ var plugins = PlugInUtility.GetInstances<IPlugIn>(Environment.CurrentDirectory, Settings.Default.PlugInFileFilter);
+ Array.Sort(plugins, new PlugInComparer());
+ foreach (var plugin in plugins)
+ {
+ services.LoadPlugIn(plugin);
+ }
+ }
+
+ services.HostWindow.SetArguments(args);
+ Application.Run(services.HostWindow.Instance);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/App.ico b/minisqlquery-master/src/MiniSqlQuery/App.ico
new file mode 100644
index 0000000..50d3b41
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/App.ico differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/ApplicationSettings.cs b/minisqlquery-master/src/MiniSqlQuery/ApplicationSettings.cs
new file mode 100644
index 0000000..eb8594a
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/ApplicationSettings.cs
@@ -0,0 +1,314 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.Data;
+using System.Data.Common;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Properties;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The application settings.</summary>
+ public class ApplicationSettings : IApplicationSettings
+ {
+ /// <summary>The _connection definition.</summary>
+ private DbConnectionDefinition _connectionDefinition;
+
+ /// <summary>The _db connection.</summary>
+ private DbConnection _dbConnection;
+
+ /// <summary>The _db provider factory.</summary>
+ private DbProviderFactory _dbProviderFactory;
+
+ /// <summary>The _definition list.</summary>
+ private DbConnectionDefinitionList _definitionList;
+
+ /// <summary>The _untitled document counter.</summary>
+ private int _untitledDocumentCounter;
+
+ /// <summary>Initializes a new instance of the <see cref="ApplicationSettings"/> class.</summary>
+ public ApplicationSettings()
+ {
+ _definitionList = new DbConnectionDefinitionList();
+ }
+
+ /// <summary>The connection definitions changed.</summary>
+ public event EventHandler ConnectionDefinitionsChanged;
+
+ /// <summary>The database connection reset.</summary>
+ public event EventHandler DatabaseConnectionReset;
+
+ /// <summary>Gets Connection.</summary>
+ public DbConnection Connection
+ {
+ get
+ {
+ if (_dbConnection == null)
+ {
+ if (ProviderFactory != null)
+ {
+ _dbConnection = ProviderFactory.CreateConnection();
+ }
+
+ if (_dbConnection != null)
+ {
+ _dbConnection.ConnectionString = _connectionDefinition.ConnectionString;
+ }
+ }
+
+ return _dbConnection;
+ }
+ }
+
+ /// <summary>Gets or sets ConnectionDefinition.</summary>
+ public DbConnectionDefinition ConnectionDefinition
+ {
+ get { return _connectionDefinition; }
+ set
+ {
+ if (_connectionDefinition != value)
+ {
+ _connectionDefinition = value;
+ ResetConnection();
+ }
+ }
+ }
+
+ /// <summary>Gets or sets DateTimeFormat.</summary>
+ public string DateTimeFormat
+ {
+ get { return Settings.Default.DateTimeFormat; }
+ set
+ {
+ if (Settings.Default.DateTimeFormat != value)
+ {
+ Settings.Default.DateTimeFormat = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ /// <summary>Gets or sets DefaultConnectionDefinitionFilename.</summary>
+ public string DefaultConnectionDefinitionFilename
+ {
+ get { return Settings.Default.DefaultConnectionDefinitionFilename; }
+ set
+ {
+ if (Settings.Default.DefaultConnectionDefinitionFilename != value)
+ {
+ Settings.Default.DefaultConnectionDefinitionFilename = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ /// <summary>Gets DefaultFileFilter.</summary>
+ public string DefaultFileFilter
+ {
+ get { return Settings.Default.FileDialogFilter; }
+ }
+
+ /// <summary>Gets or sets a value indicating whether EnableQueryBatching.</summary>
+ public bool EnableQueryBatching
+ {
+ get { return Settings.Default.EnableQueryBatching; }
+ set
+ {
+ if (Settings.Default.EnableQueryBatching != value)
+ {
+ Settings.Default.EnableQueryBatching = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating the command timeout.
+ /// </summary>
+ /// <value>The command timeout.</value>
+ public int CommandTimeout
+ {
+ get { return Settings.Default.CommandTimeout; }
+ set
+ {
+ if (Settings.Default.CommandTimeout != value)
+ {
+ Settings.Default.CommandTimeout = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ /// <summary>Gets or sets a value indicating whether LoadExternalPlugins.</summary>
+ public bool LoadExternalPlugins
+ {
+ get { return Settings.Default.LoadExternalPlugins; }
+ set
+ {
+ if (Settings.Default.LoadExternalPlugins != value)
+ {
+ Settings.Default.LoadExternalPlugins = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ /// <summary>Gets or sets NullText.</summary>
+ public string NullText
+ {
+ get { return Settings.Default.NullText; }
+ set
+ {
+ if (Settings.Default.NullText != value)
+ {
+ Settings.Default.NullText = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ /// <summary>Gets or sets PlugInFileFilter.</summary>
+ public string PlugInFileFilter
+ {
+ get { return Settings.Default.PlugInFileFilter; }
+ set
+ {
+ if (Settings.Default.PlugInFileFilter != value)
+ {
+ Settings.Default.PlugInFileFilter = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ public StringCollection MostRecentFiles
+ {
+ get { return Settings.Default.MostRecentFiles; }
+ set
+ {
+ if (Settings.Default.MostRecentFiles != value)
+ {
+ Settings.Default.MostRecentFiles = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ public bool IncludeReadOnlyColumnsInExport
+ {
+ get { return Settings.Default.IncludeReadOnlyColumnsInExport; }
+ set
+ {
+ if (Settings.Default.IncludeReadOnlyColumnsInExport != value)
+ {
+ Settings.Default.IncludeReadOnlyColumnsInExport = value;
+ Settings.Default.Save();
+ }
+ }
+ }
+
+ /// <summary>Gets ProviderFactory.</summary>
+ public DbProviderFactory ProviderFactory
+ {
+ get
+ {
+ if (_dbProviderFactory == null && _connectionDefinition != null)
+ {
+ _dbProviderFactory = DbProviderFactories.GetFactory(_connectionDefinition.ProviderName);
+ }
+
+ return _dbProviderFactory;
+ }
+ }
+
+ /// <summary>The close connection.</summary>
+ public void CloseConnection()
+ {
+ if (_dbConnection != null &&
+ (_dbConnection.State != ConnectionState.Closed && _dbConnection.State != ConnectionState.Broken))
+ {
+ _dbConnection.Close();
+ }
+ }
+
+ /// <summary>The get connection definitions.</summary>
+ /// <returns></returns>
+ public DbConnectionDefinitionList GetConnectionDefinitions()
+ {
+ return _definitionList;
+ }
+
+ /// <summary>The get open connection.</summary>
+ /// <returns></returns>
+ public DbConnection GetOpenConnection()
+ {
+ DbConnection conn = Connection;
+ if (conn.State != ConnectionState.Open)
+ {
+ if (_connectionDefinition != null && String.IsNullOrEmpty(conn.ConnectionString))
+ {
+ conn.ConnectionString = _connectionDefinition.ConnectionString;
+ }
+ conn.Open();
+ }
+
+ return conn;
+ }
+
+ /// <summary>The get untitled document counter.</summary>
+ /// <returns>The get untitled document counter.</returns>
+ public int GetUntitledDocumentCounter()
+ {
+ return ++_untitledDocumentCounter;
+ }
+
+ /// <summary>The reset connection.</summary>
+ public void ResetConnection()
+ {
+ if (_dbConnection != null)
+ {
+ _dbConnection.Dispose();
+ }
+
+ _dbProviderFactory = null;
+ _dbConnection = null;
+
+ OnDatabaseConnectionReset(EventArgs.Empty);
+ }
+
+ /// <summary>The set connection definitions.</summary>
+ /// <param name="definitionList">The definition list.</param>
+ public void SetConnectionDefinitions(DbConnectionDefinitionList definitionList)
+ {
+ _definitionList = definitionList;
+
+ OnPastConnectionStringsChanged(EventArgs.Empty);
+ }
+
+ /// <summary>The on database connection reset.</summary>
+ /// <param name="e">The e.</param>
+ protected void OnDatabaseConnectionReset(EventArgs e)
+ {
+ if (DatabaseConnectionReset != null)
+ {
+ DatabaseConnectionReset(this, e);
+ }
+ }
+
+ /// <summary>The on past connection strings changed.</summary>
+ /// <param name="e">The e.</param>
+ protected void OnPastConnectionStringsChanged(EventArgs e)
+ {
+ if (ConnectionDefinitionsChanged != null)
+ {
+ ConnectionDefinitionsChanged(this, e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/BasicEditor.cs b/minisqlquery-master/src/MiniSqlQuery/BasicEditor.cs
new file mode 100644
index 0000000..dd87e8d
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/BasicEditor.cs
@@ -0,0 +1,416 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.IO;
+using System.Windows.Forms;
+using ICSharpCode.TextEditor.Document;
+using Microsoft.VisualBasic;
+using MiniSqlQuery.Commands;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The basic editor.</summary>
+ public partial class BasicEditor : DockContent, IEditor, IFindReplaceProvider, INavigatableDocument
+ {
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _settings.</summary>
+ private readonly IApplicationSettings _settings;
+
+ /// <summary>The _file name.</summary>
+ private string _fileName;
+
+ /// <summary>The _highlighting provider loaded.</summary>
+ private bool _highlightingProviderLoaded;
+
+ /// <summary>The _is dirty.</summary>
+ private bool _isDirty;
+
+ /// <summary>The _text find service.</summary>
+ private ITextFindService _textFindService;
+
+ /// <summary>Initializes a new instance of the <see cref="BasicEditor"/> class.</summary>
+ public BasicEditor()
+ {
+ InitializeComponent();
+ txtEdit.Document.DocumentChanged += DocumentDocumentChanged;
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="BasicEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicEditor(IApplicationServices services, IApplicationSettings settings)
+ : this()
+ {
+ _services = services;
+ _settings = settings;
+
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<SaveFileCommand>());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseActiveWindowCommand>());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseAllWindowsCommand>());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CopyQueryEditorFileNameCommand>());
+
+ CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(formContextMenuStrip);
+ }
+
+ /// <summary>Gets or sets AllText.</summary>
+ public string AllText
+ {
+ get { return txtEdit.Text; }
+ set { txtEdit.Text = value; }
+ }
+
+ /// <summary>Gets a value indicating whether CanReplaceText.</summary>
+ public bool CanReplaceText
+ {
+ get { return true; }
+ }
+
+ /// <summary>Gets or sets CursorColumn.</summary>
+ public int CursorColumn
+ {
+ get { return txtEdit.ActiveTextAreaControl.Caret.Column; }
+ set { txtEdit.ActiveTextAreaControl.Caret.Column = value; }
+ }
+
+ /// <summary>Gets or sets CursorLine.</summary>
+ public int CursorLine
+ {
+ get { return txtEdit.ActiveTextAreaControl.Caret.Line; }
+ set { txtEdit.ActiveTextAreaControl.Caret.Line = value; }
+ }
+
+ /// <summary>Gets CursorOffset.</summary>
+ public int CursorOffset
+ {
+ get { return txtEdit.ActiveTextAreaControl.Caret.Offset; }
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public virtual string FileFilter
+ {
+ get { return "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"; }
+ }
+
+ /// <summary>Gets or sets FileName.</summary>
+ public string FileName
+ {
+ get { return _fileName; }
+ set
+ {
+ _fileName = value;
+ Text = FileName;
+ TabText = FileName;
+ }
+ }
+
+ /// <summary>Gets or sets a value indicating whether IsDirty.</summary>
+ public bool IsDirty
+ {
+ get { return _isDirty; }
+ set
+ {
+ if (_isDirty != value)
+ {
+ _isDirty = value;
+ SetTabTextByFilename();
+ }
+ }
+ }
+
+ /// <summary>Gets SelectedText.</summary>
+ public string SelectedText
+ {
+ get { return txtEdit.ActiveTextAreaControl.SelectionManager.SelectedText; }
+ }
+
+ /// <summary>Gets TextFindService.</summary>
+ public ITextFindService TextFindService
+ {
+ get
+ {
+ if (_textFindService == null)
+ {
+ _textFindService = _services.Resolve<ITextFindService>();
+ }
+
+ return _textFindService;
+ }
+ }
+
+ /// <summary>Gets TotalLines.</summary>
+ public int TotalLines
+ {
+ get { return txtEdit.Document.TotalNumberOfLines; }
+ }
+
+ /// <summary>The load highlighting provider.</summary>
+ public void LoadHighlightingProvider()
+ {
+ if (_highlightingProviderLoaded)
+ {
+ return;
+ }
+
+ // see: http://wiki.sharpdevelop.net/Syntax%20highlighting.ashx
+ string dir = Path.GetDirectoryName(GetType().Assembly.Location);
+ FileSyntaxModeProvider fsmProvider = new FileSyntaxModeProvider(dir);
+ HighlightingManager.Manager.AddSyntaxModeFileProvider(fsmProvider); // Attach to the text editor.
+ _highlightingProviderLoaded = true;
+ }
+
+ /// <summary>The clear selection.</summary>
+ public void ClearSelection()
+ {
+ txtEdit.ActiveTextAreaControl.SelectionManager.ClearSelection();
+ }
+
+ /// <summary>The highlight string.</summary>
+ /// <param name="offset">The offset.</param>
+ /// <param name="length">The length.</param>
+ public void HighlightString(int offset, int length)
+ {
+ if (offset < 0 || length < 1)
+ {
+ return;
+ }
+
+ int endPos = offset + length;
+ txtEdit.ActiveTextAreaControl.SelectionManager.SetSelection(
+ txtEdit.Document.OffsetToPosition(offset),
+ txtEdit.Document.OffsetToPosition(endPos));
+ SetCursorByOffset(endPos);
+ }
+
+ /// <summary>The insert text.</summary>
+ /// <param name="text">The text.</param>
+ public void InsertText(string text)
+ {
+ if (string.IsNullOrEmpty(text))
+ {
+ return;
+ }
+
+ int offset = txtEdit.ActiveTextAreaControl.Caret.Offset;
+
+ // if some text is selected we want to replace it
+ if (txtEdit.ActiveTextAreaControl.SelectionManager.IsSelected(offset))
+ {
+ offset = txtEdit.ActiveTextAreaControl.SelectionManager.SelectionCollection[0].Offset;
+ txtEdit.ActiveTextAreaControl.SelectionManager.RemoveSelectedText();
+ }
+
+ txtEdit.Document.Insert(offset, text);
+ int newOffset = offset + text.Length; // new offset at end of inserted text
+
+ // now reposition the caret if required to be after the inserted text
+ if (CursorOffset != newOffset)
+ {
+ SetCursorByOffset(newOffset);
+ }
+
+ txtEdit.Focus();
+ }
+
+
+ /// <summary>The load file.</summary>
+ public void LoadFile()
+ {
+ txtEdit.LoadFile(FileName);
+ IsDirty = false;
+ }
+
+ /// <summary>The save file.</summary>
+ public void SaveFile()
+ {
+ txtEdit.SaveFile(FileName);
+ IsDirty = false;
+ }
+
+ /// <summary>The set syntax.</summary>
+ /// <param name="name">The name.</param>
+ public void SetSyntax(string name)
+ {
+ LoadHighlightingProvider();
+ txtEdit.SetHighlighting(name);
+ }
+
+ /// <summary>The find string.</summary>
+ /// <param name="value">The value.</param>
+ /// <param name="startIndex">The start index.</param>
+ /// <param name="comparisonType">The comparison type.</param>
+ /// <returns>The find string.</returns>
+ public int FindString(string value, int startIndex, StringComparison comparisonType)
+ {
+ if (string.IsNullOrEmpty(value) || startIndex < 0)
+ {
+ return -1;
+ }
+
+ string text = AllText;
+ int pos = text.IndexOf(value, startIndex, comparisonType);
+ if (pos > -1)
+ {
+ ClearSelection();
+ HighlightString(pos, value.Length);
+ }
+
+ return pos;
+ }
+
+ /// <summary>The replace string.</summary>
+ /// <param name="value">The value.</param>
+ /// <param name="startIndex">The start index.</param>
+ /// <param name="length">The length.</param>
+ /// <returns>The replace string.</returns>
+ public bool ReplaceString(string value, int startIndex, int length)
+ {
+ if (value == null || startIndex < 0 || length < 0)
+ {
+ return false;
+ }
+
+ if ((startIndex + length) > AllText.Length)
+ {
+ return false;
+ }
+
+ txtEdit.Document.Replace(startIndex, length, value);
+
+ return true;
+ }
+
+ /// <summary>The set text find service.</summary>
+ /// <param name="textFindService">The text find service.</param>
+ public void SetTextFindService(ITextFindService textFindService)
+ {
+ // accept nulls infering a reset
+ _textFindService = textFindService;
+ }
+
+ /// <summary>The set cursor by location.</summary>
+ /// <param name="line">The line.</param>
+ /// <param name="column">The column.</param>
+ /// <returns>The set cursor by location.</returns>
+ public bool SetCursorByLocation(int line, int column)
+ {
+ if (line > TotalLines)
+ {
+ return false;
+ }
+
+ txtEdit.ActiveTextAreaControl.Caret.Line = line;
+ txtEdit.ActiveTextAreaControl.Caret.Column = column;
+
+ return true;
+ }
+
+ /// <summary>The set cursor by offset.</summary>
+ /// <param name="offset">The offset.</param>
+ /// <returns>The set cursor by offset.</returns>
+ public bool SetCursorByOffset(int offset)
+ {
+ if (offset >= 0)
+ {
+ txtEdit.ActiveTextAreaControl.Caret.Position = txtEdit.Document.OffsetToPosition(offset);
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>The basic editor_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void BasicEditor_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (_isDirty)
+ {
+ DialogResult saveFile = _services.HostWindow.DisplayMessageBox(
+ this,
+ "Contents changed, do you want to save the file?\r\n" + TabText, "Save Changes?",
+ MessageBoxButtons.YesNoCancel,
+ MessageBoxIcon.Question,
+ MessageBoxDefaultButton.Button1,
+ 0,
+ null,
+ null);
+
+ if (saveFile == DialogResult.Cancel)
+ {
+ e.Cancel = true;
+ }
+ else if (saveFile == DialogResult.Yes)
+ {
+ CommandManager.GetCommandInstance<SaveFileCommand>().Execute();
+ }
+ }
+ }
+
+ /// <summary>The basic editor_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void BasicEditor_Load(object sender, EventArgs e)
+ {
+#if DEBUG
+ lblEditorInfo.Text = GetType().FullName;
+#else
+ panel1.Visible = false;
+#endif
+ }
+
+ /// <summary>The document document changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DocumentDocumentChanged(object sender, DocumentEventArgs e)
+ {
+ IsDirty = true;
+ }
+
+ /// <summary>The get value.</summary>
+ /// <param name="name">The name.</param>
+ /// <returns>The get value.</returns>
+ private string GetValue(string name)
+ {
+ string val = Interaction.InputBox(string.Format("Value for '{0}'", name), "Supply a Value", name, -1, -1);
+ return val;
+ }
+
+ /// <summary>The set tab text by filename.</summary>
+ private void SetTabTextByFilename()
+ {
+ string dirty = string.Empty;
+ string text = "Untitled";
+ string tabtext;
+
+ if (_isDirty)
+ {
+ dirty = " *";
+ }
+
+ if (txtEdit.FileName != null)
+ {
+ text = FileName;
+ tabtext = Path.GetFileName(FileName);
+ }
+ else
+ {
+ text += _settings.GetUntitledDocumentCounter();
+ tabtext = text;
+ }
+
+ TabText = tabtext + dirty;
+ ToolTipText = text + dirty;
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/BasicEditor.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/BasicEditor.Designer.cs
new file mode 100644
index 0000000..6216032
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/BasicEditor.Designer.cs
@@ -0,0 +1,97 @@
+namespace MiniSqlQuery
+{
+ partial class BasicEditor
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.txtEdit = new ICSharpCode.TextEditor.TextEditorControl();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.lblEditorInfo = new System.Windows.Forms.Label();
+ this.formContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.panel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // txtEdit
+ //
+ this.txtEdit.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtEdit.IsReadOnly = false;
+ this.txtEdit.Location = new System.Drawing.Point(0, 0);
+ this.txtEdit.Name = "txtEdit";
+ this.txtEdit.Size = new System.Drawing.Size(381, 325);
+ this.txtEdit.TabIndex = 0;
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.lblEditorInfo);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panel1.Location = new System.Drawing.Point(0, 304);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(381, 21);
+ this.panel1.TabIndex = 1;
+ //
+ // lblEditorInfo
+ //
+ this.lblEditorInfo.AutoSize = true;
+ this.lblEditorInfo.Location = new System.Drawing.Point(3, 3);
+ this.lblEditorInfo.Name = "lblEditorInfo";
+ this.lblEditorInfo.Size = new System.Drawing.Size(62, 13);
+ this.lblEditorInfo.TabIndex = 0;
+ this.lblEditorInfo.Text = "lblEditorInfo";
+ //
+ // formContextMenuStrip
+ //
+ this.formContextMenuStrip.Name = "formContextMenuStrip";
+ this.formContextMenuStrip.Size = new System.Drawing.Size(153, 26);
+ //
+ // BasicEditor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(381, 325);
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.txtEdit);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Name = "BasicEditor";
+ this.TabPageContextMenuStrip = this.formContextMenuStrip;
+ this.Text = "DefaultEditor";
+ this.Load += new System.EventHandler(this.BasicEditor_Load);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BasicEditor_FormClosing);
+ this.panel1.ResumeLayout(false);
+ this.panel1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private ICSharpCode.TextEditor.TextEditorControl txtEdit;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Label lblEditorInfo;
+ private System.Windows.Forms.ContextMenuStrip formContextMenuStrip;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/BasicEditor.resx b/minisqlquery-master/src/MiniSqlQuery/BasicEditor.resx
new file mode 100644
index 0000000..a4d9552
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/BasicEditor.resx
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="formContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/BasicEditors.cs b/minisqlquery-master/src/MiniSqlQuery/BasicEditors.cs
new file mode 100644
index 0000000..89b0c0c
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/BasicEditors.cs
@@ -0,0 +1,263 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The basic aspx editor.</summary>
+ public class BasicAspxEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicAspxEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicAspxEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("ASP/XHTML");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "ASPX Files (*.asp;*.aspx;*.asax;*.asmx)|*.asp;*.aspx;*.asax;*.asmx|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic batch editor.</summary>
+ public class BasicBatchEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicBatchEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicBatchEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("BAT");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "Batch Files (*.bat;*.cmd)|*.bat;*.cmd|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic boo editor.</summary>
+ public class BasicBooEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicBooEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicBooEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("Boo");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "BOO Files (*.boo)|*.boo|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic coco editor.</summary>
+ public class BasicCocoEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicCocoEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicCocoEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("Coco");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "Coco Files (*.atg)|*.atg|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic c plus plus editor.</summary>
+ public class BasicCPlusPlusEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicCPlusPlusEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicCPlusPlusEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("C++.NET");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "C++ Files (*.cpp;*.cc;*.c;*.h)|*.cpp;*.cc;*.c;*.h|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic c sharp editor.</summary>
+ public class BasicCSharpEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicCSharpEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicCSharpEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("C#");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "C# Files (*.cs)|*.cs|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic html editor.</summary>
+ public class BasicHtmlEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicHtmlEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicHtmlEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("HTML");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "HTML Files (*.htm*)|*.htm*|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic java editor.</summary>
+ public class BasicJavaEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicJavaEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicJavaEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("Java");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "Java Files (*.java)|*.java|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic java script editor.</summary>
+ public class BasicJavaScriptEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicJavaScriptEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicJavaScriptEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("JavaScript");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "JavaScript Files (*.js)|*.js|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic patch editor.</summary>
+ public class BasicPatchEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicPatchEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicPatchEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("Patch");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "Patch Files (*.patch;*.diff)|*.patch;*.diff|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic php editor.</summary>
+ public class BasicPhpEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicPhpEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicPhpEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("PHP");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "PHP Files (*.php*)|*.php*|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic tex editor.</summary>
+ public class BasicTexEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicTexEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicTexEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("TeX");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "TeX Files (*.tex)|*.tex|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic vb net editor.</summary>
+ public class BasicVbNetEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicVbNetEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicVbNetEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("VBNET");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "VB.NET Files (*.vb)|*.vb|All Files (*.*)|*.*"; }
+ }
+ }
+
+ /// <summary>The basic xml editor.</summary>
+ public class BasicXmlEditor : BasicEditor
+ {
+ /// <summary>Initializes a new instance of the <see cref="BasicXmlEditor"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public BasicXmlEditor(IApplicationServices services, IApplicationSettings settings) : base(services, settings)
+ {
+ SetSyntax("XML");
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public override string FileFilter
+ {
+ get { return "XML Files (*.xml;*.resx)|*.xml;*.resx|All Files (*.*)|*.*"; }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/DuplicateLineCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/DuplicateLineCommand.cs
new file mode 100644
index 0000000..a71f955
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/DuplicateLineCommand.cs
@@ -0,0 +1,75 @@
+#region License
+// Copyright 2005-2009 Paul Kohler (http://pksoftware.net/MiniSqlQuery/). All rights reserved.
+// This source code is made available under the terms of the Microsoft Public License (Ms-PL)
+// http://minisqlquery.codeplex.com/license
+#endregion
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>
+ /// Whatever line the cursor is on this command will duplicate that line (its a resharper this that I use alot!)
+ /// </summary>
+ public class DuplicateLineCommand
+ : CommandBase
+ {
+ public DuplicateLineCommand()
+ : base("Duplicate Line")
+ {
+ ShortcutKeys = Keys.Control | Keys.D;
+ //todo SmallImage = ImageResource.?;
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this <see cref="ICommand"/> is enabled.
+ /// The window needs to implement the <see cref="IFindReplaceProvider"/> and
+ /// support replacing text (<see cref="IFindReplaceProvider.CanReplaceText"/>).
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if enabled; otherwise, <c>false</c>.
+ /// </value>
+ public override bool Enabled
+ {
+ get
+ {
+ IFindReplaceProvider findReplaceProvider = HostWindow.ActiveChildForm as IFindReplaceProvider;
+ if (findReplaceProvider == null || !findReplaceProvider.CanReplaceText)
+ {
+ return false;
+ }
+ return true;
+ }
+ }
+
+ /// <summary>
+ /// Finds the current line position and duplicates that line.
+ /// </summary>
+ public override void Execute()
+ {
+ IFindReplaceProvider findReplaceProvider = HostWindow.ActiveChildForm as IFindReplaceProvider;
+
+ if (findReplaceProvider == null || !findReplaceProvider.CanReplaceText)
+ {
+ return;
+ }
+
+ // todo!
+
+ int offset = findReplaceProvider.CursorOffset;
+ int originalLineStartOffset = 0;
+ int lineLength = 0;
+
+ string line = "?";
+ // find current text "line", back to start or \n and find next \n or eof
+
+ line = line + Environment.NewLine + line;
+
+ findReplaceProvider.ReplaceString(line, 0, 0);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/NewFileCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/NewFileCommand.cs
new file mode 100644
index 0000000..3fb143f
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/NewFileCommand.cs
@@ -0,0 +1,42 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>The new file command.</summary>
+ public class NewFileCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="NewFileCommand"/> class.</summary>
+ public NewFileCommand()
+ : base("New &File")
+ {
+ ShortcutKeys = Keys.Control | Keys.Alt | Keys.N;
+ SmallImage = ImageResource.page;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ NewFileForm newFileForm = Services.Resolve<NewFileForm>();
+
+ DialogResult result = newFileForm.ShowDialog();
+
+ if (result == DialogResult.OK)
+ {
+ var editor = Services.Resolve<IEditor>(newFileForm.FileEditorDescriptor.EditorKeyName);
+ editor.FileName = null;
+ HostWindow.DisplayDockedForm(editor as DockContent);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/OpenFileCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/OpenFileCommand.cs
new file mode 100644
index 0000000..efe27ea
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/OpenFileCommand.cs
@@ -0,0 +1,49 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>The open file command.</summary>
+ public class OpenFileCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="OpenFileCommand"/> class.</summary>
+ public OpenFileCommand()
+ : base("&Open File")
+ {
+ ShortcutKeys = Keys.Control | Keys.O;
+ SmallImage = ImageResource.folder_page;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ OpenFileDialog openFileDialog = new OpenFileDialog();
+ openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);
+ openFileDialog.Filter = Settings.DefaultFileFilter;
+ openFileDialog.CheckFileExists = true;
+ if (openFileDialog.ShowDialog(HostWindow.Instance) == DialogResult.OK)
+ {
+ // todo: check for file exist file in open windows;
+ IFileEditorResolver resolver = Services.Resolve<IFileEditorResolver>();
+ var fileName = openFileDialog.FileName;
+ IEditor editor = resolver.ResolveEditorInstance(fileName);
+ editor.FileName = fileName;
+ editor.LoadFile();
+ HostWindow.DisplayDockedForm(editor as DockContent);
+
+ Services.Resolve<IMostRecentFilesService>().Register(fileName);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/OpenRecentFileCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/OpenRecentFileCommand.cs
new file mode 100644
index 0000000..85d5372
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/OpenRecentFileCommand.cs
@@ -0,0 +1,178 @@
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>
+ /// Opens a recent file in a list by the <see cref = "Index" />.
+ /// Makes use of <see cref = "IMostRecentFilesService" /> to calculate the filename.
+ /// </summary>
+ public class OpenRecentFileCommand
+ : CommandBase
+ {
+ private readonly int _index;
+ private IMostRecentFilesService _mostRecentFilesService;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref = "OpenRecentFileCommand" /> class.
+ /// </summary>
+ protected OpenRecentFileCommand(int index)
+ : base("MRU")
+ {
+ _index = index;
+ }
+
+ public OpenRecentFileCommand(IMostRecentFilesService mostRecentFilesService, int index)
+ : base("MRU")
+ {
+ _mostRecentFilesService = mostRecentFilesService;
+ _index = index;
+ }
+
+ public override bool Enabled
+ {
+ get
+ {
+ if (MostRecentFilesService.Filenames != null)
+ {
+ return MostRecentFilesService.Filenames.Count >= Index;
+ }
+ return false;
+ }
+ }
+
+ public int Index
+ {
+ get { return _index; }
+ }
+
+ public IMostRecentFilesService MostRecentFilesService
+ {
+ get
+ {
+ if (_mostRecentFilesService == null)
+ {
+ _mostRecentFilesService = Services.Resolve<IMostRecentFilesService>();
+ _mostRecentFilesService.MostRecentFilesChanged += MostRecentFilesServiceFilesChanged;
+ }
+ return _mostRecentFilesService;
+ }
+ }
+
+ void MostRecentFilesServiceFilesChanged(object sender, MostRecentFilesChangedEventArgs e)
+ {
+ UpdateName();
+ }
+
+ public void UpdateName()
+ {
+ if (Enabled)
+ {
+ Name = string.Format("&{0} - {1}", Index, GetFilenameByIndex());
+ }
+ }
+
+ public override void Execute()
+ {
+ if (!Enabled)
+ {
+ return;
+ }
+
+ var fileEditorResolver = Services.Resolve<IFileEditorResolver>();
+ _mostRecentFilesService = Services.Resolve<IMostRecentFilesService>();
+ string fileName = GetFilenameByIndex();
+
+ var editor = fileEditorResolver.ResolveEditorInstance(fileName);
+ editor.FileName = fileName;
+ editor.LoadFile();
+ HostWindow.DisplayDockedForm(editor as DockContent);
+ }
+
+ private string GetFilenameByIndex()
+ {
+ return MostRecentFilesService.Filenames[Index - 1];
+ }
+ }
+
+ public class OpenRecentFile1Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile1Command()
+ : base(1)
+ {
+ }
+ }
+
+ public class OpenRecentFile2Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile2Command()
+ : base(2)
+ {
+ }
+ }
+
+ public class OpenRecentFile3Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile3Command()
+ : base(3)
+ {
+ }
+ }
+
+ public class OpenRecentFile4Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile4Command()
+ : base(4)
+ {
+ }
+ }
+
+ public class OpenRecentFile5Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile5Command()
+ : base(5)
+ {
+ }
+ }
+
+ public class OpenRecentFile6Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile6Command()
+ : base(6)
+ {
+ }
+ }
+
+ public class OpenRecentFile7Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile7Command()
+ : base(7)
+ {
+ }
+ }
+
+ public class OpenRecentFile8Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile8Command()
+ : base(8)
+ {
+ }
+ }
+
+ public class OpenRecentFile9Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile9Command()
+ : base(9)
+ {
+ }
+ }
+
+ public class OpenRecentFile10Command : OpenRecentFileCommand
+ {
+ public OpenRecentFile10Command()
+ : base(10)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/SaveFileAsCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/SaveFileAsCommand.cs
new file mode 100644
index 0000000..a3e598e
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/SaveFileAsCommand.cs
@@ -0,0 +1,54 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>The save file as command.</summary>
+ public class SaveFileAsCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="SaveFileAsCommand"/> class.</summary>
+ public SaveFileAsCommand()
+ : base("Save File &As...")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IEditor editor = HostWindow.Instance.ActiveMdiChild as IEditor;
+ if (editor != null)
+ {
+ string oldFilename = editor.FileName;
+ SaveFileDialog saveFileDialog = new SaveFileDialog();
+ saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);
+ saveFileDialog.Filter = editor.FileFilter;
+
+ if (saveFileDialog.ShowDialog(HostWindow.Instance) == DialogResult.OK)
+ {
+ // what if this filename covers an existing open window?
+ string newFilename = saveFileDialog.FileName;
+ editor.FileName = newFilename;
+ editor.SaveFile();
+
+ // register the new file and remove old if applicable
+ var mostRecentFilesService = Services.Resolve<IMostRecentFilesService>();
+ mostRecentFilesService.Register(newFilename);
+ if (oldFilename != null && oldFilename.Equals(newFilename, StringComparison.InvariantCultureIgnoreCase))
+ {
+ mostRecentFilesService.Remove(oldFilename);
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/SaveFileCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/SaveFileCommand.cs
new file mode 100644
index 0000000..bd41f52
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/SaveFileCommand.cs
@@ -0,0 +1,58 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>The save file command.</summary>
+ public class SaveFileCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="SaveFileCommand"/> class.</summary>
+ public SaveFileCommand()
+ : base("&Save File")
+ {
+ ShortcutKeys = Keys.Control | Keys.S;
+ SmallImage = ImageResource.disk;
+ }
+
+ /// <summary>Gets a value indicating whether Enabled.</summary>
+ public override bool Enabled
+ {
+ get
+ {
+ IEditor editor = HostWindow.Instance.ActiveMdiChild as IEditor;
+ if (editor != null)
+ {
+ return editor.IsDirty;
+ }
+
+ return false;
+ }
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IEditor editor = HostWindow.Instance.ActiveMdiChild as IEditor;
+ if (editor != null)
+ {
+ if (editor.FileName == null)
+ {
+ CommandManager.GetCommandInstance<SaveFileAsCommand>().Execute();
+ }
+ else
+ {
+ editor.SaveFile();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/SaveResultsAsDataSetCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/SaveResultsAsDataSetCommand.cs
new file mode 100644
index 0000000..cea455c
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/SaveResultsAsDataSetCommand.cs
@@ -0,0 +1,80 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Data;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using MiniSqlQuery.Core.Forms;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>The save results as data set command.</summary>
+ public class SaveResultsAsDataSetCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="SaveResultsAsDataSetCommand"/> class.</summary>
+ public SaveResultsAsDataSetCommand()
+ : base("Save Results as DataSet XML...")
+ {
+ SmallImage = ImageResource.table_save;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IQueryBatchProvider batchProvider = HostWindow.ActiveChildForm as IQueryBatchProvider;
+
+ if (batchProvider == null)
+ {
+ HostWindow.DisplaySimpleMessageBox(null, "No results to save as a 'DataSet'.", "Save Results as DataSet XML Error");
+ }
+ else
+ {
+ DataSet ds = null;
+
+ if (batchProvider.Batch != null)
+ {
+ if (batchProvider.Batch.Queries.Count > 1)
+ {
+ BatchQuerySelectForm querySelectForm = Services.Resolve<BatchQuerySelectForm>();
+ querySelectForm.Fill(batchProvider.Batch);
+ querySelectForm.ShowDialog();
+ if (querySelectForm.DialogResult == DialogResult.OK)
+ {
+ ds = querySelectForm.SelectedQuery.Result;
+ }
+ }
+ else if (batchProvider.Batch.Queries.Count == 1)
+ {
+ ds = batchProvider.Batch.Queries[0].Result;
+ }
+ }
+
+ if (ds == null)
+ {
+ return;
+ }
+
+ using (SaveFileDialog saveFileDialog = new SaveFileDialog())
+ {
+ saveFileDialog.Title = "Save Results as DataSet XML";
+ saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);
+ saveFileDialog.Filter = Properties.Settings.Default.XmlFileDialogFilter;
+
+ if (saveFileDialog.ShowDialog(HostWindow.Instance) == DialogResult.OK)
+ {
+ ds.WriteXml(saveFileDialog.FileName, XmlWriteMode.WriteSchema);
+ string msg = string.Format("Saved results to file: '{0}'", saveFileDialog.FileName);
+ HostWindow.SetStatus(HostWindow.ActiveChildForm, msg);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/ShowAboutCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/ShowAboutCommand.cs
new file mode 100644
index 0000000..1b960eb
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/ShowAboutCommand.cs
@@ -0,0 +1,32 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>The show about command.</summary>
+ public class ShowAboutCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ShowAboutCommand"/> class.</summary>
+ public ShowAboutCommand()
+ : base("&About...")
+ {
+ SmallImage = ImageResource.ApplicationIcon;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ Form frm = Services.Resolve<AboutForm>();
+ frm.Show(HostWindow.Instance);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Commands/ShowOptionsFormCommand.cs b/minisqlquery-master/src/MiniSqlQuery/Commands/ShowOptionsFormCommand.cs
new file mode 100644
index 0000000..5b1ce09
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Commands/ShowOptionsFormCommand.cs
@@ -0,0 +1,34 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.Commands
+{
+ /// <summary>The show options form command.</summary>
+ public class ShowOptionsFormCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ShowOptionsFormCommand"/> class.</summary>
+ public ShowOptionsFormCommand()
+ : base("Options")
+ {
+ // ShortcutKeys = ?;
+ SmallImage = ImageResource.cog;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ using (OptionsForm optionsForm = Services.Resolve<OptionsForm>())
+ {
+ optionsForm.ShowDialog(HostWindow.Instance);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/CopyForm.cs b/minisqlquery-master/src/MiniSqlQuery/CopyForm.cs
new file mode 100644
index 0000000..f698bb5
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/CopyForm.cs
@@ -0,0 +1,56 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Windows.Forms;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The copy form.</summary>
+ public partial class CopyForm : Form
+ {
+ /// <summary>Initializes a new instance of the <see cref="CopyForm"/> class.</summary>
+ public CopyForm()
+ {
+ InitializeComponent();
+ rbTAB.Checked = true;
+ }
+
+ /// <summary>Gets Delimiter.</summary>
+ public string Delimiter
+ {
+ get
+ {
+ if (rbCSV.Checked) return ",";
+ if (rbTAB.Checked) return "\t";
+ return txtOther.Text;
+ }
+ }
+
+ /// <summary>Gets a value indicating whether IncludeHeaders.</summary>
+ public bool IncludeHeaders
+ {
+ get { return xbIncludeHeaders.Checked; }
+ }
+
+ /// <summary>The cancel button_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void cancelButton_Click(object sender, EventArgs e)
+ {
+ Close();
+ }
+
+ /// <summary>The ok button_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void okButton_Click(object sender, EventArgs e)
+ {
+ Close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/CopyForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/CopyForm.Designer.cs
new file mode 100644
index 0000000..0c308c0
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/CopyForm.Designer.cs
@@ -0,0 +1,159 @@
+namespace MiniSqlQuery {
+ partial class CopyForm {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing) {
+ if (disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent() {
+ this.rbCSV = new System.Windows.Forms.RadioButton();
+ this.rbTAB = new System.Windows.Forms.RadioButton();
+ this.rbOther = new System.Windows.Forms.RadioButton();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.txtOther = new System.Windows.Forms.TextBox();
+ this.xbIncludeHeaders = new System.Windows.Forms.CheckBox();
+ this.cancelButton = new System.Windows.Forms.Button();
+ this.okButton = new System.Windows.Forms.Button();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // rbCSV
+ //
+ this.rbCSV.AutoSize = true;
+ this.rbCSV.Location = new System.Drawing.Point(6, 19);
+ this.rbCSV.Name = "rbCSV";
+ this.rbCSV.Size = new System.Drawing.Size(60, 17);
+ this.rbCSV.TabIndex = 3;
+ this.rbCSV.TabStop = true;
+ this.rbCSV.Text = "Comma";
+ this.rbCSV.UseVisualStyleBackColor = true;
+ //
+ // rbTAB
+ //
+ this.rbTAB.AutoSize = true;
+ this.rbTAB.Checked = true;
+ this.rbTAB.Location = new System.Drawing.Point(6, 42);
+ this.rbTAB.Name = "rbTAB";
+ this.rbTAB.Size = new System.Drawing.Size(46, 17);
+ this.rbTAB.TabIndex = 4;
+ this.rbTAB.TabStop = true;
+ this.rbTAB.Text = "TAB";
+ this.rbTAB.UseVisualStyleBackColor = true;
+ //
+ // rbOther
+ //
+ this.rbOther.AutoSize = true;
+ this.rbOther.Location = new System.Drawing.Point(6, 65);
+ this.rbOther.Name = "rbOther";
+ this.rbOther.Size = new System.Drawing.Size(51, 17);
+ this.rbOther.TabIndex = 5;
+ this.rbOther.TabStop = true;
+ this.rbOther.Text = "Other";
+ this.rbOther.UseVisualStyleBackColor = true;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.txtOther);
+ this.groupBox1.Controls.Add(this.rbCSV);
+ this.groupBox1.Controls.Add(this.rbOther);
+ this.groupBox1.Controls.Add(this.rbTAB);
+ this.groupBox1.Location = new System.Drawing.Point(12, 35);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(142, 91);
+ this.groupBox1.TabIndex = 2;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Delimiter";
+ //
+ // txtOther
+ //
+ this.txtOther.Location = new System.Drawing.Point(63, 62);
+ this.txtOther.Name = "txtOther";
+ this.txtOther.Size = new System.Drawing.Size(59, 20);
+ this.txtOther.TabIndex = 6;
+ this.txtOther.Text = "|";
+ //
+ // xbIncludeHeaders
+ //
+ this.xbIncludeHeaders.AutoSize = true;
+ this.xbIncludeHeaders.Location = new System.Drawing.Point(12, 12);
+ this.xbIncludeHeaders.Name = "xbIncludeHeaders";
+ this.xbIncludeHeaders.Size = new System.Drawing.Size(142, 17);
+ this.xbIncludeHeaders.TabIndex = 1;
+ this.xbIncludeHeaders.Text = "Include Column Headers";
+ this.xbIncludeHeaders.UseVisualStyleBackColor = true;
+ //
+ // cancelButton
+ //
+ this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.cancelButton.Location = new System.Drawing.Point(89, 143);
+ this.cancelButton.Name = "cancelButton";
+ this.cancelButton.Size = new System.Drawing.Size(65, 23);
+ this.cancelButton.TabIndex = 9;
+ this.cancelButton.Text = "&Cancel";
+ this.cancelButton.UseVisualStyleBackColor = true;
+ this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
+ //
+ // okButton
+ //
+ this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.okButton.Location = new System.Drawing.Point(12, 143);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(65, 23);
+ this.okButton.TabIndex = 8;
+ this.okButton.Text = "&OK";
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // CopyForm
+ //
+ this.AcceptButton = this.okButton;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(163, 174);
+ this.Controls.Add(this.okButton);
+ this.Controls.Add(this.cancelButton);
+ this.Controls.Add(this.xbIncludeHeaders);
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "CopyForm";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Copy";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.RadioButton rbCSV;
+ private System.Windows.Forms.RadioButton rbTAB;
+ private System.Windows.Forms.RadioButton rbOther;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox txtOther;
+ private System.Windows.Forms.CheckBox xbIncludeHeaders;
+ private System.Windows.Forms.Button cancelButton;
+ private System.Windows.Forms.Button okButton;
+ }
+}
diff --git a/minisqlquery-master/src/MiniSqlQuery/CopyForm.resx b/minisqlquery-master/src/MiniSqlQuery/CopyForm.resx
new file mode 100644
index 0000000..194da1e
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/CopyForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
diff --git a/minisqlquery-master/src/MiniSqlQuery/ErrorForm.cs b/minisqlquery-master/src/MiniSqlQuery/ErrorForm.cs
new file mode 100644
index 0000000..efd1f23
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/ErrorForm.cs
@@ -0,0 +1,37 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Windows.Forms;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The error form.</summary>
+ public partial class ErrorForm : Form
+ {
+ /// <summary>Initializes a new instance of the <see cref="ErrorForm"/> class.</summary>
+ public ErrorForm()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>The set exception.</summary>
+ /// <param name="exp">The exp.</param>
+ public void SetException(Exception exp)
+ {
+ exceptionControl1.SetException(exp);
+ }
+
+ /// <summary>The btn ok_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ Close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/ErrorForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/ErrorForm.Designer.cs
new file mode 100644
index 0000000..a381647
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/ErrorForm.Designer.cs
@@ -0,0 +1,92 @@
+namespace MiniSqlQuery
+{
+ partial class ErrorForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.exceptionControl1 = new MiniSqlQuery.Core.Controls.ExceptionControl();
+ this.btnOk = new System.Windows.Forms.Button();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox1.Controls.Add(this.exceptionControl1);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Padding = new System.Windows.Forms.Padding(6);
+ this.groupBox1.Size = new System.Drawing.Size(632, 337);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Error Details";
+ //
+ // exceptionControl1
+ //
+ this.exceptionControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.exceptionControl1.Location = new System.Drawing.Point(6, 19);
+ this.exceptionControl1.Name = "exceptionControl1";
+ this.exceptionControl1.Size = new System.Drawing.Size(620, 312);
+ this.exceptionControl1.TabIndex = 0;
+ //
+ // btnOk
+ //
+ this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnOk.Location = new System.Drawing.Point(566, 355);
+ this.btnOk.Name = "btnOk";
+ this.btnOk.Size = new System.Drawing.Size(75, 23);
+ this.btnOk.TabIndex = 1;
+ this.btnOk.Text = "OK";
+ this.btnOk.UseVisualStyleBackColor = true;
+ this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+ //
+ // ErrorForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(656, 390);
+ this.Controls.Add(this.btnOk);
+ this.Controls.Add(this.groupBox1);
+ this.Name = "ErrorForm";
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "Unhandled Exception";
+ this.groupBox1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private global::MiniSqlQuery.Core.Controls.ExceptionControl exceptionControl1;
+ private System.Windows.Forms.Button btnOk;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/ErrorForm.resx b/minisqlquery-master/src/MiniSqlQuery/ErrorForm.resx
new file mode 100644
index 0000000..19dc0dd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/ErrorForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/accept.png b/minisqlquery-master/src/MiniSqlQuery/Images/accept.png
new file mode 100644
index 0000000..89c8129
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/accept.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/cancel.png b/minisqlquery-master/src/MiniSqlQuery/Images/cancel.png
new file mode 100644
index 0000000..c149c2b
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/cancel.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/cog.png b/minisqlquery-master/src/MiniSqlQuery/Images/cog.png
new file mode 100644
index 0000000..67de2c6
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/cog.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/cross.png b/minisqlquery-master/src/MiniSqlQuery/Images/cross.png
new file mode 100644
index 0000000..1514d51
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/cross.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/database.png b/minisqlquery-master/src/MiniSqlQuery/Images/database.png
new file mode 100644
index 0000000..3d09261
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/database.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/database_add.png b/minisqlquery-master/src/MiniSqlQuery/Images/database_add.png
new file mode 100644
index 0000000..802bd6c
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/database_add.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/database_delete.png b/minisqlquery-master/src/MiniSqlQuery/Images/database_delete.png
new file mode 100644
index 0000000..cce652e
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/database_delete.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/database_edit.png b/minisqlquery-master/src/MiniSqlQuery/Images/database_edit.png
new file mode 100644
index 0000000..e501b66
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/database_edit.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/database_error.png b/minisqlquery-master/src/MiniSqlQuery/Images/database_error.png
new file mode 100644
index 0000000..578221a
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/database_error.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/database_refresh.png b/minisqlquery-master/src/MiniSqlQuery/Images/database_refresh.png
new file mode 100644
index 0000000..ff803be
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/database_refresh.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/disk.png b/minisqlquery-master/src/MiniSqlQuery/Images/disk.png
new file mode 100644
index 0000000..99d532e
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/disk.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/disk_multiple.png b/minisqlquery-master/src/MiniSqlQuery/Images/disk_multiple.png
new file mode 100644
index 0000000..fc5a52f
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/disk_multiple.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/email.png b/minisqlquery-master/src/MiniSqlQuery/Images/email.png
new file mode 100644
index 0000000..7348aed
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/email.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/email_go.png b/minisqlquery-master/src/MiniSqlQuery/Images/email_go.png
new file mode 100644
index 0000000..4a6c5d3
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/email_go.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/folder_page.png b/minisqlquery-master/src/MiniSqlQuery/Images/folder_page.png
new file mode 100644
index 0000000..1ef6e11
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/folder_page.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/lightning.png b/minisqlquery-master/src/MiniSqlQuery/Images/lightning.png
new file mode 100644
index 0000000..9680afd
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/lightning.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/page.png b/minisqlquery-master/src/MiniSqlQuery/Images/page.png
new file mode 100644
index 0000000..03ddd79
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/page.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/page_white.png b/minisqlquery-master/src/MiniSqlQuery/Images/page_white.png
new file mode 100644
index 0000000..8b8b1ca
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/page_white.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/plugin.png b/minisqlquery-master/src/MiniSqlQuery/Images/plugin.png
new file mode 100644
index 0000000..6187b15
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/plugin.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/plugin_go.png b/minisqlquery-master/src/MiniSqlQuery/Images/plugin_go.png
new file mode 100644
index 0000000..41da991
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/plugin_go.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/plugin_link.png b/minisqlquery-master/src/MiniSqlQuery/Images/plugin_link.png
new file mode 100644
index 0000000..445c188
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/plugin_link.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Images/table_save.png b/minisqlquery-master/src/MiniSqlQuery/Images/table_save.png
new file mode 100644
index 0000000..25b74d1
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/Images/table_save.png differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/License-MiniSqlQuery.txt b/minisqlquery-master/src/MiniSqlQuery/License-MiniSqlQuery.txt
new file mode 100644
index 0000000..787a5f6
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/License-MiniSqlQuery.txt
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/MainForm.cs b/minisqlquery-master/src/MiniSqlQuery/MainForm.cs
new file mode 100644
index 0000000..835ee33
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/MainForm.cs
@@ -0,0 +1,518 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using MiniSqlQuery.Properties;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The main form.</summary>
+ public partial class MainForm : Form, IHostWindow
+ {
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _settings.</summary>
+ private readonly IApplicationSettings _settings;
+
+ /// <summary>The _arguements.</summary>
+ private string[] _arguements;
+
+ /// <summary>The _db inspector.</summary>
+ private IDatabaseInspector _dbInspector;
+
+ /// <summary>The _initialized.</summary>
+ private bool _initialized;
+
+ /// <summary>Initializes a new instance of the <see cref="MainForm"/> class.</summary>
+ public MainForm()
+ {
+ InitializeComponent();
+ SetPointerState(Cursors.AppStarting);
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="MainForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public MainForm(IApplicationServices services, IApplicationSettings settings)
+ : this()
+ {
+ _services = services;
+ _settings = settings;
+
+ AllowDrop = true;
+ DragEnter += WindowDragEnter;
+ DragDrop += WindowDragDrop;
+ }
+
+ /// <summary>Gets or sets ActiveChildForm.</summary>
+ public Form ActiveChildForm { get; internal set; }
+
+ /// <summary>Gets DatabaseInspector.</summary>
+ public IDatabaseInspector DatabaseInspector
+ {
+ get
+ {
+ if (_dbInspector == null || ((Form)_dbInspector).IsDisposed)
+ {
+ return null;
+ }
+
+ return _dbInspector;
+ }
+ }
+
+ /// <summary>Gets Instance.</summary>
+ public Form Instance
+ {
+ get { return this; }
+ }
+
+ /// <summary>Gets ToolStrip.</summary>
+ [DebuggerNonUserCode]
+ public ToolStrip ToolStrip
+ {
+ get { return toolStripConnection; }
+ }
+
+
+ /// <summary>The add plugin command.</summary>
+ /// <typeparam name="TCommand"></typeparam>
+ public void AddPluginCommand<TCommand>() where TCommand : ICommand, new()
+ {
+ pluginsMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<TCommand>());
+ }
+
+ /// <summary>The add tool strip command.</summary>
+ /// <param name="index">The index.</param>
+ /// <typeparam name="TCommand"></typeparam>
+ public void AddToolStripCommand<TCommand>(int? index) where TCommand : ICommand, new()
+ {
+ ToolStripButton item = CommandControlBuilder.CreateToolStripButton<TCommand>();
+ if (index == null)
+ {
+ toolStripConnection.Items.Add(item);
+ }
+ else
+ {
+ toolStripConnection.Items.Insert(index.Value, item);
+ }
+ }
+
+ /// <summary>The add tool strip seperator.</summary>
+ /// <param name="index">The index.</param>
+ public void AddToolStripSeperator(int? index)
+ {
+ ToolStripSeparator item = CommandControlBuilder.CreateToolStripMenuItemSeparator();
+ if (index == null)
+ {
+ toolStripConnection.Items.Add(item);
+ }
+ else
+ {
+ toolStripConnection.Items.Insert(index.Value, item);
+ }
+ }
+
+ /// <summary>The display docked form.</summary>
+ /// <param name="frm">The frm.</param>
+ public void DisplayDockedForm(DockContent frm)
+ {
+ if (frm != null)
+ {
+ frm.Show(dockPanel, DockState.Document);
+ }
+ }
+
+ /// <summary>The display message box.</summary>
+ /// <param name="source">The source.</param>
+ /// <param name="text">The text.</param>
+ /// <param name="caption">The caption.</param>
+ /// <param name="buttons">The buttons.</param>
+ /// <param name="icon">The icon.</param>
+ /// <param name="defaultButton">The default button.</param>
+ /// <param name="options">The options.</param>
+ /// <param name="helpFilePath">The help file path.</param>
+ /// <param name="keyword">The keyword.</param>
+ /// <returns></returns>
+ public DialogResult DisplayMessageBox(
+ Form source, string text, string caption, MessageBoxButtons buttons,
+ MessageBoxIcon icon, MessageBoxDefaultButton defaultButton,
+ MessageBoxOptions options, string helpFilePath, string keyword)
+ {
+ if (helpFilePath == null && keyword == null)
+ {
+ return MessageBox.Show(source, text, caption, buttons, icon, defaultButton, options);
+ }
+
+ return MessageBox.Show(source, text, caption, buttons, icon, defaultButton, options, helpFilePath, keyword);
+ }
+
+ /// <summary>The display simple message box.</summary>
+ /// <param name="source">The source.</param>
+ /// <param name="text">The text.</param>
+ /// <param name="caption">The caption.</param>
+ /// <returns></returns>
+ public DialogResult DisplaySimpleMessageBox(Form source, string text, string caption)
+ {
+ return MessageBox.Show(source, text, caption);
+ }
+
+ /// <summary>The get menu item.</summary>
+ /// <param name="name">The name.</param>
+ /// <returns></returns>
+ public ToolStripMenuItem GetMenuItem(string name)
+ {
+ ToolStripMenuItem menuItem = null;
+
+ foreach (ToolStripMenuItem item in MainMenuStrip.Items)
+ {
+ if (item.Text.Replace("&", string.Empty).ToLower() == name.ToLower())
+ {
+ menuItem = item;
+ break;
+ }
+ }
+
+ return menuItem;
+ }
+
+ /// <summary>The set arguments.</summary>
+ /// <param name="args">The args.</param>
+ public void SetArguments(string[] args)
+ {
+ _arguements = args;
+ }
+
+ /// <summary>The set pointer state.</summary>
+ /// <param name="cursor">The cursor.</param>
+ public void SetPointerState(Cursor cursor)
+ {
+ Cursor = cursor;
+ Application.DoEvents();
+ }
+
+ /// <summary>The set status.</summary>
+ /// <param name="source">The source.</param>
+ /// <param name="text">The text.</param>
+ public void SetStatus(Form source, string text)
+ {
+ if (source == null || ActiveMdiChild == source)
+ {
+ if (text != null)
+ {
+ text = text.Replace("\r", string.Empty).Replace("\n", " ");
+ }
+
+ toolStripStatusLabel.Text = text;
+ }
+ }
+
+ public void SetResultCount(Form source, int? count)
+ {
+ if (source == null || ActiveMdiChild == source)
+ {
+ string result = string.Empty;
+
+ if (count != null)
+ {
+ if (count.Value == 1)
+ {
+ result = "1 row";
+ }
+ else
+ {
+ result = count.Value + " rows";
+ }
+ }
+
+ toolStripStatusLabelResultCount.Text = result;
+ }
+ }
+
+ /// <summary>The show database inspector.</summary>
+ /// <param name="databaseInspector">The database inspector.</param>
+ /// <param name="dockState">The dock state.</param>
+ /// <exception cref="InvalidOperationException"></exception>
+ public void ShowDatabaseInspector(IDatabaseInspector databaseInspector, DockState dockState)
+ {
+ if (_dbInspector != null && _dbInspector != databaseInspector)
+ {
+ _dbInspector.Close();
+ }
+
+ _dbInspector = databaseInspector;
+ DockContent frm = _dbInspector as DockContent;
+ if (frm == null)
+ {
+ throw new InvalidOperationException(
+ "The 'databaseInspector' must be a 'WeifenLuo.WinFormsUI.Docking.DockContent' based form.");
+ }
+
+ frm.Show(dockPanel, dockState);
+ }
+
+ /// <summary>The show tool window.</summary>
+ /// <param name="form">The form.</param>
+ /// <param name="dockState">The dock state.</param>
+ public void ShowToolWindow(DockContent form, DockState dockState)
+ {
+ form.Show(dockPanel, dockState);
+ }
+
+ /// <summary>The app settings connection definitions changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void AppSettingsConnectionDefinitionsChanged(object sender, EventArgs e)
+ {
+ LoadUpConnections();
+ }
+
+ /// <summary>The load up connections.</summary>
+ private void LoadUpConnections()
+ {
+ DbConnectionDefinitionList definitionList = _settings.GetConnectionDefinitions();
+
+ if (_initialized) // if initialized, just sync the lists
+ {
+ // add missing
+ foreach (var connDef in definitionList.Definitions)
+ {
+ if (!toolStripComboBoxConnection.Items.Contains(connDef))
+ {
+ toolStripComboBoxConnection.Items.Add(connDef);
+ }
+ }
+
+ // remove if missing
+ var defList = new List<DbConnectionDefinition>(definitionList.Definitions);
+ for (int i = toolStripComboBoxConnection.Items.Count - 1; i >= 0; i--)
+ {
+ var connDef = (DbConnectionDefinition)toolStripComboBoxConnection.Items[i];
+ if (!defList.Contains(connDef))
+ {
+ toolStripComboBoxConnection.Items.RemoveAt(i);
+ }
+ }
+ }
+ else
+ {
+ // first populate
+ toolStripComboBoxConnection.Items.Clear();
+ foreach (var connDef in definitionList.Definitions)
+ {
+ toolStripComboBoxConnection.Items.Add(connDef);
+ }
+ }
+
+ // Bug fix - don't automatically refresh as it can try to reconnect to a connection you don't have etc.
+ //foreach (var connDef in definitionList.Definitions)
+ //{
+ // if (connDef.Name == Settings.Default.NammedConnection)
+ // {
+ // toolStripComboBoxConnection.SelectedItem = connDef;
+ // _settings.ConnectionDefinition = connDef;
+ // SetWindowTitle(connDef.Name);
+ // }
+ //}
+ }
+
+ /// <summary>The main form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (e.Cancel)
+ {
+ return;
+ }
+
+ if (_settings.ConnectionDefinition != null)
+ {
+ Settings.Default.NammedConnection = _settings.ConnectionDefinition.Name;
+ Settings.Default.Save();
+ }
+
+ List<IPlugIn> plugins = new List<IPlugIn>(_services.Plugins.Values);
+ plugins.Reverse();
+ foreach (IPlugIn plugin in plugins)
+ {
+ plugin.UnloadPlugIn();
+ }
+
+ _services.Container.Dispose();
+ }
+
+ /// <summary>The main form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void MainForm_Load(object sender, EventArgs e)
+ {
+ _settings.ConnectionDefinitionsChanged += AppSettingsConnectionDefinitionsChanged;
+ toolStripStatusLabelResultCount.Text = string.Empty;
+
+ Utility.CreateConnectionStringsIfRequired();
+ _settings.SetConnectionDefinitions(Utility.LoadDbConnectionDefinitions());
+ }
+
+ /// <summary>The main form_ mdi child activate.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void MainForm_MdiChildActivate(object sender, EventArgs e)
+ {
+ ActiveChildForm = ActiveMdiChild;
+ }
+
+ /// <summary>The main form_ shown.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void MainForm_Shown(object sender, EventArgs e)
+ {
+ _services.InitializePlugIns();
+ DockContent dbInspectorForm = _dbInspector as DockContent;
+
+ if (dbInspectorForm != null)
+ {
+ // the activate for "DockContent" is different to that of "Form".
+ dbInspectorForm.Activate();
+ }
+
+ _initialized = true;
+ SetPointerState(Cursors.Default);
+ SetStatus(null, string.Empty);
+
+ // now check for command line args that are "command type names"
+ if (_arguements != null && _arguements.Length > 0)
+ {
+ foreach (string arg in _arguements)
+ {
+ if (arg.StartsWith("/cmd:"))
+ {
+ string cmdName = arg.Substring(5);
+ ICommand cmd = CommandManager.GetCommandInstanceByPartialName(cmdName);
+ if (cmd != null)
+ {
+ cmd.Execute();
+ }
+ }
+ }
+ }
+ else
+ {
+ CommandManager.GetCommandInstance<NewQueryFormCommand>().Execute();
+ }
+ }
+
+ /// <summary>The set window title.</summary>
+ /// <param name="connectionName">The connection name.</param>
+ private void SetWindowTitle(string connectionName)
+ {
+ Text = string.Format("Mini SQL Query [{0}]", connectionName);
+ }
+
+ /// <summary>The window drag drop.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void WindowDragDrop(object sender, DragEventArgs e)
+ {
+ if (e.Data.GetDataPresent(DataFormats.FileDrop))
+ {
+ string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
+ IFileEditorResolver resolver = _services.Resolve<IFileEditorResolver>();
+ foreach (string filename in filePaths)
+ {
+ // todo: check for file exist file in open windows;
+ IEditor editor = resolver.ResolveEditorInstance(filename);
+ editor.FileName = filename;
+ editor.LoadFile();
+ DisplayDockedForm(editor as DockContent);
+ }
+ }
+ }
+
+ /// <summary>The window drag enter.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void WindowDragEnter(object sender, DragEventArgs e)
+ {
+ if (e.Data.GetDataPresent(DataFormats.FileDrop))
+ {
+ e.Effect = DragDropEffects.Copy;
+ }
+ else
+ {
+ e.Effect = DragDropEffects.None;
+ }
+ }
+
+ /// <summary>The exit tool strip menu item_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void exitToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ CommandManager.GetCommandInstance<ExitApplicationCommand>().Execute();
+ }
+
+ /// <summary>The hide show tool strip menu item_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void hideShowToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (WindowState == FormWindowState.Normal)
+ {
+ Hide();
+ WindowState = FormWindowState.Minimized;
+ }
+ else
+ {
+ Show();
+ WindowState = FormWindowState.Normal;
+ }
+ }
+
+ /// <summary>The sys icon_ double click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void sysIcon_DoubleClick(object sender, EventArgs e)
+ {
+ if (WindowState == FormWindowState.Normal)
+ {
+ Hide();
+ WindowState = FormWindowState.Minimized;
+ }
+ else
+ {
+ Show();
+ WindowState = FormWindowState.Normal;
+ }
+ }
+
+ /// <summary>The tool strip combo box connection_ selected index changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripComboBoxConnection_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (_initialized)
+ {
+ DbConnectionDefinition dbConnectionDefinition = (DbConnectionDefinition)toolStripComboBoxConnection.SelectedItem;
+ _settings.ConnectionDefinition = dbConnectionDefinition;
+ SetWindowTitle(dbConnectionDefinition.Name);
+ }
+ }
+
+ private void dockPanel_ActiveContentChanged(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/MainForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/MainForm.Designer.cs
new file mode 100644
index 0000000..f86f65d
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/MainForm.Designer.cs
@@ -0,0 +1,452 @@
+namespace MiniSqlQuery
+{
+ partial class MainForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
+ WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
+ WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin2 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
+ WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient8 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
+ WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient9 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient5 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient10 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient11 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient12 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient13 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient14 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ this.menuStrip = new System.Windows.Forms.MenuStrip();
+ this.fileMenu = new System.Windows.Forms.ToolStripMenuItem();
+ this.editMenu = new System.Windows.Forms.ToolStripMenuItem();
+ this.queryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolsMenu = new System.Windows.Forms.ToolStripMenuItem();
+ this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pluginsMenu = new System.Windows.Forms.ToolStripMenuItem();
+ this.helpMenu = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.statusBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStrip = new System.Windows.Forms.ToolStrip();
+ this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
+ this.openToolStripButton = new System.Windows.Forms.ToolStripButton();
+ this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.helpToolStripButton = new System.Windows.Forms.ToolStripButton();
+ this.statusStrip = new System.Windows.Forms.StatusStrip();
+ this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.toolStripConnection = new System.Windows.Forms.ToolStrip();
+ this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
+ this.toolStripComboBoxConnection = new System.Windows.Forms.ToolStripComboBox();
+ this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
+ this.sysIcon = new System.Windows.Forms.NotifyIcon(this.components);
+ this.ctxSysIcon = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.hideShowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
+ this.optionsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripStatusLabelResultCount = new System.Windows.Forms.ToolStripStatusLabel();
+ this.menuStrip.SuspendLayout();
+ this.toolStrip.SuspendLayout();
+ this.statusStrip.SuspendLayout();
+ this.toolStripConnection.SuspendLayout();
+ this.ctxSysIcon.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // menuStrip
+ //
+ this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.fileMenu,
+ this.editMenu,
+ this.queryToolStripMenuItem,
+ this.toolsMenu,
+ this.pluginsMenu,
+ this.helpMenu});
+ this.menuStrip.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip.Name = "menuStrip";
+ this.menuStrip.Size = new System.Drawing.Size(1066, 24);
+ this.menuStrip.TabIndex = 0;
+ this.menuStrip.Text = "MenuStrip";
+ //
+ // fileMenu
+ //
+ this.fileMenu.ImageTransparentColor = System.Drawing.SystemColors.ActiveBorder;
+ this.fileMenu.Name = "fileMenu";
+ this.fileMenu.Size = new System.Drawing.Size(37, 20);
+ this.fileMenu.Text = "&File";
+ //
+ // editMenu
+ //
+ this.editMenu.Name = "editMenu";
+ this.editMenu.Size = new System.Drawing.Size(39, 20);
+ this.editMenu.Text = "&Edit";
+ //
+ // queryToolStripMenuItem
+ //
+ this.queryToolStripMenuItem.Name = "queryToolStripMenuItem";
+ this.queryToolStripMenuItem.Size = new System.Drawing.Size(51, 20);
+ this.queryToolStripMenuItem.Text = "&Query";
+ //
+ // toolsMenu
+ //
+ this.toolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.optionsToolStripMenuItem});
+ this.toolsMenu.Name = "toolsMenu";
+ this.toolsMenu.Size = new System.Drawing.Size(48, 20);
+ this.toolsMenu.Text = "&Tools";
+ this.toolsMenu.Visible = false;
+ //
+ // optionsToolStripMenuItem
+ //
+ this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
+ this.optionsToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
+ this.optionsToolStripMenuItem.Text = "&Options";
+ //
+ // pluginsMenu
+ //
+ this.pluginsMenu.Name = "pluginsMenu";
+ this.pluginsMenu.Size = new System.Drawing.Size(58, 20);
+ this.pluginsMenu.Text = "&Plugins";
+ //
+ // helpMenu
+ //
+ this.helpMenu.Name = "helpMenu";
+ this.helpMenu.Size = new System.Drawing.Size(44, 20);
+ this.helpMenu.Text = "&Help";
+ //
+ // toolBarToolStripMenuItem
+ //
+ this.toolBarToolStripMenuItem.CheckOnClick = true;
+ this.toolBarToolStripMenuItem.Enabled = false;
+ this.toolBarToolStripMenuItem.Name = "toolBarToolStripMenuItem";
+ this.toolBarToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.toolBarToolStripMenuItem.Text = "&Toolbar";
+ //
+ // statusBarToolStripMenuItem
+ //
+ this.statusBarToolStripMenuItem.Checked = true;
+ this.statusBarToolStripMenuItem.CheckOnClick = true;
+ this.statusBarToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.statusBarToolStripMenuItem.Name = "statusBarToolStripMenuItem";
+ this.statusBarToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.statusBarToolStripMenuItem.Text = "&Status Bar";
+ //
+ // toolStrip
+ //
+ this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
+ this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.newToolStripButton,
+ this.openToolStripButton,
+ this.saveToolStripButton,
+ this.toolStripSeparator2,
+ this.helpToolStripButton});
+ this.toolStrip.Location = new System.Drawing.Point(0, 24);
+ this.toolStrip.Name = "toolStrip";
+ this.toolStrip.Size = new System.Drawing.Size(842, 25);
+ this.toolStrip.TabIndex = 1;
+ this.toolStrip.Text = "ToolStrip";
+ this.toolStrip.Visible = false;
+ //
+ // newToolStripButton
+ //
+ this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image")));
+ this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Black;
+ this.newToolStripButton.Name = "newToolStripButton";
+ this.newToolStripButton.Size = new System.Drawing.Size(23, 22);
+ this.newToolStripButton.Text = "New";
+ //
+ // openToolStripButton
+ //
+ this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image")));
+ this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Black;
+ this.openToolStripButton.Name = "openToolStripButton";
+ this.openToolStripButton.Size = new System.Drawing.Size(23, 22);
+ this.openToolStripButton.Text = "Open";
+ //
+ // saveToolStripButton
+ //
+ this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image")));
+ this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Black;
+ this.saveToolStripButton.Name = "saveToolStripButton";
+ this.saveToolStripButton.Size = new System.Drawing.Size(23, 22);
+ this.saveToolStripButton.Text = "Save";
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
+ //
+ // helpToolStripButton
+ //
+ this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.helpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image")));
+ this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Black;
+ this.helpToolStripButton.Name = "helpToolStripButton";
+ this.helpToolStripButton.Size = new System.Drawing.Size(23, 22);
+ this.helpToolStripButton.Text = "Help";
+ //
+ // statusStrip
+ //
+ this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripStatusLabel,
+ this.toolStripStatusLabelResultCount});
+ this.statusStrip.Location = new System.Drawing.Point(0, 548);
+ this.statusStrip.Name = "statusStrip";
+ this.statusStrip.Size = new System.Drawing.Size(1066, 22);
+ this.statusStrip.TabIndex = 2;
+ this.statusStrip.Text = "StatusStrip";
+ //
+ // toolStripStatusLabel
+ //
+ this.toolStripStatusLabel.Name = "toolStripStatusLabel";
+ this.toolStripStatusLabel.Size = new System.Drawing.Size(999, 17);
+ this.toolStripStatusLabel.Spring = true;
+ this.toolStripStatusLabel.Text = "Status";
+ this.toolStripStatusLabel.TextAlign = System.Drawing.ContentAlignment.TopLeft;
+ //
+ // toolStripConnection
+ //
+ this.toolStripConnection.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
+ this.toolStripConnection.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripLabel1,
+ this.toolStripComboBoxConnection});
+ this.toolStripConnection.Location = new System.Drawing.Point(0, 24);
+ this.toolStripConnection.Name = "toolStripConnection";
+ this.toolStripConnection.Size = new System.Drawing.Size(1066, 25);
+ this.toolStripConnection.TabIndex = 4;
+ this.toolStripConnection.Text = "toolStrip1";
+ //
+ // toolStripLabel1
+ //
+ this.toolStripLabel1.Name = "toolStripLabel1";
+ this.toolStripLabel1.Size = new System.Drawing.Size(72, 22);
+ this.toolStripLabel1.Text = "Connection:";
+ //
+ // toolStripComboBoxConnection
+ //
+ this.toolStripComboBoxConnection.AutoToolTip = true;
+ this.toolStripComboBoxConnection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.toolStripComboBoxConnection.DropDownWidth = 400;
+ this.toolStripComboBoxConnection.Name = "toolStripComboBoxConnection";
+ this.toolStripComboBoxConnection.Size = new System.Drawing.Size(300, 25);
+ this.toolStripComboBoxConnection.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxConnection_SelectedIndexChanged);
+ //
+ // dockPanel
+ //
+ this.dockPanel.ActiveAutoHideContent = null;
+ this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dockPanel.DockBackColor = System.Drawing.SystemColors.Control;
+ this.dockPanel.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
+ this.dockPanel.Location = new System.Drawing.Point(0, 49);
+ this.dockPanel.Name = "dockPanel";
+ this.dockPanel.Size = new System.Drawing.Size(1066, 499);
+ dockPanelGradient4.EndColor = System.Drawing.SystemColors.ControlLight;
+ dockPanelGradient4.StartColor = System.Drawing.SystemColors.ControlLight;
+ autoHideStripSkin2.DockStripGradient = dockPanelGradient4;
+ tabGradient8.EndColor = System.Drawing.SystemColors.Control;
+ tabGradient8.StartColor = System.Drawing.SystemColors.Control;
+ tabGradient8.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+ autoHideStripSkin2.TabGradient = tabGradient8;
+ dockPanelSkin2.AutoHideStripSkin = autoHideStripSkin2;
+ tabGradient9.EndColor = System.Drawing.SystemColors.ControlLightLight;
+ tabGradient9.StartColor = System.Drawing.SystemColors.ControlLightLight;
+ tabGradient9.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripGradient2.ActiveTabGradient = tabGradient9;
+ dockPanelGradient5.EndColor = System.Drawing.SystemColors.Control;
+ dockPanelGradient5.StartColor = System.Drawing.SystemColors.Control;
+ dockPaneStripGradient2.DockStripGradient = dockPanelGradient5;
+ tabGradient10.EndColor = System.Drawing.SystemColors.ControlLight;
+ tabGradient10.StartColor = System.Drawing.SystemColors.ControlLight;
+ tabGradient10.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripGradient2.InactiveTabGradient = tabGradient10;
+ dockPaneStripSkin2.DocumentGradient = dockPaneStripGradient2;
+ tabGradient11.EndColor = System.Drawing.SystemColors.ActiveCaption;
+ tabGradient11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+ tabGradient11.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
+ tabGradient11.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
+ dockPaneStripToolWindowGradient2.ActiveCaptionGradient = tabGradient11;
+ tabGradient12.EndColor = System.Drawing.SystemColors.Control;
+ tabGradient12.StartColor = System.Drawing.SystemColors.Control;
+ tabGradient12.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripToolWindowGradient2.ActiveTabGradient = tabGradient12;
+ dockPanelGradient6.EndColor = System.Drawing.SystemColors.ControlLight;
+ dockPanelGradient6.StartColor = System.Drawing.SystemColors.ControlLight;
+ dockPaneStripToolWindowGradient2.DockStripGradient = dockPanelGradient6;
+ tabGradient13.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
+ tabGradient13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+ tabGradient13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
+ tabGradient13.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripToolWindowGradient2.InactiveCaptionGradient = tabGradient13;
+ tabGradient14.EndColor = System.Drawing.Color.Transparent;
+ tabGradient14.StartColor = System.Drawing.Color.Transparent;
+ tabGradient14.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+ dockPaneStripToolWindowGradient2.InactiveTabGradient = tabGradient14;
+ dockPaneStripSkin2.ToolWindowGradient = dockPaneStripToolWindowGradient2;
+ dockPanelSkin2.DockPaneStripSkin = dockPaneStripSkin2;
+ this.dockPanel.Skin = dockPanelSkin2;
+ this.dockPanel.TabIndex = 6;
+ this.dockPanel.ActiveContentChanged += new System.EventHandler(this.dockPanel_ActiveContentChanged);
+ //
+ // sysIcon
+ //
+ this.sysIcon.ContextMenuStrip = this.ctxSysIcon;
+ this.sysIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("sysIcon.Icon")));
+ this.sysIcon.Text = "Mini SQL Query";
+ this.sysIcon.Visible = true;
+ this.sysIcon.DoubleClick += new System.EventHandler(this.sysIcon_DoubleClick);
+ //
+ // ctxSysIcon
+ //
+ this.ctxSysIcon.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.hideShowToolStripMenuItem,
+ this.toolStripSeparator3,
+ this.optionsToolStripMenuItem1,
+ this.toolStripSeparator1,
+ this.exitToolStripMenuItem});
+ this.ctxSysIcon.Name = "ctxSysIcon";
+ this.ctxSysIcon.Size = new System.Drawing.Size(137, 82);
+ //
+ // hideShowToolStripMenuItem
+ //
+ this.hideShowToolStripMenuItem.Name = "hideShowToolStripMenuItem";
+ this.hideShowToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
+ this.hideShowToolStripMenuItem.Text = "Hide/Show";
+ this.hideShowToolStripMenuItem.Click += new System.EventHandler(this.hideShowToolStripMenuItem_Click);
+ //
+ // toolStripSeparator3
+ //
+ this.toolStripSeparator3.Name = "toolStripSeparator3";
+ this.toolStripSeparator3.Size = new System.Drawing.Size(133, 6);
+ //
+ // optionsToolStripMenuItem1
+ //
+ this.optionsToolStripMenuItem1.Name = "optionsToolStripMenuItem1";
+ this.optionsToolStripMenuItem1.Size = new System.Drawing.Size(136, 22);
+ this.optionsToolStripMenuItem1.Text = "Options";
+ this.optionsToolStripMenuItem1.Visible = false;
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(133, 6);
+ this.toolStripSeparator1.Visible = false;
+ //
+ // exitToolStripMenuItem
+ //
+ this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
+ this.exitToolStripMenuItem.Text = "Exit";
+ this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
+ //
+ // toolStripStatusLabelResultCount
+ //
+ this.toolStripStatusLabelResultCount.Name = "toolStripStatusLabelResultCount";
+ this.toolStripStatusLabelResultCount.Size = new System.Drawing.Size(21, 17);
+ this.toolStripStatusLabelResultCount.Text = "[0]";
+ this.toolStripStatusLabelResultCount.TextAlign = System.Drawing.ContentAlignment.TopLeft;
+ //
+ // MainForm
+ //
+ this.AllowDrop = true;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1066, 570);
+ this.Controls.Add(this.dockPanel);
+ this.Controls.Add(this.statusStrip);
+ this.Controls.Add(this.toolStripConnection);
+ this.Controls.Add(this.toolStrip);
+ this.Controls.Add(this.menuStrip);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.IsMdiContainer = true;
+ this.MainMenuStrip = this.menuStrip;
+ this.Name = "MainForm";
+ this.Text = "Mini SQL Query";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
+ this.Load += new System.EventHandler(this.MainForm_Load);
+ this.MdiChildActivate += new System.EventHandler(this.MainForm_MdiChildActivate);
+ this.Shown += new System.EventHandler(this.MainForm_Shown);
+ this.menuStrip.ResumeLayout(false);
+ this.menuStrip.PerformLayout();
+ this.toolStrip.ResumeLayout(false);
+ this.toolStrip.PerformLayout();
+ this.statusStrip.ResumeLayout(false);
+ this.statusStrip.PerformLayout();
+ this.toolStripConnection.ResumeLayout(false);
+ this.toolStripConnection.PerformLayout();
+ this.ctxSysIcon.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+ #endregion
+
+
+ private System.Windows.Forms.MenuStrip menuStrip;
+ private System.Windows.Forms.ToolStrip toolStrip;
+ private System.Windows.Forms.StatusStrip statusStrip;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel;
+ private System.Windows.Forms.ToolStripMenuItem fileMenu;
+ private System.Windows.Forms.ToolStripMenuItem toolBarToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem statusBarToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem toolsMenu;
+ private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem helpMenu;
+ private System.Windows.Forms.ToolStripButton newToolStripButton;
+ private System.Windows.Forms.ToolStripButton openToolStripButton;
+ private System.Windows.Forms.ToolStripButton saveToolStripButton;
+ private System.Windows.Forms.ToolStripButton helpToolStripButton;
+ private System.Windows.Forms.ToolTip toolTip;
+ private System.Windows.Forms.ToolStrip toolStripConnection;
+ private System.Windows.Forms.ToolStripLabel toolStripLabel1;
+ private System.Windows.Forms.ToolStripComboBox toolStripComboBoxConnection;
+ private System.Windows.Forms.ToolStripMenuItem queryToolStripMenuItem;
+ internal WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel;
+ private System.Windows.Forms.ToolStripMenuItem pluginsMenu;
+ private System.Windows.Forms.ToolStripMenuItem editMenu;
+ private System.Windows.Forms.NotifyIcon sysIcon;
+ private System.Windows.Forms.ContextMenuStrip ctxSysIcon;
+ private System.Windows.Forms.ToolStripMenuItem hideShowToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
+ private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem1;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
+ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelResultCount;
+ }
+}
+
+
+
diff --git a/minisqlquery-master/src/MiniSqlQuery/MainForm.resx b/minisqlquery-master/src/MiniSqlQuery/MainForm.resx
new file mode 100644
index 0000000..91b655c
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/MainForm.resx
@@ -0,0 +1,498 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>206, 17</value>
+ </metadata>
+ <metadata name="toolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>308, 17</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="newToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEKSURBVDhPrdNtS8JQFAdwv1R+h/oa+Y0kX4j0ohYhA4MF
+ hkYWZtBKEHEDe0KG5Vjzaeqcuod/3MFg5L3XvfDA4b6553c553BTqX2FVO/if5ZqCoqVFoRrOUzuW6SY
+ FQXxAemjDB+5uleZwIlQQfVJ4SPibZsJZM9uwuIoqa1clptMwPV8ECSCqMC59EwFgiCA7WxgjOwQODg8
+ pg/ztPRIBdYbD2PLgaZbfCBfrG0Bnh9gZq8xMBd418Z8IHdR3QKclQtzskTvZ4rOh8kHSH/xIIObzlfo
+ GzN0eyO8qnpyID64z/4E7bdfNFrfyYH44NSvIeTOAHcvWjIg2jfrZK4x2jG5sCv39YFD5w/f9fWWFNSd
+ PAAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="openToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJfSURBVDhPvZNbSBNgGIZ30UVXFmlRCEaWhF2IgSHVRUjS
+ SVFKs8JIE8pTBwzFNg9tOnVzJ6eudJjbdE2dVpZhWCEUikRoqaPEtCwoKsXMUMnT09xCkyzwph/em5/v
+ fb73+35+geB/nJxiMxKthctyE3k6K2lKI8vqG52sIyxe5TCdF5aTZYelSA1EJRcjqDNrWEqNNbK/dklI
+ KyE8UUVofIET0NtlZGKk1qEfwxamBg1YTSrqzdIlIWEJakLjtATHFiGorVAzPly1yDzzqYQpWxJV5XIq
+ S3MxFGehL8jkmlJEkSx1MbTaqGD8i3G+86zdTK8IbLFL6g/AjTIZ3z/qHbHnzE11CofuW/NpsMi4XZmL
+ 1ZCNRS/BpLvCdW06pWoROoXQmaZSn8vou0LmYr9pEVNfpWbmjQQGpIv11n7XnwY9yfAykc6aCC7GhCAw
+ 6LL51ieH90ruVKtoe6B0Fv0+wosoaA9nujWIiYcBvK7w4dyp/U5AmVbM11cSBlozqLcome0XQ3ecE9AZ
+ YzceZ7othInmfYw27maobjuSeC9OBLo5l1mizmCoS8hNs4KOJ/YkPUl2wBnoOMns08NMPj7IWNMehuv9
+ +FztTXvOaiKDPPHb6uIE6PJFdDdncsucD32Z8Nwe99lRJluCGXsUwEiDP4NWHz4Yt2BTuiKO3YzvNveF
+ pyzMS6XWJMd2N4F2jWBebcoVNMtWci9rFTXpazGkunP10kYiD23C39djAaCRpqARnyVPGE3ahWOOxZyO
+ COTIgZ3s3eXDDh8vvD3d8djgxro1Lqx3/RV9Wb/pH8U/ATEu7l+AbzRZAAAAAElFTkSuQmCC
+</value>
+ </data>
+ <data name="saveToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIpSURBVDhPrZPdS5NxFMf3L3TfTdBFtzU1hmuxGjzlHMqq
+ YVgRvT2RL+XSZZqoWJlGLV8gW+HSScvpJJxU+AamSI2hTCVLM1e0xKGm2EQw+PY7v+j5tTJv6gfn8vM5
+ zznn+6hU/+M9exoFla99GW3eJTx2L6CxIYL7jhnU1nyC/XYIN8qnUFoygcKC18jLHcWF80EovQns7QFq
+ qlex0VtZXYMxrReH057wUgTe1kUuqKz48lee4MjCCnabn0OtlmE55BEC96N5Ligt+byu4Cf8PryIOJMP
+ BZenccDcJATO+lkuuGR794fgV3hkMoJtkhfWnHGkpjiFoO5umAuys0ZjBL/Dg8EwNuvdkOUATCaHEFRX
+ feQC+UxAEawH9/g/YFNiA44cfYGkpFohuFk5je4usFMCx0++guXYAN82LYxmps+mzj/gPhy0dEKS7EJw
+ tWwSHT6wDABNrm/s7l9Rfn2OL5UWRjNnZgQVODm1HQZDhRBcKRyHpxl46FxjwYnCmJ4TU+YTNqSfK+Kd
+ k1MYvN8Dvb5MCGx5YwwGqu5EeWcSUEjitBKG3s5ibGoOcu417DW2cVi7xwWdrkgIKJaOe1A+mwQEn82/
+ hTeheYRmlnCx2I54vYvBjYjf9QDaxHwhyMwYZnMv85m3GjzYskNCS0c/fF2D6O7zY+DlEPaZLFDr6pHA
+ 4O2aOmg01ljB6VP9PJ6UMAoJ3ZlORdumhdHM1JWK4J0J2ULwL3/0d2xoOmtKzOuNAAAAAElFTkSuQmCC
+</value>
+ </data>
+ <data name="helpToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKcSURBVDhPjZNbSNNRHMf3HPRcYu+9Gb32VhAJ9RASlOBb
+ b1aIFop5GXPeyrmp8zLNu21NR24q6qa2izbndKnzspI2hm5O866FFyg+/TfRyjT6wY8Dh/P5/r7nd85P
+ JDoj6po8lJZOkpMzTHa2nbPOnbofhsPpdq/T0DiH5s0sUul/Ch3BTuc6FSo3Vtsa78xBBszzaFs9SHIc
+ Zzs6CXf3LGO3f2PIuoPNusVA/zp6/SIt6hnB0cifQifhzq4QFvMWvb2rdHQu0y6Abbp5Wpq9qFQe5PIJ
+ cvNHDntzEtYbghHQYAjRql2gudlHbe0cFRUzKBTjFBSM8TTFzOMnRo5ht3szcmdt6zw63QKa134aG7y0
+ dgSRtW0SX7ZPnGwHSW0QecUUiY+M6DuGDwW0bdPIFS4amny8qvlEVbkHZek0dboQyVqotsKHBSED0Dj4
+ nfv5AdrNHrwBPyKxxIZWN4VEOoisZBRZ8Tgvi1zUq30kaUA3CotL22QWmrj1oC6yGpy73EhyUaR0InqW
+ asS/HMRkmSA9ox+x2BZ587yWFVQWInEEj00EIiJljQ6kmiUSEk2IMrM1lCj7WNoOMb8q3K/UgjRvkLuF
+ GxgmDgXCEXYRFrh2p4pK9TgtQwdEXa5E9KJ4RKg8IKQRs32ajYMvWB0fiRUH0f8msPN1PwKn5prwrgi9
+ sOxxIbrg1xeX5A6SkdVPSbkNX2gBVc8i8q7dYwcOobq81olPgKeFZqaUeYiNq/t7RjKyzDwXhLotn7mZ
+ Mkm364C9H2B8HyDmegmzi1DZvcb5q0rylZbThyxLbCEtvY+m9lmuxJsQ1/vR2vdQW3dJVsxyLkbB47S3
+ DI0H/z2lqhoXxUoHCQ87iLqUx8XoTG7fq0amsjEyFYrAPwG3BHAuW8RdOwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>121, 17</value>
+ </metadata>
+ <metadata name="toolStripConnection.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>401, 17</value>
+ </metadata>
+ <metadata name="sysIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>550, 17</value>
+ </metadata>
+ <metadata name="ctxSysIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>639, 17</value>
+ </metadata>
+ <data name="sysIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAgBAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFtWgGBbVoDgW1aBYFtWgeBbVoJgW1aCoFt
+ WguBbVoLgW1aCoFtWgmBbVoHgW1aCIFtWguBbVoPgW1aEoFtWhKBbVoOgW1aCIFtWgIAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFtWgKBbVoFgW1aCoFtWhGBbVoVgW1aGYFt
+ WhyBbVofgW1aIYFtWiGBbVofgW1aHYFtWiJ2Yk9GclxIeG5ZRZprVUGsbFZClW1YQ3F1Xks8gW1aGIFt
+ WgqBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFtWgGBbVoEgW1aC4FtWhSBbVoeXWdrQU9l
+ cWBHZHV7SGR1fUJjeJhEZHaPSGR0f1JmcGVhZGVrc2FQsoh2Zuyik4f5urCn/8a+tv+2rKP+mot+935s
+ WuZqVECVdV1LMIFtWg+BbVoCAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoBgW1aBoFtWhFeZ2oyP2N5mjpl
+ f+BCcYrnUIef6FeYsO9Tmrb/UqLC/0eYvP89ia/3PW6K/mtpY/mtoZb/2NTP/+Dc2P/d2NT/5OHd/+Xi
+ 3//k4N3/1c/K/qCShv1sWEW8cV5IPoFtWg+BbVoBAAAAAAAAAAAAAAAAAAAAAIFtWgSBbVoTO26Kqzpp
+ hehaobznfdTq/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0qu1f9tfHz/ua+m/+Lf3P/i39z/AI0A/6+8
+ qP/Z1dD/4d7a/+Lf3P/i39z/4d7b/6ickv9tWke6eF9NL4FtWgkAAAAAAAAAAAAAAAAAAAAAgW1aEzdq
+ huJDlLjuYsjq/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uvuf/ZYuV/7Clm//f29j/4NzZ/+Dc
+ 2f8AjQD/AGYA/665pv/X0s7/39vY/+Dc2f/g3Nn/3trX/56Qhf1qVkORgW1aGIFtWgIAAAAAAAAAAAAA
+ AABaaG1WP5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1uz0v+MiH7/1NDM/9zZ
+ 1v/c2db/3NnW/wCNAP8xrVH/AGYA/625pv/Vz8v/29jV/9zZ1v/c2db/zcbB/3tpWORxYUw1gW1aBwAA
+ AAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/ZaCz/6qh
+ lf/a1tP/2tbT/9rW0//g3Nr/AI0A/0/Rdv8xrVH/AGYA/7rHtf/a1tL/2dbT/9rW0//Y1NH/lIZ49W5Y
+ RWWBbVoMAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI
+ 6/9tk5z/wbiw/9fT0P/Y1NH/5ePh//n5+P8AjQD/T9F2/zfEXf8xrVH/AGYA/8HPvv/h3dn/19PQ/9fT
+ 0P+qn5X+a1dDiYFtWhAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a
+ 8P9w0e3/Ysjr/3OMkP/IwLr/2NTR/+nm5f/+/v7//////wCNAP9+4J7/aNiK/2jYiv9+4J7/AGcD/9Dg
+ 0P/o5uX/19PR/7Wso/9sVkObgW1aDwAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PI6v9owuH/abrX/2y4
+ 0v9otM//XqnH/1aiwv9Pmrz/aoOK/8K4sP/r6Of//v39////////////AI0A/37gnv9o2Ir/fuCe/wFv
+ EP/Q4ND//v7+//39/f/k4uD/rKGX/nBZRYaBbVoLAAAAAAAAAAAAAAAAUH2d/z+Ywv9Mq9X/U6bM/1ut
+ 0P9uwNz/fc7j/4DS5/930Of/bczp/2LI6/9morX/ta6l//38/P////////////////8AjQD/fuCe/37g
+ nv8BbxD/0ODQ//7+/v////////////f29f+dj4P1cVxHYIFtWgYAAAAAAAAAAAAAAABQfZ3/RJjB/0ym
+ 0P9gwuX/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1u01v+XlYz/8vDv/////////////////wCN
+ AP9+4J7/AW8Q/9Dg0P/+/v7/////////////////6+jm/ol3ZuNzXU4pgW1aAQAAAAAAAAAAAAAAAFB9
+ nf9EmMH/TLfi/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/2qUoP/Fu7L//v7+////
+ ////////AI0A/wFvEP/Q4ND//v7+//////////////////39/f+zp5z8dV5LhoFtWgcAAAAAAAAAAAAA
+ AAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uv+j/SrHb/3aL
+ jv/Qxr///v7+//////8AjQD/0eHS//7+/v/////////////////9/f3/wLat/31qWLN7X00agW1aAQAA
+ AAAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/
+ 6P9EtuX/PKDP/3CFjP/CuK//7+7r//79/f/////////////////9/f3/7ero/raqoP2Ba1q1fGNRJoFt
+ WgIAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR
+ 7f9iyOv/VL/o/0S25f8vqOH/IpjU/0yBmv+OjYf/squj/87Fvv/Z0cz/ysK7/62hl/+Vg3LofWdUkHVk
+ UxqBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8jq/2jC4f9putf/bLjS/2i0
+ z/9eqcf/VqLC/0+avP9LmLv/Rpa8/z2Quf8yi7n/JoW4/yqBsv86gKL/SnuU/153gf9TcID/SWuA/4Fr
+ WUqBbVoYgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/P5jC/0yr1f9Tpsz/W63Q/27A
+ 3P99zuP/gNLn/3fQ5/9tzOn/Ysjr/1O85f9Est//M6LX/yGW0f8Vicn/GoXA/yOCtv8ufqn/MX2n/yJ0
+ p/8qapT/gW1aLoFtWhaBbVoEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf9EmMH/TKbQ/2DC
+ 5f9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0S25f8vqOH/GZvd/wSO2f8Ai9j/AIvY/wSK
+ 1P8sgK3/KHSi/ypqlP+BbVotgW1aFoFtWgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/0SY
+ wf9Mt+L/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uv+j/RLbl/y+o4f8Zm93/BI7Z/wCL
+ 2P8Ai9j/A4rV/yCFvf8edKr/KmqU/4FtWi2BbVoWgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9EtuX/L6jh/xmb
+ 3f8Ejtn/AIvY/wCL2P8DitX/IIW9/x50qv8qapT/gW1aLYFtWhaBbVoEAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0S2
+ 5f8vqOH/GZvd/wSO2f8Ai9j/AIvY/wOK1f8ghb3/HnSq/ypqlP+BbVotgW1aF4FtWgQAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Ycbp/2K+4P9is9X/XKfL/1Sexf9Nlr//S5W//0yW
+ v/9KlL//SJO//0eUv/9FlsP/OZXI/x+Ozf8Mi9P/BIrU/yCFvf8edKr/KmqU/4FtWiyBbVoWgW1aBAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/P5jC/0ueyP9Okrn/aajF/4W+1f+k2ef/t+rz/8n7
+ /v/J/P//x/v//8T7///B+f3/ufX6/6bj7/+OzuH/dLbQ/1ugwv9Ej7r/OIy8/x50qv8qapT/gW1aKIFt
+ WhOBbVoEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf9Oh6f/ir3P/8by9v/U////0v///9D+
+ ///O/f//y/3//8n8///H+///xPv//8P7///A+///vvr//7v6//+4+f//tff+/5/h7P91tMr/UH2d/ypq
+ lP+BbVocgW1aDIFtWgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPXCOo3+wv/zT/v7/1P///9T/
+ ///S////0P7//879///L/f//yfz//8f7///E+///w/v//8D7//+++v//u/r//7j5//+2+f//s/j//672
+ /f9akqr4QG+LrIFtWg6BbVoEgW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEboQLUnyQuWOO
+ n+qn0tj8xfDy/9L////Q/v//zv3//8v9///J/P//x/v//8T7///D+///wPv//776//+7+v//uPn//6bm
+ 7v+MyNT6VoSY6096jadwbWULgW1aA4FtWgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAARG6EH1B7j4tSfJDYT3mN8WKNn+92obDyiLbC/4m4xP+WxtH/lMbR/4S1wv+CtMH9bp6v81qH
+ mvBMeI3wUHyQ0kx2in9ObXwcgW1aA4FtWgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARG6EI0RuhD9EbYNgRG2DYFN9kZBRe5CLRW2CYkVt
+ gl5GbYJCSG2BHYFtWgKBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAA/wAAH/wAAAfwAAAD4AAAAeAAAAHgAAAA4AAAAOAAAADgAAAA4AAAAOAA
+ AADgAAAA4AAAAOAAAAHgAAAB4AAAA+AAAAfgAAAP4AAAD+AAAA/gAAAP4AAAD+AAAA/gAAAP4AAAD+AA
+ AA/gAAAP4AAAH/gAAH//gAf///////////8oAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoBgW1aA4FtWgWBbVoHgW1aCYFt
+ WgqBbVoLgW1aC4FtWgqBbVoJgW1aB4FtWgiBbVoLgW1aD4FtWhKBbVoSgW1aDoFtWgiBbVoCAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoCgW1aBYFtWgqBbVoRgW1aFYFt
+ WhmBbVocgW1aH4FtWiGBbVohgW1aH4FtWh2BbVoidmJPRnJcSHhuWUWaa1VBrGxWQpVtWENxdV5LPIFt
+ WhiBbVoKgW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoBgW1aBIFtWguBbVoUgW1aHl1n
+ a0FPZXFgR2R1e0hkdX1CY3iYRGR2j0hkdH9SZnBlYWRla3NhULKIdmbsopOH+bqwp//Gvrb/tqyj/pqL
+ fvd+bFrmalRAlXVdSzCBbVoPgW1aAgAAAAAAAAAAAAAAAAAAAAAAAAAAgW1aAYFtWgaBbVoRXmdqMj9j
+ eZo6ZX/gQnGK51CHn+hXmLDvU5q2/1Kiwv9HmLz/PYmv9z1uiv5raWP5raGW/9jUz//g3Nj/3djU/+Th
+ 3f/l4t//5ODd/9XPyv6gkob9bFhFvHFeSD6BbVoPgW1aAQAAAAAAAAAAAAAAAAAAAACBbVoEgW1aEztu
+ iqs6aYXoWqG8533U6v+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9KrtX/bXx8/7mvpv/i39z/4t/c/wCN
+ AP+vvKj/2dXQ/+He2v/i39z/4t/c/+He2/+onJL/bVpHunhfTS+BbVoJAAAAAAAAAAAAAAAAAAAAAIFt
+ WhM3aobiQ5S47mLI6v9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL7n/2WLlf+wpZv/39vY/+Dc
+ 2f/g3Nn/AI0A/wBmAP+uuab/19LO/9/b2P/g3Nn/4NzZ/97a1/+ekIX9alZDkYFtWhiBbVoCAAAAAAAA
+ AAAAAAAAWmhtVj+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9bs9L/jIh+/9TQ
+ zP/c2db/3NnW/9zZ1v8AjQD/Ma1R/wBmAP+tuab/1c/L/9vY1f/c2db/3NnW/83Gwf97aVjkcWFMNYFt
+ WgcAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/2Wg
+ s/+qoZX/2tbT/9rW0//a1tP/4Nza/wCNAP9P0Xb/Ma1R/wBmAP+6x7X/2tbS/9nW0//a1tP/2NTR/5SG
+ ePVuWEVlgW1aDAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR
+ 7f9iyOv/bZOc/8G4sP/X09D/2NTR/+Xj4f/5+fj/AI0A/0/Rdv83xF3/Ma1R/wBmAP/Bz77/4d3Z/9fT
+ 0P/X09D/qp+V/mtXQ4mBbVoQAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi
+ 8/9+2vD/cNHt/2LI6/9zjJD/yMC6/9jU0f/p5uX//v7+//////8AjQD/fuCe/2jYiv9o2Ir/fuCe/wBn
+ A//Q4ND/6Obl/9fT0f+1rKP/bFZDm4FtWg8AAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyOr/aMLh/2m6
+ 1/9suNL/aLTP/16px/9WosL/T5q8/2qDiv/CuLD/6+jn//79/f///////////wCNAP9+4J7/aNiK/37g
+ nv8BbxD/0ODQ//7+/v/9/f3/5OLg/6yhl/5wWUWGgW1aCwAAAAAAAAAAAAAAAFB9nf8/mML/TKvV/1Om
+ zP9brdD/bsDc/33O4/+A0uf/d9Dn/23M6f9iyOv/ZqK1/7Wupf/9/Pz/////////////////AI0A/37g
+ nv9+4J7/AW8Q/9Dg0P/+/v7////////////39vX/nY+D9XFcR2CBbVoGAAAAAAAAAAAAAAAAUH2d/0SY
+ wf9MptD/YMLl/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9btNb/l5WM//Lw7///////////////
+ //8AjQD/fuCe/wFvEP/Q4ND//v7+/////////////////+vo5v6Jd2bjc11OKYFtWgEAAAAAAAAAAAAA
+ AABQfZ3/RJjB/0y34v9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9qlKD/xbuy//7+
+ /v///////////wCNAP8BbxD/0ODQ//7+/v/////////////////9/f3/s6ec/HVeS4aBbVoHAAAAAAAA
+ AAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0qx
+ 2/92i47/0Ma///7+/v//////AI0A/9Hh0v/+/v7//////////////////f39/8C2rf99alize19NGoFt
+ WgEAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI
+ 6/9Uv+j/RLbl/zygz/9whYz/wriv/+/u6//+/f3//////////////////f39/+3q6P62qqD9gWtatXxj
+ USaBbVoCAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a
+ 8P9w0e3/Ysjr/1S/6P9EtuX/L6jh/yKY1P9MgZr/jo2H/7Kro//Oxb7/2dHM/8rCu/+toZf/lYNy6H1n
+ VJB1ZFMagW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PI6v9owuH/abrX/2y4
+ 0v9otM//XqnH/1aiwv9Pmrz/S5i7/0aWvP89kLn/Mou5/yaFuP8qgbL/OoCi/0p7lP9ed4H/U3CA/0lr
+ gP+Ba1lKgW1aGIFtWgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9Mq9X/U6bM/1ut
+ 0P9uwNz/fc7j/4DS5/930Of/bczp/2LI6/9TvOX/RLLf/zOi1/8hltH/FYnJ/xqFwP8jgrb/Ln6p/zF9
+ p/8idKf/KmqU/4FtWi6BbVoWgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/RJjB/0ym
+ 0P9gwuX/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9EtuX/L6jh/xmb3f8Ejtn/AIvY/wCL
+ 2P8EitT/LICt/yh0ov8qapT/gW1aLYFtWhaBbVoEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9
+ nf9EmMH/TLfi/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0S25f8vqOH/GZvd/wSO
+ 2f8Ai9j/AIvY/wOK1f8ghb3/HnSq/ypqlP+BbVotgW1aFoFtWgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uv+j/RLbl/y+o
+ 4f8Zm93/BI7Z/wCL2P8Ai9j/A4rV/yCFvf8edKr/KmqU/4FtWi2BbVoWgW1aBAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/
+ 6P9EtuX/L6jh/xmb3f8Ejtn/AIvY/wCL2P8DitX/IIW9/x50qv8qapT/gW1aLYFtWheBbVoEAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2HG6f9ivuD/YrPV/1yny/9UnsX/TZa//0uV
+ v/9Mlr//SpS//0iTv/9HlL//RZbD/zmVyP8fjs3/DIvT/wSK1P8ghb3/HnSq/ypqlP+BbVosgW1aFoFt
+ WgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9Lnsj/TpK5/2moxf+FvtX/pNnn/7fq
+ 8//J+/7/yfz//8f7///E+///wfn9/7n1+v+m4+//js7h/3S20P9boML/RI+6/ziMvP8edKr/KmqU/4Ft
+ WiiBbVoTgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/Toen/4q9z//G8vb/1P///9L/
+ ///Q/v//zv3//8v9///J/P//x/v//8T7///D+///wPv//776//+7+v//uPn//7X3/v+f4ez/dbTK/1B9
+ nf8qapT/gW1aHIFtWgyBbVoCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD1wjqN/sL/80/7+/9T/
+ ///U////0v///9D+///O/f//y/3//8n8///H+///xPv//8P7///A+///vvr//7v6//+4+f//tvn//7P4
+ //+u9v3/WpKq+EBvi6yBbVoOgW1aBIFtWgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARG6EC1J8
+ kLljjp/qp9LY/MXw8v/S////0P7//879///L/f//yfz//8f7///E+///w/v//8D7//+++v//u/r//7j5
+ //+m5u7/jMjU+laEmOtPeo2ncG1lC4FtWgOBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAERuhB9Qe4+LUnyQ2E95jfFijZ/vdqGw8oi2wv+JuMT/lsbR/5TG0f+EtcL/grTB/W6e
+ r/Nah5rwTHiN8FB8kNJMdop/Tm18HIFtWgOBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAERuhCNEboQ/RG2DYERtg2BTfZGQUXuQi0Vt
+ gmJFbYJeRm2CQkhtgR2BbVoCgW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAB/8AAAH8AAAA+AAAAHgAAAB4AAAAOAAAADgAAAA4AAAAOAA
+ AADgAAAA4AAAAOAAAADgAAAB4AAAAeAAAAPgAAAH4AAAD+AAAA/gAAAP4AAAD+AAAA/gAAAP4AAAD+AA
+ AA/gAAAP4AAAD+AAAB/4AAB//4AH////////////
+</value>
+ </data>
+ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>51</value>
+ </metadata>
+ <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAgBAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFtWgGBbVoDgW1aBYFtWgeBbVoJgW1aCoFt
+ WguBbVoLgW1aCoFtWgmBbVoHgW1aCIFtWguBbVoPgW1aEoFtWhKBbVoOgW1aCIFtWgIAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFtWgKBbVoFgW1aCoFtWhGBbVoVgW1aGYFt
+ WhyBbVofgW1aIYFtWiGBbVofgW1aHYFtWiJ2Yk9GclxIeG5ZRZprVUGsbFZClW1YQ3F1Xks8gW1aGIFt
+ WgqBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFtWgGBbVoEgW1aC4FtWhSBbVoeXWdrQU9l
+ cWBHZHV7SGR1fUJjeJhEZHaPSGR0f1JmcGVhZGVrc2FQsoh2Zuyik4f5urCn/8a+tv+2rKP+mot+935s
+ WuZqVECVdV1LMIFtWg+BbVoCAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoBgW1aBoFtWhFeZ2oyP2N5mjpl
+ f+BCcYrnUIef6FeYsO9Tmrb/UqLC/0eYvP89ia/3PW6K/mtpY/mtoZb/2NTP/+Dc2P/d2NT/5OHd/+Xi
+ 3//k4N3/1c/K/qCShv1sWEW8cV5IPoFtWg+BbVoBAAAAAAAAAAAAAAAAAAAAAIFtWgSBbVoTO26Kqzpp
+ hehaobznfdTq/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0qu1f9tfHz/ua+m/+Lf3P/i39z/AI0A/6+8
+ qP/Z1dD/4d7a/+Lf3P/i39z/4d7b/6ickv9tWke6eF9NL4FtWgkAAAAAAAAAAAAAAAAAAAAAgW1aEzdq
+ huJDlLjuYsjq/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uvuf/ZYuV/7Clm//f29j/4NzZ/+Dc
+ 2f8AjQD/AGYA/665pv/X0s7/39vY/+Dc2f/g3Nn/3trX/56Qhf1qVkORgW1aGIFtWgIAAAAAAAAAAAAA
+ AABaaG1WP5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1uz0v+MiH7/1NDM/9zZ
+ 1v/c2db/3NnW/wCNAP8xrVH/AGYA/625pv/Vz8v/29jV/9zZ1v/c2db/zcbB/3tpWORxYUw1gW1aBwAA
+ AAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/ZaCz/6qh
+ lf/a1tP/2tbT/9rW0//g3Nr/AI0A/0/Rdv8xrVH/AGYA/7rHtf/a1tL/2dbT/9rW0//Y1NH/lIZ49W5Y
+ RWWBbVoMAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI
+ 6/9tk5z/wbiw/9fT0P/Y1NH/5ePh//n5+P8AjQD/T9F2/zfEXf8xrVH/AGYA/8HPvv/h3dn/19PQ/9fT
+ 0P+qn5X+a1dDiYFtWhAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a
+ 8P9w0e3/Ysjr/3OMkP/IwLr/2NTR/+nm5f/+/v7//////wCNAP9+4J7/aNiK/2jYiv9+4J7/AGcD/9Dg
+ 0P/o5uX/19PR/7Wso/9sVkObgW1aDwAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PI6v9owuH/abrX/2y4
+ 0v9otM//XqnH/1aiwv9Pmrz/aoOK/8K4sP/r6Of//v39////////////AI0A/37gnv9o2Ir/fuCe/wFv
+ EP/Q4ND//v7+//39/f/k4uD/rKGX/nBZRYaBbVoLAAAAAAAAAAAAAAAAUH2d/z+Ywv9Mq9X/U6bM/1ut
+ 0P9uwNz/fc7j/4DS5/930Of/bczp/2LI6/9morX/ta6l//38/P////////////////8AjQD/fuCe/37g
+ nv8BbxD/0ODQ//7+/v////////////f29f+dj4P1cVxHYIFtWgYAAAAAAAAAAAAAAABQfZ3/RJjB/0ym
+ 0P9gwuX/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1u01v+XlYz/8vDv/////////////////wCN
+ AP9+4J7/AW8Q/9Dg0P/+/v7/////////////////6+jm/ol3ZuNzXU4pgW1aAQAAAAAAAAAAAAAAAFB9
+ nf9EmMH/TLfi/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/2qUoP/Fu7L//v7+////
+ ////////AI0A/wFvEP/Q4ND//v7+//////////////////39/f+zp5z8dV5LhoFtWgcAAAAAAAAAAAAA
+ AAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uv+j/SrHb/3aL
+ jv/Qxr///v7+//////8AjQD/0eHS//7+/v/////////////////9/f3/wLat/31qWLN7X00agW1aAQAA
+ AAAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/
+ 6P9EtuX/PKDP/3CFjP/CuK//7+7r//79/f/////////////////9/f3/7ero/raqoP2Ba1q1fGNRJoFt
+ WgIAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR
+ 7f9iyOv/VL/o/0S25f8vqOH/IpjU/0yBmv+OjYf/squj/87Fvv/Z0cz/ysK7/62hl/+Vg3LofWdUkHVk
+ UxqBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8jq/2jC4f9putf/bLjS/2i0
+ z/9eqcf/VqLC/0+avP9LmLv/Rpa8/z2Quf8yi7n/JoW4/yqBsv86gKL/SnuU/153gf9TcID/SWuA/4Fr
+ WUqBbVoYgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/P5jC/0yr1f9Tpsz/W63Q/27A
+ 3P99zuP/gNLn/3fQ5/9tzOn/Ysjr/1O85f9Est//M6LX/yGW0f8Vicn/GoXA/yOCtv8ufqn/MX2n/yJ0
+ p/8qapT/gW1aLoFtWhaBbVoEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf9EmMH/TKbQ/2DC
+ 5f9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0S25f8vqOH/GZvd/wSO2f8Ai9j/AIvY/wSK
+ 1P8sgK3/KHSi/ypqlP+BbVotgW1aFoFtWgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/0SY
+ wf9Mt+L/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uv+j/RLbl/y+o4f8Zm93/BI7Z/wCL
+ 2P8Ai9j/A4rV/yCFvf8edKr/KmqU/4FtWi2BbVoWgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9EtuX/L6jh/xmb
+ 3f8Ejtn/AIvY/wCL2P8DitX/IIW9/x50qv8qapT/gW1aLYFtWhaBbVoEAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0S2
+ 5f8vqOH/GZvd/wSO2f8Ai9j/AIvY/wOK1f8ghb3/HnSq/ypqlP+BbVotgW1aF4FtWgQAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Ycbp/2K+4P9is9X/XKfL/1Sexf9Nlr//S5W//0yW
+ v/9KlL//SJO//0eUv/9FlsP/OZXI/x+Ozf8Mi9P/BIrU/yCFvf8edKr/KmqU/4FtWiyBbVoWgW1aBAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/P5jC/0ueyP9Okrn/aajF/4W+1f+k2ef/t+rz/8n7
+ /v/J/P//x/v//8T7///B+f3/ufX6/6bj7/+OzuH/dLbQ/1ugwv9Ej7r/OIy8/x50qv8qapT/gW1aKIFt
+ WhOBbVoEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf9Oh6f/ir3P/8by9v/U////0v///9D+
+ ///O/f//y/3//8n8///H+///xPv//8P7///A+///vvr//7v6//+4+f//tff+/5/h7P91tMr/UH2d/ypq
+ lP+BbVocgW1aDIFtWgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPXCOo3+wv/zT/v7/1P///9T/
+ ///S////0P7//879///L/f//yfz//8f7///E+///w/v//8D7//+++v//u/r//7j5//+2+f//s/j//672
+ /f9akqr4QG+LrIFtWg6BbVoEgW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEboQLUnyQuWOO
+ n+qn0tj8xfDy/9L////Q/v//zv3//8v9///J/P//x/v//8T7///D+///wPv//776//+7+v//uPn//6bm
+ 7v+MyNT6VoSY6096jadwbWULgW1aA4FtWgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAARG6EH1B7j4tSfJDYT3mN8WKNn+92obDyiLbC/4m4xP+WxtH/lMbR/4S1wv+CtMH9bp6v81qH
+ mvBMeI3wUHyQ0kx2in9ObXwcgW1aA4FtWgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARG6EI0RuhD9EbYNgRG2DYFN9kZBRe5CLRW2CYkVt
+ gl5GbYJCSG2BHYFtWgKBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAA/wAAH/wAAAfwAAAD4AAAAeAAAAHgAAAA4AAAAOAAAADgAAAA4AAAAOAA
+ AADgAAAA4AAAAOAAAAHgAAAB4AAAA+AAAAfgAAAP4AAAD+AAAA/gAAAP4AAAD+AAAA/gAAAP4AAAD+AA
+ AA/gAAAP4AAAH/gAAH//gAf///////////8oAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoBgW1aA4FtWgWBbVoHgW1aCYFt
+ WgqBbVoLgW1aC4FtWgqBbVoJgW1aB4FtWgiBbVoLgW1aD4FtWhKBbVoSgW1aDoFtWgiBbVoCAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoCgW1aBYFtWgqBbVoRgW1aFYFt
+ WhmBbVocgW1aH4FtWiGBbVohgW1aH4FtWh2BbVoidmJPRnJcSHhuWUWaa1VBrGxWQpVtWENxdV5LPIFt
+ WhiBbVoKgW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBbVoBgW1aBIFtWguBbVoUgW1aHl1n
+ a0FPZXFgR2R1e0hkdX1CY3iYRGR2j0hkdH9SZnBlYWRla3NhULKIdmbsopOH+bqwp//Gvrb/tqyj/pqL
+ fvd+bFrmalRAlXVdSzCBbVoPgW1aAgAAAAAAAAAAAAAAAAAAAAAAAAAAgW1aAYFtWgaBbVoRXmdqMj9j
+ eZo6ZX/gQnGK51CHn+hXmLDvU5q2/1Kiwv9HmLz/PYmv9z1uiv5raWP5raGW/9jUz//g3Nj/3djU/+Th
+ 3f/l4t//5ODd/9XPyv6gkob9bFhFvHFeSD6BbVoPgW1aAQAAAAAAAAAAAAAAAAAAAACBbVoEgW1aEztu
+ iqs6aYXoWqG8533U6v+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9KrtX/bXx8/7mvpv/i39z/4t/c/wCN
+ AP+vvKj/2dXQ/+He2v/i39z/4t/c/+He2/+onJL/bVpHunhfTS+BbVoJAAAAAAAAAAAAAAAAAAAAAIFt
+ WhM3aobiQ5S47mLI6v9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL7n/2WLlf+wpZv/39vY/+Dc
+ 2f/g3Nn/AI0A/wBmAP+uuab/19LO/9/b2P/g3Nn/4NzZ/97a1/+ekIX9alZDkYFtWhiBbVoCAAAAAAAA
+ AAAAAAAAWmhtVj+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9bs9L/jIh+/9TQ
+ zP/c2db/3NnW/9zZ1v8AjQD/Ma1R/wBmAP+tuab/1c/L/9vY1f/c2db/3NnW/83Gwf97aVjkcWFMNYFt
+ WgcAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/2Wg
+ s/+qoZX/2tbT/9rW0//a1tP/4Nza/wCNAP9P0Xb/Ma1R/wBmAP+6x7X/2tbS/9nW0//a1tP/2NTR/5SG
+ ePVuWEVlgW1aDAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR
+ 7f9iyOv/bZOc/8G4sP/X09D/2NTR/+Xj4f/5+fj/AI0A/0/Rdv83xF3/Ma1R/wBmAP/Bz77/4d3Z/9fT
+ 0P/X09D/qp+V/mtXQ4mBbVoQAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi
+ 8/9+2vD/cNHt/2LI6/9zjJD/yMC6/9jU0f/p5uX//v7+//////8AjQD/fuCe/2jYiv9o2Ir/fuCe/wBn
+ A//Q4ND/6Obl/9fT0f+1rKP/bFZDm4FtWg8AAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyOr/aMLh/2m6
+ 1/9suNL/aLTP/16px/9WosL/T5q8/2qDiv/CuLD/6+jn//79/f///////////wCNAP9+4J7/aNiK/37g
+ nv8BbxD/0ODQ//7+/v/9/f3/5OLg/6yhl/5wWUWGgW1aCwAAAAAAAAAAAAAAAFB9nf8/mML/TKvV/1Om
+ zP9brdD/bsDc/33O4/+A0uf/d9Dn/23M6f9iyOv/ZqK1/7Wupf/9/Pz/////////////////AI0A/37g
+ nv9+4J7/AW8Q/9Dg0P/+/v7////////////39vX/nY+D9XFcR2CBbVoGAAAAAAAAAAAAAAAAUH2d/0SY
+ wf9MptD/YMLl/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9btNb/l5WM//Lw7///////////////
+ //8AjQD/fuCe/wFvEP/Q4ND//v7+/////////////////+vo5v6Jd2bjc11OKYFtWgEAAAAAAAAAAAAA
+ AABQfZ3/RJjB/0y34v9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9qlKD/xbuy//7+
+ /v///////////wCNAP8BbxD/0ODQ//7+/v/////////////////9/f3/s6ec/HVeS4aBbVoHAAAAAAAA
+ AAAAAAAAAAAAAFB9nf8/mML/TLnk/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0qx
+ 2/92i47/0Ma///7+/v//////AI0A/9Hh0v/+/v7//////////////////f39/8C2rf99alize19NGoFt
+ WgEAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI
+ 6/9Uv+j/RLbl/zygz/9whYz/wriv/+/u6//+/f3//////////////////f39/+3q6P62qqD9gWtatXxj
+ USaBbVoCAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a
+ 8P9w0e3/Ysjr/1S/6P9EtuX/L6jh/yKY1P9MgZr/jo2H/7Kro//Oxb7/2dHM/8rCu/+toZf/lYNy6H1n
+ VJB1ZFMagW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2PI6v9owuH/abrX/2y4
+ 0v9otM//XqnH/1aiwv9Pmrz/S5i7/0aWvP89kLn/Mou5/yaFuP8qgbL/OoCi/0p7lP9ed4H/U3CA/0lr
+ gP+Ba1lKgW1aGIFtWgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9Mq9X/U6bM/1ut
+ 0P9uwNz/fc7j/4DS5/930Of/bczp/2LI6/9TvOX/RLLf/zOi1/8hltH/FYnJ/xqFwP8jgrb/Ln6p/zF9
+ p/8idKf/KmqU/4FtWi6BbVoWgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/RJjB/0ym
+ 0P9gwuX/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/6P9EtuX/L6jh/xmb3f8Ejtn/AIvY/wCL
+ 2P8EitT/LICt/yh0ov8qapT/gW1aLYFtWhaBbVoEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9
+ nf9EmMH/TLfi/2PJ6/9y0u7/gdvx/4/k9P+M4vP/ftrw/3DR7f9iyOv/VL/o/0S25f8vqOH/GZvd/wSO
+ 2f8Ai9j/AIvY/wOK1f8ghb3/HnSq/ypqlP+BbVotgW1aFoFtWgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAUH2d/z+Ywv9MueT/Y8nr/3LS7v+B2/H/j+T0/4zi8/9+2vD/cNHt/2LI6/9Uv+j/RLbl/y+o
+ 4f8Zm93/BI7Z/wCL2P8Ai9j/A4rV/yCFvf8edKr/KmqU/4FtWi2BbVoWgW1aBAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAABQfZ3/P5jC/0y55P9jyev/ctLu/4Hb8f+P5PT/jOLz/37a8P9w0e3/Ysjr/1S/
+ 6P9EtuX/L6jh/xmb3f8Ejtn/AIvY/wCL2P8DitX/IIW9/x50qv8qapT/gW1aLYFtWheBbVoEAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFB9nf8/mML/TLnk/2HG6f9ivuD/YrPV/1yny/9UnsX/TZa//0uV
+ v/9Mlr//SpS//0iTv/9HlL//RZbD/zmVyP8fjs3/DIvT/wSK1P8ghb3/HnSq/ypqlP+BbVosgW1aFoFt
+ WgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUH2d/z+Ywv9Lnsj/TpK5/2moxf+FvtX/pNnn/7fq
+ 8//J+/7/yfz//8f7///E+///wfn9/7n1+v+m4+//js7h/3S20P9boML/RI+6/ziMvP8edKr/KmqU/4Ft
+ WiiBbVoTgW1aBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQfZ3/Toen/4q9z//G8vb/1P///9L/
+ ///Q/v//zv3//8v9///J/P//x/v//8T7///D+///wPv//776//+7+v//uPn//7X3/v+f4ez/dbTK/1B9
+ nf8qapT/gW1aHIFtWgyBbVoCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD1wjqN/sL/80/7+/9T/
+ ///U////0v///9D+///O/f//y/3//8n8///H+///xPv//8P7///A+///vvr//7v6//+4+f//tvn//7P4
+ //+u9v3/WpKq+EBvi6yBbVoOgW1aBIFtWgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARG6EC1J8
+ kLljjp/qp9LY/MXw8v/S////0P7//879///L/f//yfz//8f7///E+///w/v//8D7//+++v//u/r//7j5
+ //+m5u7/jMjU+laEmOtPeo2ncG1lC4FtWgOBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAERuhB9Qe4+LUnyQ2E95jfFijZ/vdqGw8oi2wv+JuMT/lsbR/5TG0f+EtcL/grTB/W6e
+ r/Nah5rwTHiN8FB8kNJMdop/Tm18HIFtWgOBbVoBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAERuhCNEboQ/RG2DYERtg2BTfZGQUXuQi0Vt
+ gmJFbYJeRm2CQkhtgR2BbVoCgW1aAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAB/8AAAH8AAAA+AAAAHgAAAB4AAAAOAAAADgAAAA4AAAAOAA
+ AADgAAAA4AAAAOAAAADgAAAB4AAAAeAAAAPgAAAH4AAAD+AAAA/gAAAP4AAAD+AAAA/gAAAP4AAAD+AA
+ AA/gAAAP4AAAD+AAAB/4AAB//4AH////////////
+</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/MiniSqlQuery.csproj b/minisqlquery-master/src/MiniSqlQuery/MiniSqlQuery.csproj
new file mode 100644
index 0000000..700393e
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/MiniSqlQuery.csproj
@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0164E1CD-8EC2-4C9E-8D67-2575221D8707}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MiniSqlQuery</RootNamespace>
+ <AssemblyName>MiniSqlQuery</AssemblyName>
+ <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <StartupObject>MiniSqlQuery.App</StartupObject>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>MiniSqlQuery.snk</AssemblyOriginatorKeyFile>
+ <ApplicationIcon>App.ico</ApplicationIcon>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\Build\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\Build\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release - No Tests|AnyCPU' ">
+ <OutputPath>bin\Release - No Tests\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.VisualBasic" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\CommonAssemblyInfo.cs">
+ <Link>CommonAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="AboutForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="AboutForm.Designer.cs">
+ <DependentUpon>AboutForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="App.cs" />
+ <Compile Include="ApplicationSettings.cs" />
+ <Compile Include="BasicEditors.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Commands\NewFileCommand.cs" />
+ <Compile Include="Commands\OpenFileCommand.cs" />
+ <Compile Include="Commands\OpenRecentFileCommand.cs" />
+ <Compile Include="Commands\SaveFileAsCommand.cs" />
+ <Compile Include="Commands\SaveFileCommand.cs" />
+ <Compile Include="Commands\SaveResultsAsDataSetCommand.cs" />
+ <Compile Include="Commands\ShowAboutCommand.cs" />
+ <Compile Include="Commands\ShowOptionsFormCommand.cs" />
+ <Compile Include="CopyForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="CopyForm.Designer.cs">
+ <DependentUpon>CopyForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="BasicEditor.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="BasicEditor.Designer.cs">
+ <DependentUpon>BasicEditor.cs</DependentUpon>
+ </Compile>
+ <Compile Include="ErrorForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="ErrorForm.Designer.cs">
+ <DependentUpon>ErrorForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="MainForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="MainForm.Designer.cs">
+ <DependentUpon>MainForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="NewFileForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="NewFileForm.Designer.cs">
+ <DependentUpon>NewFileForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="OptionsForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="OptionsForm.Designer.cs">
+ <DependentUpon>OptionsForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\ConnectionStringsManager\Commands\EditConnectionsFormCommand.cs" />
+ <Compile Include="PlugIns\ConnectionStringsManager\ConnectionStringBuilderForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\ConnectionStringsManager\ConnectionStringBuilderForm.Designer.cs">
+ <DependentUpon>ConnectionStringBuilderForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\ConnectionStringsManager\DbConnectionsForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\ConnectionStringsManager\DbConnectionsForm.Designer.cs">
+ <DependentUpon>DbConnectionsForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\ConnectionStringsManager\GenericConnectionStringBuilder.cs" />
+ <Compile Include="PlugIns\ConnectionStringsManager\ConnectionStringsManagerLoader.cs" />
+ <Compile Include="PlugIns\CoreApplicationPlugIn.cs" />
+ <Compile Include="PlugIns\CoreMiniSqlQueryConfiguration.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\CopyTableNameCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\GenerateDeleteStatementCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\GenerateInsertStatementCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\GenerateSelectCountStatementCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\GenerateSelectStatementCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\GenerateStatementCommandBase.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\GenerateUpdateStatementCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\LocateFkReferenceColumnCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\ShowDatabaseInspectorCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\ShowFindObjectFormCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\Commands\TruncateTableCommand.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\DatabaseInspectorForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\DatabaseInspector\DatabaseInspectorForm.Designer.cs">
+ <DependentUpon>DatabaseInspectorForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\DatabaseInspector\DatabaseInspectorLoader.cs" />
+ <Compile Include="PlugIns\DatabaseInspector\FindObjectForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\DatabaseInspector\FindObjectForm.Designer.cs">
+ <DependentUpon>FindObjectForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\SearchTools\Commands\FindNextStringCommand.cs" />
+ <Compile Include="PlugIns\SearchTools\Commands\ReplaceStringCommand.cs" />
+ <Compile Include="PlugIns\SearchTools\Commands\ShowFindTextFormCommand.cs" />
+ <Compile Include="PlugIns\SearchTools\Commands\ShowGoToLineFormCommand.cs" />
+ <Compile Include="PlugIns\SearchTools\FindReplaceForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\SearchTools\FindReplaceForm.designer.cs">
+ <DependentUpon>FindReplaceForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\SearchTools\GoToLineForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\SearchTools\GoToLineForm.designer.cs">
+ <DependentUpon>GoToLineForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\SearchTools\SearchToolsLoader.cs" />
+ <Compile Include="PlugIns\SearchTools\SearchToolsCommon.cs" />
+ <Compile Include="PlugIns\TemplateViewer\Commands\NewQueryByTemplateCommand.cs" />
+ <Compile Include="PlugIns\TemplateViewer\Commands\RunTemplateCommand.cs" />
+ <Compile Include="PlugIns\TemplateViewer\ITemplateEditor.cs" />
+ <Compile Include="PlugIns\TemplateViewer\TemplateData.cs" />
+ <Compile Include="PlugIns\TemplateViewer\TemplateHost.cs" />
+ <Compile Include="PlugIns\TemplateViewer\TemplateEditorForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\TemplateViewer\TemplateEditorForm.Designer.cs">
+ <DependentUpon>TemplateEditorForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\TemplateViewer\TemplateResources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>TemplateResources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\TemplateViewer\TemplateResult.cs" />
+ <Compile Include="PlugIns\TemplateViewer\TemplateViewerLoader.cs" />
+ <Compile Include="PlugIns\TemplateViewer\TemplateModel.cs" />
+ <Compile Include="PlugIns\TemplateViewer\TemplateViewForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\TemplateViewer\TemplateViewForm.Designer.cs">
+ <DependentUpon>TemplateViewForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PlugIns\TextGenerator\Commands\RunTextGeneratorCommand.cs" />
+ <Compile Include="PlugIns\TextGenerator\TextGeneratorLoader.cs" />
+ <Compile Include="PlugIns\TextGenerator\TextGeneratorService.cs" />
+ <Compile Include="PlugIns\ViewTable\Commands\ViewTableFormCommand.cs" />
+ <Compile Include="PlugIns\ViewTable\Commands\ViewTableFromInspectorCommand.cs" />
+ <Compile Include="PlugIns\ViewTable\ViewTableLoader.cs" />
+ <Compile Include="PlugIns\ViewTable\ViewTableForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PlugIns\ViewTable\ViewTableForm.Designer.cs">
+ <DependentUpon>ViewTableForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Content Include="x64\SQLite.Interop.dll">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ <Content Include="x86\SQLite.Interop.dll">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ <EmbeddedResource Include="AboutForm.resx">
+ <DependentUpon>AboutForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="BasicEditor.resx">
+ <DependentUpon>BasicEditor.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="CopyForm.resx">
+ <DependentUpon>CopyForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ErrorForm.resx">
+ <DependentUpon>ErrorForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MainForm.resx">
+ <DependentUpon>MainForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="NewFileForm.resx">
+ <DependentUpon>NewFileForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="OptionsForm.resx">
+ <DependentUpon>OptionsForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\ConnectionStringsManager\ConnectionStringBuilderForm.resx">
+ <DependentUpon>ConnectionStringBuilderForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\ConnectionStringsManager\DbConnectionsForm.resx">
+ <DependentUpon>DbConnectionsForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\DatabaseInspector\DatabaseInspectorForm.resx">
+ <DependentUpon>DatabaseInspectorForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\DatabaseInspector\FindObjectForm.resx">
+ <DependentUpon>FindObjectForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\SearchTools\FindReplaceForm.resx">
+ <DependentUpon>FindReplaceForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\SearchTools\GoToLineForm.resx">
+ <DependentUpon>GoToLineForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\TemplateViewer\TemplateEditorForm.resx">
+ <DependentUpon>TemplateEditorForm.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\TemplateViewer\TemplateResources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>TemplateResources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\TemplateViewer\TemplateViewForm.resx">
+ <DependentUpon>TemplateViewForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="PlugIns\ViewTable\ViewTableForm.resx">
+ <DependentUpon>ViewTableForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <SubType>Designer</SubType>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <EmbeddedResource Include="QueryForm.resx">
+ <DependentUpon>QueryForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <None Include="app.config">
+ <SubType>Designer</SubType>
+ </None>
+ <None Include="MiniSqlQuery.snk" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </None>
+ <Content Include="SQL-Mode.xshd">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <None Include="Templates\Create Table.sql.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\Sample - CSharp Model.cs.mt">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\New.sql.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\Sample - Tables and Columns.txt.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <Compile Include="QueryForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="QueryForm.Designer.cs">
+ <DependentUpon>QueryForm.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="App.ico" />
+ <Content Include="Images\accept.png" />
+ <Content Include="Images\cancel.png" />
+ <Content Include="Images\cog.png" />
+ <Content Include="Images\cross.png" />
+ <Content Include="Images\database.png" />
+ <Content Include="Images\database_add.png" />
+ <Content Include="Images\database_delete.png" />
+ <Content Include="Images\database_edit.png" />
+ <Content Include="Images\database_error.png" />
+ <Content Include="Images\database_refresh.png" />
+ <Content Include="Images\disk.png" />
+ <Content Include="Images\disk_multiple.png" />
+ <Content Include="Images\email.png" />
+ <Content Include="Images\email_go.png" />
+ <Content Include="Images\folder_page.png" />
+ <Content Include="Images\lightning.png" />
+ <Content Include="Images\page.png" />
+ <Content Include="Images\page_white.png" />
+ <Content Include="Images\plugin.png" />
+ <Content Include="Images\plugin_go.png" />
+ <Content Include="Images\plugin_link.png" />
+ <Content Include="Images\table_save.png" />
+ <Content Include="License-MiniSqlQuery.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="PlugIns\ViewTable\table.ico" />
+ <Content Include="script.ico" />
+ <None Include="Mode.xsd" />
+ <None Include="MT-Mode.xshd">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="PlugIns\TemplateViewer\TemplateHelp.rtf" />
+ <None Include="Templates\Sample - Advanced Looping.txt.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\Sample - Plugin Access.txt.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\Sample - Tables and Columns and DATA.txt.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\New.txt.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\New.xml.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Templates\Sample - WPF View Model.cs.mt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\MiniSqlQuery.Core\MiniSqlQuery.Core.csproj">
+ <Project>{B819CF6A-B5FD-4E85-842D-FD855F856A5A}</Project>
+ <Name>MiniSqlQuery.Core</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="DockPanelSuite">
+ <Version>2.9.0</Version>
+ </PackageReference>
+ <PackageReference Include="ICSharpCode.TextEditor">
+ <Version>3.2.1.6466</Version>
+ </PackageReference>
+ <PackageReference Include="Ninject">
+ <Version>3.3.4</Version>
+ </PackageReference>
+ <PackageReference Include="System.Data.SQLite">
+ <Version>1.0.112</Version>
+ </PackageReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/MiniSqlQuery.snk b/minisqlquery-master/src/MiniSqlQuery/MiniSqlQuery.snk
new file mode 100644
index 0000000..9b2560f
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/MiniSqlQuery.snk differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/Mode.xsd b/minisqlquery-master/src/MiniSqlQuery/Mode.xsd
new file mode 100644
index 0000000..e67b656
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Mode.xsd
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:annotation>
+ <xsd:documentation>
+ This schema defines the syntax for mode definitions in SharpDevelop.
+ The schema can be simplified quite a bit but it does the job as is.
+
+
+ If you are using this file as a reference it is probably easiest to scroll to
+ the botton to find the definition of the root element called SyntaxDefinition and
+ then unwind the different type definitions and refernces.
+
+ Note on coloring:
+ Many tags define how some symbol should be colored. If a specific symbol
+ can not be matched onto either a Span definition, Keyword, or a Digit/Number it
+ will be rendered in the current default color. Which is the default color of the
+ current span or the default color of the mode as a whole if no span has been entered.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <!-- Defines the default rendering of the mode -->
+ <xsd:complexType name="EnvironmentEntry">
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:complexType>
+
+ <xsd:complexType name="CustomEnvironmentEntry">
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:complexType>
+
+ <!-- The environment tag defines the coloring of various attributes in SharpDevelop -->
+ <xsd:complexType name="Environment">
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Default" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="Selection" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="VRuler" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="InvalidLines" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="CaretMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="CaretLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+
+ <xsd:element name="LineNumbers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+
+ <xsd:element name="FoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="FoldMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="SelectedFoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+
+ <xsd:element name="EOLMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="SpaceMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="TabMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
+
+ <xsd:element name="Custom" type="CustomEnvironmentEntry" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="Properties">
+ <xsd:sequence>
+ <xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Property">
+ <!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="value" type="xsd:string" />
+ </xsd:complexType>
+
+ <!-- The Digits tag defines the color for rendering Digits-->
+ <xsd:complexType name="Digits">
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:complexType>
+
+ <!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
+ into separate symbols, typically key words. It is not necessary, or desirable to include the
+ characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
+ and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
+ <xsd:complexType name="Delimiters">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"></xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- The beginning symbol of a Span -->
+ <xsd:complexType name="Begin">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="singleword" type="xsd:boolean" />
+ <xsd:attribute name="startofline" type="xsd:boolean" />
+ <!-- The default rendering style for the Begin symbol. If not specified
+ the defaul rendering style for the span will be used. -->
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- The end symbol of a Span -->
+ <xsd:complexType name="End">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="singleword" type="xsd:boolean" />
+ <!-- The default rendering style for the End symbol. If not specified
+ the defaul rendering style for the span will be used. -->
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="Span">
+ <xsd:sequence>
+ <!-- Defines the symbol that indicates the beginning of the span. -->
+ <xsd:element name="Begin" type="Begin" />
+ <!-- Defines the symbol that indicates the end of the span. May be omitted for
+ one-line spans. -->
+ <xsd:element name="End" minOccurs="0" type="End" />
+ </xsd:sequence>
+ <!-- The name of the span definition -->
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <!-- Defines the rule set that is applicable in the Span. May be omitted. -->
+ <xsd:attribute name="rule" type="xsd:string" />
+ <!-- Defines wether the Span should terminate automatically at the end of line. Typical examples
+ include one-line comments such as // in C++ or REM in Windows .Bat files. -->
+ <xsd:attribute name="stopateol" type="xsd:boolean" />
+
+ <!-- OBSOLUTE: Defines whether C-style escape sequences using \ are applicable or not in the span. -->
+ <xsd:attribute name="noescapesequences" type="xsd:boolean" />
+
+ <!-- defines the escape character -->
+ <xsd:attribute name="escapecharacter" type="xsd:string" />
+
+ <!-- The default rendering style for the span -->
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:complexType>
+
+ <xsd:complexType name="MarkPrevious">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
+ <xsd:attribute name="markmarker" type="xsd:boolean" />
+ <!-- The rendering style to be used -->
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- Allows you to define the coloring of the symbol that follows a specified symbol -->
+ <xsd:complexType name="MarkFollowing">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
+ <xsd:attribute name="markmarker" type="xsd:boolean" />
+ <!-- The rendering style to be used -->
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="Key">
+ <!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
+ <xsd:attribute name="word" type="xsd:string" />
+ </xsd:complexType>
+
+
+ <!-- A grouping of keywords that sholuld be colored the same way -->
+ <xsd:complexType name="KeyWords">
+ <xsd:sequence>
+ <!-- allow groups with 0 keywords: this simplifies the syntax highlighting editor -->
+ <!-- A KeyWord -->
+ <xsd:element name="Key" type="Key" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ </xsd:sequence>
+ <!-- The name of the KeyWord group -->
+ <xsd:attribute name="name" type="xsd:string" />
+ <!-- The rendering style of the KeyWord group -->
+ <xsd:attribute name="bold" type="xsd:boolean" />
+ <xsd:attribute name="italic" type="xsd:boolean" />
+ <xsd:attribute name="color" type="xsd:string" />
+ <xsd:attribute name="bgcolor" type="xsd:string" />
+ </xsd:complexType>
+
+ <xsd:complexType name="RuleSet">
+ <xsd:sequence>
+ <!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
+ into separate symbols, typically key words. It is not necessary, or desirable to include the
+ characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
+ and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
+ <xsd:element name="Delimiters" type="Delimiters" minOccurs="0" maxOccurs="1"></xsd:element>
+ <!-- A Span tag defines a scope, or what can be seen as a separate parsing context where a different set of
+ highlighting rules are applicable compared to the text where the span is found.
+ Examples of spans include:
+ - A string in a language as C
+ - A <script> tag in Html
+ - The internals of a tag in XML (between < and >).
+ A span can have a rule set associated with it that defines the highlighting rules that are applicable
+ in the span. -->
+ <xsd:element name="Span" type="Span" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ <!-- The MarkPrevious tag allows you to define the coloring of the item that preceeds a specific
+ symbol. An example of where this comes in handy is when coloring the contents of an XML-tag,
+ in particular the attributes and attribute names. The following definition:
+ <MarkPrevious bold="false" italic="false" color="Red">=</MarkPrevious>
+ will make teh highlighter color words that are followed by an = to be colored in Red.
+ You can see this in this file if you view it with the default XML-mode in SharpDevelop. -->
+ <xsd:element name="MarkPrevious" type="MarkPrevious" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ <!-- The MarkFollowing tag works similarly as the MarkPrevious tag but relates to the coloring
+ of the symbol that follows the specified symbol. -->
+ <xsd:element name="MarkFollowing" type="MarkFollowing" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ <!-- Defines a group of keywords that should be colored the same way -->
+ <xsd:element name="KeyWords" type="KeyWords" minOccurs="0" maxOccurs="unbounded"></xsd:element>
+ </xsd:sequence>
+ <!-- The name of the RuleSet. Used when you refer to the RuleSet in the rule attribute of a Span tag.
+ Each mode file should have a rule definition without a defined name. This denotes the default rule
+ set for the mode. -->
+ <xsd:attribute name="name" type="xsd:string" />
+ <!-- Allows you to use another mode, defined in another file as a RuleSet. For an example see the
+ use of the JavaScript mode from the HTML-mode. -->
+ <xsd:attribute name="reference" type="xsd:string" />
+ <!-- Defines whether case is significant for matching keywords in the mode. -->
+ <xsd:attribute name="ignorecase" type="xsd:boolean" />
+ <!-- OBSOLETE: noescapesequences -->
+ <xsd:attribute name="noescapesequences" type="xsd:boolean" />
+ <!-- defines the escape character -->
+ <xsd:attribute name="escapecharacter" type="xsd:string" />
+ </xsd:complexType>
+
+ <!-- The RuleSets tag is just a grouping of the set of RuleSets for a mode. -->
+ <xsd:complexType name="RuleSets">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <!-- Any number of RuleSet tag can be defined in a mode -->
+ <xsd:element name="RuleSet" type="RuleSet" minOccurs="1" maxOccurs="unbounded"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- SyntaxDefinition is the root-element in a mode definition file -->
+ <xsd:element name="SyntaxDefinition">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- The Environment tag defines colors, for various standard elements in the SharpDevelop GUI, if
+ not given the default values are used. -->
+ <xsd:element name="Environment" type="Environment" minOccurs="0" maxOccurs="1" />
+
+ <!-- The Properties section defines properties which are bound to the highlighting -->
+ <xsd:element name="Properties" type="Properties" minOccurs="0" maxOccurs="1" />
+
+ <!-- The Digits tag defines the color for rendering Digits-->
+ <xsd:element name="Digits" type="Digits" minOccurs="0" maxOccurs="1" />
+
+ <!-- The RuleSets tag defines the rule sets that are used in the mode. Note that all modes are defined in
+ a flat structture even if they are used recursively. For an example of a mode that uses
+ multiple rule sets see the XML-mode. There is a top level rule-set and and another rule-set
+ that handles highligting within a tag, i.e., between < and >. -->
+ <xsd:element name="RuleSets" type="RuleSets" />
+ </xsd:sequence>
+ <!-- The name of the mode. This is used when you, in the defintion of a RuleSet refers to another
+ mode. I.e., one that is defined in an external file. For an example of this see the HTML-Mode that
+ uses the JavaScript-mode this way. -->
+ <xsd:attribute name="name" type="xsd:string" />
+ <!-- The file extensions that the mode is applicable for. Extensions must be written with lower case and
+ should include the ., as in .txt. If several extensions are applicable they should be separeated with | -->
+ <xsd:attribute name="extensions" type="xsd:string" />
+ <!-- Name of a syntax mode where rulesets, spans, keywords and other settings are imported from -->
+ <xsd:attribute name="extends" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/MT-Mode.xshd b/minisqlquery-master/src/MiniSqlQuery/MT-Mode.xshd
new file mode 100644
index 0000000..423f07b
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/MT-Mode.xshd
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+
+<SyntaxDefinition name = "NVelocity" extensions = ".mt;.vm;.nv">
+
+ <Properties>
+ <Property name="LineComment" value="##"/>
+ </Properties>
+
+ <Digits name = "Digits" bold = "false" italic = "false" color = "DarkBlue"/>
+
+ <RuleSets>
+ <RuleSet ignorecase = "false">
+ <Delimiters>~!%^*()-+=|\/{}[]:;"'<> , .?</Delimiters>
+
+ <Span name = "LineDirective1" bold = "true" italic = "false" color = "Purple" stopateol = "true">
+ <Begin>#@get</Begin>
+ </Span>
+
+ <Span name = "LineDirective2" bold = "true" italic = "false" color = "Purple" stopateol = "true">
+ <Begin>#@set</Begin>
+ </Span>
+
+ <Span name = "LineComment" bold = "false" italic = "true" color = "Green" stopateol = "true" escapecharacter="\">
+ <Begin>##</Begin>
+ </Span>
+
+ <Span name = "BlockComment" bold = "false" italic = "true" color = "Green" stopateol = "false">
+ <Begin>#*</Begin>
+ <End>*#</End>
+ </Span>
+
+ <Span name = "VelocityVariable" bold = "false" italic = "false" color = "Blue" stopateol = "false" >
+ <Begin>${</Begin>
+ <End>}</End>
+ </Span>
+
+ <MarkFollowing bold = "false" italic = "false" color = "Blue">$</MarkFollowing>
+
+ <KeyWords name = "GeneralKeywords" bold="true" italic="false" color="Blue">
+ <Key word = "#foreach" />
+ <Key word = "#set" />
+ <Key word = "#if" />
+ <Key word = "#else" />
+ <Key word = "#elseif" />
+ <Key word = "#end" />
+ </KeyWords>
+
+ <KeyWords name = "LoopKeywords" bold="false" italic="false" color="DarkSlateBlue">
+ <Key word = "#beforeall" />
+ <Key word = "#before" />
+ <Key word = "#each" />
+ <Key word = "#after" />
+ <Key word = "#between" />
+ <Key word = "#odd" />
+ <Key word = "#even" />
+ <Key word = "#nodata" />
+ <Key word = "#afterall" />
+ </KeyWords>
+
+ <KeyWords name = "FunctionalSpaces" bold="true" italic="false" color="Green">
+ <Key word = "#macro" />
+ <Key word = "#include" />
+ </KeyWords>
+
+ <KeyWords name = "Literals" bold="true" italic="false" color="Black">
+ <Key word = "false" />
+ <Key word = "true" />
+ </KeyWords>
+
+ </RuleSet>
+ </RuleSets>
+</SyntaxDefinition>
+
diff --git a/minisqlquery-master/src/MiniSqlQuery/NewFileForm.cs b/minisqlquery-master/src/MiniSqlQuery/NewFileForm.cs
new file mode 100644
index 0000000..bac78a5
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/NewFileForm.cs
@@ -0,0 +1,82 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The new file form.</summary>
+ public partial class NewFileForm : Form
+ {
+ /// <summary>The _file editor resolver.</summary>
+ private readonly IFileEditorResolver _fileEditorResolver;
+
+ /// <summary>Initializes a new instance of the <see cref="NewFileForm"/> class.</summary>
+ /// <param name="fileEditorResolver">The file editor resolver.</param>
+ public NewFileForm(IFileEditorResolver fileEditorResolver)
+ {
+ InitializeComponent();
+ _fileEditorResolver = fileEditorResolver;
+ }
+
+ /// <summary>Gets FileEditorDescriptor.</summary>
+ public FileEditorDescriptor FileEditorDescriptor
+ {
+ get { return lstFileTypes.SelectedItem as FileEditorDescriptor; }
+ }
+
+ /// <summary>Gets a value indicating whether IsValid.</summary>
+ public bool IsValid
+ {
+ get { return lstFileTypes.SelectedItem != null; }
+ }
+
+ /// <summary>The do ok.</summary>
+ private void DoOK()
+ {
+ DialogResult = DialogResult.OK;
+ Close();
+ }
+
+ /// <summary>The new file form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void NewFileForm_Load(object sender, EventArgs e)
+ {
+ lstFileTypes.DataSource = _fileEditorResolver.GetFileTypes();
+ }
+
+ /// <summary>The btn o k_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void btnOK_Click(object sender, EventArgs e)
+ {
+ DoOK();
+ }
+
+ /// <summary>The lst file types_ double click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void lstFileTypes_DoubleClick(object sender, EventArgs e)
+ {
+ if (IsValid)
+ {
+ DoOK();
+ }
+ }
+
+ /// <summary>The lst file types_ selected value changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void lstFileTypes_SelectedValueChanged(object sender, EventArgs e)
+ {
+ btnOK.Enabled = IsValid;
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/NewFileForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/NewFileForm.Designer.cs
new file mode 100644
index 0000000..f30e5a3
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/NewFileForm.Designer.cs
@@ -0,0 +1,95 @@
+namespace MiniSqlQuery
+{
+ partial class NewFileForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.lstFileTypes = new System.Windows.Forms.ListBox();
+ this.btnOK = new System.Windows.Forms.Button();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // lstFileTypes
+ //
+ this.lstFileTypes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.lstFileTypes.FormattingEnabled = true;
+ this.lstFileTypes.Location = new System.Drawing.Point(12, 12);
+ this.lstFileTypes.Name = "lstFileTypes";
+ this.lstFileTypes.Size = new System.Drawing.Size(284, 186);
+ this.lstFileTypes.TabIndex = 0;
+ this.lstFileTypes.DoubleClick += new System.EventHandler(this.lstFileTypes_DoubleClick);
+ this.lstFileTypes.SelectedValueChanged += new System.EventHandler(this.lstFileTypes_SelectedValueChanged);
+ //
+ // btnOK
+ //
+ this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnOK.Enabled = false;
+ this.btnOK.Location = new System.Drawing.Point(140, 216);
+ this.btnOK.Name = "btnOK";
+ this.btnOK.Size = new System.Drawing.Size(75, 23);
+ this.btnOK.TabIndex = 1;
+ this.btnOK.Text = "&OK";
+ this.btnOK.UseVisualStyleBackColor = true;
+ this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(221, 216);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 2;
+ this.btnCancel.Text = "&Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ //
+ // NewFileForm
+ //
+ this.AcceptButton = this.btnOK;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(308, 246);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnOK);
+ this.Controls.Add(this.lstFileTypes);
+ this.Name = "NewFileForm";
+ this.Text = "NewFileForm";
+ this.Load += new System.EventHandler(this.NewFileForm_Load);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListBox lstFileTypes;
+ private System.Windows.Forms.Button btnOK;
+ private System.Windows.Forms.Button btnCancel;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/NewFileForm.resx b/minisqlquery-master/src/MiniSqlQuery/NewFileForm.resx
new file mode 100644
index 0000000..19dc0dd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/NewFileForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/OptionsForm.cs b/minisqlquery-master/src/MiniSqlQuery/OptionsForm.cs
new file mode 100644
index 0000000..c9b3e07
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/OptionsForm.cs
@@ -0,0 +1,177 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The options form.</summary>
+ public partial class OptionsForm : Form
+ {
+ /// <summary>The _configuration objects.</summary>
+ private readonly List<IConfigurationObject> _configurationObjects = new List<IConfigurationObject>();
+
+ /// <summary>The _host.</summary>
+ private readonly IHostWindow _host;
+
+ /// <summary>The _property grid.</summary>
+ private readonly PropertyGrid _propertyGrid;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>Initializes a new instance of the <see cref="OptionsForm"/> class.</summary>
+ /// <param name="applicationServices">The application services.</param>
+ /// <param name="hostWindow">The host window.</param>
+ public OptionsForm(IApplicationServices applicationServices, IHostWindow hostWindow)
+ {
+ InitializeComponent();
+
+ // add a grid to the panel
+ _propertyGrid = new PropertyGrid();
+ _propertyGrid.Dock = DockStyle.Fill;
+ groupBox1.Controls.Add(_propertyGrid);
+
+ _services = applicationServices;
+ _host = hostWindow;
+ }
+
+ /// <summary>Gets ConfigurationObject.</summary>
+ private IConfigurationObject ConfigurationObject
+ {
+ get
+ {
+ if (lstSettingsProviders.SelectedIndex > -1)
+ {
+ return _configurationObjects[lstSettingsProviders.SelectedIndex];
+ }
+
+ return null;
+ }
+ }
+
+ /// <summary>The ask to save changes.</summary>
+ /// <returns></returns>
+ private DialogResult AskToSaveChanges()
+ {
+ return _host.DisplayMessageBox(null, "Configuration changes made, would you like to save them?", "Save Changes?", MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question, MessageBoxDefaultButton.Button1,
+ MessageBoxOptions.ServiceNotification, null, null);
+ }
+
+ /// <summary>The config object property changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void ConfigObjectPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == "IsDirty")
+ {
+ string title = "Options";
+ if (((IConfigurationObject)sender).IsDirty)
+ {
+ title += "*";
+ }
+
+ Text = title;
+ }
+ }
+
+ /// <summary>The options form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void OptionsForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (ConfigurationObject != null)
+ {
+ if (ConfigurationObject.IsDirty)
+ {
+ DialogResult result = AskToSaveChanges();
+ if (result == DialogResult.Yes)
+ {
+ ConfigurationObject.Save();
+ }
+ else if (result == DialogResult.Cancel)
+ {
+ e.Cancel = true;
+ }
+ }
+ }
+ }
+
+ /// <summary>The options form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void OptionsForm_Load(object sender, EventArgs e)
+ {
+ var cofigTypes = _services.GetConfigurationObjectTypes();
+
+ // build a list of config instances
+ foreach (Type cofigType in cofigTypes)
+ {
+ _configurationObjects.Add(_services.Resolve<IConfigurationObject>(cofigType.FullName));
+ }
+
+ // add the config editors to the list and watch them for changes
+ foreach (var configObject in _configurationObjects)
+ {
+ configObject.PropertyChanged += ConfigObjectPropertyChanged;
+ lstSettingsProviders.Items.Add(configObject.Name);
+ }
+
+ // select first
+ if (lstSettingsProviders.Items.Count > 0)
+ {
+ lstSettingsProviders.SelectedIndex = 0;
+ }
+ }
+
+ /// <summary>The btn o k_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void btnOK_Click(object sender, EventArgs e)
+ {
+ if (ConfigurationObject != null)
+ {
+ ConfigurationObject.Save();
+ }
+
+ Close();
+ }
+
+ /// <summary>The list box 1_ selected value changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void listBox1_SelectedValueChanged(object sender, EventArgs e)
+ {
+ if (ConfigurationObject != null)
+ {
+ bool change = true;
+ if (ConfigurationObject.IsDirty)
+ {
+ DialogResult result = AskToSaveChanges();
+ if (result == DialogResult.Yes)
+ {
+ ConfigurationObject.Save();
+ }
+ else
+ {
+ change = false;
+ }
+ }
+
+ if (change)
+ {
+ _propertyGrid.SelectedObject = ConfigurationObject.Settings;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/OptionsForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/OptionsForm.Designer.cs
new file mode 100644
index 0000000..b2d15be
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/OptionsForm.Designer.cs
@@ -0,0 +1,132 @@
+namespace MiniSqlQuery
+{
+ partial class OptionsForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.lstSettingsProviders = new System.Windows.Forms.ListBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.btnOK = new System.Windows.Forms.Button();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // lstSettingsProviders
+ //
+ this.lstSettingsProviders.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.lstSettingsProviders.FormattingEnabled = true;
+ this.lstSettingsProviders.Location = new System.Drawing.Point(0, 0);
+ this.lstSettingsProviders.Name = "lstSettingsProviders";
+ this.lstSettingsProviders.Size = new System.Drawing.Size(150, 251);
+ this.lstSettingsProviders.TabIndex = 0;
+ this.lstSettingsProviders.SelectedValueChanged += new System.EventHandler(this.listBox1_SelectedValueChanged);
+ //
+ // groupBox1
+ //
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox1.Location = new System.Drawing.Point(0, 0);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(351, 254);
+ this.groupBox1.TabIndex = 1;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Settings";
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.splitContainer1.Location = new System.Drawing.Point(12, 12);
+ this.splitContainer1.Name = "splitContainer1";
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.lstSettingsProviders);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.groupBox1);
+ this.splitContainer1.Size = new System.Drawing.Size(505, 254);
+ this.splitContainer1.SplitterDistance = 150;
+ this.splitContainer1.TabIndex = 2;
+ //
+ // btnCancel
+ //
+ this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(442, 272);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 3;
+ this.btnCancel.Text = "&Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ //
+ // btnOK
+ //
+ this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnOK.Location = new System.Drawing.Point(361, 272);
+ this.btnOK.Name = "btnOK";
+ this.btnOK.Size = new System.Drawing.Size(75, 23);
+ this.btnOK.TabIndex = 4;
+ this.btnOK.Text = "&OK";
+ this.btnOK.UseVisualStyleBackColor = true;
+ this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+ //
+ // OptionsForm
+ //
+ this.AcceptButton = this.btnOK;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(529, 307);
+ this.Controls.Add(this.btnOK);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.splitContainer1);
+ this.MinimizeBox = false;
+ this.Name = "OptionsForm";
+ this.Text = "Options";
+ this.Load += new System.EventHandler(this.OptionsForm_Load);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OptionsForm_FormClosing);
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ this.splitContainer1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListBox lstSettingsProviders;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.Button btnCancel;
+ private System.Windows.Forms.Button btnOK;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/OptionsForm.resx b/minisqlquery-master/src/MiniSqlQuery/OptionsForm.resx
new file mode 100644
index 0000000..19dc0dd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/OptionsForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/Commands/EditConnectionsFormCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/Commands/EditConnectionsFormCommand.cs
new file mode 100644
index 0000000..c79e403
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/Commands/EditConnectionsFormCommand.cs
@@ -0,0 +1,30 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.ConnectionStringsManager.Commands
+{
+ /// <summary>The edit connections form command.</summary>
+ public class EditConnectionsFormCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="EditConnectionsFormCommand"/> class.</summary>
+ public EditConnectionsFormCommand()
+ : base("&Edit Connection Strings")
+ {
+ SmallImage = ImageResource.database_edit;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ DbConnectionsForm frm = Services.Resolve<DbConnectionsForm>();
+ frm.ShowDialog(HostWindow.Instance);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.cs
new file mode 100644
index 0000000..b860634
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.cs
@@ -0,0 +1,346 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Data.Common;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Properties;
+
+namespace MiniSqlQuery.PlugIns.ConnectionStringsManager
+{
+ /// <summary>The connection string builder form.</summary>
+ public partial class ConnectionStringBuilderForm : Form
+ {
+ /// <summary>The _host window.</summary>
+ private readonly IHostWindow _hostWindow;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>Gets or sets ConnectionDefinition.</summary>
+ public DbConnectionDefinition ConnectionDefinition { get; set; }
+
+ /// <summary>The default provider name.</summary>
+ public const string DefaultProviderName = "System.Data.SqlClient";
+
+ /// <summary>The _initialised.</summary>
+ private bool _initialised;
+
+ /// <summary>The _loaded.</summary>
+ private bool _loaded;
+
+ /// <summary>The _init provider.</summary>
+ private string _initProvider;
+
+ /// <summary>The _provider name.</summary>
+ private string _providerName = DefaultProviderName;
+
+ /// <summary>The _conn str.</summary>
+ private string _connStr;
+
+ /// <summary>The _conn str bldr.</summary>
+ private DbConnectionStringBuilder _connStrBldr;
+
+ /// <summary>The _dirty.</summary>
+ private bool _dirty;
+
+ /// <summary>Gets or sets ConnectionName.</summary>
+ public string ConnectionName
+ {
+ get { return txtConnectionName.Text; }
+ set { txtConnectionName.Text = value; }
+ }
+
+ /// <summary>Gets or sets Comments.</summary>
+ public string Comments
+ {
+ get { return txtComments.Text; }
+ set { txtComments.Text = value; }
+ }
+
+ /// <summary>Gets or sets ProviderName.</summary>
+ public string ProviderName
+ {
+ get { return _providerName; }
+ set
+ {
+ _providerName = value;
+ cboProvider.SelectedItem = _providerName;
+ }
+ }
+
+ /// <summary>
+ /// The supplied connection string - or if during an edit - the new one.
+ /// </summary>
+ public string ConnectionString
+ {
+ get
+ {
+ if (_connStrBldr != null)
+ {
+ return _connStrBldr.ConnectionString;
+ }
+
+ return _connStr;
+ }
+
+ set
+ {
+ _connStr = value; // store
+ if (_connStrBldr == null)
+ {
+ BindNewConnectionStringBuilder();
+ }
+ }
+ }
+
+ /// <summary>Gets DbConnectionStringBuilderInstance.</summary>
+ public DbConnectionStringBuilder DbConnectionStringBuilderInstance
+ {
+ get { return _connStrBldr; }
+ }
+
+
+ /// <summary>Initializes a new instance of the <see cref="ConnectionStringBuilderForm"/> class.</summary>
+ /// <param name="hostWindow">The host window.</param>
+ /// <param name="services">The services.</param>
+ public ConnectionStringBuilderForm(IHostWindow hostWindow, IApplicationServices services)
+ {
+ InitializeComponent();
+ _hostWindow = hostWindow;
+ _services = services;
+ Icon = ImageResource.database_edit_icon;
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="ConnectionStringBuilderForm"/> class.</summary>
+ /// <param name="hostWindow">The host window.</param>
+ /// <param name="definition">The definition.</param>
+ /// <param name="services">The services.</param>
+ public ConnectionStringBuilderForm(IHostWindow hostWindow, DbConnectionDefinition definition, IApplicationServices services)
+ : this(hostWindow, services)
+ {
+ ConnectionDefinition = definition;
+ ConnectionName = ConnectionDefinition.Name;
+ Comments = ConnectionDefinition.Comment;
+ _initProvider = ConnectionDefinition.ProviderName;
+ _connStr = ConnectionDefinition.ConnectionString;
+ }
+
+ /// <summary>The connection string builder form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void ConnectionStringBuilderForm_Load(object sender, EventArgs e)
+ {
+ cboProvider.DataSource = Utility.GetSqlProviderNames();
+ _initialised = true;
+ }
+
+ /// <summary>The connection string builder form_ shown.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void ConnectionStringBuilderForm_Shown(object sender, EventArgs e)
+ {
+ if (_initProvider == null)
+ {
+ ProviderName = DefaultProviderName;
+ }
+ else
+ {
+ ProviderName = _initProvider;
+ }
+
+ _loaded = true;
+ }
+
+ /// <summary>The connection string builder form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void ConnectionStringBuilderForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (_dirty)
+ {
+ DialogResult saveFile = _hostWindow.DisplayMessageBox(
+ this,
+ Resources.The_connection_details_have_changed__do_you_want_to_save, Resources.Save_Changes,
+ MessageBoxButtons.YesNoCancel,
+ MessageBoxIcon.Question,
+ MessageBoxDefaultButton.Button1,
+ 0,
+ null,
+ null);
+
+ switch (saveFile)
+ {
+ case DialogResult.Yes:
+ WriteValuesBack();
+ break;
+ case DialogResult.Cancel:
+ e.Cancel = true;
+ break;
+ }
+ }
+ }
+
+
+ /// <summary>The tool strip button ok_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonOk_Click(object sender, EventArgs e)
+ {
+ DialogResult = DialogResult.OK;
+ WriteValuesBack();
+ Close();
+ }
+
+ /// <summary>The tool strip button cancel_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonCancel_Click(object sender, EventArgs e)
+ {
+ // todo - is dirty?
+ DialogResult = DialogResult.Cancel;
+ Close();
+ }
+
+ /// <summary>The write values back.</summary>
+ protected void WriteValuesBack()
+ {
+ if (ConnectionDefinition == null)
+ {
+ ConnectionDefinition = new DbConnectionDefinition();
+ }
+
+ ConnectionDefinition.Name = ConnectionName;
+ ConnectionDefinition.ProviderName = ProviderName;
+ ConnectionDefinition.ConnectionString = ConnectionString;
+ ConnectionDefinition.Comment = Comments;
+ _dirty = false;
+ }
+
+
+ /// <summary>The bind new connection string builder.</summary>
+ private void BindNewConnectionStringBuilder()
+ {
+ if (!_initialised)
+ {
+ return;
+ }
+
+ bool getBuilderFailed = false;
+ try
+ {
+ _connStrBldr = DbProviderFactories.GetFactory(ProviderName).CreateConnectionStringBuilder();
+ if (_connStrBldr == null)
+ {
+ getBuilderFailed = true;
+ }
+ }
+ catch
+ {
+ getBuilderFailed = true;
+ }
+
+ if (getBuilderFailed)
+ {
+ _connStrBldr = new GenericConnectionStringBuilder();
+ }
+
+ try
+ {
+ _connStrBldr.ConnectionString = _connStr;
+ }
+ catch (ArgumentException argExp)
+ {
+ // consume error but notify
+ MessageBox.Show(Resources.BindNewConnectionStringBuilder_Could_not_populate_with_current_connection_string___ + argExp.Message);
+ }
+
+ propertyGridDbConnection.SelectedObject = _connStrBldr;
+ }
+
+ /// <summary>The cbo provider_ selected index changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void cboProvider_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (!_initialised)
+ {
+ return;
+ }
+
+ SetDirty();
+ if (cboProvider.SelectedItem != null)
+ {
+ ProviderName = cboProvider.SelectedItem.ToString();
+ BindNewConnectionStringBuilder();
+ }
+ }
+
+ /// <summary>The items text changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void ItemsTextChanged(object sender, EventArgs e)
+ {
+ SetDirty();
+ }
+
+ /// <summary>The property grid db connection_ property value changed.</summary>
+ /// <param name="s">The s.</param>
+ /// <param name="e">The e.</param>
+ private void propertyGridDbConnection_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
+ {
+ SetDirty();
+ }
+
+ /// <summary>The set dirty.</summary>
+ private void SetDirty()
+ {
+ if (!_loaded)
+ {
+ return;
+ }
+
+ if (!_dirty)
+ {
+ _dirty = true;
+ Text += "*";
+ }
+ }
+
+ /// <summary>The tool strip button test_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonTest_Click(object sender, EventArgs e)
+ {
+ // do a standalone raw connection test
+ Exception exp = QueryRunner.TestDbConnection(ProviderName, ConnectionString);
+ if (exp == null)
+ {
+ string msg = string.Format(Resources.Connected_to_0_successfully, ConnectionName);
+ _hostWindow.DisplaySimpleMessageBox(this, msg, Resources.Connection_Successful);
+ }
+ else
+ {
+ string msg = string.Format(Resources.Failed_connecting_to_0_1_2, ConnectionName, Environment.NewLine, exp.Message);
+ _hostWindow.DisplaySimpleMessageBox(this, msg, Resources.Connection_Failed);
+ }
+ }
+
+#if DEBUG
+
+ /// <summary>The to string.</summary>
+ /// <returns>The to string.</returns>
+ public override string ToString()
+ {
+ return string.Format("[ConnectionStringBuilderForm => Name: {0}; Provider: {1}; ConnectionString: {2}]", ConnectionName, ProviderName,
+ ConnectionString);
+ }
+
+#endif
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.Designer.cs
new file mode 100644
index 0000000..36e0d03
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.Designer.cs
@@ -0,0 +1,224 @@
+namespace MiniSqlQuery.PlugIns.ConnectionStringsManager
+{
+ partial class ConnectionStringBuilderForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectionStringBuilderForm));
+ this.cboProvider = new System.Windows.Forms.ComboBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.propertyGridDbConnection = new System.Windows.Forms.PropertyGrid();
+ this.label2 = new System.Windows.Forms.Label();
+ this.txtConnectionName = new System.Windows.Forms.TextBox();
+ this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+ this.toolStripButtonOk = new System.Windows.Forms.ToolStripButton();
+ this.toolStripButtonCancel = new System.Windows.Forms.ToolStripButton();
+ this.txtComments = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripButtonTest = new System.Windows.Forms.ToolStripButton();
+ this.groupBox1.SuspendLayout();
+ this.toolStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // cboProvider
+ //
+ this.cboProvider.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cboProvider.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cboProvider.FormattingEnabled = true;
+ this.cboProvider.Location = new System.Drawing.Point(120, 94);
+ this.cboProvider.Name = "cboProvider";
+ this.cboProvider.Size = new System.Drawing.Size(295, 21);
+ this.cboProvider.TabIndex = 5;
+ this.cboProvider.SelectedIndexChanged += new System.EventHandler(this.cboProvider_SelectedIndexChanged);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 97);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(46, 13);
+ this.label1.TabIndex = 4;
+ this.label1.Text = "Provider";
+ //
+ // groupBox1
+ //
+ this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox1.Controls.Add(this.propertyGridDbConnection);
+ this.groupBox1.Location = new System.Drawing.Point(12, 121);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(403, 288);
+ this.groupBox1.TabIndex = 10;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Connection Settings";
+ //
+ // propertyGridDbConnection
+ //
+ this.propertyGridDbConnection.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.propertyGridDbConnection.Location = new System.Drawing.Point(3, 16);
+ this.propertyGridDbConnection.Name = "propertyGridDbConnection";
+ this.propertyGridDbConnection.Size = new System.Drawing.Size(397, 269);
+ this.propertyGridDbConnection.TabIndex = 0;
+ this.propertyGridDbConnection.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.propertyGridDbConnection_PropertyValueChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(12, 15);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(35, 13);
+ this.label2.TabIndex = 0;
+ this.label2.Text = "Name";
+ //
+ // txtConnectionName
+ //
+ this.txtConnectionName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtConnectionName.Location = new System.Drawing.Point(120, 12);
+ this.txtConnectionName.Name = "txtConnectionName";
+ this.txtConnectionName.Size = new System.Drawing.Size(295, 20);
+ this.txtConnectionName.TabIndex = 1;
+ this.txtConnectionName.TextChanged += new System.EventHandler(this.ItemsTextChanged);
+ //
+ // toolStrip1
+ //
+ this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripButtonOk,
+ this.toolStripButtonCancel,
+ this.toolStripSeparator1,
+ this.toolStripButtonTest});
+ this.toolStrip1.Location = new System.Drawing.Point(0, 412);
+ this.toolStrip1.Name = "toolStrip1";
+ this.toolStrip1.Size = new System.Drawing.Size(427, 25);
+ this.toolStrip1.TabIndex = 15;
+ this.toolStrip1.Text = "toolStrip1";
+ //
+ // toolStripButtonOk
+ //
+ this.toolStripButtonOk.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButtonOk.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonOk.Image")));
+ this.toolStripButtonOk.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonOk.Name = "toolStripButtonOk";
+ this.toolStripButtonOk.Size = new System.Drawing.Size(27, 22);
+ this.toolStripButtonOk.Text = "&OK";
+ this.toolStripButtonOk.Click += new System.EventHandler(this.toolStripButtonOk_Click);
+ //
+ // toolStripButtonCancel
+ //
+ this.toolStripButtonCancel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButtonCancel.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonCancel.Image")));
+ this.toolStripButtonCancel.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonCancel.Name = "toolStripButtonCancel";
+ this.toolStripButtonCancel.Size = new System.Drawing.Size(47, 22);
+ this.toolStripButtonCancel.Text = "&Cancel";
+ this.toolStripButtonCancel.Click += new System.EventHandler(this.toolStripButtonCancel_Click);
+ //
+ // txtComments
+ //
+ this.txtComments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtComments.Location = new System.Drawing.Point(120, 38);
+ this.txtComments.Multiline = true;
+ this.txtComments.Name = "txtComments";
+ this.txtComments.Size = new System.Drawing.Size(295, 50);
+ this.txtComments.TabIndex = 3;
+ this.txtComments.TextChanged += new System.EventHandler(this.ItemsTextChanged);
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(12, 41);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(56, 13);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "Comments";
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
+ // toolStripButtonTest
+ //
+ this.toolStripButtonTest.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButtonTest.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonTest.Image")));
+ this.toolStripButtonTest.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonTest.Name = "toolStripButtonTest";
+ this.toolStripButtonTest.Size = new System.Drawing.Size(42, 22);
+ this.toolStripButtonTest.Text = "Test...";
+ this.toolStripButtonTest.Click += new System.EventHandler(this.toolStripButtonTest_Click);
+ //
+ // ConnectionStringBuilderForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(427, 437);
+ this.Controls.Add(this.txtComments);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.toolStrip1);
+ this.Controls.Add(this.txtConnectionName);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.cboProvider);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "ConnectionStringBuilderForm";
+ this.Text = "Connection String Builder";
+ this.Load += new System.EventHandler(this.ConnectionStringBuilderForm_Load);
+ this.Shown += new System.EventHandler(this.ConnectionStringBuilderForm_Shown);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConnectionStringBuilderForm_FormClosing);
+ this.groupBox1.ResumeLayout(false);
+ this.toolStrip1.ResumeLayout(false);
+ this.toolStrip1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ComboBox cboProvider;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox txtConnectionName;
+ private System.Windows.Forms.ToolStrip toolStrip1;
+ private System.Windows.Forms.ToolStripButton toolStripButtonCancel;
+ private System.Windows.Forms.ToolStripButton toolStripButtonOk;
+ private System.Windows.Forms.PropertyGrid propertyGridDbConnection;
+ private System.Windows.Forms.TextBox txtComments;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripButton toolStripButtonTest;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.resx
new file mode 100644
index 0000000..bfb5614
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringBuilderForm.resx
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="toolStripButtonOk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
+ U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
+ VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
+ QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
+ /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
+ cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
+ 3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
+ dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
+ NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
+ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
+</value>
+ </data>
+ <data name="toolStripButtonCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
+ U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
+ VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
+ QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
+ /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
+ cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
+ 3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
+ dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
+ NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
+ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
+</value>
+ </data>
+ <data name="toolStripButtonTest.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
+ U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
+ VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
+ QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
+ /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
+ cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
+ 3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
+ dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
+ NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
+ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
+</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringsManagerLoader.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringsManagerLoader.cs
new file mode 100644
index 0000000..5f8965c
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/ConnectionStringsManagerLoader.cs
@@ -0,0 +1,34 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.PlugIns.ConnectionStringsManager.Commands;
+
+namespace MiniSqlQuery.PlugIns.ConnectionStringsManager
+{
+ /// <summary>The connection strings manager loader.</summary>
+ public class ConnectionStringsManagerLoader : PluginLoaderBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ConnectionStringsManagerLoader"/> class.</summary>
+ public ConnectionStringsManagerLoader() : base(
+ "Connection String Manager",
+ "A Mini SQL Query Plugin for managing the list of connection strings.",
+ 10)
+ {
+ }
+
+ /// <summary>Iinitialize the plug in.</summary>
+ public override void InitializePlugIn()
+ {
+ Services.RegisterComponent<DbConnectionsForm>("DbConnectionsForm");
+ ToolStripMenuItem editMenu = Services.HostWindow.GetMenuItem("edit");
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<EditConnectionsFormCommand>());
+ Services.HostWindow.AddToolStripCommand<EditConnectionsFormCommand>(null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.cs
new file mode 100644
index 0000000..b3fdbbc
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.cs
@@ -0,0 +1,345 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Properties;
+
+namespace MiniSqlQuery.PlugIns.ConnectionStringsManager
+{
+ /// <summary>The db connections form.</summary>
+ public partial class DbConnectionsForm : Form
+ {
+ /// <summary>The _host window.</summary>
+ private readonly IHostWindow _hostWindow;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _settings.</summary>
+ private readonly IApplicationSettings _settings;
+
+ /// <summary>The _definition list.</summary>
+ private DbConnectionDefinitionList _definitionList;
+
+ private bool _loaded;
+
+ private bool _dirty;
+
+ /// <summary>Initializes a new instance of the <see cref="DbConnectionsForm"/> class.</summary>
+ public DbConnectionsForm()
+ {
+ InitializeComponent();
+ toolStripButtonAdd.Image = ImageResource.database_add;
+ toolStripButtonCopyAsNew.Image = ImageResource.database_add;
+ toolStripButtonEditConnStr.Image = ImageResource.database_edit;
+ toolStripButtonDelete.Image = ImageResource.database_delete;
+ Icon = ImageResource.disconnect_icon;
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="DbConnectionsForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="hostWindow">The host window.</param>
+ /// <param name="settings">The settings.</param>
+ public DbConnectionsForm(IApplicationServices services, IHostWindow hostWindow, IApplicationSettings settings)
+ : this()
+ {
+ _services = services;
+ _hostWindow = hostWindow;
+ _settings = settings;
+ }
+
+ /// <summary>The load connection definitions.</summary>
+ /// <returns></returns>
+ private static DbConnectionDefinitionList LoadConnectionDefinitions()
+ {
+ return DbConnectionDefinitionList.FromXml(Utility.LoadConnections());
+ }
+
+
+ /// <summary>The add to list.</summary>
+ /// <param name="definition">The definition.</param>
+ private void AddToList(DbConnectionDefinition definition)
+ {
+ if (!lstConnections.Items.Contains(definition))
+ {
+ lstConnections.Items.Add(definition);
+ SetDirty();
+ }
+ }
+
+ /// <summary>The db connections form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DbConnectionsForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (_dirty)
+ {
+ DialogResult saveFile = _hostWindow.DisplayMessageBox(
+ this,
+ Resources.The_connection_details_have_changed__do_you_want_to_save,
+ Resources.Save_Changes,
+ MessageBoxButtons.YesNoCancel,
+ MessageBoxIcon.Question,
+ MessageBoxDefaultButton.Button1,
+ 0,
+ null,
+ null);
+
+ switch (saveFile)
+ {
+ case DialogResult.Yes:
+ SaveConnectionDefinitions(_definitionList);
+ break;
+ case DialogResult.Cancel:
+ e.Cancel = true;
+ break;
+ }
+ }
+ }
+
+ /// <summary>The db connections form_ shown.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DbConnectionsForm_Shown(object sender, EventArgs e)
+ {
+ _definitionList = LoadConnectionDefinitions();
+ UpdateListView();
+ _loaded = true;
+ }
+
+ /// <summary>The manage definition.</summary>
+ /// <param name="definition">The definition.</param>
+ private void ManageDefinition(DbConnectionDefinition definition)
+ {
+ ConnectionStringBuilderForm frm;
+ string oldName = null;
+
+ if (definition == null)
+ {
+ frm = new ConnectionStringBuilderForm(_hostWindow, _services); // new blank form
+ }
+ else
+ {
+ oldName = definition.Name;
+ frm = new ConnectionStringBuilderForm(_hostWindow, definition, _services);
+ }
+
+ frm.ShowDialog(this);
+
+ if (frm.DialogResult == DialogResult.OK)
+ {
+ SetDirty();
+
+ if (lstConnections.Items.Contains(frm.ConnectionDefinition) && definition != null)
+ {
+ if (definition.Name != oldName)
+ {
+ // want the list text to update due to name change
+ UpdateListView();
+ lstConnections.SelectedItem = definition;
+ }
+ else
+ {
+ UpdateDetailsPanel(lstConnections.SelectedItem as DbConnectionDefinition);
+ }
+ }
+ else
+ {
+ _definitionList.AddDefinition(frm.ConnectionDefinition);
+ AddToList(frm.ConnectionDefinition);
+ lstConnections.SelectedItem = frm.ConnectionDefinition;
+ }
+ }
+ }
+
+ /// <summary>The remove from list.</summary>
+ /// <param name="definition">The definition.</param>
+ private void RemoveFromList(DbConnectionDefinition definition)
+ {
+ if (lstConnections.Items.Contains(definition))
+ {
+ lstConnections.Items.Remove(definition);
+ SetDirty();
+ }
+ }
+
+
+ /// <summary>The save connection definitions.</summary>
+ /// <param name="data">The data.</param>
+ private void SaveConnectionDefinitions(DbConnectionDefinitionList data)
+ {
+ _settings.SetConnectionDefinitions(data);
+ Utility.SaveConnections(data);
+ _dirty = false;
+ }
+
+ /// <summary>The update details panel.</summary>
+ /// <param name="definition">The definition.</param>
+ private void UpdateDetailsPanel(DbConnectionDefinition definition)
+ {
+ if (definition != null)
+ {
+ txtName.Text = definition.Name;
+ txtProvider.Text = definition.ProviderName;
+ txtConn.Text = definition.ConnectionString;
+ txtComment.Text = definition.Comment;
+ }
+ else
+ {
+ txtName.Clear();
+ txtProvider.Clear();
+ txtConn.Clear();
+ txtComment.Clear();
+ }
+ }
+
+ /// <summary>The update list view.</summary>
+ private void UpdateListView()
+ {
+ if (_definitionList.Definitions != null && _definitionList.Definitions.Length > 0)
+ {
+ lstConnections.Items.Clear();
+ lstConnections.Items.AddRange(_definitionList.Definitions);
+ lstConnections.SelectedItem = _definitionList.Definitions[0];
+ }
+ }
+
+ /// <summary>The lst connections_ double click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void lstConnections_DoubleClick(object sender, EventArgs e)
+ {
+ DbConnectionDefinition definition = lstConnections.SelectedItem as DbConnectionDefinition;
+ if (definition != null)
+ {
+ ManageDefinition(definition);
+ }
+ }
+
+ /// <summary>The lst connections_ selected value changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void lstConnections_SelectedValueChanged(object sender, EventArgs e)
+ {
+ DbConnectionDefinition definition = lstConnections.SelectedItem as DbConnectionDefinition;
+ UpdateDetailsPanel(definition);
+ }
+
+ /// <summary>The tool strip button add_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonAdd_Click(object sender, EventArgs e)
+ {
+ ManageDefinition(null);
+ }
+
+ /// <summary>The tool strip button cancel_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonCancel_Click(object sender, EventArgs e)
+ {
+ Close();
+ }
+
+ /// <summary>The tool strip button copy as new_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonCopyAsNew_Click(object sender, EventArgs e)
+ {
+ DbConnectionDefinition definition = lstConnections.SelectedItem as DbConnectionDefinition;
+ if (definition != null)
+ {
+ DbConnectionDefinition newDefinition = DbConnectionDefinition.FromXml(definition.ToXml());
+ newDefinition.Name = "Copy of " + newDefinition.Name;
+ ManageDefinition(newDefinition);
+ }
+ }
+
+ /// <summary>The tool strip button delete_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonDelete_Click(object sender, EventArgs e)
+ {
+ DbConnectionDefinition definition = lstConnections.SelectedItem as DbConnectionDefinition;
+ if (definition != null)
+ {
+ int newIndex = Math.Max(lstConnections.SelectedIndex - 1, 0);
+ _definitionList.RemoveDefinition(definition);
+ RemoveFromList(definition);
+ if (lstConnections.Items.Count > 0)
+ {
+ lstConnections.SelectedIndex = newIndex;
+ }
+ }
+ }
+
+ /// <summary>The tool strip button edit conn str_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonEditConnStr_Click(object sender, EventArgs e)
+ {
+ DbConnectionDefinition definition = lstConnections.SelectedItem as DbConnectionDefinition;
+ if (definition != null)
+ {
+ ManageDefinition(definition);
+ }
+ }
+
+ /// <summary>The tool strip button ok_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonOk_Click(object sender, EventArgs e)
+ {
+ SaveConnectionDefinitions(_definitionList);
+ Close();
+ }
+
+ /// <summary>The tool strip button test_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripButtonTest_Click(object sender, EventArgs e)
+ {
+ // do a standalone raw connection test
+ DbConnectionDefinition definition = lstConnections.SelectedItem as DbConnectionDefinition;
+ if (definition != null)
+ {
+ Exception exp = QueryRunner.TestDbConnection(definition.ProviderName, definition.ConnectionString);
+ if (exp == null)
+ {
+ string msg = string.Format("Connected to '{0}' successfully.", definition.Name);
+ _hostWindow.DisplaySimpleMessageBox(this, msg, "Connection Successful");
+ }
+ else
+ {
+ string msg = string.Format("Failed connecting to '{0}'.{1}{2}", definition.Name, Environment.NewLine, exp.Message);
+ _hostWindow.DisplaySimpleMessageBox(this, msg, "Connection Failed");
+ }
+ }
+ }
+
+ private void DbConnectionsForm_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ private void SetDirty()
+ {
+ if (!_loaded)
+ {
+ return;
+ }
+
+ if (!_dirty)
+ {
+ _dirty = true;
+ Text += "*";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.Designer.cs
new file mode 100644
index 0000000..ea1f002
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.Designer.cs
@@ -0,0 +1,325 @@
+namespace MiniSqlQuery.PlugIns.ConnectionStringsManager
+{
+ partial class DbConnectionsForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbConnectionsForm));
+ this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+ this.toolStripButtonOk = new System.Windows.Forms.ToolStripButton();
+ this.toolStripButtonCancel = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripButtonAdd = new System.Windows.Forms.ToolStripButton();
+ this.toolStripButtonCopyAsNew = new System.Windows.Forms.ToolStripButton();
+ this.toolStripButtonEditConnStr = new System.Windows.Forms.ToolStripButton();
+ this.toolStripButtonDelete = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripButtonTest = new System.Windows.Forms.ToolStripButton();
+ this.lstConnections = new System.Windows.Forms.ListBox();
+ this.grpDetails = new System.Windows.Forms.GroupBox();
+ this.txtComment = new System.Windows.Forms.TextBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.txtConn = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.txtProvider = new System.Windows.Forms.TextBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.txtName = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.toolStrip1.SuspendLayout();
+ this.grpDetails.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // toolStrip1
+ //
+ this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripButtonOk,
+ this.toolStripButtonCancel,
+ this.toolStripSeparator1,
+ this.toolStripButtonAdd,
+ this.toolStripButtonCopyAsNew,
+ this.toolStripButtonEditConnStr,
+ this.toolStripButtonDelete,
+ this.toolStripSeparator2,
+ this.toolStripButtonTest});
+ this.toolStrip1.Location = new System.Drawing.Point(0, 342);
+ this.toolStrip1.Name = "toolStrip1";
+ this.toolStrip1.Size = new System.Drawing.Size(881, 27);
+ this.toolStrip1.TabIndex = 4;
+ this.toolStrip1.Text = "toolStrip1";
+ //
+ // toolStripButtonOk
+ //
+ this.toolStripButtonOk.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButtonOk.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonOk.Image")));
+ this.toolStripButtonOk.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonOk.Name = "toolStripButtonOk";
+ this.toolStripButtonOk.Size = new System.Drawing.Size(33, 24);
+ this.toolStripButtonOk.Text = "&OK";
+ this.toolStripButtonOk.Click += new System.EventHandler(this.toolStripButtonOk_Click);
+ //
+ // toolStripButtonCancel
+ //
+ this.toolStripButtonCancel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButtonCancel.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonCancel.Image")));
+ this.toolStripButtonCancel.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonCancel.Name = "toolStripButtonCancel";
+ this.toolStripButtonCancel.Size = new System.Drawing.Size(57, 24);
+ this.toolStripButtonCancel.Text = "&Cancel";
+ this.toolStripButtonCancel.Click += new System.EventHandler(this.toolStripButtonCancel_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 27);
+ //
+ // toolStripButtonAdd
+ //
+ this.toolStripButtonAdd.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonAdd.Image")));
+ this.toolStripButtonAdd.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonAdd.Name = "toolStripButtonAdd";
+ this.toolStripButtonAdd.Size = new System.Drawing.Size(57, 24);
+ this.toolStripButtonAdd.Text = "Add";
+ this.toolStripButtonAdd.ToolTipText = "Add";
+ this.toolStripButtonAdd.Click += new System.EventHandler(this.toolStripButtonAdd_Click);
+ //
+ // toolStripButtonCopyAsNew
+ //
+ this.toolStripButtonCopyAsNew.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonCopyAsNew.Image")));
+ this.toolStripButtonCopyAsNew.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonCopyAsNew.Name = "toolStripButtonCopyAsNew";
+ this.toolStripButtonCopyAsNew.Size = new System.Drawing.Size(115, 24);
+ this.toolStripButtonCopyAsNew.Text = "Copy as New";
+ this.toolStripButtonCopyAsNew.Click += new System.EventHandler(this.toolStripButtonCopyAsNew_Click);
+ //
+ // toolStripButtonEditConnStr
+ //
+ this.toolStripButtonEditConnStr.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonEditConnStr.Image")));
+ this.toolStripButtonEditConnStr.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonEditConnStr.Name = "toolStripButtonEditConnStr";
+ this.toolStripButtonEditConnStr.Size = new System.Drawing.Size(55, 24);
+ this.toolStripButtonEditConnStr.Text = "Edit";
+ this.toolStripButtonEditConnStr.Click += new System.EventHandler(this.toolStripButtonEditConnStr_Click);
+ //
+ // toolStripButtonDelete
+ //
+ this.toolStripButtonDelete.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonDelete.Image")));
+ this.toolStripButtonDelete.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonDelete.Name = "toolStripButtonDelete";
+ this.toolStripButtonDelete.Size = new System.Drawing.Size(73, 24);
+ this.toolStripButtonDelete.Text = "Delete";
+ this.toolStripButtonDelete.Click += new System.EventHandler(this.toolStripButtonDelete_Click);
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(6, 27);
+ //
+ // toolStripButtonTest
+ //
+ this.toolStripButtonTest.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripButtonTest.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonTest.Image")));
+ this.toolStripButtonTest.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripButtonTest.Name = "toolStripButtonTest";
+ this.toolStripButtonTest.Size = new System.Drawing.Size(49, 24);
+ this.toolStripButtonTest.Text = "Test...";
+ this.toolStripButtonTest.Click += new System.EventHandler(this.toolStripButtonTest_Click);
+ //
+ // lstConnections
+ //
+ this.lstConnections.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
+ this.lstConnections.FormattingEnabled = true;
+ this.lstConnections.ItemHeight = 16;
+ this.lstConnections.Location = new System.Drawing.Point(16, 15);
+ this.lstConnections.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.lstConnections.Name = "lstConnections";
+ this.lstConnections.Size = new System.Drawing.Size(335, 292);
+ this.lstConnections.TabIndex = 5;
+ this.lstConnections.SelectedValueChanged += new System.EventHandler(this.lstConnections_SelectedValueChanged);
+ this.lstConnections.DoubleClick += new System.EventHandler(this.lstConnections_DoubleClick);
+ //
+ // grpDetails
+ //
+ this.grpDetails.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.grpDetails.Controls.Add(this.txtComment);
+ this.grpDetails.Controls.Add(this.label4);
+ this.grpDetails.Controls.Add(this.txtConn);
+ this.grpDetails.Controls.Add(this.label3);
+ this.grpDetails.Controls.Add(this.txtProvider);
+ this.grpDetails.Controls.Add(this.label2);
+ this.grpDetails.Controls.Add(this.txtName);
+ this.grpDetails.Controls.Add(this.label1);
+ this.grpDetails.Location = new System.Drawing.Point(360, 15);
+ this.grpDetails.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.grpDetails.Name = "grpDetails";
+ this.grpDetails.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.grpDetails.Size = new System.Drawing.Size(505, 319);
+ this.grpDetails.TabIndex = 6;
+ this.grpDetails.TabStop = false;
+ this.grpDetails.Text = "Details";
+ //
+ // txtComment
+ //
+ this.txtComment.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtComment.Location = new System.Drawing.Point(133, 206);
+ this.txtComment.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.txtComment.Multiline = true;
+ this.txtComment.Name = "txtComment";
+ this.txtComment.ReadOnly = true;
+ this.txtComment.Size = new System.Drawing.Size(363, 105);
+ this.txtComment.TabIndex = 7;
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(8, 209);
+ this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(67, 17);
+ this.label4.TabIndex = 6;
+ this.label4.Text = "Comment";
+ //
+ // txtConn
+ //
+ this.txtConn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtConn.Location = new System.Drawing.Point(133, 87);
+ this.txtConn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.txtConn.Multiline = true;
+ this.txtConn.Name = "txtConn";
+ this.txtConn.ReadOnly = true;
+ this.txtConn.Size = new System.Drawing.Size(363, 110);
+ this.txtConn.TabIndex = 5;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(8, 91);
+ this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(79, 17);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "Connection";
+ //
+ // txtProvider
+ //
+ this.txtProvider.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtProvider.Location = new System.Drawing.Point(133, 55);
+ this.txtProvider.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.txtProvider.Name = "txtProvider";
+ this.txtProvider.ReadOnly = true;
+ this.txtProvider.Size = new System.Drawing.Size(363, 22);
+ this.txtProvider.TabIndex = 3;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(8, 59);
+ this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(61, 17);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "Provider";
+ //
+ // txtName
+ //
+ this.txtName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtName.Location = new System.Drawing.Point(133, 23);
+ this.txtName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.txtName.Name = "txtName";
+ this.txtName.ReadOnly = true;
+ this.txtName.Size = new System.Drawing.Size(363, 22);
+ this.txtName.TabIndex = 1;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(8, 27);
+ this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(45, 17);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Name";
+ //
+ // DbConnectionsForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(881, 369);
+ this.Controls.Add(this.grpDetails);
+ this.Controls.Add(this.lstConnections);
+ this.Controls.Add(this.toolStrip1);
+ this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "DbConnectionsForm";
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Database Connection List Editor";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DbConnectionsForm_FormClosing);
+ this.Load += new System.EventHandler(this.DbConnectionsForm_Load);
+ this.Shown += new System.EventHandler(this.DbConnectionsForm_Shown);
+ this.toolStrip1.ResumeLayout(false);
+ this.toolStrip1.PerformLayout();
+ this.grpDetails.ResumeLayout(false);
+ this.grpDetails.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ToolStrip toolStrip1;
+ private System.Windows.Forms.ToolStripButton toolStripButtonOk;
+ private System.Windows.Forms.ToolStripButton toolStripButtonCancel;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripButton toolStripButtonEditConnStr;
+ private System.Windows.Forms.ListBox lstConnections;
+ private System.Windows.Forms.GroupBox grpDetails;
+ private System.Windows.Forms.TextBox txtProvider;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox txtName;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox txtComment;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox txtConn;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.ToolStripButton toolStripButtonAdd;
+ private System.Windows.Forms.ToolStripButton toolStripButtonDelete;
+ private System.Windows.Forms.ToolStripButton toolStripButtonCopyAsNew;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+ private System.Windows.Forms.ToolStripButton toolStripButtonTest;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.resx
new file mode 100644
index 0000000..3b9a305
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/DbConnectionsForm.resx
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="toolStripButtonOk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="toolStripButtonCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="toolStripButtonAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="toolStripButtonCopyAsNew.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="toolStripButtonEditConnStr.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="toolStripButtonDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
+</value>
+ </data>
+ <data name="toolStripButtonTest.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
+ 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
+ bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
+ VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
+ c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
+ Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
+ mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
+ kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
+ TgDQASA1MVpwzwAAAABJRU5ErkJggg==
+</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/GenericConnectionStringBuilder.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/GenericConnectionStringBuilder.cs
new file mode 100644
index 0000000..5fa0aca
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ConnectionStringsManager/GenericConnectionStringBuilder.cs
@@ -0,0 +1,79 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Collections;
+using System.ComponentModel;
+using System.Data.Common;
+using System.Reflection;
+
+namespace MiniSqlQuery.PlugIns.ConnectionStringsManager
+{
+ /// <summary>The generic connection string builder.</summary>
+ [DefaultMember("Item"), DefaultProperty("ConnectionString")]
+ public class GenericConnectionStringBuilder : DbConnectionStringBuilder
+ {
+ /// <summary>The _properties.</summary>
+ private Hashtable _properties;
+
+ /// <summary>Initializes a new instance of the <see cref="GenericConnectionStringBuilder"/> class.</summary>
+ public GenericConnectionStringBuilder()
+ {
+ Initialize(null);
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="GenericConnectionStringBuilder"/> class.</summary>
+ /// <param name="connectionString">The connection string.</param>
+ public GenericConnectionStringBuilder(string connectionString)
+ {
+ Initialize(connectionString);
+ }
+
+ /// <summary>The try get value.</summary>
+ /// <param name="keyword">The keyword.</param>
+ /// <param name="value">The value.</param>
+ /// <returns>The try get value.</returns>
+ public override bool TryGetValue(string keyword, out object value)
+ {
+ bool success = base.TryGetValue(keyword, out value);
+ if (_properties.ContainsKey(keyword))
+ {
+ PropertyDescriptor descriptor = _properties[keyword] as PropertyDescriptor;
+ if (descriptor == null)
+ {
+ return success;
+ }
+
+ if (success)
+ {
+ value = TypeDescriptor.GetConverter(descriptor.PropertyType).ConvertFrom(value);
+ return success;
+ }
+
+ DefaultValueAttribute attribute = descriptor.Attributes[typeof(DefaultValueAttribute)] as DefaultValueAttribute;
+ if (attribute != null)
+ {
+ value = attribute.Value;
+ success = true;
+ }
+ }
+
+ return success;
+ }
+
+ /// <summary>The initialize.</summary>
+ /// <param name="cnnString">The cnn string.</param>
+ private void Initialize(string cnnString)
+ {
+ _properties = new Hashtable();
+ this.GetProperties(_properties);
+ if (!string.IsNullOrEmpty(cnnString))
+ {
+ ConnectionString = cnnString;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/CoreApplicationPlugIn.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/CoreApplicationPlugIn.cs
new file mode 100644
index 0000000..ef57ebd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/CoreApplicationPlugIn.cs
@@ -0,0 +1,212 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.Diagnostics;
+using System.Linq;
+using System.Windows.Forms;
+using MiniSqlQuery.Commands;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns
+{
+ /// <summary>The core application plug in.</summary>
+ public class CoreApplicationPlugIn : PluginLoaderBase
+ {
+ /// <summary>The _timer.</summary>
+ private Timer _timer;
+
+ /// <summary>Initializes a new instance of the <see cref="CoreApplicationPlugIn"/> class.</summary>
+ public CoreApplicationPlugIn()
+ : base("Mini SQL Query Core", "Plugin to setup the core features of Mini SQL Query.", 1)
+ {
+ }
+
+ /// <summary>Iinitialize the plug in.</summary>
+ public override void InitializePlugIn()
+ {
+ IApplicationServices services = Services;
+ IHostWindow hostWindow = services.HostWindow;
+
+ services.RegisterSingletonComponent<ICompletionProvider, NullCompletionProvider>("CompletionProvider");
+
+ services.RegisterEditor<BasicEditor>(new FileEditorDescriptor("Default text editor", "default-editor"));
+ services.RegisterEditor<QueryForm>(new FileEditorDescriptor("SQL Editor", "sql-editor", "sql"));
+ services.RegisterEditor<BasicCSharpEditor>(new FileEditorDescriptor("C# Editor", "cs-editor", "cs"));
+ services.RegisterEditor<BasicVbNetEditor>(new FileEditorDescriptor("VB/VB.NET Editor", "vb-editor", "vb"));
+ services.RegisterEditor<BasicXmlEditor>(new FileEditorDescriptor("XML Editor", "xml-editor", "xml"));
+ services.RegisterEditor<BasicHtmlEditor>(new FileEditorDescriptor("HTML Editor", "htm-editor", "htm", "html"));
+ services.RegisterEditor<BasicEditor>(new FileEditorDescriptor("Text Editor", "txt-editor", "txt"));
+
+ services.RegisterComponent<NewFileForm>("NewFileForm");
+ services.RegisterComponent<OptionsForm>("OptionsForm");
+ services.RegisterSingletonComponent<IMostRecentFilesService, MostRecentFilesService>("MostRecentFilesService");
+ services.RegisterConfigurationObject<CoreMiniSqlQueryConfiguration>();
+
+ ToolStripMenuItem fileMenu = hostWindow.GetMenuItem("File");
+ ToolStripMenuItem editMenu = hostWindow.GetMenuItem("edit");
+ ToolStripMenuItem queryMenu = hostWindow.GetMenuItem("query");
+ ToolStripMenuItem helpMenu = hostWindow.GetMenuItem("help");
+
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<NewQueryFormCommand>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<NewFileCommand>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenFileCommand>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<SaveFileCommand>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<SaveFileAsCommand>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseActiveWindowCommand>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<PrintCommand>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile1Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile2Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile3Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile4Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile5Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile6Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile7Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile8Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile9Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenRecentFile10Command>());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ fileMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ExitApplicationCommand>());
+
+ queryMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ExecuteTaskCommand>());
+ queryMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<CancelTaskCommand>());
+ queryMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<SaveResultsAsDataSetCommand>());
+ queryMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<RefreshDatabaseConnectionCommand>());
+ queryMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseDatabaseConnectionCommand>());
+ queryMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<DisplayDbModelDependenciesCommand>());
+
+ // editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<DuplicateLineCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<PasteAroundSelectionCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ConvertTextToLowerCaseCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ConvertTextToUpperCaseCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ConvertTextToTitleCaseCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<SetLeftPasteAroundSelectionCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<SetRightPasteAroundSelectionCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ShowOptionsFormCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<OpenConnectionFileCommand>());
+
+ // get the new item and make in invisible - the shortcut key is still available etc ;-)
+ ToolStripItem item = editMenu.DropDownItems["SetLeftPasteAroundSelectionCommandToolStripMenuItem"];
+ item.Visible = false;
+ item = editMenu.DropDownItems["SetRightPasteAroundSelectionCommandToolStripMenuItem"];
+ item.Visible = false;
+
+
+ helpMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ShowHelpCommand>());
+ helpMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ShowWebPageCommand>());
+ helpMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<EmailAuthorCommand>());
+ helpMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ helpMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ShowAboutCommand>());
+
+ CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(hostWindow.Instance.MainMenuStrip);
+
+ // toolstrip
+ hostWindow.AddToolStripCommand<NewQueryFormCommand>(0);
+ hostWindow.AddToolStripCommand<OpenFileCommand>(1);
+ hostWindow.AddToolStripCommand<SaveFileCommand>(2);
+ hostWindow.AddToolStripSeperator(3);
+ hostWindow.AddToolStripCommand<ExecuteTaskCommand>(4);
+ hostWindow.AddToolStripCommand<CancelTaskCommand>(5);
+ hostWindow.AddToolStripSeperator(6);
+ hostWindow.AddToolStripSeperator(null);
+ hostWindow.AddToolStripCommand<RefreshDatabaseConnectionCommand>(null);
+
+ hostWindow.AddPluginCommand<InsertGuidCommand>();
+
+ ConfigureMostRecentFileList(services);
+
+ // watch tool strip enabled properties
+ // by simply iterating each one every second or so we avoid the need to track via events
+ _timer = new Timer();
+ _timer.Interval = 1000;
+ _timer.Tick += TimerTick;
+ _timer.Enabled = true;
+ }
+
+ protected void ConfigureMostRecentFileList(IApplicationServices services)
+ {
+ // get the files out of the settings and register them
+ var mostRecentFilesService = services.Resolve<IMostRecentFilesService>();
+ if (services.Settings.MostRecentFiles != null)
+ {
+ foreach (string mostRecentFile in services.Settings.MostRecentFiles)
+ {
+ mostRecentFilesService.Filenames.Add(mostRecentFile);
+ }
+ }
+
+ // watch for changes
+ mostRecentFilesService.MostRecentFilesChanged += mostRecentFilesService_MostRecentFilesChanged;
+
+ // need to manually call the update - only required on first load
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile1Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile2Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile3Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile4Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile5Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile6Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile7Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile8Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile9Command>()).UpdateName();
+ ((OpenRecentFileCommand)CommandManager.GetCommandInstance<OpenRecentFile10Command>()).UpdateName();
+ }
+
+ /// <summary>The unload plug in.</summary>
+ public override void UnloadPlugIn()
+ {
+ if (_timer != null)
+ {
+ _timer.Dispose();
+ }
+ }
+
+ /// <summary>Called frequently to run through all the commands on the toolstrip and check their enabled state.
+ /// Marked as "DebuggerNonUserCode" because it can get in the way of a debug sesssion.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
+ [DebuggerNonUserCode]
+ private void TimerTick(object sender, EventArgs e)
+ {
+ try
+ {
+ _timer.Enabled = false;
+ foreach (ToolStripItem item in Services.HostWindow.ToolStrip.Items)
+ {
+ ICommand cmd = item.Tag as ICommand;
+ if (cmd != null)
+ {
+ item.Enabled = cmd.Enabled;
+ }
+ }
+ }
+ finally
+ {
+ _timer.Enabled = true;
+ }
+ }
+
+ static void mostRecentFilesService_MostRecentFilesChanged(object sender, MostRecentFilesChangedEventArgs e)
+ {
+ var services = ApplicationServices.Instance;
+ var mostRecentFilesService = services.Resolve<IMostRecentFilesService>();
+ if (services.Settings.MostRecentFiles == null)
+ {
+ services.Settings.MostRecentFiles = new StringCollection();
+ }
+ else
+ {
+ services.Settings.MostRecentFiles.Clear();
+ }
+ services.Settings.MostRecentFiles.AddRange(mostRecentFilesService.Filenames.ToArray());
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/CoreMiniSqlQueryConfiguration.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/CoreMiniSqlQueryConfiguration.cs
new file mode 100644
index 0000000..9a55071
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/CoreMiniSqlQueryConfiguration.cs
@@ -0,0 +1,280 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Collections.Specialized;
+using System.ComponentModel;
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery.PlugIns
+{
+ /// <summary>The core mini sql query configuration.</summary>
+ public class CoreMiniSqlQueryConfiguration : NotifyPropertyChangedBase, IConfigurationObject
+ {
+ /// <summary>The application settings.</summary>
+ private readonly IApplicationSettings _settings;
+
+ /// <summary>The settings wrapper.</summary>
+ private readonly CoreMiniSqlQuerySettingsWrapper _settingsWrapper;
+
+ /// <summary>The dirty record.</summary>
+ private static bool _isDirty;
+
+ /// <summary>Initializes a new instance of the <see cref="CoreMiniSqlQueryConfiguration"/> class.</summary>
+ /// <param name="settings">The settings.</param>
+ public CoreMiniSqlQueryConfiguration(IApplicationSettings settings)
+ {
+ _settings = settings;
+ _settingsWrapper = new CoreMiniSqlQuerySettingsWrapper(_settings);
+ _settingsWrapper.PropertyChanged += ProxyPropertyChanged;
+ _isDirty = false;
+ }
+
+ /// <summary>Gets a value indicating whether IsDirty.</summary>
+ public bool IsDirty
+ {
+ get { return _isDirty; }
+ private set
+ {
+ if (_isDirty != value)
+ {
+ _isDirty = value;
+ OnPropertyChanged("IsDirty");
+ }
+ }
+ }
+
+ /// <summary>Gets Name.</summary>
+ public string Name
+ {
+ get { return "Mini SQL Query Settings"; }
+ }
+
+ /// <summary>Gets Settings.</summary>
+ public object Settings
+ {
+ get { return _settingsWrapper; }
+ }
+
+ /// <summary>Save the settings back.</summary>
+ public void Save()
+ {
+ _settings.EnableQueryBatching = _settingsWrapper.EnableQueryBatching;
+ _settings.CommandTimeout = _settingsWrapper.CommandTimeout;
+ _settings.PlugInFileFilter = _settingsWrapper.PlugInFileFilter;
+ _settings.MostRecentFiles = _settingsWrapper.MostRecentFiles;
+ _settings.LoadExternalPlugins = _settingsWrapper.LoadExternalPlugins;
+ _settings.DefaultConnectionDefinitionFilename = _settingsWrapper.DefaultConnectionDefinitionFilename;
+ _settings.DateTimeFormat = _settingsWrapper.DateTimeFormat;
+ _settings.NullText = _settingsWrapper.NullText;
+ _settings.IncludeReadOnlyColumnsInExport = _settingsWrapper.IncludeReadOnlyColumnsInExport;
+ IsDirty = false;
+ }
+
+ /// <summary>The proxy property changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The events.</param>
+ private void ProxyPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ IsDirty = true;
+ }
+
+ /// <summary>The core mini sql query settings wrapper.</summary>
+ public class CoreMiniSqlQuerySettingsWrapper : NotifyPropertyChangedBase
+ {
+ /// <summary>The _settings.</summary>
+ private readonly IApplicationSettings _settings;
+
+ /// <summary>The _date time format.</summary>
+ private string _dateTimeFormat;
+
+ /// <summary>The _default connection definition filename.</summary>
+ private string _defaultConnectionDefinitionFilename;
+
+ /// <summary>The _enable query batching.</summary>
+ private bool _enableQueryBatching;
+
+ /// <summary>The _load plugins.</summary>
+ private bool _loadPlugins;
+
+ /// <summary>The _null text.</summary>
+ private string _nullText;
+
+ /// <summary>The _plug in file filter.</summary>
+ private string _plugInFileFilter;
+
+ StringCollection _mostRecentFiles;
+
+ /// <summary>The include ReadOnly Columns in Export value.</summary>
+ private bool _includeReadOnlyColumnsInExport;
+
+ /// <summary>The command timout.</summary>
+ private int _commandTimeout;
+
+ /// <summary>Initializes a new instance of the <see cref="CoreMiniSqlQuerySettingsWrapper"/> class.</summary>
+ /// <param name="settings">The settings.</param>
+ public CoreMiniSqlQuerySettingsWrapper(IApplicationSettings settings)
+ {
+ _settings = settings;
+
+ EnableQueryBatching = _settings.EnableQueryBatching;
+ CommandTimeout = _settings.CommandTimeout;
+ PlugInFileFilter = _settings.PlugInFileFilter;
+ MostRecentFiles = _settings.MostRecentFiles;
+ LoadExternalPlugins = _settings.LoadExternalPlugins;
+ DefaultConnectionDefinitionFilename = _settings.DefaultConnectionDefinitionFilename;
+ DateTimeFormat = _settings.DateTimeFormat;
+ NullText = _settings.NullText;
+ IncludeReadOnlyColumnsInExport = _settings.IncludeReadOnlyColumnsInExport;
+ }
+
+ /// <summary>Gets or sets DateTimeFormat.</summary>
+ [Category("Query Results")]
+ [Description("")]
+ public string DateTimeFormat
+ {
+ get { return _dateTimeFormat; }
+ set
+ {
+ if (_dateTimeFormat != value)
+ {
+ _dateTimeFormat = value;
+ OnPropertyChanged("DateTimeFormat");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets DefaultConnectionDefinitionFilename.</summary>
+ [Category("Query")]
+ [Description("If this value is set to a specific connections XML file it will be loaded in preferences to the default path " +
+ "(%APPDATA%\\MiniSqlQuery\\Connections.xml). Note that changing this value will require a restart of the application.")]
+ public string DefaultConnectionDefinitionFilename
+ {
+ get { return _defaultConnectionDefinitionFilename; }
+ set
+ {
+ if (_defaultConnectionDefinitionFilename != value)
+ {
+ _defaultConnectionDefinitionFilename = value;
+ OnPropertyChanged("DefaultConnectionDefinitionFilename");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets a value indicating whether EnableQueryBatching.</summary>
+ [Category("Query")]
+ [Description("Set to true to enable the batching feature, if false the 'GO' statements will be passed straight through.")]
+ public bool EnableQueryBatching
+ {
+ get { return _enableQueryBatching; }
+ set
+ {
+ if (_enableQueryBatching != value)
+ {
+ _enableQueryBatching = value;
+ OnPropertyChanged("EnableQueryBatching");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets a value indicating the command timeout.</summary>
+ [Category("Query")]
+ [Description("Gets or sets the wait time before terminating the attempt to execute a command and generating an error. A value of 0 indicates no limit.")]
+ public int CommandTimeout
+ {
+ get { return _commandTimeout; }
+ set
+ {
+ if (_commandTimeout != value)
+ {
+ _commandTimeout = value;
+ OnPropertyChanged("CommandTimeout");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets a value indicating whether LoadExternalPlugins.</summary>
+ [Category("Plugins")]
+ [Description("If true, external plugin files will be loaded (requires restart).")]
+ public bool LoadExternalPlugins
+ {
+ get { return _loadPlugins; }
+ set
+ {
+ if (_loadPlugins != value)
+ {
+ _loadPlugins = value;
+ OnPropertyChanged("LoadExternalPlugins");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets NullText.</summary>
+ [Category("Query Results")]
+ [Description("")]
+ public string NullText
+ {
+ get { return _nullText; }
+ set
+ {
+ if (_nullText != value)
+ {
+ _nullText = value;
+ OnPropertyChanged("NullText");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets PlugInFileFilter.</summary>
+ [Category("Plugins")]
+ [Description("The file filter used for finding plugins (*.PlugIn.dll)")]
+ public string PlugInFileFilter
+ {
+ get { return _plugInFileFilter; }
+ set
+ {
+ if (_plugInFileFilter != value)
+ {
+ _plugInFileFilter = value;
+ OnPropertyChanged("PlugInFileFilter");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets MostRecentFiles.</summary>
+ [Category("Plugins")]
+ [Description("The file filter used for finding plugins (*.PlugIn.dll)")]
+ public StringCollection MostRecentFiles
+ {
+ get { return _mostRecentFiles; }
+ set
+ {
+ if (_mostRecentFiles != value)
+ {
+ _mostRecentFiles = value;
+ OnPropertyChanged("MostRecentFiles");
+ }
+ }
+ }
+
+ /// <summary>Gets or sets PlugInFileFilter.</summary>
+ [Category("Export Scripts")]
+ [Description("If true, the readonly columns (e.g. identity) will be exported in the script.")]
+ public bool IncludeReadOnlyColumnsInExport
+ {
+ get { return _includeReadOnlyColumnsInExport; }
+ set
+ {
+ if (_includeReadOnlyColumnsInExport != value)
+ {
+ _includeReadOnlyColumnsInExport = value;
+ OnPropertyChanged("PlugInFileFilter");
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/CopyTableNameCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/CopyTableNameCommand.cs
new file mode 100644
index 0000000..ff20da0
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/CopyTableNameCommand.cs
@@ -0,0 +1,28 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The copy table name command.</summary>
+ public class CopyTableNameCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="CopyTableNameCommand"/> class.</summary>
+ public CopyTableNameCommand()
+ : base("Copy table name")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ Clipboard.SetText(HostWindow.DatabaseInspector.RightClickedTableName);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateDeleteStatementCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateDeleteStatementCommand.cs
new file mode 100644
index 0000000..e0b7220
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateDeleteStatementCommand.cs
@@ -0,0 +1,38 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.IO;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The generate delete statement command.</summary>
+ public class GenerateDeleteStatementCommand : GenerateStatementCommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="GenerateDeleteStatementCommand"/> class.</summary>
+ public GenerateDeleteStatementCommand()
+ : base("Generate Delete Statement")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IQueryEditor editor = ActiveFormAsSqlQueryEditor;
+ string tableName = HostWindow.DatabaseInspector.RightClickedTableName;
+ DbModelInstance model = HostWindow.DatabaseInspector.DbSchema;
+
+ if (tableName != null && editor != null)
+ {
+ StringWriter sql = new StringWriter();
+ SqlWriter.WriteDelete(sql, GetTableOrViewByName(model, tableName));
+ editor.InsertText(sql.ToString());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateInsertStatementCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateInsertStatementCommand.cs
new file mode 100644
index 0000000..55f0802
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateInsertStatementCommand.cs
@@ -0,0 +1,38 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.IO;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The generate insert statement command.</summary>
+ internal class GenerateInsertStatementCommand : GenerateStatementCommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="GenerateInsertStatementCommand"/> class.</summary>
+ public GenerateInsertStatementCommand()
+ : base("Generate Insert Statement")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IQueryEditor editor = ActiveFormAsSqlQueryEditor;
+ string tableName = HostWindow.DatabaseInspector.RightClickedTableName;
+ DbModelInstance model = HostWindow.DatabaseInspector.DbSchema;
+
+ if (tableName != null && editor != null)
+ {
+ StringWriter sql = new StringWriter();
+ SqlWriter.WriteInsert(sql, GetTableOrViewByName(model, tableName));
+ editor.InsertText(sql.ToString());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateSelectCountStatementCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateSelectCountStatementCommand.cs
new file mode 100644
index 0000000..14efcf5
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateSelectCountStatementCommand.cs
@@ -0,0 +1,38 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.IO;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The generate select count statement command.</summary>
+ public class GenerateSelectCountStatementCommand : GenerateStatementCommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="GenerateSelectCountStatementCommand"/> class.</summary>
+ public GenerateSelectCountStatementCommand()
+ : base("Generate Select COUNT(*) Statement")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IQueryEditor editor = ActiveFormAsSqlQueryEditor;
+ string tableName = HostWindow.DatabaseInspector.RightClickedTableName;
+ DbModelInstance model = HostWindow.DatabaseInspector.DbSchema;
+
+ if (tableName != null && editor != null)
+ {
+ StringWriter sql = new StringWriter();
+ SqlWriter.WriteSelectCount(sql, GetTableOrViewByName(model, tableName));
+ editor.InsertText(sql.ToString());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateSelectStatementCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateSelectStatementCommand.cs
new file mode 100644
index 0000000..7265429
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateSelectStatementCommand.cs
@@ -0,0 +1,38 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.IO;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The generate select statement command.</summary>
+ public class GenerateSelectStatementCommand : GenerateStatementCommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="GenerateSelectStatementCommand"/> class.</summary>
+ public GenerateSelectStatementCommand()
+ : base("Generate Select Statement")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IQueryEditor editor = ActiveFormAsSqlQueryEditor;
+ string tableName = HostWindow.DatabaseInspector.RightClickedTableName;
+ DbModelInstance model = HostWindow.DatabaseInspector.DbSchema;
+
+ if (tableName != null && editor != null)
+ {
+ StringWriter sql = new StringWriter();
+ SqlWriter.WriteSelect(sql, GetTableOrViewByName(model, tableName));
+ editor.InsertText(sql.ToString());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateStatementCommandBase.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateStatementCommandBase.cs
new file mode 100644
index 0000000..1464746
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateStatementCommandBase.cs
@@ -0,0 +1,70 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core.Commands;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The generate statement command base.</summary>
+ public abstract class GenerateStatementCommandBase : CommandBase
+ {
+ /// <summary>The _sql writer.</summary>
+ private ISqlWriter _sqlWriter;
+
+ /// <summary>Initializes a new instance of the <see cref="GenerateStatementCommandBase"/> class.</summary>
+ /// <param name="name">The name.</param>
+ public GenerateStatementCommandBase(string name)
+ : base(name)
+ {
+ }
+
+ /// <summary>Gets SqlWriter.</summary>
+ protected ISqlWriter SqlWriter
+ {
+ get
+ {
+ if (_sqlWriter == null)
+ {
+ _sqlWriter = Services.Resolve<ISqlWriter>();
+ }
+
+ return _sqlWriter;
+ }
+ }
+
+ /// <summary>The get table or view by name.</summary>
+ /// <param name="model">The model.</param>
+ /// <param name="tableName">The table name.</param>
+ /// <returns></returns>
+ protected DbModelTable GetTableOrViewByName(DbModelInstance model, string tableName)
+ {
+ DbModelTable tableOrView = model.FindTable(tableName);
+ if (tableOrView == null)
+ {
+ // check the views
+ tableOrView = model.FindView(tableName);
+ }
+
+ return tableOrView;
+ }
+
+ /// <summary>The trim trailing comma.</summary>
+ /// <param name="sql">The sql.</param>
+ /// <returns>The trim trailing comma.</returns>
+ protected string TrimTrailingComma(string sql)
+ {
+ if (sql != null && sql.TrimEnd().EndsWith(","))
+ {
+ string tmp = sql.TrimEnd();
+ return tmp.Substring(0, tmp.Length - 1);
+ }
+
+ return sql;
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateUpdateStatementCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateUpdateStatementCommand.cs
new file mode 100644
index 0000000..2f90fe6
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/GenerateUpdateStatementCommand.cs
@@ -0,0 +1,38 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.IO;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The generate update statement command.</summary>
+ internal class GenerateUpdateStatementCommand : GenerateStatementCommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="GenerateUpdateStatementCommand"/> class.</summary>
+ public GenerateUpdateStatementCommand()
+ : base("Generate Update Statement")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IQueryEditor editor = ActiveFormAsSqlQueryEditor;
+ string tableName = HostWindow.DatabaseInspector.RightClickedTableName;
+ DbModelInstance model = HostWindow.DatabaseInspector.DbSchema;
+
+ if (tableName != null && editor != null)
+ {
+ StringWriter sql = new StringWriter();
+ SqlWriter.WriteUpdate(sql, GetTableOrViewByName(model, tableName));
+ editor.InsertText(sql.ToString());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/LocateFkReferenceColumnCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/LocateFkReferenceColumnCommand.cs
new file mode 100644
index 0000000..ec425e4
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/LocateFkReferenceColumnCommand.cs
@@ -0,0 +1,41 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The locate fk reference column command.</summary>
+ public class LocateFkReferenceColumnCommand : GenerateStatementCommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="LocateFkReferenceColumnCommand"/> class.</summary>
+ public LocateFkReferenceColumnCommand()
+ : base("Jump to FK column reference...")
+ {
+ }
+
+ /// <summary>Gets a value indicating whether Enabled.</summary>
+ public override bool Enabled
+ {
+ get
+ {
+ DbModelColumn column = HostWindow.DatabaseInspector.RightClickedModelObject as DbModelColumn;
+ return column != null && column.ForeignKeyReference != null;
+ }
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ DbModelColumn column = HostWindow.DatabaseInspector.RightClickedModelObject as DbModelColumn;
+ if (column != null && column.ForeignKeyReference != null)
+ {
+ HostWindow.DatabaseInspector.NavigateTo(column.ForeignKeyReference.ReferenceColumn);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/ShowDatabaseInspectorCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/ShowDatabaseInspectorCommand.cs
new file mode 100644
index 0000000..bdf1fd0
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/ShowDatabaseInspectorCommand.cs
@@ -0,0 +1,34 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The show database inspector command.</summary>
+ public class ShowDatabaseInspectorCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ShowDatabaseInspectorCommand"/> class.</summary>
+ public ShowDatabaseInspectorCommand()
+ : base("Show Database Inspector")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ DockContent databaseInspector = Services.Resolve<IDatabaseInspector>() as DockContent;
+ if (databaseInspector != null)
+ {
+ HostWindow.ShowDatabaseInspector(databaseInspector as IDatabaseInspector, DockState.DockLeft);
+ databaseInspector.Activate();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/ShowFindObjectFormCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/ShowFindObjectFormCommand.cs
new file mode 100644
index 0000000..079ffe4
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/ShowFindObjectFormCommand.cs
@@ -0,0 +1,47 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The show find object form command.</summary>
+ public class ShowFindObjectFormCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ShowFindObjectFormCommand"/> class.</summary>
+ public ShowFindObjectFormCommand()
+ : base("Find Object...")
+ {
+ ShortcutKeys = Keys.Alt | Keys.F;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ using (var frm = Services.Resolve<FindObjectForm>())
+ {
+ frm.ShowDialog(HostWindow.Instance);
+
+ var selectedTableName = frm.SelectedObjectName;
+ if (frm.DialogResult == DialogResult.OK && !String.IsNullOrEmpty(selectedTableName))
+ {
+ // Special case for handling schemas - We want the search without the [dbo].[foo] part
+ // but the FindTableOrView expects it....
+ var parts = selectedTableName.Split('.').Select(s => "[" + s + "]").ToArray();
+ var name = String.Join(".", parts);
+
+ IDbModelNamedObject obj = HostWindow.DatabaseInspector.DbSchema.FindTableOrView(name);
+ HostWindow.DatabaseInspector.NavigateTo(obj);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/TruncateTableCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/TruncateTableCommand.cs
new file mode 100644
index 0000000..373535d
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/Commands/TruncateTableCommand.cs
@@ -0,0 +1,69 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Data;
+using System.Data.Common;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector.Commands
+{
+ /// <summary>The truncate table command.</summary>
+ public class TruncateTableCommand : GenerateStatementCommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="TruncateTableCommand"/> class.</summary>
+ public TruncateTableCommand()
+ : base("Truncate Table")
+ {
+ SmallImage = ImageResource.table_delete;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IHostWindow hostWindow = Services.HostWindow;
+ string tableName = hostWindow.DatabaseInspector.RightClickedTableName;
+
+ string caption = string.Format("Truncate '{0}' Table Confirmation", tableName);
+ string msg = string.Format("Delete all '{0}' data, are you sure?", tableName);
+ if (tableName != null && MessageBox.Show(msg, caption, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
+ {
+ DbConnection dbConnection;
+ DbCommand cmd = null;
+
+ try
+ {
+ hostWindow.SetPointerState(Cursors.WaitCursor);
+ dbConnection = Settings.GetOpenConnection();
+ cmd = dbConnection.CreateCommand();
+ cmd.CommandText = "DELETE FROM " + tableName;
+ cmd.CommandType = CommandType.Text;
+ cmd.ExecuteNonQuery();
+ Services.PostMessage(SystemMessage.TableTruncated, tableName);
+ }
+ catch (DbException dbExp)
+ {
+ hostWindow.DisplaySimpleMessageBox(null, dbExp.Message, "Error");
+ }
+ catch (InvalidOperationException invalidExp)
+ {
+ hostWindow.DisplaySimpleMessageBox(null, invalidExp.Message, "Error");
+ }
+ finally
+ {
+ if (cmd != null)
+ {
+ cmd.Dispose();
+ }
+
+ hostWindow.SetPointerState(Cursors.Default);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.cs
new file mode 100644
index 0000000..6a845c3
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.cs
@@ -0,0 +1,553 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.IO;
+using System.Media;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+using MiniSqlQuery.Properties;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector
+{
+ /// <summary>The database inspector form.</summary>
+ public partial class DatabaseInspectorForm : DockContent, IDatabaseInspector
+ {
+ /// <summary>The root tag.</summary>
+ private static readonly object RootTag = new object();
+
+ /// <summary>The tables tag.</summary>
+ private static readonly object TablesTag = new object();
+
+ /// <summary>The views tag.</summary>
+ private static readonly object ViewsTag = new object();
+
+ /// <summary>The _host window.</summary>
+ private readonly IHostWindow _hostWindow;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _meta data service.</summary>
+ private IDatabaseSchemaService _metaDataService;
+
+ /// <summary>The _model.</summary>
+ private DbModelInstance _model;
+
+ /// <summary>The _populated.</summary>
+ private bool _populated;
+
+ /// <summary>The _right clicked model object.</summary>
+ private IDbModelNamedObject _rightClickedModelObject;
+
+ /// <summary>The _right clicked node.</summary>
+ private TreeNode _rightClickedNode;
+
+ /// <summary>The _sql writer.</summary>
+ private ISqlWriter _sqlWriter;
+
+ /// <summary>The _tables node.</summary>
+ private TreeNode _tablesNode;
+
+ /// <summary>The _views node.</summary>
+ private TreeNode _viewsNode;
+
+ /// <summary>Initializes a new instance of the <see cref="DatabaseInspectorForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="hostWindow">The host window.</param>
+ public DatabaseInspectorForm(IApplicationServices services, IHostWindow hostWindow)
+ {
+ InitializeComponent();
+ BuildImageList();
+
+ DatabaseTreeView.Nodes.Clear();
+ TreeNode root = CreateRootNodes();
+ root.Nodes.Add("Loading problem - check connection details and reset...");
+ DatabaseTreeView.Nodes.Add(root);
+
+ _services = services;
+ _hostWindow = hostWindow;
+
+ _services.Settings.DatabaseConnectionReset += Settings_DatabaseConnectionReset;
+ }
+
+ /// <summary>Gets ColumnMenu.</summary>
+ public ContextMenuStrip ColumnMenu
+ {
+ get { return ColumnNameContextMenuStrip; }
+ }
+
+ /// <summary>Gets DbSchema.</summary>
+ public DbModelInstance DbSchema
+ {
+ get { return _model; }
+ }
+
+ /// <summary>Gets RightClickedModelObject.</summary>
+ public IDbModelNamedObject RightClickedModelObject
+ {
+ get { return _rightClickedModelObject; }
+ }
+
+ /// <summary>Gets RightClickedTableName.</summary>
+ public string RightClickedTableName
+ {
+ get
+ {
+ if (_rightClickedNode == null)
+ {
+ return null;
+ }
+
+ return _rightClickedNode.Text;
+ }
+ }
+
+ /// <summary>Gets TableMenu.</summary>
+ public ContextMenuStrip TableMenu
+ {
+ get { return TableNodeContextMenuStrip; }
+ }
+
+ /// <summary>The load database details.</summary>
+ public void LoadDatabaseDetails()
+ {
+ ExecLoadDatabaseDetails();
+ }
+
+ /// <summary>The navigate to.</summary>
+ /// <param name="modelObject">The model object.</param>
+ public void NavigateTo(IDbModelNamedObject modelObject)
+ {
+ if (modelObject == null)
+ {
+ return;
+ }
+
+ // todo - ensure expanded
+
+ switch (modelObject.ObjectType)
+ {
+ case ObjectTypes.Table:
+ foreach (TreeNode treeNode in _tablesNode.Nodes)
+ {
+ IDbModelNamedObject obj = treeNode.Tag as IDbModelNamedObject;
+ if (obj != null && modelObject == obj)
+ {
+ SelectNode(treeNode);
+ }
+ }
+
+ break;
+ case ObjectTypes.View:
+ foreach (TreeNode treeNode in _viewsNode.Nodes)
+ {
+ IDbModelNamedObject obj = treeNode.Tag as IDbModelNamedObject;
+ if (obj != null && modelObject == obj)
+ {
+ SelectNode(treeNode);
+ }
+ }
+
+ break;
+ case ObjectTypes.Column:
+ DbModelColumn modelColumn = modelObject as DbModelColumn;
+ if (modelColumn != null)
+ {
+ foreach (TreeNode treeNode in _tablesNode.Nodes)
+ {
+ // only look in the tables nodw for FK refs
+ DbModelTable modelTable = treeNode.Tag as DbModelTable;
+ if (modelTable != null && modelTable == modelColumn.ParentTable)
+ {
+ // now find the column in the child nodes
+ foreach (TreeNode columnNode in treeNode.Nodes)
+ {
+ DbModelColumn modelReferingColumn = columnNode.Tag as DbModelColumn;
+ if (modelReferingColumn != null && modelReferingColumn == modelColumn)
+ {
+ SelectNode(columnNode);
+ }
+ }
+ }
+ }
+ }
+
+ break;
+ }
+ }
+
+ /// <summary>The build image key.</summary>
+ /// <param name="column">The column.</param>
+ /// <returns>The build image key.</returns>
+ private string BuildImageKey(DbModelColumn column)
+ {
+ string imageKey = column.ObjectType;
+ if (column.IsRowVersion)
+ {
+ imageKey += "-RowVersion";
+ }
+ else
+ {
+ if (column.IsKey)
+ {
+ imageKey += "-PK";
+ }
+
+ if (column.ForeignKeyReference != null)
+ {
+ imageKey += "-FK";
+ }
+ }
+
+ return imageKey;
+ }
+
+ /// <summary>Builds the image list.
+ /// It's nicer to hadle image lists this way, easier to update etc</summary>
+ private void BuildImageList()
+ {
+ InspectorImageList.Images.Add("Table", ImageResource.table);
+ InspectorImageList.Images.Add("Database", ImageResource.database);
+ InspectorImageList.Images.Add("Column", ImageResource.column);
+ InspectorImageList.Images.Add("Tables", ImageResource.table_multiple);
+ InspectorImageList.Images.Add("Views", ImageResource.view_multiple);
+ InspectorImageList.Images.Add("View", ImageResource.view);
+ InspectorImageList.Images.Add("Column-PK", ImageResource.key);
+ InspectorImageList.Images.Add("Column-FK", ImageResource.key_go_disabled);
+ InspectorImageList.Images.Add("Column-PK-FK", ImageResource.key_go);
+ InspectorImageList.Images.Add("Column-RowVersion", ImageResource.column_row_version);
+ }
+
+ /// <summary>The build tool tip.</summary>
+ /// <param name="table">The table.</param>
+ /// <param name="column">The column.</param>
+ /// <returns>The build tool tip.</returns>
+ private string BuildToolTip(DbModelTable table, DbModelColumn column)
+ {
+ string friendlyColumnName = Utility.MakeSqlFriendly(column.Name);
+ string toolTip = table.FullName + "." + friendlyColumnName;
+ if (column.IsKey)
+ {
+ toolTip += "; Primary Key";
+ }
+
+ if (column.IsAutoIncrement)
+ {
+ toolTip += "; Auto*";
+ }
+
+ if (column.ForeignKeyReference != null)
+ {
+ toolTip += string.Format("; FK -> {0}.{1}", column.ForeignKeyReference.ReferenceTable.FullName, column.ForeignKeyReference.ReferenceColumn.Name);
+ }
+
+ if (column.IsReadOnly)
+ {
+ toolTip += "; Read Only";
+ }
+
+ return toolTip;
+ }
+
+ /// <summary>The build tree from db model.</summary>
+ /// <param name="connection">The connection.</param>
+ private void BuildTreeFromDbModel(string connection)
+ {
+ DatabaseTreeView.Nodes.Clear();
+ TreeNode root = CreateRootNodes();
+ root.ToolTipText = connection;
+
+ if (_model.Tables != null)
+ {
+ foreach (DbModelTable table in _model.Tables)
+ {
+ CreateTreeNodes(table);
+ }
+ }
+
+ if (_model.Views != null)
+ {
+ foreach (DbModelView view in _model.Views)
+ {
+ CreateTreeNodes(view);
+ }
+ }
+
+ DatabaseTreeView.Nodes.Add(root);
+ }
+
+ /// <summary>The create root nodes.</summary>
+ /// <returns></returns>
+ private TreeNode CreateRootNodes()
+ {
+ TreeNode root = new TreeNode(Resources.Database);
+ root.ImageKey = "Database";
+ root.SelectedImageKey = "Database";
+ root.ContextMenuStrip = InspectorContextMenuStrip;
+ root.Tag = RootTag;
+
+ _tablesNode = new TreeNode(Resources.Tables);
+ _tablesNode.ImageKey = "Tables";
+ _tablesNode.SelectedImageKey = "Tables";
+ _tablesNode.Tag = TablesTag;
+
+ _viewsNode = new TreeNode(Resources.Views);
+ _viewsNode.ImageKey = "Views";
+ _viewsNode.SelectedImageKey = "Views";
+ _viewsNode.Tag = ViewsTag;
+
+ root.Nodes.Add(_tablesNode);
+ root.Nodes.Add(_viewsNode);
+
+ return root;
+ }
+
+ /// <summary>The create tree nodes.</summary>
+ /// <param name="table">The table.</param>
+ private void CreateTreeNodes(DbModelTable table)
+ {
+ TreeNode tableNode = new TreeNode(table.FullName);
+ tableNode.Name = table.FullName;
+ tableNode.ImageKey = table.ObjectType;
+ tableNode.SelectedImageKey = table.ObjectType;
+ tableNode.ContextMenuStrip = TableNodeContextMenuStrip;
+ tableNode.Tag = table;
+
+ foreach (DbModelColumn column in table.Columns)
+ {
+ string friendlyColumnName = Utility.MakeSqlFriendly(column.Name);
+ TreeNode columnNode = new TreeNode(friendlyColumnName);
+ columnNode.Name = column.Name;
+ string imageKey = BuildImageKey(column);
+ columnNode.ImageKey = imageKey;
+ columnNode.SelectedImageKey = imageKey;
+ columnNode.ContextMenuStrip = ColumnNameContextMenuStrip;
+ columnNode.Tag = column;
+ columnNode.Text = GetSummary(column);
+ string toolTip = BuildToolTip(table, column);
+ columnNode.ToolTipText = toolTip;
+ tableNode.Nodes.Add(columnNode);
+ }
+
+ switch (table.ObjectType)
+ {
+ case ObjectTypes.Table:
+ _tablesNode.Nodes.Add(tableNode);
+ break;
+ case ObjectTypes.View:
+ _viewsNode.Nodes.Add(tableNode);
+ break;
+ }
+ }
+
+ /// <summary>The database inspector form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DatabaseInspectorForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (e.CloseReason == CloseReason.UserClosing)
+ {
+ Hide();
+ e.Cancel = true;
+ }
+ }
+
+
+ /// <summary>The database inspector form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DatabaseInspectorForm_Load(object sender, EventArgs e)
+ {
+ }
+
+ /// <summary>The database tree view_ before expand.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DatabaseTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e)
+ {
+ TreeNode node = e.Node;
+
+ if (node != null && node.Tag == RootTag && !_populated)
+ {
+ _populated = true;
+ bool ok = ExecLoadDatabaseDetails();
+
+ if (ok && DatabaseTreeView.Nodes.Count > 0)
+ {
+ DatabaseTreeView.Nodes[0].Expand();
+ }
+ else
+ {
+ e.Cancel = true;
+ }
+ }
+ }
+
+ /// <summary>The database tree view_ node mouse click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DatabaseTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
+ {
+ TreeNode node = e.Node;
+ if (e.Button == MouseButtons.Right)
+ {
+ IDbModelNamedObject namedObject = node.Tag as IDbModelNamedObject;
+ _rightClickedModelObject = namedObject;
+
+ if (namedObject != null &&
+ (namedObject.ObjectType == ObjectTypes.Table || namedObject.ObjectType == ObjectTypes.View))
+ {
+ _rightClickedNode = node;
+ }
+ else
+ {
+ _rightClickedNode = null;
+ }
+ }
+ }
+
+ /// <summary>The database tree view_ node mouse double click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DatabaseTreeView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
+ {
+ TreeNode node = e.Node;
+ if (e.Button == MouseButtons.Left)
+ {
+ IDbModelNamedObject namedObject = node.Tag as IDbModelNamedObject;
+ if (namedObject != null)
+ {
+ SetText(namedObject.FullName);
+ }
+ }
+ }
+
+ /// <summary>The exec load database details.</summary>
+ /// <returns>The exec load database details.</returns>
+ private bool ExecLoadDatabaseDetails()
+ {
+ bool populate = false;
+ string connection = string.Empty;
+ bool success = false;
+
+ try
+ {
+ _hostWindow.SetPointerState(Cursors.WaitCursor);
+ if (_metaDataService == null)
+ {
+ _metaDataService = DatabaseMetaDataService.Create(_services.Settings.ConnectionDefinition.ProviderName);
+ }
+
+ connection = _metaDataService.GetDescription();
+ populate = true;
+ }
+ catch (Exception exp)
+ {
+ string msg = string.Format(
+ "{0}\r\n\r\nCheck the connection and select 'Refresh Database Connection'.",
+ exp.Message);
+ _hostWindow.DisplaySimpleMessageBox(_hostWindow.Instance, msg, "DB Connection Error");
+ _hostWindow.SetStatus(this, exp.Message);
+ }
+ finally
+ {
+ _hostWindow.SetPointerState(Cursors.Default);
+ }
+
+ if (populate)
+ {
+ try
+ {
+ _hostWindow.SetPointerState(Cursors.WaitCursor);
+ _model = _metaDataService.GetDbObjectModel(_services.Settings.ConnectionDefinition.ConnectionString);
+ }
+ finally
+ {
+ _hostWindow.SetPointerState(Cursors.Default);
+ }
+
+ BuildTreeFromDbModel(connection);
+ _hostWindow.SetStatus(this, string.Empty);
+ success = true;
+ }
+ else
+ {
+ _populated = false;
+ DatabaseTreeView.CollapseAll();
+ }
+
+ return success;
+ }
+
+ /// <summary>The get summary.</summary>
+ /// <param name="column">The column.</param>
+ /// <returns>The get summary.</returns>
+ private string GetSummary(DbModelColumn column)
+ {
+ StringWriter stringWriter = new StringWriter();
+ if (_sqlWriter == null)
+ {
+ _sqlWriter = _services.Resolve<ISqlWriter>();
+ }
+
+ _sqlWriter.WriteSummary(stringWriter, column);
+ return stringWriter.ToString();
+ }
+
+ /// <summary>The select node.</summary>
+ /// <param name="treeNode">The tree node.</param>
+ private void SelectNode(TreeNode treeNode)
+ {
+ if (treeNode.Parent != null)
+ {
+ treeNode.Parent.EnsureVisible();
+ }
+
+ treeNode.EnsureVisible();
+ DatabaseTreeView.SelectedNode = treeNode;
+ treeNode.Expand();
+ DatabaseTreeView.Focus();
+ }
+
+ /// <summary>The set text.</summary>
+ /// <param name="text">The text.</param>
+ private void SetText(string text)
+ {
+ IQueryEditor editor = _hostWindow.ActiveChildForm as IQueryEditor;
+
+ if (editor != null)
+ {
+ editor.InsertText(text);
+ }
+ else
+ {
+ SystemSounds.Beep.Play();
+ }
+ }
+
+ /// <summary>The settings_ database connection reset.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void Settings_DatabaseConnectionReset(object sender, EventArgs e)
+ {
+ _metaDataService = null;
+ _sqlWriter = null;
+ ExecLoadDatabaseDetails();
+ }
+
+ /// <summary>The load tool strip menu item_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void loadToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ LoadDatabaseDetails();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.Designer.cs
new file mode 100644
index 0000000..6fa0653
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.Designer.cs
@@ -0,0 +1,120 @@
+namespace MiniSqlQuery.PlugIns.DatabaseInspector
+{
+ partial class DatabaseInspectorForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DatabaseInspectorForm));
+ this.InspectorContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.InspectorImageList = new System.Windows.Forms.ImageList(this.components);
+ this.TableNodeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.DatabaseTreeView = new System.Windows.Forms.TreeView();
+ this.ColumnNameContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.InspectorContextMenuStrip.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // InspectorContextMenuStrip
+ //
+ this.InspectorContextMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
+ this.InspectorContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.loadToolStripMenuItem});
+ this.InspectorContextMenuStrip.Name = "InspectorContextMenuStrip";
+ this.InspectorContextMenuStrip.Size = new System.Drawing.Size(196, 28);
+ //
+ // loadToolStripMenuItem
+ //
+ this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
+ this.loadToolStripMenuItem.Size = new System.Drawing.Size(195, 24);
+ this.loadToolStripMenuItem.Text = "&Load Meta-Data";
+ this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
+ //
+ // InspectorImageList
+ //
+ this.InspectorImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.InspectorImageList.ImageSize = new System.Drawing.Size(16, 16);
+ this.InspectorImageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
+ // TableNodeContextMenuStrip
+ //
+ this.TableNodeContextMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
+ this.TableNodeContextMenuStrip.Name = "TableNodeContextMenuStrip";
+ this.TableNodeContextMenuStrip.Size = new System.Drawing.Size(61, 4);
+ //
+ // DatabaseTreeView
+ //
+ this.DatabaseTreeView.ContextMenuStrip = this.InspectorContextMenuStrip;
+ this.DatabaseTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.DatabaseTreeView.ImageIndex = 0;
+ this.DatabaseTreeView.ImageList = this.InspectorImageList;
+ this.DatabaseTreeView.Location = new System.Drawing.Point(0, 0);
+ this.DatabaseTreeView.Name = "DatabaseTreeView";
+ this.DatabaseTreeView.SelectedImageIndex = 0;
+ this.DatabaseTreeView.ShowNodeToolTips = true;
+ this.DatabaseTreeView.Size = new System.Drawing.Size(478, 465);
+ this.DatabaseTreeView.TabIndex = 2;
+ this.DatabaseTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.DatabaseTreeView_BeforeExpand);
+ this.DatabaseTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DatabaseTreeView_NodeMouseClick);
+ this.DatabaseTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DatabaseTreeView_NodeMouseDoubleClick);
+ //
+ // ColumnNameContextMenuStrip
+ //
+ this.ColumnNameContextMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
+ this.ColumnNameContextMenuStrip.Name = "ColumnNameContextMenuStrip";
+ this.ColumnNameContextMenuStrip.Size = new System.Drawing.Size(61, 4);
+ //
+ // DatabaseInspectorForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(478, 465);
+ this.Controls.Add(this.DatabaseTreeView);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "DatabaseInspectorForm";
+ this.TabText = "DB Inspector";
+ this.Text = "Database Inspector";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DatabaseInspectorForm_FormClosing);
+ this.Load += new System.EventHandler(this.DatabaseInspectorForm_Load);
+ this.InspectorContextMenuStrip.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ContextMenuStrip InspectorContextMenuStrip;
+ private System.Windows.Forms.ContextMenuStrip TableNodeContextMenuStrip;
+ private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
+ private System.Windows.Forms.ImageList InspectorImageList;
+ private System.Windows.Forms.TreeView DatabaseTreeView;
+ private System.Windows.Forms.ContextMenuStrip ColumnNameContextMenuStrip;
+
+
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.resx
new file mode 100644
index 0000000..6f7034b
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorForm.resx
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="InspectorContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>19, 20</value>
+ </metadata>
+ <metadata name="InspectorImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>610, 20</value>
+ </metadata>
+ <metadata name="TableNodeContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>210, 20</value>
+ </metadata>
+ <metadata name="ColumnNameContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>403, 20</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAA////AMOEUgC4uLgAdr58AN+qggDb29sAmpWRAOrHrQCLy5MA0ZdqALannAD27eYAysrKANK7
+ qQDnt5MA69O/AKKiogDw4tgArKysAMiNXwDXoXUA+/byAOTk5ACCxokA0dHRANvCrQDw8PAA2KyKAOrq
+ 6gCysrIAmpqaAOrNtQDksowAzpJjAPr6+gDW1tYAp6enAMXFxQDj3tsA8+feAOnDpgDcpX0Ar6ScAOPH
+ sACTk5MA+PLtAH7DhADUm28A9PT0AJ6engDIilkAh8mOAKSgnAB6wYAA69C6AOKviADt7e0AtbW1APTq
+ 4gDGhlUAxYpdANaecgDZpHoA8eXbAPfw6gDmtZAA6cmwAMuPXwD4+PgA9vb2APLy8gDi4uIA2dnZAKWl
+ pQDPz88Arq6uAMjIyADdqH4A4KyEAOvRvQD58+8A05luAKurqgDoyK4AxIZUAPv39ADJilsAxoxfANGW
+ aADdqYAA6s63AOrMswDozLUA6MesAPv7+wD5+fkAx4dWAPPz8wDx8fEA7+/vAOzs7ADX19cAqKioANXV
+ 1QDQ0NAAsbGxAMvLywC0tLQAtra2ALe3twDGxsYAxopcAMuOXgD38esAzpNkANegdADao3oA69K+AOrP
+ ugDpya4A6MiwAPnz7gDy594A8eTbAKurqwDr0LsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAA+UlkicVdhAgICAgICAAAAFS5BDDsofBISEhISEj0AAD96dgEQAQEBCAEBARJYAABOUTd+
+ fn5+UCAgICAScAAABVFbAX4BAQF3FgEBEhQAABwnDhosXFxbXl55VBJVAAArUzUlC2IBAV4BAQFAPABr
+ HRtHZQ0HeENeQ3ldezMTI2ZIDUsBLQEBXgEBAXJETEUZZSZvAR8pKSkpKSlWc2pFaGRrawEyAQEBAQEB
+ VgpsRQZkaWkBEQk0GC82BFYwbUdJF0hNY0pWVlZWVlZWdANGMWBfRkZnD0IhOE9aKnUAJDlgXxtJfQAA
+ AAAAAAAAAAAAbjoeAAAAAAAAAAAAAMABAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAACAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAgP8AAOP/AAA=
+</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorLoader.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorLoader.cs
new file mode 100644
index 0000000..e3c5b0c
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/DatabaseInspectorLoader.cs
@@ -0,0 +1,53 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.PlugIns.DatabaseInspector.Commands;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector
+{
+ /// <summary>The database inspector loader.</summary>
+ public class DatabaseInspectorLoader : PluginLoaderBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="DatabaseInspectorLoader"/> class.</summary>
+ public DatabaseInspectorLoader()
+ : base(
+ "Database Inspector",
+ "A Mini SQL Query Plugin for displaying the database schema in a tree view",
+ 20)
+ {
+ }
+
+ /// <summary>Iinitialize the plug in.</summary>
+ public override void InitializePlugIn()
+ {
+ Services.RegisterSingletonComponent<IDatabaseInspector, DatabaseInspectorForm>("DatabaseInspector");
+ Services.RegisterComponent<FindObjectForm>("FindObjectForm");
+
+ IHostWindow hostWindow = Services.HostWindow;
+ hostWindow.AddPluginCommand<ShowDatabaseInspectorCommand>();
+ CommandManager.GetCommandInstance<ShowDatabaseInspectorCommand>().Execute();
+
+ ToolStripMenuItem editMenu = hostWindow.GetMenuItem("edit");
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ShowFindObjectFormCommand>());
+
+ hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<GenerateSelectStatementCommand>());
+ hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<GenerateSelectCountStatementCommand>());
+ hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<GenerateInsertStatementCommand>());
+ hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<GenerateUpdateStatementCommand>());
+ hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<GenerateDeleteStatementCommand>());
+ hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CopyTableNameCommand>());
+ hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<TruncateTableCommand>());
+
+ hostWindow.DatabaseInspector.ColumnMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<LocateFkReferenceColumnCommand>());
+
+ // todo: bug - the opening event is not firing....
+ CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(hostWindow.DatabaseInspector.ColumnMenu);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.cs
new file mode 100644
index 0000000..1529d11
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.cs
@@ -0,0 +1,203 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.DatabaseInspector
+{
+ /// <summary>The find object form.</summary>
+ public partial class FindObjectForm : Form
+ {
+ /// <summary>The _database inspector.</summary>
+ private readonly IDatabaseInspector _databaseInspector;
+
+ private readonly List<string> _items = new List<string>();
+ private string _selectedItem;
+
+ /// <summary>Initializes a new instance of the <see cref="FindObjectForm"/> class.</summary>
+ /// <param name="databaseInspector">The database inspector.</param>
+ public FindObjectForm(IDatabaseInspector databaseInspector)
+ {
+ _databaseInspector = databaseInspector;
+ InitializeComponent();
+ }
+
+ /// <summary>Gets the Selected Table Name.</summary>
+ [Obsolete]
+ public string SelectedTableName
+ {
+ get { return _selectedItem; }
+ }
+
+ /// <summary>Gets the Selected Object Name.</summary>
+ public string SelectedObjectName
+ {
+ get { return _selectedItem; }
+ }
+
+ /// <summary>Check the keys, escape to exit, enter to select. If up or down are pressed move the list item.</summary>
+ /// <param name="msg">The windows message.</param>
+ /// <param name="keyData">The key data.</param>
+ /// <returns>The process command key result.</returns>
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ switch (keyData)
+ {
+ case Keys.Escape:
+ DialogResult = DialogResult.Cancel;
+ Close();
+ break;
+
+ case Keys.Enter:
+ Done();
+ break;
+
+ case Keys.Up:
+ MoveSelectionUp();
+ return true;
+
+ case Keys.Down:
+ MoveSelectionDown();
+ return true;
+ }
+
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
+
+ private void FindObjectForm_Load(object sender, EventArgs e)
+ {
+ }
+
+ private void FindObjectForm_Shown(object sender, EventArgs e)
+ {
+ _items.Clear();
+
+ try
+ {
+ UseWaitCursor = true;
+
+ if (_databaseInspector.DbSchema == null)
+ {
+ _databaseInspector.LoadDatabaseDetails();
+
+ // And if it is still null (e.g. connection error) then bail out:
+ if (_databaseInspector.DbSchema == null)
+ {
+ return;
+ }
+ }
+
+ foreach (DbModelTable table in _databaseInspector.DbSchema.Tables)
+ {
+ var name = table.Schema;
+ if (!String.IsNullOrEmpty(name))
+ {
+ name += ".";
+ }
+ name += table.Name;
+
+ _items.Add(name);
+ }
+
+ foreach (DbModelView view in _databaseInspector.DbSchema.Views)
+ {
+ _items.Add(view.FullName);
+ }
+ }
+ finally
+ {
+ UseWaitCursor = false;
+ }
+
+ lstItems.DataSource = _items;
+ txtSearchPattern.Focus();
+ }
+
+ private void lstItems_DoubleClick(object sender, EventArgs e)
+ {
+ Done();
+ }
+
+ private void txtSearchPattern_TextChanged(object sender, EventArgs e)
+ {
+ if (_items != null)
+ {
+ var searchValue = txtSearchPattern.Text.ToLowerInvariant();
+ var dataSource = _items.Where(objectName =>
+ {
+ objectName = objectName ?? String.Empty;
+ objectName = objectName.ToLowerInvariant();
+ return objectName.Contains(searchValue);
+ }).ToList();
+ Debug.WriteLine(string.Format("search '{0}' yields {1}...", searchValue, dataSource.Count));
+
+ lstItems.DataSource = dataSource;
+ }
+ else
+ {
+ lstItems.DataSource = null;
+ }
+
+ SetSelectedName();
+ }
+
+ /// <summary>
+ /// If there is a valid selection remember it.
+ /// </summary>
+ private void SetSelectedName()
+ {
+ _selectedItem = String.Empty;
+
+ if (lstItems.SelectedItem != null)
+ {
+ _selectedItem = lstItems.SelectedItem.ToString();
+ }
+ }
+
+ /// <summary>
+ /// Move the list selection up one if we can.
+ /// </summary>
+ private void MoveSelectionUp()
+ {
+ if (lstItems.SelectedIndex < 1)
+ {
+ return;
+ }
+ lstItems.SelectedIndex--;
+ }
+
+ /// <summary>
+ /// Move the list selection down one if we can.
+ /// </summary>
+ private void MoveSelectionDown()
+ {
+ var maxIndex = lstItems.Items.Count - 1;
+ if (lstItems.SelectedIndex >= maxIndex)
+ {
+ return;
+ }
+ lstItems.SelectedIndex++;
+ }
+
+ /// <summary>
+ /// Set the selected item and close the form.
+ /// </summary>
+ private void Done()
+ {
+ SetSelectedName();
+ DialogResult = DialogResult.OK;
+ Close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.Designer.cs
new file mode 100644
index 0000000..bc01518
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.Designer.cs
@@ -0,0 +1,82 @@
+namespace MiniSqlQuery.PlugIns.DatabaseInspector
+{
+ partial class FindObjectForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.txtSearchPattern = new System.Windows.Forms.TextBox();
+ this.lstItems = new System.Windows.Forms.ListBox();
+ this.SuspendLayout();
+ //
+ // txtSearchPattern
+ //
+ this.txtSearchPattern.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtSearchPattern.Location = new System.Drawing.Point(12, 12);
+ this.txtSearchPattern.Name = "txtSearchPattern";
+ this.txtSearchPattern.Size = new System.Drawing.Size(553, 22);
+ this.txtSearchPattern.TabIndex = 2;
+ this.txtSearchPattern.TextChanged += new System.EventHandler(this.txtSearchPattern_TextChanged);
+ //
+ // lstItems
+ //
+ this.lstItems.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.lstItems.FormattingEnabled = true;
+ this.lstItems.ItemHeight = 16;
+ this.lstItems.Location = new System.Drawing.Point(12, 38);
+ this.lstItems.Name = "lstItems";
+ this.lstItems.Size = new System.Drawing.Size(553, 244);
+ this.lstItems.TabIndex = 3;
+ this.lstItems.DoubleClick += new System.EventHandler(this.lstItems_DoubleClick);
+ //
+ // FindObjectForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(577, 295);
+ this.Controls.Add(this.lstItems);
+ this.Controls.Add(this.txtSearchPattern);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Margin = new System.Windows.Forms.Padding(4);
+ this.Name = "FindObjectForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Find Object";
+ this.Load += new System.EventHandler(this.FindObjectForm_Load);
+ this.Shown += new System.EventHandler(this.FindObjectForm_Shown);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox txtSearchPattern;
+ private System.Windows.Forms.ListBox lstItems;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.resx
new file mode 100644
index 0000000..19dc0dd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/DatabaseInspector/FindObjectForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/FindNextStringCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/FindNextStringCommand.cs
new file mode 100644
index 0000000..b972cff
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/FindNextStringCommand.cs
@@ -0,0 +1,75 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.SearchTools.Commands
+{
+ /// <summary>The find next string command.</summary>
+ public class FindNextStringCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="FindNextStringCommand"/> class.</summary>
+ public FindNextStringCommand() : base("Find Next String")
+ {
+ SmallImage = ImageResource.find;
+ ShortcutKeys = Keys.F3;
+ }
+
+ /// <summary>Two execution methods - through the "Find Text" window or by hitting F3.
+ /// If simply hitting F3, we are executing the current search from current cursor position for this window.
+ /// Different windows can also have different search text.</summary>
+ public override void Execute()
+ {
+ IFindReplaceProvider editorFindProvider = HostWindow.ActiveChildForm as IFindReplaceProvider;
+
+ if (editorFindProvider != null)
+ {
+ FindTextRequest findTextRequest = null;
+ int key = editorFindProvider.GetHashCode();
+
+ // is there a request in the table for this window?
+ if (SearchToolsCommon.FindReplaceTextRequests.ContainsKey(key))
+ {
+ findTextRequest = SearchToolsCommon.FindReplaceTextRequests[key];
+ }
+ else
+ {
+ if (SearchToolsCommon.FindReplaceTextRequests.Count > 0)
+ {
+ // if there is an entry in the list of searches create an instance
+ findTextRequest = new FindTextRequest(editorFindProvider);
+ findTextRequest.Position = editorFindProvider.CursorOffset;
+ }
+ else
+ {
+ // none in table, default to curently selected text if its the editor
+ IEditor editor = ActiveFormAsEditor;
+ if (editor != null && editor.SelectedText.Length > 0)
+ {
+ findTextRequest = new FindTextRequest(editorFindProvider, editor.SelectedText);
+ findTextRequest.Position = editorFindProvider.CursorOffset;
+ }
+ }
+ }
+
+ if (findTextRequest != null)
+ {
+ // wrap around to start if at last pos
+ if (findTextRequest.Position != 0)
+ {
+ findTextRequest.Position = editorFindProvider.CursorOffset;
+ }
+
+ findTextRequest = editorFindProvider.TextFindService.FindNext(findTextRequest);
+ SearchToolsCommon.FindReplaceTextRequests[key] = findTextRequest;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ReplaceStringCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ReplaceStringCommand.cs
new file mode 100644
index 0000000..a7c38de
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ReplaceStringCommand.cs
@@ -0,0 +1,54 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.SearchTools.Commands
+{
+ /// <summary>The replace string command.</summary>
+ public class ReplaceStringCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ReplaceStringCommand"/> class.</summary>
+ public ReplaceStringCommand()
+ : base("Replace String")
+ {
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IFindReplaceProvider editorFindProvider = HostWindow.ActiveChildForm as IFindReplaceProvider;
+
+ if (editorFindProvider != null)
+ {
+ FindTextRequest req = null;
+ int key = editorFindProvider.GetHashCode();
+
+ // is there a request in the table for this window?
+ if (SearchToolsCommon.FindReplaceTextRequests.ContainsKey(key))
+ {
+ req = SearchToolsCommon.FindReplaceTextRequests[key];
+ }
+
+ if (req != null)
+ {
+ // wrap around to start if at last pos
+ if (req.Position != 0)
+ {
+ req.Position = editorFindProvider.CursorOffset;
+ }
+
+ if (editorFindProvider.ReplaceString(req.ReplaceValue, req.Position - req.SearchValue.Length, req.SearchValue.Length))
+ {
+ CommandManager.GetCommandInstance<FindNextStringCommand>().Execute();
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ShowFindTextFormCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ShowFindTextFormCommand.cs
new file mode 100644
index 0000000..f27c357
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ShowFindTextFormCommand.cs
@@ -0,0 +1,64 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.SearchTools.Commands
+{
+ /// <summary>The show find text form command.</summary>
+ public class ShowFindTextFormCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ShowFindTextFormCommand"/> class.</summary>
+ public ShowFindTextFormCommand()
+ : base("&Find Text...")
+ {
+ SmallImage = ImageResource.find;
+ ShortcutKeys = Keys.Control | Keys.F;
+ }
+
+
+ /// <summary>Gets a value indicating whether Enabled.</summary>
+ public override bool Enabled
+ {
+ get { return HostWindow.ActiveChildForm is IFindReplaceProvider; }
+ }
+
+ /// <summary>Gets FindReplaceWindow.</summary>
+ public IFindReplaceWindow FindReplaceWindow { get; private set; }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ if (!Enabled)
+ {
+ return;
+ }
+
+ // if the window is an editor, grab the highlighted text
+ IFindReplaceProvider findReplaceProvider = HostWindow.ActiveChildForm as IFindReplaceProvider;
+
+ if (FindReplaceWindow == null || FindReplaceWindow.IsDisposed)
+ {
+ FindReplaceWindow = new FindReplaceForm(Services);
+ }
+
+ if (findReplaceProvider is IEditor)
+ {
+ FindReplaceWindow.FindString = ((IEditor)findReplaceProvider).SelectedText;
+ }
+
+ FindReplaceWindow.TopMost = true;
+
+ if (!FindReplaceWindow.Visible)
+ {
+ FindReplaceWindow.Show(HostWindow.Instance);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ShowGoToLineFormCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ShowGoToLineFormCommand.cs
new file mode 100644
index 0000000..88158bd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/Commands/ShowGoToLineFormCommand.cs
@@ -0,0 +1,40 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.SearchTools.Commands
+{
+ /// <summary>The show go to line form command.</summary>
+ public class ShowGoToLineFormCommand : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ShowGoToLineFormCommand"/> class.</summary>
+ public ShowGoToLineFormCommand()
+ : base("Go To Line...")
+ {
+ ShortcutKeys = Keys.Control | Keys.G;
+ }
+
+ /// <summary>Gets a value indicating whether Enabled.</summary>
+ public override bool Enabled
+ {
+ get { return HostWindow.ActiveChildForm is INavigatableDocument; }
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ if (Enabled)
+ {
+ GoToLineForm frm = Services.Resolve<GoToLineForm>();
+ frm.ShowDialog(HostWindow as Form);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.cs
new file mode 100644
index 0000000..c0b17ce
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.cs
@@ -0,0 +1,212 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Media;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.PlugIns.SearchTools.Commands;
+
+namespace MiniSqlQuery.PlugIns.SearchTools
+{
+ /// <summary>The find replace form.</summary>
+ public partial class FindReplaceForm : Form, IFindReplaceWindow
+ {
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>Initializes a new instance of the <see cref="FindReplaceForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ public FindReplaceForm(IApplicationServices services)
+ {
+ InitializeComponent();
+ StartPosition = FormStartPosition.CenterParent;
+ _services = services;
+ }
+
+ /// <summary>Gets or sets FindString.</summary>
+ public string FindString
+ {
+ get { return txtFindString.Text; }
+ set { txtFindString.Text = value; }
+ }
+
+ /// <summary>Gets or sets ReplaceString.</summary>
+ public string ReplaceString
+ {
+ get { return txtReplaceText.Text; }
+ set { txtReplaceText.Text = value; }
+ }
+
+ /// <summary>The create find request.</summary>
+ /// <param name="provider">The provider.</param>
+ /// <param name="findString">The find string.</param>
+ /// <param name="replaceValue">The replace value.</param>
+ private void CreateFindRequest(IFindReplaceProvider provider, string findString, string replaceValue)
+ {
+ int key = provider.GetHashCode();
+ FindTextRequest request;
+
+ if (SearchToolsCommon.FindReplaceTextRequests.ContainsKey(key))
+ {
+ request = SearchToolsCommon.FindReplaceTextRequests[key];
+ if (request.SearchValue != findString)
+ {
+ // reset find text and set the starting position to the current cursor location
+ request.SearchValue = findString;
+ request.ReplaceValue = replaceValue;
+ request.Position = provider.CursorOffset;
+ }
+ }
+ else
+ {
+ request = new FindTextRequest(provider, findString);
+ request.ReplaceValue = replaceValue;
+ }
+
+ SearchToolsCommon.FindReplaceTextRequests[key] = request;
+ }
+
+ /// <summary>The dim form.</summary>
+ private void DimForm()
+ {
+ Opacity = 0.8;
+ }
+
+ /// <summary>The find replace form_ activated.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void FindReplaceForm_Activated(object sender, EventArgs e)
+ {
+ if (txtFindString.Focused | txtReplaceText.Focused)
+ {
+ UnDimForm();
+ }
+ else
+ {
+ DimForm();
+ }
+ }
+
+ /// <summary>The find replace form_ deactivate.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void FindReplaceForm_Deactivate(object sender, EventArgs e)
+ {
+ DimForm();
+ }
+
+ /// <summary>The find replace form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void FindReplaceForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (e.CloseReason == CloseReason.UserClosing)
+ {
+ e.Cancel = true;
+ Hide();
+ }
+ }
+
+ /// <summary>The find replace form_ key up.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void FindReplaceForm_KeyUp(object sender, KeyEventArgs e)
+ {
+ // simulate close
+ if (e.KeyCode == Keys.Escape)
+ {
+ e.Handled = true;
+ Hide();
+ }
+ }
+
+
+ /// <summary>The handle find next.</summary>
+ /// <param name="provider">The provider.</param>
+ /// <param name="findString">The find string.</param>
+ /// <param name="replaceValue">The replace value.</param>
+ private void HandleFindNext(IFindReplaceProvider provider, string findString, string replaceValue)
+ {
+ CreateFindRequest(provider, findString, replaceValue);
+ CommandManager.GetCommandInstance<FindNextStringCommand>().Execute();
+ }
+
+ /// <summary>The handle replace next.</summary>
+ /// <param name="provider">The provider.</param>
+ /// <param name="findString">The find string.</param>
+ /// <param name="replaceValue">The replace value.</param>
+ private void HandleReplaceNext(IFindReplaceProvider provider, string findString, string replaceValue)
+ {
+ CommandManager.GetCommandInstance<ReplaceStringCommand>().Execute();
+ }
+
+ /// <summary>The un dim form.</summary>
+ private void UnDimForm()
+ {
+ Opacity = 1.0;
+ }
+
+ /// <summary>The btn cancel_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ Hide();
+ }
+
+ /// <summary>The btn find next_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void btnFindNext_Click(object sender, EventArgs e)
+ {
+ IFindReplaceProvider provider = _services.HostWindow.ActiveChildForm as IFindReplaceProvider;
+
+ if (provider == null)
+ {
+ SystemSounds.Beep.Play();
+ }
+ else
+ {
+ HandleFindNext(provider, FindString, ReplaceString);
+ }
+ }
+
+ /// <summary>The btn replace_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void btnReplace_Click(object sender, EventArgs e)
+ {
+ IFindReplaceProvider provider = _services.HostWindow.ActiveChildForm as IFindReplaceProvider;
+
+ if (provider == null)
+ {
+ SystemSounds.Beep.Play();
+ }
+ else
+ {
+ HandleReplaceNext(provider, FindString, ReplaceString);
+ }
+ }
+
+ /// <summary>The txt find string_ enter.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void txtFindString_Enter(object sender, EventArgs e)
+ {
+ UnDimForm();
+ }
+
+ /// <summary>The txt find string_ leave.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void txtFindString_Leave(object sender, EventArgs e)
+ {
+ DimForm();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.designer.cs
new file mode 100644
index 0000000..6d1cb20
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.designer.cs
@@ -0,0 +1,154 @@
+namespace MiniSqlQuery.PlugIns.SearchTools
+{
+ partial class FindReplaceForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.txtFindString = new System.Windows.Forms.TextBox();
+ this.btnFindNext = new System.Windows.Forms.Button();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.txtReplaceText = new System.Windows.Forms.TextBox();
+ this.btnReplace = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 15);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(56, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "&Search for";
+ //
+ // txtFindString
+ //
+ this.txtFindString.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtFindString.Location = new System.Drawing.Point(95, 12);
+ this.txtFindString.Name = "txtFindString";
+ this.txtFindString.Size = new System.Drawing.Size(222, 20);
+ this.txtFindString.TabIndex = 1;
+ this.txtFindString.Leave += new System.EventHandler(this.txtFindString_Leave);
+ this.txtFindString.Enter += new System.EventHandler(this.txtFindString_Enter);
+ //
+ // btnFindNext
+ //
+ this.btnFindNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnFindNext.Location = new System.Drawing.Point(161, 64);
+ this.btnFindNext.Name = "btnFindNext";
+ this.btnFindNext.Size = new System.Drawing.Size(75, 23);
+ this.btnFindNext.TabIndex = 10;
+ this.btnFindNext.Text = "&Find Next";
+ this.btnFindNext.UseVisualStyleBackColor = true;
+ this.btnFindNext.Click += new System.EventHandler(this.btnFindNext_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(242, 93);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 12;
+ this.btnCancel.Text = "&Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // txtReplaceText
+ //
+ this.txtReplaceText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.txtReplaceText.Location = new System.Drawing.Point(95, 38);
+ this.txtReplaceText.Name = "txtReplaceText";
+ this.txtReplaceText.Size = new System.Drawing.Size(222, 20);
+ this.txtReplaceText.TabIndex = 3;
+ this.txtReplaceText.Leave += new System.EventHandler(this.txtFindString_Leave);
+ this.txtReplaceText.Enter += new System.EventHandler(this.txtFindString_Enter);
+ //
+ // btnReplace
+ //
+ this.btnReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnReplace.Location = new System.Drawing.Point(242, 64);
+ this.btnReplace.Name = "btnReplace";
+ this.btnReplace.Size = new System.Drawing.Size(75, 23);
+ this.btnReplace.TabIndex = 11;
+ this.btnReplace.Text = "&Replace";
+ this.btnReplace.UseVisualStyleBackColor = true;
+ this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(12, 41);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(69, 13);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "&Replace with";
+ //
+ // FindReplaceForm
+ //
+ this.AcceptButton = this.btnFindNext;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(329, 124);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.btnReplace);
+ this.Controls.Add(this.txtReplaceText);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnFindNext);
+ this.Controls.Add(this.txtFindString);
+ this.Controls.Add(this.label1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+ this.MinimumSize = new System.Drawing.Size(320, 110);
+ this.Name = "FindReplaceForm";
+ this.Opacity = 0.8;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Find Text";
+ this.Deactivate += new System.EventHandler(this.FindReplaceForm_Deactivate);
+ this.Activated += new System.EventHandler(this.FindReplaceForm_Activated);
+ this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.FindReplaceForm_KeyUp);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FindReplaceForm_FormClosing);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox txtFindString;
+ private System.Windows.Forms.Button btnFindNext;
+ private System.Windows.Forms.Button btnCancel;
+ private System.Windows.Forms.TextBox txtReplaceText;
+ private System.Windows.Forms.Button btnReplace;
+ private System.Windows.Forms.Label label2;
+ }
+}
+
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.resx
new file mode 100644
index 0000000..19dc0dd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/FindReplaceForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.cs
new file mode 100644
index 0000000..be94bcc
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.cs
@@ -0,0 +1,76 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Media;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery.PlugIns.SearchTools
+{
+ /// <summary>The go to line form.</summary>
+ public partial class GoToLineForm : Form
+ {
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>Initializes a new instance of the <see cref="GoToLineForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ public GoToLineForm(IApplicationServices services)
+ {
+ _services = services;
+ InitializeComponent();
+ }
+
+ /// <summary>Gets or sets LineValue.</summary>
+ public string LineValue
+ {
+ get { return txtLine.Text; }
+ set { txtLine.Text = value; }
+ }
+
+ /// <summary>The go to line form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void GoToLineForm_Load(object sender, EventArgs e)
+ {
+ INavigatableDocument navDoc = _services.HostWindow.ActiveChildForm as INavigatableDocument;
+ if (navDoc != null)
+ {
+ LineValue = (navDoc.CursorLine + 1).ToString();
+ Text = string.Format("{0} (1-{1})", Text, navDoc.TotalLines);
+ }
+ }
+
+ /// <summary>The btn ok_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ INavigatableDocument navDoc = _services.HostWindow.ActiveChildForm as INavigatableDocument;
+ if (navDoc != null)
+ {
+ int line;
+
+ if (int.TryParse(LineValue, out line))
+ {
+ int column = 0;
+ line = Math.Abs(line - 1);
+
+ // todo - copy column?
+ if (navDoc.SetCursorByLocation(line, column))
+ {
+ Close();
+ }
+ }
+
+ // otherwise
+ SystemSounds.Beep.Play();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.designer.cs
new file mode 100644
index 0000000..e1b4401
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.designer.cs
@@ -0,0 +1,102 @@
+namespace MiniSqlQuery.PlugIns.SearchTools
+{
+ partial class GoToLineForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.lblLinePrompt = new System.Windows.Forms.Label();
+ this.txtLine = new System.Windows.Forms.TextBox();
+ this.btnOk = new System.Windows.Forms.Button();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // lblLinePrompt
+ //
+ this.lblLinePrompt.AutoSize = true;
+ this.lblLinePrompt.Location = new System.Drawing.Point(12, 9);
+ this.lblLinePrompt.Name = "lblLinePrompt";
+ this.lblLinePrompt.Size = new System.Drawing.Size(30, 13);
+ this.lblLinePrompt.TabIndex = 0;
+ this.lblLinePrompt.Text = "&Line:";
+ //
+ // txtLine
+ //
+ this.txtLine.Location = new System.Drawing.Point(12, 25);
+ this.txtLine.Name = "txtLine";
+ this.txtLine.Size = new System.Drawing.Size(300, 20);
+ this.txtLine.TabIndex = 1;
+ //
+ // btnOk
+ //
+ this.btnOk.Location = new System.Drawing.Point(156, 51);
+ this.btnOk.Name = "btnOk";
+ this.btnOk.Size = new System.Drawing.Size(75, 23);
+ this.btnOk.TabIndex = 2;
+ this.btnOk.Text = "OK";
+ this.btnOk.UseVisualStyleBackColor = true;
+ this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(237, 51);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 3;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ //
+ // GoToLineForm
+ //
+ this.AcceptButton = this.btnOk;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(324, 86);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnOk);
+ this.Controls.Add(this.txtLine);
+ this.Controls.Add(this.lblLinePrompt);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+ this.Name = "GoToLineForm";
+ this.Opacity = 0.8;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Go to Line";
+ this.Load += new System.EventHandler(this.GoToLineForm_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label lblLinePrompt;
+ private System.Windows.Forms.TextBox txtLine;
+ private System.Windows.Forms.Button btnOk;
+ private System.Windows.Forms.Button btnCancel;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.resx
new file mode 100644
index 0000000..19dc0dd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/GoToLineForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/SearchToolsCommon.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/SearchToolsCommon.cs
new file mode 100644
index 0000000..3024e0a
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/SearchToolsCommon.cs
@@ -0,0 +1,25 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Collections.Generic;
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery.PlugIns.SearchTools
+{
+ /// <summary>The search tools common.</summary>
+ public class SearchToolsCommon
+ {
+ /// <summary>The _find text requests.</summary>
+ private static readonly Dictionary<int, FindTextRequest> _findTextRequests = new Dictionary<int, FindTextRequest>();
+
+ /// <summary>Gets FindReplaceTextRequests.</summary>
+ public static Dictionary<int, FindTextRequest> FindReplaceTextRequests
+ {
+ get { return _findTextRequests; }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/SearchToolsLoader.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/SearchToolsLoader.cs
new file mode 100644
index 0000000..80062f4
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/SearchTools/SearchToolsLoader.cs
@@ -0,0 +1,50 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.PlugIns.SearchTools.Commands;
+
+namespace MiniSqlQuery.PlugIns.SearchTools
+{
+ /// <summary>The search tools loader.</summary>
+ public class SearchToolsLoader : PluginLoaderBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="SearchToolsLoader"/> class.</summary>
+ public SearchToolsLoader()
+ : base(
+ "Mini SQL Query Search Tools",
+ "Text searching tools - generic find text tool window.",
+ 50)
+ {
+ }
+
+ /// <summary>Iinitialize the plug in.</summary>
+ public override void InitializePlugIn()
+ {
+ Services.RegisterComponent<GoToLineForm>("GoToLineForm");
+
+ ToolStripMenuItem editMenu = Services.HostWindow.GetMenuItem("edit");
+
+ // add the find to the plugins menu
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ShowFindTextFormCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<FindNextStringCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ReplaceStringCommand>());
+ editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem<ShowGoToLineFormCommand>());
+
+ // get the new item and make in invisible - the shortcut key is still available etc ;-)
+ ToolStripItem item = editMenu.DropDownItems["FindNextStringCommandToolStripMenuItem"];
+ item.Visible = false;
+ item = editMenu.DropDownItems["ReplaceStringCommandToolStripMenuItem"];
+ item.Visible = false;
+
+ // append the button the the toolbar items
+ Services.HostWindow.AddToolStripSeperator(null);
+ Services.HostWindow.AddToolStripCommand<ShowFindTextFormCommand>(null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/Commands/NewQueryByTemplateCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/Commands/NewQueryByTemplateCommand.cs
new file mode 100644
index 0000000..1bb5b26
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/Commands/NewQueryByTemplateCommand.cs
@@ -0,0 +1,31 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer.Commands
+{
+ /// <summary>The new query by template command.</summary>
+ public class NewQueryByTemplateCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="NewQueryByTemplateCommand"/> class.</summary>
+ public NewQueryByTemplateCommand()
+ : base("New &Query from Template")
+ {
+ SmallImage = ImageResource.script_code;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ ICommand newQueryFormCommand = CommandManager.GetCommandInstance("NewQueryFormCommand");
+ newQueryFormCommand.Execute();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/Commands/RunTemplateCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/Commands/RunTemplateCommand.cs
new file mode 100644
index 0000000..a915a40
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/Commands/RunTemplateCommand.cs
@@ -0,0 +1,41 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer.Commands
+{
+ /// <summary>The run template command.</summary>
+ public class RunTemplateCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="RunTemplateCommand"/> class.</summary>
+ public RunTemplateCommand()
+ : base("Run Template")
+ {
+ SmallImage = ImageResource.script_code;
+ }
+
+ /// <summary>Gets a value indicating whether Enabled.</summary>
+ public override bool Enabled
+ {
+ get { return HostWindow.ActiveChildForm is ITemplateEditor; }
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ ITemplateEditor templateEditor = HostWindow.ActiveChildForm as ITemplateEditor;
+
+ if (templateEditor != null)
+ {
+ templateEditor.RunTemplate();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/ITemplateEditor.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/ITemplateEditor.cs
new file mode 100644
index 0000000..2b8439d
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/ITemplateEditor.cs
@@ -0,0 +1,18 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The i template editor.</summary>
+ public interface ITemplateEditor : IPerformTask
+ {
+ /// <summary>The run template.</summary>
+ void RunTemplate();
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateData.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateData.cs
new file mode 100644
index 0000000..d93e880
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateData.cs
@@ -0,0 +1,201 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.Common;
+using MiniSqlQuery.Core;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The template data.</summary>
+ public class TemplateData : IDisposable
+ {
+ /// <summary>The _data tables.</summary>
+ private readonly Dictionary<string, DataTable> _dataTables = new Dictionary<string, DataTable>();
+
+ /// <summary>The _db connection.</summary>
+ private DbConnection _dbConnection;
+
+ /// <summary>Initializes a new instance of the <see cref="TemplateData"/> class.</summary>
+ /// <param name="services">The services.</param>
+ public TemplateData(IApplicationServices services)
+ {
+ Services = services;
+ }
+
+ /// <summary>Gets Services.</summary>
+ public IApplicationServices Services { get; private set; }
+
+ /// <summary>Helper for getting the value of a row - avoids "get_Item()" usage.</summary>
+ /// <param name="row">The row.</param>
+ /// <param name="columnName">Name of the column.</param>
+ /// <returns>The column value.</returns>
+ public object ColumnValue(DataRow row, string columnName)
+ {
+ return row[columnName];
+ }
+
+ /// <summary>The get.</summary>
+ /// <param name="schema">The schema name.</param>
+ /// <param name="viewOrTableName">The view or table name.</param>
+ /// <returns></returns>
+ public DataTable Get(string schema, string viewOrTableName)
+ {
+ return Get(Utility.RenderSafeSchemaObjectName(schema, viewOrTableName));
+ }
+
+ /// <summary>The get.</summary>
+ /// <param name="viewOrTableName">The view or table name.</param>
+ /// <returns></returns>
+ public DataTable Get(string viewOrTableName)
+ {
+ DbDataAdapter adapter = null;
+ DbCommand cmd = null;
+ DataTable dt = null;
+ QueryBatch batch = new QueryBatch();
+ Query query = new Query("SELECT * FROM " + viewOrTableName);
+
+ if (string.IsNullOrEmpty(viewOrTableName))
+ {
+ return null;
+ }
+
+ if (_dataTables.ContainsKey(viewOrTableName))
+ {
+ return _dataTables[viewOrTableName];
+ }
+
+ try
+ {
+ if (_dbConnection == null || _dbConnection.State != ConnectionState.Open)
+ {
+ _dbConnection = Services.Settings.GetOpenConnection();
+ }
+
+ query.Result = new DataSet(viewOrTableName + " View");
+ batch.Clear();
+ batch.Add(query);
+
+ adapter = Services.Settings.ProviderFactory.CreateDataAdapter();
+ cmd = _dbConnection.CreateCommand();
+ cmd.CommandText = query.Sql;
+ cmd.CommandType = CommandType.Text;
+ adapter.SelectCommand = cmd;
+ adapter.Fill(query.Result);
+ }
+
+ // catch (Exception exp)
+ // {
+ // throw;
+ // }
+ finally
+ {
+ if (adapter != null)
+ {
+ adapter.Dispose();
+ }
+
+ if (cmd != null)
+ {
+ cmd.Dispose();
+ }
+ }
+
+ if (query.Result.Tables.Count > 0)
+ {
+ dt = query.Result.Tables[0];
+ _dataTables[viewOrTableName] = dt;
+ }
+
+ return dt;
+ }
+
+ /// <summary>The query.</summary>
+ /// <param name="sql">The sql.</param>
+ /// <returns></returns>
+ public DataTable Query(string sql)
+ {
+ DbDataAdapter adapter = null;
+ DbCommand cmd = null;
+ DataTable dt = null;
+ QueryBatch batch = new QueryBatch();
+ Query query = new Query(sql);
+
+ if (string.IsNullOrEmpty(sql))
+ {
+ return null;
+ }
+
+ if (_dataTables.ContainsKey(sql))
+ {
+ return _dataTables[sql];
+ }
+
+ try
+ {
+ if (_dbConnection == null || _dbConnection.State != ConnectionState.Open)
+ {
+ _dbConnection = Services.Settings.GetOpenConnection();
+ }
+
+ string dataSetName = sql;
+ query.Result = new DataSet(dataSetName);
+ batch.Clear();
+ batch.Add(query);
+
+ adapter = Services.Settings.ProviderFactory.CreateDataAdapter();
+ cmd = _dbConnection.CreateCommand();
+ cmd.CommandText = query.Sql;
+ cmd.CommandType = CommandType.Text;
+ adapter.SelectCommand = cmd;
+ adapter.Fill(query.Result);
+ }
+
+ // catch (Exception exp)
+ // {
+ // throw;
+ // }
+ finally
+ {
+ if (adapter != null)
+ {
+ adapter.Dispose();
+ }
+
+ if (cmd != null)
+ {
+ cmd.Dispose();
+ }
+ }
+
+ if (query.Result.Tables.Count > 0)
+ {
+ dt = query.Result.Tables[0];
+ _dataTables[sql] = dt;
+ }
+
+ return dt;
+ }
+
+ /// <summary>The dispose.</summary>
+ public void Dispose()
+ {
+ if (_dbConnection != null)
+ {
+ _dbConnection.Dispose();
+ _dbConnection = null;
+ }
+
+ foreach (var dataTable in _dataTables)
+ {
+ dataTable.Value.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.cs
new file mode 100644
index 0000000..405680d
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.cs
@@ -0,0 +1,462 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Windows.Forms;
+using ICSharpCode.TextEditor.Document;
+using Microsoft.VisualBasic;
+using MiniSqlQuery.Commands;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using MiniSqlQuery.Core.Template;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The template editor form.</summary>
+ public partial class TemplateEditorForm : DockContent, IEditor, IFindReplaceProvider, INavigatableDocument, ITemplateEditor
+ {
+ /// <summary>The _host window.</summary>
+ private readonly IHostWindow _hostWindow;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _file name.</summary>
+ private string _fileName;
+
+ /// <summary>The _highlighting provider loaded.</summary>
+ private bool _highlightingProviderLoaded;
+
+ /// <summary>The _is dirty.</summary>
+ private bool _isDirty;
+
+ /// <summary>The _text find service.</summary>
+ private ITextFindService _textFindService;
+
+ /// <summary>Initializes a new instance of the <see cref="TemplateEditorForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="hostWindow">The host window.</param>
+ public TemplateEditorForm(IApplicationServices services, IHostWindow hostWindow)
+ {
+ InitializeComponent();
+ txtEdit.Document.DocumentChanged += DocumentDocumentChanged;
+ _services = services;
+ _hostWindow = hostWindow;
+
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<SaveFileCommand>());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseActiveWindowCommand>());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseAllWindowsCommand>());
+ formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CopyQueryEditorFileNameCommand>());
+
+ CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(formContextMenuStrip);
+ }
+
+ /// <summary>Gets or sets AllText.</summary>
+ public string AllText
+ {
+ get { return txtEdit.Text; }
+ set { txtEdit.Text = value; }
+ }
+
+ /// <summary>Gets a value indicating whether CanReplaceText.</summary>
+ public bool CanReplaceText
+ {
+ get { return true; }
+ }
+
+ /// <summary>Gets or sets CursorColumn.</summary>
+ public int CursorColumn
+ {
+ get { return txtEdit.ActiveTextAreaControl.Caret.Column; }
+ set { txtEdit.ActiveTextAreaControl.Caret.Column = value; }
+ }
+
+ /// <summary>Gets or sets CursorLine.</summary>
+ public int CursorLine
+ {
+ get { return txtEdit.ActiveTextAreaControl.Caret.Line; }
+ set { txtEdit.ActiveTextAreaControl.Caret.Line = value; }
+ }
+
+ /// <summary>Gets CursorOffset.</summary>
+ public int CursorOffset
+ {
+ get { return txtEdit.ActiveTextAreaControl.Caret.Offset; }
+ }
+
+ /// <summary>Gets FileFilter.</summary>
+ public string FileFilter
+ {
+ get { return "Mini SQL Template Files (*.mt)|*.mt|All Files (*.*)|*.*"; }
+ }
+
+ /// <summary>Gets or sets FileName.</summary>
+ public string FileName
+ {
+ get { return _fileName; }
+ set
+ {
+ _fileName = value;
+ Text = FileName;
+ SetTabTextByFilename();
+ }
+ }
+
+ /// <summary>Gets a value indicating whether IsBusy.</summary>
+ public bool IsBusy
+ {
+ get { return false; }
+ }
+
+ /// <summary>Gets or sets a value indicating whether IsDirty.</summary>
+ public bool IsDirty
+ {
+ get { return _isDirty; }
+ set
+ {
+ if (_isDirty != value)
+ {
+ _isDirty = value;
+ SetTabTextByFilename();
+ }
+ }
+ }
+
+ /// <summary>Gets SelectedText.</summary>
+ public string SelectedText
+ {
+ get { return txtEdit.ActiveTextAreaControl.SelectionManager.SelectedText; }
+ }
+
+ /// <summary>Gets TextFindService.</summary>
+ public ITextFindService TextFindService
+ {
+ get
+ {
+ if (_textFindService == null)
+ {
+ _textFindService = _services.Resolve<ITextFindService>();
+ }
+
+ return _textFindService;
+ }
+ }
+
+ /// <summary>Gets TotalLines.</summary>
+ public int TotalLines
+ {
+ get { return txtEdit.Document.TotalNumberOfLines; }
+ }
+
+ /// <summary>The load highlighting provider.</summary>
+ public void LoadHighlightingProvider()
+ {
+ if (_highlightingProviderLoaded)
+ {
+ return;
+ }
+
+ // see: http://wiki.sharpdevelop.net/Syntax%20highlighting.ashx
+ string dir = Path.GetDirectoryName(GetType().Assembly.Location);
+ FileSyntaxModeProvider fsmProvider = new FileSyntaxModeProvider(dir);
+ HighlightingManager.Manager.AddSyntaxModeFileProvider(fsmProvider); // Attach to the text editor.
+ txtEdit.SetHighlighting("NVelocity");
+ _highlightingProviderLoaded = true;
+ }
+
+ /// <summary>The clear selection.</summary>
+ public void ClearSelection()
+ {
+ txtEdit.ActiveTextAreaControl.SelectionManager.ClearSelection();
+ }
+
+ /// <summary>The highlight string.</summary>
+ /// <param name="offset">The offset.</param>
+ /// <param name="length">The length.</param>
+ public void HighlightString(int offset, int length)
+ {
+ if (offset < 0 || length < 1)
+ {
+ return;
+ }
+
+ int endPos = offset + length;
+ txtEdit.ActiveTextAreaControl.SelectionManager.SetSelection(
+ txtEdit.Document.OffsetToPosition(offset),
+ txtEdit.Document.OffsetToPosition(endPos));
+ SetCursorByOffset(endPos);
+ }
+
+ /// <summary>The insert text.</summary>
+ /// <param name="text">The text.</param>
+ public void InsertText(string text)
+ {
+ if (string.IsNullOrEmpty(text))
+ {
+ return;
+ }
+
+ int offset = txtEdit.ActiveTextAreaControl.Caret.Offset;
+
+ // if some text is selected we want to replace it
+ if (txtEdit.ActiveTextAreaControl.SelectionManager.IsSelected(offset))
+ {
+ offset = txtEdit.ActiveTextAreaControl.SelectionManager.SelectionCollection[0].Offset;
+ txtEdit.ActiveTextAreaControl.SelectionManager.RemoveSelectedText();
+ }
+
+ txtEdit.Document.Insert(offset, text);
+ int newOffset = offset + text.Length; // new offset at end of inserted text
+
+ // now reposition the caret if required to be after the inserted text
+ if (CursorOffset != newOffset)
+ {
+ SetCursorByOffset(newOffset);
+ }
+
+ txtEdit.Focus();
+ }
+
+
+ /// <summary>The load file.</summary>
+ public void LoadFile()
+ {
+ txtEdit.LoadFile(FileName);
+ IsDirty = false;
+ }
+
+ /// <summary>The save file.</summary>
+ public void SaveFile()
+ {
+ txtEdit.SaveFile(FileName);
+ IsDirty = false;
+ }
+
+ /// <summary>The set syntax.</summary>
+ /// <param name="name">The name.</param>
+ public void SetSyntax(string name)
+ {
+ LoadHighlightingProvider();
+ txtEdit.SetHighlighting(name);
+ }
+
+ /// <summary>The find string.</summary>
+ /// <param name="value">The value.</param>
+ /// <param name="startIndex">The start index.</param>
+ /// <param name="comparisonType">The comparison type.</param>
+ /// <returns>The find string.</returns>
+ public int FindString(string value, int startIndex, StringComparison comparisonType)
+ {
+ if (string.IsNullOrEmpty(value) || startIndex < 0)
+ {
+ return -1;
+ }
+
+ string text = AllText;
+ int pos = text.IndexOf(value, startIndex, comparisonType);
+ if (pos > -1)
+ {
+ ClearSelection();
+ HighlightString(pos, value.Length);
+ }
+
+ return pos;
+ }
+
+ /// <summary>The replace string.</summary>
+ /// <param name="value">The value.</param>
+ /// <param name="startIndex">The start index.</param>
+ /// <param name="length">The length.</param>
+ /// <returns>The replace string.</returns>
+ public bool ReplaceString(string value, int startIndex, int length)
+ {
+ if (value == null || startIndex < 0 || length < 0)
+ {
+ return false;
+ }
+
+ if ((startIndex + length) > AllText.Length)
+ {
+ return false;
+ }
+
+ txtEdit.Document.Replace(startIndex, length, value);
+
+ return true;
+ }
+
+ /// <summary>The set text find service.</summary>
+ /// <param name="textFindService">The text find service.</param>
+ public void SetTextFindService(ITextFindService textFindService)
+ {
+ // accept nulls infering a reset
+ _textFindService = textFindService;
+ }
+
+ /// <summary>The set cursor by location.</summary>
+ /// <param name="line">The line.</param>
+ /// <param name="column">The column.</param>
+ /// <returns>The set cursor by location.</returns>
+ public bool SetCursorByLocation(int line, int column)
+ {
+ if (line > TotalLines)
+ {
+ return false;
+ }
+
+ txtEdit.ActiveTextAreaControl.Caret.Line = line;
+ txtEdit.ActiveTextAreaControl.Caret.Column = column;
+
+ return true;
+ }
+
+ /// <summary>The set cursor by offset.</summary>
+ /// <param name="offset">The offset.</param>
+ /// <returns>The set cursor by offset.</returns>
+ public bool SetCursorByOffset(int offset)
+ {
+ if (offset >= 0)
+ {
+ txtEdit.ActiveTextAreaControl.Caret.Position = txtEdit.Document.OffsetToPosition(offset);
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>The cancel task.</summary>
+ public void CancelTask()
+ {
+ // N/A
+ }
+
+ /// <summary>The execute task.</summary>
+ public void ExecuteTask()
+ {
+ RunTemplate();
+ }
+
+ /// <summary>The run template.</summary>
+ public void RunTemplate()
+ {
+ TemplateModel templateModel = _services.Resolve<TemplateModel>();
+ TemplateResult templateResult = null;
+ txtErrors.Clear();
+
+ try
+ {
+ string[] lines = AllText.Replace("\r", string.Empty).Split('\n');
+ string text;
+ Dictionary<string, object> items = new Dictionary<string, object>();
+ items[TemplateModel.Extension] = templateModel.InferExtensionFromFilename(FileName, items);
+ text = templateModel.PreProcessTemplate(lines, GetValue, items);
+ templateResult = templateModel.ProcessTemplate(text, items);
+ }
+ catch (TemplateException exp)
+ {
+ _hostWindow.DisplaySimpleMessageBox(this, exp.Message, "Template Error");
+
+ // todo - try to get the line number and move cursor?...
+ txtErrors.Text = exp.Message;
+ }
+
+ if (templateResult != null)
+ {
+ // display in new window
+ IFileEditorResolver resolver = _services.Resolve<IFileEditorResolver>();
+ IEditor editor = _services.Resolve<IEditor>(resolver.ResolveEditorNameByExtension(templateResult.Extension));
+ editor.AllText = templateResult.Text;
+ editor.SetSyntax(templateResult.SyntaxName);
+ _hostWindow.DisplayDockedForm(editor as DockContent);
+ }
+ }
+
+ /// <summary>The document document changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DocumentDocumentChanged(object sender, DocumentEventArgs e)
+ {
+ IsDirty = true;
+ }
+
+ /// <summary>The get value.</summary>
+ /// <param name="name">The name.</param>
+ /// <returns>The get value.</returns>
+ private string GetValue(string name)
+ {
+ string val = Interaction.InputBox(string.Format("Value for '{0}'", name), "Supply a Value", name, -1, -1);
+ return val;
+ }
+
+ /// <summary>The set tab text by filename.</summary>
+ private void SetTabTextByFilename()
+ {
+ string dirty = string.Empty;
+ string text = "Untitled";
+ string tabtext;
+
+ if (_isDirty)
+ {
+ dirty = " *";
+ }
+
+ if (txtEdit.FileName != null)
+ {
+ text = FileName;
+ tabtext = Path.GetFileName(FileName);
+ }
+ else
+ {
+ text += _services.Settings.GetUntitledDocumentCounter();
+ tabtext = text;
+ }
+
+ TabText = tabtext + dirty;
+ ToolTipText = text + dirty;
+ }
+
+ /// <summary>The template editor form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void TemplateEditorForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (_isDirty)
+ {
+ DialogResult saveFile = _hostWindow.DisplayMessageBox(
+ this,
+ "Contents changed, do you want to save the file?\r\n" + TabText, "Save Changes?",
+ MessageBoxButtons.YesNoCancel,
+ MessageBoxIcon.Question,
+ MessageBoxDefaultButton.Button1,
+ 0,
+ null,
+ null);
+
+ if (saveFile == DialogResult.Cancel)
+ {
+ e.Cancel = true;
+ }
+ else if (saveFile == DialogResult.Yes)
+ {
+ CommandManager.GetCommandInstance<SaveFileCommand>().Execute();
+ }
+ }
+ }
+
+ /// <summary>The template editor form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void TemplateEditorForm_Load(object sender, EventArgs e)
+ {
+ rtfHelp.Rtf = TemplateResources.TemplateHelp;
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.Designer.cs
new file mode 100644
index 0000000..51fb08c
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.Designer.cs
@@ -0,0 +1,170 @@
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ partial class TemplateEditorForm : ITemplateEditor
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.txtEdit = new ICSharpCode.TextEditor.TextEditorControl();
+ this.tabControl1 = new System.Windows.Forms.TabControl();
+ this.tabPageTemplateSource = new System.Windows.Forms.TabPage();
+ this.tabPageHelp = new System.Windows.Forms.TabPage();
+ this.rtfHelp = new System.Windows.Forms.RichTextBox();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.txtErrors = new System.Windows.Forms.TextBox();
+ this.formContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.tabControl1.SuspendLayout();
+ this.tabPageTemplateSource.SuspendLayout();
+ this.tabPageHelp.SuspendLayout();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // txtEdit
+ //
+ this.txtEdit.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtEdit.IsReadOnly = false;
+ this.txtEdit.Location = new System.Drawing.Point(3, 3);
+ this.txtEdit.Name = "txtEdit";
+ this.txtEdit.Size = new System.Drawing.Size(533, 314);
+ this.txtEdit.TabIndex = 0;
+ //
+ // tabControl1
+ //
+ this.tabControl1.Controls.Add(this.tabPageTemplateSource);
+ this.tabControl1.Controls.Add(this.tabPageHelp);
+ this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabControl1.Location = new System.Drawing.Point(0, 0);
+ this.tabControl1.Name = "tabControl1";
+ this.tabControl1.SelectedIndex = 0;
+ this.tabControl1.Size = new System.Drawing.Size(547, 346);
+ this.tabControl1.TabIndex = 1;
+ //
+ // tabPageTemplateSource
+ //
+ this.tabPageTemplateSource.Controls.Add(this.txtEdit);
+ this.tabPageTemplateSource.Location = new System.Drawing.Point(4, 22);
+ this.tabPageTemplateSource.Name = "tabPageTemplateSource";
+ this.tabPageTemplateSource.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageTemplateSource.Size = new System.Drawing.Size(539, 320);
+ this.tabPageTemplateSource.TabIndex = 0;
+ this.tabPageTemplateSource.Text = "Template Source";
+ this.tabPageTemplateSource.UseVisualStyleBackColor = true;
+ //
+ // tabPageHelp
+ //
+ this.tabPageHelp.Controls.Add(this.rtfHelp);
+ this.tabPageHelp.Location = new System.Drawing.Point(4, 22);
+ this.tabPageHelp.Name = "tabPageHelp";
+ this.tabPageHelp.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageHelp.Size = new System.Drawing.Size(539, 321);
+ this.tabPageHelp.TabIndex = 1;
+ this.tabPageHelp.Text = "Quick Help";
+ this.tabPageHelp.UseVisualStyleBackColor = true;
+ //
+ // rtfHelp
+ //
+ this.rtfHelp.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.rtfHelp.Location = new System.Drawing.Point(3, 3);
+ this.rtfHelp.Name = "rtfHelp";
+ this.rtfHelp.ReadOnly = true;
+ this.rtfHelp.ShowSelectionMargin = true;
+ this.rtfHelp.Size = new System.Drawing.Size(533, 315);
+ this.rtfHelp.TabIndex = 0;
+ this.rtfHelp.Text = "";
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.Location = new System.Drawing.Point(4, 4);
+ this.splitContainer1.Name = "splitContainer1";
+ this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.tabControl1);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.txtErrors);
+ this.splitContainer1.Size = new System.Drawing.Size(547, 437);
+ this.splitContainer1.SplitterDistance = 346;
+ this.splitContainer1.TabIndex = 2;
+ //
+ // txtErrors
+ //
+ this.txtErrors.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtErrors.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.txtErrors.Location = new System.Drawing.Point(0, 0);
+ this.txtErrors.Multiline = true;
+ this.txtErrors.Name = "txtErrors";
+ this.txtErrors.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.txtErrors.Size = new System.Drawing.Size(547, 87);
+ this.txtErrors.TabIndex = 0;
+ //
+ // formContextMenuStrip
+ //
+ this.formContextMenuStrip.Name = "formContextMenuStrip";
+ this.formContextMenuStrip.Size = new System.Drawing.Size(153, 26);
+ //
+ // TemplateEditorForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(555, 445);
+ this.Controls.Add(this.splitContainer1);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Name = "TemplateEditorForm";
+ this.Padding = new System.Windows.Forms.Padding(4);
+ this.TabPageContextMenuStrip = this.formContextMenuStrip;
+ this.Text = "TemplateEditorForm";
+ this.Load += new System.EventHandler(this.TemplateEditorForm_Load);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TemplateEditorForm_FormClosing);
+ this.tabControl1.ResumeLayout(false);
+ this.tabPageTemplateSource.ResumeLayout(false);
+ this.tabPageHelp.ResumeLayout(false);
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ this.splitContainer1.Panel2.PerformLayout();
+ this.splitContainer1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private ICSharpCode.TextEditor.TextEditorControl txtEdit;
+ private System.Windows.Forms.TabControl tabControl1;
+ private System.Windows.Forms.TabPage tabPageTemplateSource;
+ private System.Windows.Forms.TabPage tabPageHelp;
+ private System.Windows.Forms.RichTextBox rtfHelp;
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.TextBox txtErrors;
+ private System.Windows.Forms.ContextMenuStrip formContextMenuStrip;
+ }
+}
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.resx
new file mode 100644
index 0000000..a4d9552
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateEditorForm.resx
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="formContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateHelp.rtf b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateHelp.rtf
new file mode 100644
index 0000000..f8fea0d
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateHelp.rtf
@@ -0,0 +1,449 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch37\stshfhich37\stshfbi37\deflang3081\deflangfe3081\themelang3081\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial{\*\falt Arial};}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}
+{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\f288\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\f289\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\f291\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\f292\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\f293\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\f294\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\f295\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\f296\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\f298\fbidi \fswiss\fcharset238\fprq2 Arial CE{\*\falt Arial};}
+{\f299\fbidi \fswiss\fcharset204\fprq2 Arial Cyr{\*\falt Arial};}{\f301\fbidi \fswiss\fcharset161\fprq2 Arial Greek{\*\falt Arial};}{\f302\fbidi \fswiss\fcharset162\fprq2 Arial Tur{\*\falt Arial};}
+{\f303\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew){\*\falt Arial};}{\f304\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic){\*\falt Arial};}{\f305\fbidi \fswiss\fcharset186\fprq2 Arial Baltic{\*\falt Arial};}
+{\f306\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese){\*\falt Arial};}{\f308\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f309\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}{\f311\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}
+{\f312\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f313\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f314\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f315\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}
+{\f316\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f628\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f629\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f631\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}
+{\f632\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f635\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f658\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f659\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\f661\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f662\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f665\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
+{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}
+{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}
+{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}
+{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}
+{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}
+{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
+{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}
+{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}
+{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}
+{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
+{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}
+{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}
+{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}
+{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
+{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}
+{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
+{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}}{\colortbl;\red0\green0\blue0;
+\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;
+\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green100\blue0;\red139\green69\blue19;}{\*\defchp \f37\fs22 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0
+\f37\fs22\lang3081\langfe3081\cgrid\langnp3081\langfenp3081 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af37\afs22\alang1025 \ltrch\fcs0 \f37\fs22\lang3081\langfe3081\cgrid\langnp3081\langfenp3081 \snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\listtable
+{\list\listtemplateid1994920380\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0
+\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li1440\lin1440 }
+{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li2160\lin2160 }{\listlevel
+\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23
+\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0
+\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
+\levelspace360\levelindent0{\leveltext\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li6480\lin6480 }{\listname ;}\listid586115817}{\list\listtemplateid1513266810\listhybrid{\listlevel\levelnfc23\levelnfcn23
+\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace3240\levelindent0{\leveltext\leveltemplateid474885214\'01\u-3913 ?;}{\levelnumbers;}\loch\af3\hich\af3\dbch\af0\fbias0\hres0\chhres0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23
+\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace3240\levelindent0{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li-1080\lin-1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\lvltentative\levelspace3240\levelindent0{\leveltext\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li-360\lin-360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\lvltentative\levelspace3240\levelindent0{\leveltext\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li360\lin360 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1
+\lvltentative\levelspace3240\levelindent0{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
+\levelspace3240\levelindent0{\leveltext\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li1800\lin1800 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace3240
+\levelindent0{\leveltext\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace3240\levelindent0
+{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace3240\levelindent0{\leveltext
+\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li3960\lin3960 }{\listname ;}\listid877427267}{\list\listtemplateid1704463912\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
+\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid474885214\'01\u-3913 ?;}{\levelnumbers;}\loch\af3\hich\af3\dbch\af0\fbias0\hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
+\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
+\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li6480\lin6480 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li7200\lin7200 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid201916417
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li7920\lin7920 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers
+;}\f2\fbias0\hres0\chhres0 \fi-360\li8640\lin8640 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}
+\f10\fbias0\hres0\chhres0 \fi-360\li9360\lin9360 }{\listname ;}\listid1344089321}{\list\listtemplateid748702832\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916417
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916419
+\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916417
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916419
+\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li6480\lin6480 }{\listname ;}\listid1431273083}{\list\listtemplateid1223347500\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360
+\levelindent0{\leveltext\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0
+{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916417
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916419
+\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li6480\lin6480 }{\listname ;}\listid1611547526}{\list\listtemplateid1417693332\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360
+\levelindent0{\leveltext\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0
+{\leveltext\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916421\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916417\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext
+\leveltemplateid201916419\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916417
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916419
+\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid201916421
+\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li6480\lin6480 }{\listname ;}\listid1768498529}}{\*\listoverridetable{\listoverride\listid1344089321\listoverridecount0\ls1}{\listoverride\listid877427267\listoverridecount0\ls2}
+{\listoverride\listid586115817\listoverridecount0\ls3}{\listoverride\listid1611547526\listoverridecount0\ls4}{\listoverride\listid1431273083\listoverridecount0\ls5}{\listoverride\listid1768498529\listoverridecount0\ls6}}{\*\rsidtbl \rsid939189\rsid3482954
+\rsid4084760\rsid4728322\rsid5655077\rsid9175728\rsid9329129\rsid9330872\rsid9527813\rsid11020037\rsid11871217\rsid11956202\rsid12725751\rsid13640472\rsid13906272\rsid15340299}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0
+\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Paul}{\creatim\yr2009\mo9\dy16\hr16\min42}{\revtim\yr2009\mo10\dy6\hr6\min37}{\version15}{\edmins1569}{\nofpages3}{\nofwords675}{\nofchars4049}{\nofcharsws4715}{\vern32771}}
+{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}{\xmlns2 urn:schemas-microsoft-com:office:smarttags}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\noxlattoyen
+\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\nolnhtadjtbl\viewnobound1\rsidroot5655077 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar
+\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}
+{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1
+\af0\afs22\alang1025 \ltrch\fcs0 \f37\fs22\lang3081\langfe3081\cgrid\langnp3081\langfenp3081 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9527813 Template Help
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par Mini SQL Query takes advantage of the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9527813\charrsid11020037 NVelocity}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 template engine to transform simple scripts into SQL scripts, C#}{
+\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9330872 /VB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+ code, HTML mark-up or any other type of text output. The scripts have access to the database model making it a simple yet powerful tool}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9330872
+. It is also possible to get user input for variables or import references to plug}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12725751 -}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9330872 ins}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
+\f1\fs20\insrsid12725751 for execution}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 . The following examples use the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \i\f1\fs20\insrsid9527813\charrsid11020037 Northwind SQL Compact Edition}{
+\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 sample database.
+\par
+\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9527813 Pre-Processor Directives
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par A Pre-processor directive is Mini SQL Query specific and start with \'93#@\'94. They are:
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx720\wrapdefault\faauto\ls6\rin0\lin720\itap0\pararsid9527813 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 #@get <}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \i\f2\fs20\insrsid9527813\charrsid15340299 variable}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 >}{
+\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 (used to prompt the user for a value, currently just text)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls6\rin0\lin720\itap0\pararsid9527813 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 #@set <}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \i\f2\fs20\insrsid9527813\charrsid15340299 property}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 > <}{
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \i\f2\fs20\insrsid9527813\charrsid15340299 value}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 >}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 (currently just \'93extension
+\'94)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid4728322\charrsid4728322 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid4728322\charrsid4728322 #@import-plugin}{\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4728322 <plugin-type-name>
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9527813 Directives
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par Template directives are signalled with a hash (#) and are pure NVelocity syntax. Some directives are:
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx720\wrapdefault\faauto\ls5\rin0\lin720\itap0\pararsid9527813 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 foreach}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 / }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 end}{\rtlch\fcs1 \af1\afs20
+\ltrch\fcs0 \f1\fs20\insrsid9527813
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls5\rin0\lin720\itap0\pararsid9527813 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 set
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 if / }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\insrsid9527813\charrsid15340299 ifelse}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 / }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 else}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+ / }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 end}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par Other more advanced directives include:
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx720\wrapdefault\faauto\ls5\rin0\lin720\itap0\pararsid9527813 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 macro
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx720\wrapdefault\faauto\ls5\rin0\lin720\itap0\pararsid15340299 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813\charrsid15340299 include
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9527813 Built in Variables
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par Variables are de-referenced with the format $\{}{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\insrsid9527813 varable-name}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 \}
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9329129 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 The following variables are built in}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9329129 .
+\par
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\i\f1\fs20\insrsid9329129 $\{}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\i\f1\fs20\insrsid9329129\charrsid9329129 Host}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\i\f1\fs20\insrsid9329129 \}}{\rtlch\fcs1 \af1\afs20
+\ltrch\fcs0 \b\i\f1\fs20\insrsid9329129\charrsid9329129
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9329129 The host variable allows access to several helper functions and data, most notably the \'93Model\'94. The model is t
+he database schema of the current connection. The model contains collections of tables and views with their respective columns. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11871217 Each column has the}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
+\f1\fs20\insrsid13640472 primary/unique key and}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11871217 type information}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13640472 . I}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11871217
+f supported by the schema service of that database }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13640472 the column }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11871217 will contain foreign key information.}{\rtlch\fcs1 \af1\afs20
+\ltrch\fcs0 \f1\fs20\insrsid9329129
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13640472 The \'93Model\'94 hierarchy is below:
+\par }\pard \ltrpar\ql \fi-360\li1440\ri0\nowidctlpar\tx1440\wrapdefault\faauto\rin0\lin1440\itap0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813 o\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 Model
+\par }\pard \ltrpar\ql \fi-360\li2160\ri0\nowidctlpar\tx2160\wrapdefault\faauto\rin0\lin2160\itap0 {\rtlch\fcs1 \af10\afs20 \ltrch\fcs0 \f10\fs20\insrsid9527813 \'a7\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 Tables (list)
+\par }\pard \ltrpar\ql \fi-360\li2880\ri0\nowidctlpar\tx2880\wrapdefault\faauto\rin0\lin2880\itap0 {\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813 \'b7\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 Schema (e.g. "dbo")
+\par }\pard \ltrpar\ql \fi-360\li2880\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin2880\itap0 {\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813 \'b7\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 Name (e.g. "User")
+\par }{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813 \'b7\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 FullName (e.g. "dbo.User")
+\par }{\rtlch\fcs1 \af3\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813 \'b7\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 Columns (list)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid9527813 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li3600\ri0\nowidctlpar\tx3600\wrapdefault\faauto\ls1\rin0\lin3600\itap0\pararsid5655077 {\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 Name (e.g. "int")
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077\charrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5655077\charrsid5655077 Nullable}{\rtlch\fcs1 \af1\afs20
+\ltrch\fcs0 \f1\fs20\insrsid5655077
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid9175728\charrsid9175728 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728\charrsid9175728 DbType}{\rtlch\fcs1 \af1\afs20
+\ltrch\fcs0 \f1\fs20\insrsid9175728
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9329129 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \ltrpar\ql \fi-360\li4320\ri0\nowidctlpar\tx3600\wrapdefault\faauto\ls1\ilvl1\rin0\lin4320\itap0\pararsid9329129 {\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9329129 Name
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9329129 \hich\af2\dbch\af0\loch\f2 o\tab}Summary (renders the type with respect to Length)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9329129 \hich\af2\dbch\af0\loch\f2 o\tab}Length
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9329129\charrsid9329129 \hich\af2\dbch\af0\loch\f2 o\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9329129\charrsid9329129 Precision}{\rtlch\fcs1 \af1\afs20
+\ltrch\fcs0 \f1\fs20\insrsid9329129
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9329129 \hich\af2\dbch\af0\loch\f2 o\tab}Scale
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9329129 \hich\af2\dbch\af0\loch\f2 o\tab}SystemType (the .Net type, e.g. System.String)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9329129\charrsid9329129
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li3600\ri0\nowidctlpar\tx3600\wrapdefault\faauto\ls1\rin0\lin3600\itap0\pararsid5655077 {\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5655077 IsKey
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}IsUnique
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}IsRowVersion (e.g. a Timestamp column)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}IsIdentity
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}IsAutoIncrement
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}IsReadOnly (e.g. a auto increment or timestamp column)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}IsWritable
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}HasFK (true if the column references another table)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid5655077\charrsid5655077 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5655077\charrsid5655077 ForeignKeyReference}{\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728 (applicable if HasFK is true)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5655077
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9175728\charrsid9175728 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \ltrpar\ql \fi-360\li4320\ri0\nowidctlpar
+\tx3600\wrapdefault\faauto\ls1\ilvl1\rin0\lin4320\itap0\pararsid5655077 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728\charrsid9175728 ConstraintName}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5655077
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9175728\charrsid9175728 \hich\af2\dbch\af0\loch\f2 o\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728\charrsid9175728 ReferenceTable}{\rtlch\fcs1 \af1\afs20
+\ltrch\fcs0 \f1\fs20\insrsid9175728
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f10\fs20\insrsid9175728 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}\pard \ltrpar\ql \fi-360\li5040\ri0\nowidctlpar\tx3600\wrapdefault\faauto\ls1\ilvl2\rin0\lin5040\itap0\pararsid9175728 {
+\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728 FullName etc (as Table)
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f2\fs20\insrsid9175728\charrsid9175728 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \ltrpar\ql \fi-360\li4320\ri0\nowidctlpar
+\tx3600\wrapdefault\faauto\ls1\ilvl1\rin0\lin4320\itap0\pararsid9175728 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728\charrsid9175728 ReferenceColumn}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f10\fs20\insrsid9175728 \loch\af10\dbch\af0\hich\f10 \'a7\tab}}\pard \ltrpar\ql \fi-360\li5040\ri0\nowidctlpar\tx3600\wrapdefault\faauto\ls1\ilvl2\rin0\lin5040\itap0\pararsid9329129 {
+\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9175728 Name etc (as Column)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\tx3600\wrapdefault\faauto\rin0\lin0\itap0\pararsid9329129 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3482954
+\par There is also a \'93Views\'94 list with the same objects available for scripting.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9329129
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3482954
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13640472 Other \'93Host\'94 functions are:
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid13640472\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx709\wrapdefault\faauto\ls5\rin0\lin720\itap0\pararsid9527813 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid13640472\charrsid15340299 MachineName
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid13640472\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}UserName
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid13640472\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx709\wrapdefault\faauto\ls3\rin0\lin720\itap0\pararsid9527813 {
+\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid13640472\charrsid15340299 Date(format)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813 \endash where format is something like \'93d MMM yyyy\'94 or \'93dd/MM/yy\'94 etc}{\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13640472
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid939189\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid939189\charrsid15340299 ToPascalCase(text)}{\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid939189 \endash converts \'93user_name\'94 to \'93UserName\'94 for example}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3482954
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f3\fs20\insrsid939189\charrsid15340299 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid939189\charrsid15340299 ToCamelCase(text)}{\rtlch\fcs1
+\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid939189 \endash converts \'93FirstName\'94 to \'93firstName\'94 for example
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid939189 \loch\af3\dbch\af0\hich\f3 \'b7\tab}(if you want more email me or better yet send a patch for the \'93}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
+\f1\fs20\insrsid939189\charrsid939189 TemplateHost}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid939189 \'94 class!)
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\tx3600\wrapdefault\faauto\rin0\lin0\itap0\pararsid9329129 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13640472
+\par }\pard \ltrpar\ql \li3600\ri0\nowidctlpar\tx3600\wrapdefault\faauto\rin0\lin3600\itap0\pararsid9329129 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9329129\charrsid9329129
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid939189 Sample - All Table Names}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9527813
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid9527813 #foreach }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid9527813 ($table in }{\rtlch\fcs1
+\af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid9527813 $\{Host.Model.Tables\}}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid9527813 )
+\par Table: }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid9527813 $\{table.Name\}
+\par }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid9527813 #end
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par Sample Output:
+\par
+\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid9527813 Table: Categories
+\par Table: Customers
+\par Table: Employees
+\par Table: Order Details
+\par Table: Orders
+\par Table: Products
+\par Table: Shippers
+\par Table: Suppliers
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9527813
+\par
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid13906272\charrsid13906272 Sample - CSharp Model.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9527813\charrsid13906272
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13906272
+\par A simple script to produce a C# class for each table:
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13906272\charrsid13906272
+\par }\pard \ltrpar\ql \li720\ri0\widctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid13906272 {\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid13906272 #foreach }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid13906272
+($table in $Host.Model.Tables)
+\par public class }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid13906272 $\{table.Name\}
+\par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid13906272 \{
+\par }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid13906272 #foreach }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid13906272 ($c in $table.Columns)
+\par \tab public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid13906272 $\{c.DbType.SystemType\} $\{Host.ToPascalCase($c.Name)\} }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid13906272 \{ get; set; \}
+\par }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid13906272 #end
+\par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid13906272 \}
+\par }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid13906272 #end
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13906272
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13906272 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13906272 Sample Output:
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13906272
+\par }\pard \ltrpar\ql \li720\ri0\widctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid4084760 {\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf6\insrsid4084760 class }{\rtlch\fcs1
+\af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 Categories
+\par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 Int32 CategoryID }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String CategoryName }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String Description }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 Byte}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 [] }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 Picture }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{
+}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; \}
+\par \}
+\par }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf6\insrsid4084760 class }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 Customers
+\par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String CustomerID }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String CompanyName }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String ContactName }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String ContactTitle }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String Address }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 {\*\xmlopen\xmlns2{\factoidname PlaceName}}{\*\xmlopen\xmlns2{\factoidname place}}System}{\rtlch\fcs1
+\af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String{\*\xmlclose} {\*\xmlopen\xmlns2{\factoidname PlaceType}}City{\*\xmlclose}{\*\xmlclose} }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1
+\af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String Region }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String PostalCode }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String Country }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String Phone }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf17\insrsid4084760 ; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \tab }{\rtlch\fcs1 \ab\af2\afs20 \ltrch\fcs0 \b\f2\fs20\cf2\insrsid4084760 public }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 System}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 .}{\rtlch\fcs1 \af2\afs20
+\ltrch\fcs0 \f2\fs20\cf1\insrsid4084760 String Fax }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 \{ }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 get}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760
+; }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf18\insrsid4084760 set}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf17\insrsid4084760 ; \}
+\par \}
+\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid4084760 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4084760 ...
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4084760
+\par
+\par
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid11956202\charrsid4728322 Sample - Plugin Access.txt
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11956202
+\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4728322 You can import a plug-in to the script using it\rquote s fully qualified type name and access the properties and methods for that plug-in. Note that the name of the plug-in variable
+in the template has the dots replaced with underscores (i.e. \'93}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4728322\charrsid4728322 MiniSqlQuery.PlugIns.CoreApplicationPlugIn}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4728322 \'94
+ has a variable name of \'93}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4728322\charrsid4728322 MiniSqlQuery_PlugIns_CoreApplicationPlugIn}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4728322 \'94)
+\par
+\par }\pard \ltrpar\ql \li720\ri0\widctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid11956202 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11956202 #@import-plugin MiniSqlQuery.PlugIns.CoreApplicationPlugIn
+\par
+\par \\}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid11956202 $\{MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginName\}}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11956202 :
+\par "}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid11956202 $\{MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginName\}}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11956202 "
+\par \\}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid11956202 $\{MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginDescription\}
+\par }{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf1\insrsid11956202 "}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\cf2\insrsid11956202 $\{MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginDescription\}}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0
+\f2\fs20\cf1\insrsid11956202 "
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11956202
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid4728322 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4728322 Sample Output:
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11956202
+\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid4728322 {\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid4728322\charrsid4728322 $\{MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginName\}:
+\par "Mini SQL Query Core"
+\par $\{MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginDescription\}
+\par "Plugin to setup the core features of Mini SQL Query."}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \f2\fs20\insrsid11956202\charrsid4728322
+\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
+72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
+2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
+44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7
+065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000
+00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08
+84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc
+52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353
+bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468
+656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c
+070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7
+29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65
+312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8
+a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04
+98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c
+94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471
+7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671
+9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1
+e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5
+193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1
+17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2
+8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6
+6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a
+668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847
+bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e
+16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b
+5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0
+8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2
+c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966
+0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b
+7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb
+9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0
+088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf
+8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26
+ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0
+28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6
+345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93
+b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30
+254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74
+68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24
+51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198
+720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528
+a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000
+000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000
+002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468
+656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000
+00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000
+00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 Normal;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 heading 1;\lsdqformat1 \lsdpriority0 heading 2;\lsdqformat1 \lsdpriority0 heading 3;\lsdqformat1 \lsdpriority0 heading 4;\lsdqformat1 \lsdpriority0 heading 5;\lsdqformat1 \lsdpriority0 heading 6;
+\lsdqformat1 \lsdpriority0 heading 7;\lsdqformat1 \lsdpriority0 heading 8;\lsdqformat1 \lsdpriority0 heading 9;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 7;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 8;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 toc 9;\lsdqformat1 \lsdpriority0 caption;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 Title;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 Default Paragraph Font;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 Subtitle;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdpriority0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;
+\lsdunhideused0 \lsdlocked0 Revision;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;
+\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 0105000002000000180000004d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000003053
+7f9ffb45ca01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateHost.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateHost.cs
new file mode 100644
index 0000000..f699214
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateHost.cs
@@ -0,0 +1,155 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Globalization;
+using System.Text;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The template host.</summary>
+ public class TemplateHost : IDisposable
+ {
+ /// <summary>The _database inspector.</summary>
+ private readonly IDatabaseInspector _databaseInspector;
+
+ private TemplateData _data;
+
+ /// <summary>Initializes a new instance of the <see cref="TemplateHost"/> class.</summary>
+ /// <param name="applicationServices">The application services.</param>
+ /// <param name="databaseInspector">The database inspector.</param>
+ public TemplateHost(IApplicationServices applicationServices, IDatabaseInspector databaseInspector)
+ {
+ Services = applicationServices;
+ _databaseInspector = databaseInspector;
+ }
+
+ /// <summary>Gets or sets Data.</summary>
+ public TemplateData Data
+ {
+ get
+ {
+ if (_data == null)
+ {
+ _data = Services.Resolve<TemplateData>();
+ }
+ return _data;
+ }
+ set { _data = value; }
+ }
+
+ /// <summary>Gets MachineName.</summary>
+ public string MachineName
+ {
+ get { return Environment.MachineName; }
+ }
+
+ /// <summary>Gets Model.</summary>
+ public DbModelInstance Model
+ {
+ get
+ {
+ if (_databaseInspector.DbSchema == null)
+ {
+ _databaseInspector.LoadDatabaseDetails();
+ }
+
+ return _databaseInspector.DbSchema;
+ }
+ }
+
+ /// <summary>Gets Services.</summary>
+ public IApplicationServices Services { get; private set; }
+
+ /// <summary>Gets UserName.</summary>
+ public string UserName
+ {
+ get { return Environment.UserName; }
+ }
+
+ // to do - helper functions for changing names too code friendly etc
+
+ /// <summary>The date.</summary>
+ /// <param name="format">The format.</param>
+ /// <returns>The date.</returns>
+ public string Date(string format)
+ {
+ return DateTime.Now.ToString(format);
+ }
+
+ /// <summary>The to camel case.</summary>
+ /// <param name="text">The text.</param>
+ /// <returns>The to camel case.</returns>
+ public string ToCamelCase(string text)
+ {
+ if (text == null)
+ {
+ return string.Empty;
+ }
+
+ StringBuilder sb = new StringBuilder();
+ text = ToPascalCase(text);
+
+ for (int i = 0; i < text.Length; i++)
+ {
+ if (Char.IsUpper(text, i))
+ {
+ sb.Append(Char.ToLower(text[i]));
+ }
+ else
+ {
+ // allows for names that start with an acronym, e.g. "ABCCode" -> "abcCode"
+ if (i > 1)
+ {
+ i--; // reverse one
+ sb.Remove(i, 1); // drop last lower cased char
+ }
+
+ sb.Append(text.Substring(i));
+ break;
+ }
+ }
+
+ return sb.ToString();
+ }
+
+ /// <summary>The to pascal case.</summary>
+ /// <param name="text">The text.</param>
+ /// <returns>The to pascal case.</returns>
+ public string ToPascalCase(string text)
+ {
+ if (text == null)
+ {
+ return string.Empty;
+ }
+
+ if (text.Contains(" ") || text.Contains("_"))
+ {
+ text = text.Replace("_", " ");
+ text = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(text);
+ text = text.Replace(" ", string.Empty);
+ }
+ else if (text.Length > 1)
+ {
+ text = char.ToUpper(text[0]) + text.Substring(1);
+ }
+
+ return text;
+ }
+
+ /// <summary>The dispose.</summary>
+ public void Dispose()
+ {
+ if (Data != null)
+ {
+ Data.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateModel.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateModel.cs
new file mode 100644
index 0000000..b1a1324
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateModel.cs
@@ -0,0 +1,202 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Template;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The template model.</summary>
+ public class TemplateModel
+ {
+ /// <summary>The extension.</summary>
+ public const string Extension = "extension";
+
+ /// <summary>The _formatter.</summary>
+ private readonly ITextFormatter _formatter;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>Initializes a new instance of the <see cref="TemplateModel"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="formatter">The formatter.</param>
+ public TemplateModel(IApplicationServices services, ITextFormatter formatter)
+ {
+ _services = services;
+ _formatter = formatter;
+ }
+
+ /// <summary>The get value for parameter.</summary>
+ /// <param name="parameter">The parameter.</param>
+ public delegate string GetValueForParameter(string parameter);
+
+ /// <summary>The create nodes.</summary>
+ /// <returns></returns>
+ public TreeNode[] CreateNodes()
+ {
+ string path = GetTemplatePath();
+ return CreateNodes(path, GetFilesForFolder(path));
+ }
+
+ /// <summary>The create nodes.</summary>
+ /// <param name="rootPath">The root path.</param>
+ /// <param name="files">The files.</param>
+ /// <returns></returns>
+ public TreeNode[] CreateNodes(string rootPath, string[] files)
+ {
+ List<TreeNode> nodes = new List<TreeNode>();
+
+ foreach (string file in files)
+ {
+ if (file.StartsWith(rootPath))
+ {
+ FileInfo fi = new FileInfo(file);
+
+ TreeNode node = new TreeNode(Path.GetFileNameWithoutExtension(fi.FullName));
+ node.ImageKey = "script_code";
+ node.SelectedImageKey = "script_code";
+ node.Tag = fi; // store file info on tag
+ node.ToolTipText = fi.FullName;
+
+ nodes.Add(node);
+ }
+ }
+
+ return nodes.ToArray();
+ }
+
+ /// <summary>The get files for folder.</summary>
+ /// <param name="path">The path.</param>
+ /// <returns></returns>
+ public string[] GetFilesForFolder(string path)
+ {
+ return Directory.GetFiles(path, "*.mt", SearchOption.TopDirectoryOnly);
+ }
+
+ /// <summary>The get template path.</summary>
+ /// <returns>The get template path.</returns>
+ public string GetTemplatePath()
+ {
+ string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ path = Path.Combine(path, TemplateResources.TemplatesDirectoryName);
+
+ return path;
+ }
+
+ /// <summary>The infer extension from filename.</summary>
+ /// <param name="filename">The filename.</param>
+ /// <param name="items">The items.</param>
+ /// <returns>The infer extension from filename.</returns>
+ public string InferExtensionFromFilename(string filename, Dictionary<string, object> items)
+ {
+ string ext = Path.GetExtension(filename);
+ string templateFilename = Path.GetFileNameWithoutExtension(filename);
+ if (ext.ToLower() == ".mt" && templateFilename.Contains("."))
+ {
+ return Path.GetExtension(templateFilename).Substring(1);
+ }
+
+ // default
+ return "sql";
+ }
+
+ /// <summary>The pre process template.</summary>
+ /// <param name="lines">The lines.</param>
+ /// <param name="getValueForParameter">The get value for parameter.</param>
+ /// <param name="items">The items.</param>
+ /// <returns>The pre process template.</returns>
+ public string PreProcessTemplate(
+ string[] lines,
+ GetValueForParameter getValueForParameter,
+ Dictionary<string, object> items)
+ {
+ int i = 0;
+ for (; i < lines.Length; i++)
+ {
+ string line = lines[i];
+ if (line.StartsWith("#@"))
+ {
+ // process cmd
+ if (line.StartsWith("#@get ", StringComparison.CurrentCultureIgnoreCase))
+ {
+ string name = line.Substring("#@get ".Length);
+ string val = getValueForParameter(name);
+ items.Add(name, val);
+ }
+ else if (line.StartsWith("#@set extension ", StringComparison.CurrentCultureIgnoreCase))
+ {
+ items[Extension] = line.Substring("#@set extension ".Length);
+ }
+ else if (line.StartsWith("#@import-plugin ", StringComparison.CurrentCultureIgnoreCase))
+ {
+ string pluginKeyName = line.Substring("#@import-plugin ".Length);
+ items[pluginKeyName.Replace(".", "_")] = _services.Resolve<IPlugIn>(pluginKeyName);
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ string text = string.Join(Environment.NewLine, lines, i, lines.Length - i);
+
+ return text;
+ }
+
+ /// <summary>The process template.</summary>
+ /// <param name="text">The text.</param>
+ /// <param name="items">The items.</param>
+ /// <returns></returns>
+ public TemplateResult ProcessTemplate(string text, Dictionary<string, object> items)
+ {
+ if (items == null)
+ {
+ items = new Dictionary<string, object>();
+ }
+
+ TemplateResult result;
+
+ using (TemplateHost host = _services.Resolve<TemplateHost>())
+ {
+ items.Add("Host", host);
+ items.Add("Data", host.Data);
+
+ result = new TemplateResult();
+ result.Text = _formatter.Format(text, items);
+ result.Extension = "sql";
+ if (items.ContainsKey(Extension))
+ {
+ result.Extension = (string)items[Extension];
+ }
+ }
+
+ return result;
+ }
+
+ /// <summary>The process template file.</summary>
+ /// <param name="filename">The filename.</param>
+ /// <param name="getValueForParameter">The get value for parameter.</param>
+ /// <returns></returns>
+ public TemplateResult ProcessTemplateFile(string filename, GetValueForParameter getValueForParameter)
+ {
+ Dictionary<string, object> items = new Dictionary<string, object>();
+ string[] lines = File.ReadAllLines(filename);
+
+ items[Extension] = InferExtensionFromFilename(filename, items);
+
+ string text = PreProcessTemplate(lines, getValueForParameter, items);
+ return ProcessTemplate(text, items);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResources.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResources.Designer.cs
new file mode 100644
index 0000000..8f33b18
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResources.Designer.cs
@@ -0,0 +1,82 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class TemplateResources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal TemplateResources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MiniSqlQuery.PlugIns.TemplateViewer.TemplateResources", typeof(TemplateResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch37\stshfhich37\stshfbi37\deflang3081\deflangfe3081\themelang3081\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+ ///{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial{\*\falt Arial};}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 0505010201070602 [rest of string was truncated]";.
+ /// </summary>
+ internal static string TemplateHelp {
+ get {
+ return ResourceManager.GetString("TemplateHelp", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Templates.
+ /// </summary>
+ internal static string TemplatesDirectoryName {
+ get {
+ return ResourceManager.GetString("TemplatesDirectoryName", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResources.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResources.resx
new file mode 100644
index 0000000..55c706a
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResources.resx
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="TemplateHelp" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>templatehelp.rtf;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+ </data>
+ <data name="TemplatesDirectoryName" xml:space="preserve">
+ <value>Templates</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResult.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResult.cs
new file mode 100644
index 0000000..bd525b6
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateResult.cs
@@ -0,0 +1,67 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The template result.</summary>
+ public class TemplateResult
+ {
+ /// <summary>Gets or sets Extension.</summary>
+ public string Extension { get; set; }
+
+ /// <summary>
+ /// Converts the <see cref="Extension"/> to an Editor "Syntax Name" such as "C#".
+ /// </summary>
+ public string SyntaxName
+ {
+ get
+ {
+ string ext = Extension ?? string.Empty;
+ switch (ext.ToLower())
+ {
+ case "bat":
+ case "boo":
+ case "coco":
+ case "java":
+ case "patch":
+ case "php":
+ case "tex":
+ case "xml":
+ case "sql":
+ case "txt":
+ return Extension;
+
+ case "asp":
+ case "aspx":
+ case "htm":
+ case "html":
+ return "ASP/XHTML";
+
+ case "vb":
+ return "VBNET";
+
+ case "js":
+ return "JavaScript";
+
+ case "cpp":
+ case "cxx":
+ return "C++.NET";
+
+ case "cs":
+ return "C#";
+
+ default:
+ return string.Empty;
+ }
+ }
+ }
+
+ /// <summary>Gets or sets Text.</summary>
+ public string Text { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewerLoader.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewerLoader.cs
new file mode 100644
index 0000000..8d56921
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewerLoader.cs
@@ -0,0 +1,35 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.PlugIns.TemplateViewer.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The template viewer loader.</summary>
+ public class TemplateViewerLoader : PluginLoaderBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="TemplateViewerLoader"/> class.</summary>
+ public TemplateViewerLoader()
+ : base("Template Viewer", "A Mini SQL Query Plugin for displaying template SQL items.", 50)
+ {
+ }
+
+ /// <summary>Iinitialize the plug in.</summary>
+ public override void InitializePlugIn()
+ {
+ Services.RegisterEditor<TemplateEditorForm>(new FileEditorDescriptor("Template Editor", "mt-editor", "mt"));
+ Services.RegisterComponent<TemplateHost>("TemplateHost");
+ Services.RegisterComponent<TemplateData>("TemplateData");
+
+ Services.RegisterComponent<TemplateViewForm>("TemplateViewForm");
+ Services.HostWindow.AddPluginCommand<RunTemplateCommand>();
+ Services.HostWindow.ShowToolWindow(Services.Resolve<TemplateViewForm>(), DockState.DockLeft);
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.cs
new file mode 100644
index 0000000..a2f45a8
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.cs
@@ -0,0 +1,152 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.IO;
+using System.Windows.Forms;
+using Microsoft.VisualBasic;
+using MiniSqlQuery.Core;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ /// <summary>The template view form.</summary>
+ public partial class TemplateViewForm : DockContent
+ {
+ /// <summary>The _model.</summary>
+ private readonly TemplateModel _model;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _selected file.</summary>
+ private FileInfo _selectedFile;
+
+ /// <summary>Initializes a new instance of the <see cref="TemplateViewForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="model">The model.</param>
+ public TemplateViewForm(IApplicationServices services, TemplateModel model)
+ {
+ InitializeComponent();
+ _services = services;
+ _model = model;
+ }
+
+ /// <summary>The get value.</summary>
+ /// <param name="name">The name.</param>
+ /// <returns>The get value.</returns>
+ private string GetValue(string name)
+ {
+ string val = Interaction.InputBox(string.Format("Value for '{0}'", name), "Supply a Value", name, -1, -1);
+ return val;
+ }
+
+ /// <summary>The populate tree.</summary>
+ private void PopulateTree()
+ {
+ tvTemplates.Nodes[0].Nodes.Clear();
+ tvTemplates.Nodes[0].Nodes.AddRange(_model.CreateNodes());
+ tvTemplates.Nodes[0].Expand();
+ }
+
+ /// <summary>The run template.</summary>
+ /// <param name="fi">The fi.</param>
+ private void RunTemplate(FileInfo fi)
+ {
+ TemplateResult templateResult = _model.ProcessTemplateFile(fi.FullName, GetValue);
+
+ // display in new window
+ IFileEditorResolver resolver = _services.Resolve<IFileEditorResolver>();
+ IEditor editor = _services.Resolve<IEditor>(resolver.ResolveEditorNameByExtension(templateResult.Extension));
+ editor.AllText = templateResult.Text;
+ editor.SetSyntax(templateResult.SyntaxName);
+ _services.HostWindow.DisplayDockedForm(editor as DockContent);
+ }
+
+ /// <summary>The template view form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void TemplateViewForm_Load(object sender, EventArgs e)
+ {
+ PopulateTree();
+ templateFileWatcher.Path = _model.GetTemplatePath();
+ }
+
+ /// <summary>The template file watcher_ changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void templateFileWatcher_Changed(object sender, FileSystemEventArgs e)
+ {
+ PopulateTree();
+ }
+
+ /// <summary>The template file watcher_ renamed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void templateFileWatcher_Renamed(object sender, RenamedEventArgs e)
+ {
+ // todo - scan and modify tree
+ PopulateTree();
+ }
+
+ /// <summary>The tool strip menu item edit_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripMenuItemEdit_Click(object sender, EventArgs e)
+ {
+ if (_selectedFile != null)
+ {
+ IFileEditorResolver resolver = _services.Resolve<IFileEditorResolver>();
+ var editor = resolver.ResolveEditorInstance(_selectedFile.FullName);
+ editor.FileName = _selectedFile.FullName;
+ editor.LoadFile();
+ _services.HostWindow.DisplayDockedForm(editor as DockContent);
+ }
+ }
+
+ /// <summary>The tool strip menu item run_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void toolStripMenuItemRun_Click(object sender, EventArgs e)
+ {
+ if (_selectedFile != null)
+ {
+ RunTemplate(_selectedFile);
+ }
+ }
+
+ /// <summary>The tv templates_ node mouse click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void tvTemplates_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
+ {
+ FileInfo fi = null;
+ if (e.Button == MouseButtons.Right && e.Node != null && e.Node.Tag is FileInfo)
+ {
+ fi = e.Node.Tag as FileInfo;
+ }
+
+ _selectedFile = fi;
+ treeMenuStrip.Enabled = _selectedFile != null;
+ }
+
+ /// <summary>The tv templates_ node mouse double click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void tvTemplates_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
+ {
+ if (e != null && e.Node != null)
+ {
+ FileInfo fi = e.Node.Tag as FileInfo;
+ if (fi != null)
+ {
+ RunTemplate(fi);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.Designer.cs
new file mode 100644
index 0000000..98015de
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.Designer.cs
@@ -0,0 +1,134 @@
+namespace MiniSqlQuery.PlugIns.TemplateViewer
+{
+ partial class TemplateViewForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Templates");
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TemplateViewForm));
+ this.tvTemplates = new System.Windows.Forms.TreeView();
+ this.treeMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.toolStripMenuItemRun = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItemEdit = new System.Windows.Forms.ToolStripMenuItem();
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
+ this.templateFileWatcher = new System.IO.FileSystemWatcher();
+ this.treeMenuStrip.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.templateFileWatcher)).BeginInit();
+ this.SuspendLayout();
+ //
+ // tvTemplates
+ //
+ this.tvTemplates.ContextMenuStrip = this.treeMenuStrip;
+ this.tvTemplates.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tvTemplates.HideSelection = false;
+ this.tvTemplates.ImageKey = "folder_page";
+ this.tvTemplates.ImageList = this.imageList;
+ this.tvTemplates.Indent = 15;
+ this.tvTemplates.Location = new System.Drawing.Point(0, 0);
+ this.tvTemplates.Name = "tvTemplates";
+ treeNode1.Name = "templates";
+ treeNode1.Text = "Templates";
+ this.tvTemplates.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
+ treeNode1});
+ this.tvTemplates.SelectedImageIndex = 0;
+ this.tvTemplates.ShowRootLines = false;
+ this.tvTemplates.Size = new System.Drawing.Size(292, 266);
+ this.tvTemplates.TabIndex = 0;
+ this.tvTemplates.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvTemplates_NodeMouseDoubleClick);
+ this.tvTemplates.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvTemplates_NodeMouseClick);
+ //
+ // treeMenuStrip
+ //
+ this.treeMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripMenuItemRun,
+ this.toolStripMenuItemEdit});
+ this.treeMenuStrip.Name = "treeMenuStrip";
+ this.treeMenuStrip.Size = new System.Drawing.Size(148, 48);
+ //
+ // toolStripMenuItemRun
+ //
+ this.toolStripMenuItemRun.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
+ this.toolStripMenuItemRun.Name = "toolStripMenuItemRun";
+ this.toolStripMenuItemRun.Size = new System.Drawing.Size(147, 22);
+ this.toolStripMenuItemRun.Text = "Run";
+ this.toolStripMenuItemRun.Click += new System.EventHandler(this.toolStripMenuItemRun_Click);
+ //
+ // toolStripMenuItemEdit
+ //
+ this.toolStripMenuItemEdit.Name = "toolStripMenuItemEdit";
+ this.toolStripMenuItemEdit.Size = new System.Drawing.Size(147, 22);
+ this.toolStripMenuItemEdit.Text = "Edit Template";
+ this.toolStripMenuItemEdit.Click += new System.EventHandler(this.toolStripMenuItemEdit_Click);
+ //
+ // imageList
+ //
+ this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+ this.imageList.Images.SetKeyName(0, "folder_page");
+ this.imageList.Images.SetKeyName(1, "script");
+ this.imageList.Images.SetKeyName(2, "script_code");
+ //
+ // templateFileWatcher
+ //
+ this.templateFileWatcher.EnableRaisingEvents = true;
+ this.templateFileWatcher.Filter = "*.mt";
+ this.templateFileWatcher.NotifyFilter = ((System.IO.NotifyFilters)((System.IO.NotifyFilters.FileName | System.IO.NotifyFilters.LastWrite)));
+ this.templateFileWatcher.SynchronizingObject = this;
+ this.templateFileWatcher.Renamed += new System.IO.RenamedEventHandler(this.templateFileWatcher_Renamed);
+ this.templateFileWatcher.Deleted += new System.IO.FileSystemEventHandler(this.templateFileWatcher_Changed);
+ this.templateFileWatcher.Created += new System.IO.FileSystemEventHandler(this.templateFileWatcher_Changed);
+ this.templateFileWatcher.Changed += new System.IO.FileSystemEventHandler(this.templateFileWatcher_Changed);
+ //
+ // TemplateViewForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(292, 266);
+ this.Controls.Add(this.tvTemplates);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "TemplateViewForm";
+ this.TabText = "Templates";
+ this.Text = "Templates";
+ this.Load += new System.EventHandler(this.TemplateViewForm_Load);
+ this.treeMenuStrip.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.templateFileWatcher)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TreeView tvTemplates;
+ private System.Windows.Forms.ImageList imageList;
+ private System.Windows.Forms.ContextMenuStrip treeMenuStrip;
+ private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemRun;
+ private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEdit;
+ private System.IO.FileSystemWatcher templateFileWatcher;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.resx
new file mode 100644
index 0000000..2e7b765
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TemplateViewer/TemplateViewForm.resx
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="treeMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>120, 17</value>
+ </metadata>
+ <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <data name="imageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
+ LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
+ ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD8
+ CgAAAk1TRnQBSQFMAgEBAwEAAQQBAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
+ AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
+ AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
+ AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
+ AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
+ AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
+ ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
+ AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
+ AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
+ AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
+ AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
+ AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
+ AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
+ AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
+ AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
+ ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
+ Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
+ AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
+ AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
+ AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
+ ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
+ Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
+ AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
+ AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
+ AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
+ AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
+ AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
+ AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAAUwMUgFMAgABoQGn
+ BIYFiwGRAYYBoQIAAaEBpwSGBYsBkQGGAaESAAFSAcMHmgN6AcMBUgIAAccBtAG7AQkB8AHxAfMB9AL/
+ ARkB9AG1AccCAAHHAbQBuwEJAfAB8QHzAfQC/wEZAfQBtQHHEgABUgH2BJoEegJZAcMBUgIAAacBtQj/
+ AbUBGQG1AacCAAGnAbUI/wG1ARkBtQGnEgABUgH2BZoEegFZAcMBUgIAAccBiwm0ARkBCQGnAgABxwGL
+ CbQBGQEJAacSAAFSAfYFmgWZAfABUgKtAaEBpwG1AfQDCQQZAfQBCQGnAgABoQGnAbUB9AMJBBkB9AEJ
+ AacSAAFSAv8D9gaaAcMBUgH0Ac8BAAGhAbQB/wgZAfEBrQMAAaEDtAEZArQBCQMZAfEBrRIAAVIB9gF5
+ AXQBUgGaAfQG/wFSAfQBtAEAAaEBtAH/CBkB8wGtAwABoQGzArQBGQO0AQkCGQHzAa0SAAFSAfYCmgF6
+ CVIB9AG0AQABoQGzAf8IGQH/AbMBoQEAAccBtAHVAbQBCQEZAQkBtAHVAbQB3AEZAf8BswGhEQABUgH2
+ A5oBGgG0Af8GGQH/AbQCAAGzAf8IGQH/AbQBoQEAAbQB2wG0BBkBCQG0AdsBtAEZAf8BtAGhEQABUgX/
+ AQkB/wYZAfQBtAIAAa0B8wgZAf8BtAGhAQABxwHVAdsBtAIZAQkB1QHbAdUB3AEZAf8BtAGhEQABdAV5
+ AQkB/wYZAfQBtAIAAa0BGQH0BxkB/wG0AbMBxwEAAaEBswHbAdUBGQLbAdUDGQH/AbQBswHHFgABCQH/
+ BBkB3QEJAfQBtAIAAa0BCQH/BxkB/wG0ARkBswIAAa0BtAHVARkC2wQZAf8BtAEZAbMWAAEJAf8EGQHz
+ AfQB/wG0AgABrQEJAf8EGQP0Af8BtAH/AbsCAAGtAQkB/wQZA/QB/wG0Af8BuxYAAQkB9AMZAQkB/wEZ
+ AQkBpwIAAa0BCQH/BPQF/wEZAbQCAAGtAQkB/wT0Bf8BGQG0FgABCQH/BfQB3AGtAaECAAGnAdwF/wH0
+ AxkBCQG0AacCAAGnAdwF/wH0AxkBCQG0AacWAAQJA7QBpwGhAwABxwGzAdwB2wK6ArQCswKtAacBoQIA
+ AccBswHcAdsCugK0ArMCrQGnAaEQAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/
+ AgABAwEAAQMBAAEDAwABAwEAAQMBAAEDAwABAwEAAQMBAAEDAwABAwEAAQMBAAEDBQABAwEAAQMEAAGA
+ AQMBgAEDBAABgAEDAYABAwQAAYABAQEAAQEEAAHAAQEBAAEBBAABwAEBAQABAQQAAcABAAGAAwAB/AEA
+ AcABAAHAAwAB/AEAAcABAAHAAwAB/AEAAcABAAHAAwAB/AEAAcABAAHAAwAB/AEBAcABAAHAAwAL
+</value>
+ </data>
+ <metadata name="templateFileWatcher.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>250, 17</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAA////ACyG2ADFdEQAguH3AOzBkwDJ2NYAQNHyANCebQCGwcYA/+LLAFWq4gDM8vsArOH2ADS0
+ 2QDz0a8AcLznAF7Z9ADv8ugAkcnrAMyHWAA2mtoA6Pb7AJDO1wCY4fYAXsLhAHDT8gD/6tsA/vbwAMyW
+ XwD32bwAT9XzAJPX4wDa8/gAwur4AOq7iADz/P4AN6baAHHe9gBkvOkA+u/kAOS6kQB61/MAjMjPADOO
+ 2QCO5PgA6sOdAPXp3QDKf1MATaXgAPnexABn2/UAidz1AP3m1ACf5fQAet/3AJHe9QCT2+kA/fPpAJPS
+ 3ADmv5YAgNn0AJTm+AA1lNoA9dO0APrgygCa5vcAzoFWADWr2gD4/f8AbNz2AMqEUgA2odoA/vz7APrz
+ 7wCJ4/gAn+D1APv48wD85NAAdNXzAIXa9ADv+v4A+uLEANzw+gA1r9oA+vLnAP/n1wD68+sA/OLNAJrk
+ 9ADLhVUAd972AIbi9wD++fMA/vXtAPv27wBb2PQA/N7FAJHl+ACV4PYA/f79AP/l0gD74McA+tzCAH/h
+ 9wCO3vUAk9z0ADaz2gDRoGwA//fyAPb8/gDy+v0AYMPiAPvjywD217sAlN71AMyDVQAtiNgATdTzAOS7
+ kwD98ucA/+nZAP3n1gD85dIAneX1AP3+/wD/59UAyvL7AIvj+ADMhlYA//38AP307gD638gAkt/2AMqA
+ VADKg1MANqraAPb9/wD1/P8A//fwAP738QD+8+gA5b6WAPzy6AD95dEA++LMAJPl+ACb5vYALYfYAMyH
+ VwD///4A/v//AP7+/wD+/v0AX8PiAP3+/gD+/fwA5LuRAPf8/gDku5IA//fxAPH6/QD98+oA+u/jAP7n
+ 1QD8480A/OTRAPncwgD53cQAj+T4AJDl+ACS5fgAlOX4AJ7l9QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAnWUdXV1dXV1dXWUdQIAACxTGGOFaTRQPSpPGiI/AAA/UZKpSwQ3JjNgdgd/PwAAFW8+q6qA
+ XGhbRhEfDD8AAEhurJKSYjkgOxcrCQY/AzAll0WJiiRZQpN8rTYhP4OGRBYQCzETSmSCgpxJmT8SQ4ih
+ c2onPz8/Pz8/Pz8/X3RUni04TA1HoHkbeVZlCqBaa5uXmH2XKYt+ejVOcWeNgQ4ZcHBwmp1tpKSQQTIe
+ eJUAAAAAAACfjHumkahyDygUAAAAAAAAnxxYpYQeL1dNhwAAAAAAAHdeYWanQF1SBQAAAAAAAACOljqi
+ j6NVIwAAAAAAAAAALjyfn2wIHQAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAA/AAAAPwAAAD8AQAA/AMAAPwHAAA=
+</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/Commands/RunTextGeneratorCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/Commands/RunTextGeneratorCommand.cs
new file mode 100644
index 0000000..7b672a8
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/Commands/RunTextGeneratorCommand.cs
@@ -0,0 +1,40 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+
+#endregion
+
+using MiniSqlQuery.Core.Commands;
+
+namespace MiniSqlQuery.PlugIns.TextGenerator.Commands
+{
+ public class RunTextGeneratorCommand : CommandBase
+ {
+ public RunTextGeneratorCommand()
+ : base("Run the (experimental) text to C# class generator")
+ {
+ }
+
+ public override void Execute()
+ {
+ var editor = ActiveFormAsEditor;
+
+ if (editor != null)
+ {
+ var text = editor.SelectedText;
+ if (string.IsNullOrEmpty(text))
+ {
+ text = editor.AllText;
+ }
+
+ var textGeneratorService = new TextGeneratorService();
+ var generatedText = textGeneratorService.Process(text);
+
+ // update editor, just put in the code for now...
+ editor.InsertText(generatedText);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/TextGeneratorLoader.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/TextGeneratorLoader.cs
new file mode 100644
index 0000000..64291ea
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/TextGeneratorLoader.cs
@@ -0,0 +1,29 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.PlugIns.TextGenerator.Commands;
+
+namespace MiniSqlQuery.PlugIns.TextGenerator
+{
+ public class TextGeneratorLoader : PluginLoaderBase
+ {
+ public TextGeneratorLoader()
+ : base(
+ "Text Generator Tools",
+ "A Mini SQL Query Plugin for generating test from... text :-)",
+ 21)
+ {
+ }
+
+ public override void InitializePlugIn()
+ {
+ IHostWindow hostWindow = Services.HostWindow;
+ hostWindow.AddPluginCommand<RunTextGeneratorCommand>();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/TextGeneratorService.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/TextGeneratorService.cs
new file mode 100644
index 0000000..634c234
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/TextGenerator/TextGeneratorService.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Globalization;
+using System.Text;
+
+namespace MiniSqlQuery.PlugIns.TextGenerator
+{
+ public class TextGeneratorService
+ {
+ private const string SpaceString = " ";
+
+ public string Process(string text)
+ {
+ if (string.IsNullOrEmpty(text))
+ {
+ return text;
+ }
+
+ // convert to a class, line 1 is name, rest are props
+
+ var lines = text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
+
+ var sb = new StringBuilder();
+
+ // class name
+ sb.Append("public class ");
+ sb.AppendLine(ToPascalCase(lines[0]));
+ sb.AppendLine("{");
+
+ // properties
+ if (lines.Length > 1)
+ {
+ for (int i = 1; i < lines.Length; i++)
+ {
+ string typeName = "string";
+ var propertyName = ToPascalCase(lines[i]);
+
+ // is it an "id"
+ if (propertyName.EndsWith("id", StringComparison.CurrentCultureIgnoreCase))
+ {
+ typeName = "int";
+ }
+
+ sb.Append("public virtual ");
+ sb.Append(typeName);
+ sb.Append(" ");
+ sb.Append(propertyName);
+ sb.AppendLine(" { get; set; }");
+ }
+ }
+
+ sb.AppendLine("}");
+
+ return sb.ToString();
+ }
+
+ public string ToPascalCase(string text)
+ {
+ // if it has spaces, e.g "first name", or maybe its lower, e.g. "foo". Still allow for "MyID" etc
+ if (text.Contains(SpaceString) || !char.IsUpper(text[0]))
+ {
+ return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(text).Replace(SpaceString, string.Empty).Trim();
+ }
+ return text.Trim();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/Commands/ViewTableFormCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/Commands/ViewTableFormCommand.cs
new file mode 100644
index 0000000..393a83a
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/Commands/ViewTableFormCommand.cs
@@ -0,0 +1,39 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.ViewTable.Commands
+{
+ /// <summary>The view table form command.</summary>
+ public class ViewTableFormCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ViewTableFormCommand"/> class.</summary>
+ public ViewTableFormCommand()
+ : base("&View table...")
+ {
+ ShortcutKeys = Keys.Control | Keys.T;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ IQueryEditor queryForm = HostWindow.Instance.ActiveMdiChild as IQueryEditor;
+ if (queryForm != null)
+ {
+ string tableName = queryForm.SelectedText;
+ IViewTable frm = Services.Resolve<IViewTable>();
+ frm.TableName = tableName;
+ HostWindow.DisplayDockedForm(frm as DockContent);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/Commands/ViewTableFromInspectorCommand.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/Commands/ViewTableFromInspectorCommand.cs
new file mode 100644
index 0000000..80785c8
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/Commands/ViewTableFromInspectorCommand.cs
@@ -0,0 +1,37 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.ViewTable.Commands
+{
+ /// <summary>The view table from inspector command.</summary>
+ public class ViewTableFromInspectorCommand
+ : CommandBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ViewTableFromInspectorCommand"/> class.</summary>
+ public ViewTableFromInspectorCommand()
+ : base("&View table data")
+ {
+ SmallImage = ImageResource.table_go;
+ }
+
+ /// <summary>Execute the command.</summary>
+ public override void Execute()
+ {
+ string tableName = HostWindow.DatabaseInspector.RightClickedTableName;
+ if (tableName != null)
+ {
+ IViewTable frm = Services.Resolve<IViewTable>();
+ frm.TableName = tableName;
+ HostWindow.DisplayDockedForm(frm as DockContent);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/table.ico b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/table.ico
new file mode 100644
index 0000000..a6650d4
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/table.ico differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.cs
new file mode 100644
index 0000000..7ccce01
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.cs
@@ -0,0 +1,531 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.Common;
+using System.Data.SqlClient;
+using System.Diagnostics;
+using System.IO;
+using System.Windows.Forms;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.DbModel;
+using MiniSqlQuery.Properties;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery.PlugIns.ViewTable
+{
+ /// <summary>The view table form.</summary>
+ public partial class ViewTableForm : DockContent, IViewTable
+ {
+ /// <summary>The _batch.</summary>
+ private readonly QueryBatch _batch;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _settings.</summary>
+ private readonly IApplicationSettings _settings;
+
+ /// <summary>The _sync lock.</summary>
+ private readonly object _syncLock = new object();
+
+ /// <summary>The _db connection.</summary>
+ private DbConnection _dbConnection;
+
+ /// <summary>The _is busy.</summary>
+ private bool _isBusy;
+
+ /// <summary>The _meta data service.</summary>
+ private IDatabaseSchemaService _metaDataService;
+
+ /// <summary>The _status.</summary>
+ private string _status = string.Empty;
+
+ private int? _rowCount;
+
+ /// <summary>Stores the widths of the columns for this window.</summary>
+ private Dictionary<string, int> _columnSizes = new Dictionary<string, int>();
+
+ /// <summary>When tru the grid is being resized on fill, used to avoid overriting column width values.</summary>
+ private bool _resizingGrid;
+
+ /// <summary>Initializes a new instance of the <see cref="ViewTableForm"/> class.</summary>
+ public ViewTableForm()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="ViewTableForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ public ViewTableForm(IApplicationServices services, IApplicationSettings settings)
+ : this()
+ {
+ _services = services;
+ _settings = settings;
+ _batch = new QueryBatch();
+ TableName = string.Empty;
+ Text = Resources.ViewData;
+
+ dataGridViewResult.DefaultCellStyle.NullValue = _settings.NullText;
+ dataGridViewResult.DataBindingComplete += DataGridViewResultDataBindingComplete;
+ dataGridViewResult.ColumnWidthChanged += OnColumnWidthChanged;
+ _services.Settings.DatabaseConnectionReset += SettingsDatabaseConnectionReset;
+ _services.SystemMessagePosted += ServicesSystemMessagePosted;
+ }
+
+ /// <summary>Gets a value indicating whether AutoReload.</summary>
+ public bool AutoReload
+ {
+ get { return chkAutoReload.Checked; }
+ }
+
+ /// <summary>Gets Batch.</summary>
+ public QueryBatch Batch
+ {
+ get { return _batch; }
+ }
+
+ /// <summary>Gets CursorColumn.</summary>
+ public int CursorColumn
+ {
+ get { return dataGridViewResult.SelectedCells.Count > 0 ? dataGridViewResult.SelectedCells[0].ColumnIndex : 0; }
+ }
+
+ /// <summary>Gets CursorLine.</summary>
+ public int CursorLine
+ {
+ get { return (dataGridViewResult.CurrentRow != null) ? dataGridViewResult.CurrentRow.Index : 0; }
+ }
+
+ /// <summary>Gets CursorOffset.</summary>
+ public int CursorOffset
+ {
+ get { return CursorLine; }
+ }
+
+ /// <summary>Gets or sets a value indicating whether IsBusy.</summary>
+ public bool IsBusy
+ {
+ get { return _isBusy; }
+ set
+ {
+ lock (_syncLock)
+ {
+ _isBusy = value;
+ }
+ }
+ }
+
+ /// <summary>Gets or sets TableName.</summary>
+ public string TableName
+ {
+ get { return cboTableName.Text; }
+ set { cboTableName.Text = value; }
+ }
+
+ /// <summary>Gets or sets Text.</summary>
+ public override string Text
+ {
+ get { return base.Text; }
+ set
+ {
+ base.Text = value;
+ TabText = Text;
+ }
+ }
+
+ /// <summary>Gets TotalLines.</summary>
+ public int TotalLines
+ {
+ get { return (dataGridViewResult.DataSource != null) ? dataGridViewResult.Rows.Count : 0; }
+ }
+
+ /// <summary>The set status.</summary>
+ /// <param name="text">The text.</param>
+ public void SetStatus(string text)
+ {
+ _status = text;
+ UpdateHostStatus();
+ }
+
+ public void SetRowCount(int? rows)
+ {
+ _rowCount = rows;
+ UpdateHostStatus();
+ }
+
+ /// <summary>The set cursor by location.</summary>
+ /// <param name="line">The line.</param>
+ /// <param name="column">The column.</param>
+ /// <returns>The set cursor by location.</returns>
+ public bool SetCursorByLocation(int line, int column)
+ {
+ if (line > 0 && line <= TotalLines)
+ {
+ dataGridViewResult.FirstDisplayedScrollingRowIndex = line;
+ dataGridViewResult.Refresh();
+ dataGridViewResult.Rows[line].Selected = true;
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>The set cursor by offset.</summary>
+ /// <param name="offset">The offset.</param>
+ /// <returns>The set cursor by offset.</returns>
+ public bool SetCursorByOffset(int offset)
+ {
+ return SetCursorByLocation(offset, 0);
+ }
+
+ /// <summary>The cancel task.</summary>
+ public void CancelTask()
+ {
+ // not supported (yet?)
+ }
+
+ /// <summary>The execute task.</summary>
+ public void ExecuteTask()
+ {
+ LoadTableData();
+ }
+
+ /// <summary>The update host status.</summary>
+ protected void UpdateHostStatus()
+ {
+ _services.HostWindow.SetStatus(this, _status);
+ _services.HostWindow.SetResultCount(this, _rowCount);
+ }
+
+ /// <summary>The data grid view result data binding complete.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DataGridViewResultDataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
+ {
+ DataTable dt = dataGridViewResult.DataSource as DataTable;
+ if (dt == null)
+ {
+ return;
+ }
+
+ try
+ {
+ _resizingGrid = true;
+
+ // create a reasonable default max width for columns
+ int maxColWidth = Math.Max(dataGridViewResult.ClientSize.Width / 2, 100);
+
+ // Autosize the columns then change the widths, gleaned from SO - http://stackoverflow.com/a/1031871/276563
+ dataGridViewResult.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells);
+
+ string nullText = _settings.NullText;
+ string dateTimeFormat = _settings.DateTimeFormat;
+ for (int i = 0; i < dt.Columns.Count; i++)
+ {
+ if (dt.Columns[i].DataType == typeof(DateTime))
+ {
+ DataGridViewCellStyle dateCellStyle = new DataGridViewCellStyle();
+ dateCellStyle.NullValue = nullText;
+ dateCellStyle.Format = dateTimeFormat;
+ dataGridViewResult.Columns[i].DefaultCellStyle = dateCellStyle;
+ }
+
+ // sync column sizes:
+ int columnWidth = dataGridViewResult.Columns[i].Width;
+ dataGridViewResult.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
+
+ string headerText = dataGridViewResult.Columns[i].HeaderText;
+ if (!string.IsNullOrEmpty(headerText) && _columnSizes.ContainsKey(headerText))
+ {
+ // use the previous column size in case its been adjusted etc
+ dataGridViewResult.Columns[i].Width = _columnSizes[headerText];
+ }
+ else
+ {
+ // reset to a the smaller of the 2 sizes, this is mainly for the bigger text columns that throw the size out
+ dataGridViewResult.Columns[i].Width = Math.Min(columnWidth, maxColWidth);
+
+ if (!string.IsNullOrEmpty(headerText))
+ {
+ _columnSizes[headerText] = dataGridViewResult.Columns[i].Width;
+ }
+ }
+ }
+ }
+ finally
+ {
+ _resizingGrid = false;
+ }
+ }
+
+ public void OnColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
+ {
+ if (_resizingGrid)
+ {
+ return;
+ }
+
+ string headerText = e.Column.HeaderText;
+ if (!string.IsNullOrEmpty(headerText))
+ {
+ _columnSizes[headerText] = e.Column.Width;
+ }
+ }
+
+ /// <summary>The get tables and views.</summary>
+ private void GetTablesAndViews()
+ {
+ if (_metaDataService == null)
+ {
+ _metaDataService = DatabaseMetaDataService.Create(_services.Settings.ConnectionDefinition.ProviderName);
+
+ DbModelInstance model = _metaDataService.GetDbObjectModel(_services.Settings.ConnectionDefinition.ConnectionString);
+ List<string> tableNames = new List<string>();
+ foreach (DbModelTable table in model.Tables)
+ {
+ tableNames.Add(Utility.MakeSqlFriendly(table.FullName));
+ }
+
+ foreach (DbModelView view in model.Views)
+ {
+ tableNames.Add(Utility.MakeSqlFriendly(view.FullName));
+ }
+
+ cboTableName.Items.AddRange(tableNames.ToArray());
+ }
+ }
+
+ /// <summary>The load table data.</summary>
+ private void LoadTableData()
+ {
+ if (_services.Settings.ConnectionDefinition == null)
+ {
+ _services.HostWindow.DisplaySimpleMessageBox(this, "Please select a connection.", "Select a Connection");
+ return;
+ }
+
+ GetTablesAndViews();
+
+ DbDataAdapter adapter = null;
+ DbCommand cmd = null;
+ DataTable dt = null;
+ Query query = new Query("SELECT * FROM " + Utility.MakeSqlFriendly(TableName));
+
+ if (string.IsNullOrEmpty(TableName))
+ {
+ Text = Resources.Table_none;
+ return;
+ }
+
+ try
+ {
+ IsBusy = true;
+ UseWaitCursor = true;
+ dataGridViewResult.DataSource = null;
+ Application.DoEvents();
+
+ if (_dbConnection == null)
+ {
+ _dbConnection = _services.Settings.GetOpenConnection();
+ }
+
+ query.Result = new DataSet(TableName + " View");
+ _batch.Clear();
+ _batch.Add(query);
+
+ adapter = _services.Settings.ProviderFactory.CreateDataAdapter();
+ cmd = _dbConnection.CreateCommand();
+ cmd.CommandText = query.Sql;
+ cmd.CommandType = CommandType.Text;
+ SetCommandTimeout(cmd, _settings.CommandTimeout);
+ adapter.SelectCommand = cmd;
+ adapter.Fill(query.Result);
+ SetStatus(string.Format("Loaded table '{0}'", TableName));
+ Text = TableName;
+ }
+ catch (DbException dbExp)
+ {
+ // todo: improve!
+ _services.HostWindow.DisplaySimpleMessageBox(this, dbExp.Message, "View Table Error");
+ SetStatus(dbExp.Message);
+ Text = Resources.ViewDataError;
+ }
+ finally
+ {
+ if (adapter != null)
+ {
+ adapter.Dispose();
+ }
+
+ if (cmd != null)
+ {
+ cmd.Dispose();
+ }
+
+ UseWaitCursor = false;
+ IsBusy = false;
+ }
+
+ if (query.Result != null && query.Result.Tables.Count > 0)
+ {
+ dt = query.Result.Tables[0];
+ Text = Resources.Table_colon + TableName;
+ }
+
+ dataGridViewResult.DefaultCellStyle.NullValue = _settings.NullText;
+ dataGridViewResult.DataSource = dt;
+
+ if (dt != null)
+ {
+ SetRowCount(dt.Rows.Count);
+ }
+ }
+
+
+ /// <summary>
+ /// Sets the command timeout, currently only tested against MSSQL.
+ /// </summary>
+ /// <param name="cmd">The command.</param>
+ /// <param name="commandTimeout">The command timeout.</param>
+ private void SetCommandTimeout(IDbCommand cmd, int commandTimeout)
+ {
+ if (_services.Settings.ProviderFactory is SqlClientFactory)
+ {
+ if (cmd == null)
+ {
+ throw new ArgumentNullException("cmd");
+ }
+ cmd.CommandTimeout = commandTimeout;
+ }
+ else
+ {
+ Trace.WriteLine("Command Timeout only supported by SQL Client (so far)");
+ }
+ }
+
+ /// <summary>The services system message posted.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void ServicesSystemMessagePosted(object sender, SystemMessageEventArgs e)
+ {
+ if (e.Message == SystemMessage.TableTruncated)
+ {
+ if (AutoReload && TableName.Equals(e.Data))
+ {
+ LoadTableData();
+ }
+ }
+ }
+
+ /// <summary>The settings database connection reset.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void SettingsDatabaseConnectionReset(object sender, EventArgs e)
+ {
+ _dbConnection = null;
+ }
+
+ /// <summary>The update status.</summary>
+ /// <param name="msg">The msg.</param>
+ private void UpdateStatus(string msg)
+ {
+ _services.HostWindow.SetStatus(this, msg);
+ Application.DoEvents();
+ }
+
+ /// <summary>The view table form_ shown.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void ViewTableForm_Shown(object sender, EventArgs e)
+ {
+ LoadTableData();
+ }
+
+ /// <summary>The data grid view result_ data error.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void dataGridViewResult_DataError(object sender, DataGridViewDataErrorEventArgs e)
+ {
+ e.ThrowException = false;
+ }
+
+ /// <summary>The lnk export script_ link clicked.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void lnkExportScript_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ DataTable dt = dataGridViewResult.DataSource as DataTable;
+
+ if (dt != null)
+ {
+ var stringWriter = new StringWriter();
+ var hostWindow = _services.HostWindow;
+ var dbModelTable = hostWindow.DatabaseInspector.DbSchema.FindTableOrView(TableName);
+ var sqlWriter = _services.Resolve<ISqlWriter>();
+ sqlWriter.IncludeComments = false;
+ sqlWriter.InsertLineBreaksBetweenColumns = false;
+ sqlWriter.IncludeReadOnlyColumnsInExport = _settings.IncludeReadOnlyColumnsInExport;
+
+ for (int i = 0; i < dt.Rows.Count; i++)
+ {
+ DataRow dataRow = dt.Rows[i];
+
+ foreach (var column in dbModelTable.Columns)
+ {
+ column.DbType.Value = dataRow[dt.Columns[column.Name]];
+ }
+
+ sqlWriter.WriteInsert(stringWriter, dbModelTable);
+ if (_settings.EnableQueryBatching)
+ {
+ stringWriter.WriteLine("GO");
+ }
+
+ stringWriter.WriteLine();
+
+ if (i % 10 == 0)
+ {
+ UpdateStatus(string.Format("Processing {0} of {1} rows", i + 1, dt.Rows.Count));
+ }
+ }
+
+ UpdateStatus(string.Format("Processed {0} rows. Opening file...", dt.Rows.Count));
+
+ // HACK - need to clean up the values for now as the model is holding the last rows data ;-)
+ // TODO - add a "deep clone" method to the table/columns
+ foreach (var column in dbModelTable.Columns)
+ {
+ column.DbType.Value = null;
+ }
+
+ // create a new sql editor and push the sql into it
+ IEditor editor = _services.Resolve<IQueryEditor>();
+ editor.AllText = stringWriter.ToString();
+ hostWindow.DisplayDockedForm(editor as DockContent);
+
+ UpdateStatus(null);
+ }
+ }
+
+ /// <summary>The lnk refresh_ link clicked.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void lnkRefresh_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ LoadTableData();
+ }
+
+ private void ViewTableForm_Activated(object sender, EventArgs e)
+ {
+ UpdateHostStatus();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.Designer.cs
new file mode 100644
index 0000000..869349f
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.Designer.cs
@@ -0,0 +1,171 @@
+namespace MiniSqlQuery.PlugIns.ViewTable
+{
+ partial class ViewTableForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewTableForm));
+ this.dataGridViewResult = new System.Windows.Forms.DataGridView();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.lnkExportScript = new System.Windows.Forms.LinkLabel();
+ this.chkAutoReload = new System.Windows.Forms.CheckBox();
+ this.lnkRefresh = new System.Windows.Forms.LinkLabel();
+ this.cboTableName = new System.Windows.Forms.ComboBox();
+ this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewResult)).BeginInit();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // dataGridViewResult
+ //
+ this.dataGridViewResult.AllowUserToAddRows = false;
+ this.dataGridViewResult.AllowUserToDeleteRows = false;
+ this.dataGridViewResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.dataGridViewResult.DefaultCellStyle = dataGridViewCellStyle1;
+ this.dataGridViewResult.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridViewResult.Location = new System.Drawing.Point(4, 69);
+ this.dataGridViewResult.Name = "dataGridViewResult";
+ this.dataGridViewResult.ReadOnly = true;
+ this.dataGridViewResult.Size = new System.Drawing.Size(562, 294);
+ this.dataGridViewResult.TabIndex = 0;
+ this.dataGridViewResult.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dataGridViewResult_DataError);
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.lnkExportScript);
+ this.groupBox1.Controls.Add(this.chkAutoReload);
+ this.groupBox1.Controls.Add(this.lnkRefresh);
+ this.groupBox1.Controls.Add(this.cboTableName);
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupBox1.Location = new System.Drawing.Point(4, 4);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(562, 65);
+ this.groupBox1.TabIndex = 2;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Table Name";
+ //
+ // lnkExportScript
+ //
+ this.lnkExportScript.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.lnkExportScript.AutoSize = true;
+ this.lnkExportScript.Location = new System.Drawing.Point(469, 29);
+ this.lnkExportScript.Name = "lnkExportScript";
+ this.lnkExportScript.Size = new System.Drawing.Size(76, 13);
+ this.lnkExportScript.TabIndex = 4;
+ this.lnkExportScript.TabStop = true;
+ this.lnkExportScript.Text = "Export Script...";
+ this.toolTip1.SetToolTip(this.lnkExportScript, "Takes the current data and creates a script of insert statements in a new window." +
+ "");
+ this.lnkExportScript.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkExportScript_LinkClicked);
+ //
+ // chkAutoReload
+ //
+ this.chkAutoReload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.chkAutoReload.AutoSize = true;
+ this.chkAutoReload.Checked = true;
+ this.chkAutoReload.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkAutoReload.Location = new System.Drawing.Point(471, 45);
+ this.chkAutoReload.Name = "chkAutoReload";
+ this.chkAutoReload.Size = new System.Drawing.Size(85, 17);
+ this.chkAutoReload.TabIndex = 2;
+ this.chkAutoReload.Text = "Auto Reload";
+ this.toolTip1.SetToolTip(this.chkAutoReload, "Automatically reload the table when a \'Truncate\' action is performed.");
+ this.chkAutoReload.UseVisualStyleBackColor = true;
+ //
+ // lnkRefresh
+ //
+ this.lnkRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.lnkRefresh.AutoSize = true;
+ this.lnkRefresh.Location = new System.Drawing.Point(469, 16);
+ this.lnkRefresh.Name = "lnkRefresh";
+ this.lnkRefresh.Size = new System.Drawing.Size(71, 13);
+ this.lnkRefresh.TabIndex = 1;
+ this.lnkRefresh.TabStop = true;
+ this.lnkRefresh.Text = "Reload Table";
+ this.toolTip1.SetToolTip(this.lnkRefresh, "Reload the selected table now.");
+ this.lnkRefresh.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkRefresh_LinkClicked);
+ //
+ // cboTableName
+ //
+ this.cboTableName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.cboTableName.FormattingEnabled = true;
+ this.cboTableName.Location = new System.Drawing.Point(12, 19);
+ this.cboTableName.MaxDropDownItems = 20;
+ this.cboTableName.Name = "cboTableName";
+ this.cboTableName.Size = new System.Drawing.Size(454, 21);
+ this.cboTableName.TabIndex = 0;
+ //
+ // contextMenuStrip
+ //
+ this.contextMenuStrip.Name = "contextMenuStrip";
+ this.contextMenuStrip.Size = new System.Drawing.Size(61, 4);
+ //
+ // ViewTableForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(570, 367);
+ this.Controls.Add(this.dataGridViewResult);
+ this.Controls.Add(this.groupBox1);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "ViewTableForm";
+ this.Padding = new System.Windows.Forms.Padding(4);
+ this.TabText = "ViewTableForm";
+ this.Text = "ViewTableForm";
+ this.Activated += new System.EventHandler(this.ViewTableForm_Activated);
+ this.Shown += new System.EventHandler(this.ViewTableForm_Shown);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridViewResult)).EndInit();
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.DataGridView dataGridViewResult;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.ComboBox cboTableName;
+ private System.Windows.Forms.LinkLabel lnkRefresh;
+ private System.Windows.Forms.CheckBox chkAutoReload;
+ private System.Windows.Forms.ToolTip toolTip1;
+ private System.Windows.Forms.ContextMenuStrip contextMenuStrip;
+ private System.Windows.Forms.LinkLabel lnkExportScript;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.resx b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.resx
new file mode 100644
index 0000000..e58af44
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableForm.resx
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>132, 17</value>
+ </metadata>
+ <metadata name="contextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>229, 17</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAA////AMOEUgCc1aUA78GiAHa+fADao3oA8OLYAOvRvQCHyY4AzpNkAOSyjAD38esA6MiwANSb
+ bwCQzpgA6bqWAMWKXQB+w4QA9OriAN+qggD79/QA6MSpAOrNtQDXoHQAy45eAILGiQDRl2oA676dAIvL
+ kwCU0J0A4a6HAMeHVgB6wYAAmNOhAPbt5gDy594A5rWQAPr08ADdqH4A6sesAMmKWwDnt5QA8eXbAOrP
+ ugDqy7IA67yaAO3AnwDIjV8A3KV9AOnDpgDEhlQA1p5yAOCshADr078A6smuAPr28gD58+4A05luAOnG
+ qgDIilkAxoxfANGWaADqzrcA6My1AN2pgADqybAA6MiuAOjHrADpupgA+PLtAMaGVQDr0LsA4q+IAOy/
+ ngDltI8A9/DqAMaKXADLj18AzpJjAOvSvgDXoXUA6syzANmkegDpx60A6casAO7BoQDrvZsA47GMAPv2
+ 8gD69vEA+fPvAPPn3gDx5NsA69C6AOnJsADpya4A6setAOe3kwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0Oj5PGSkgAgICAgICAAAAUUZMIxNcXQcHBwcHBxEAAFM5UAE2
+ AQEBYQEBAQc9AAAnW15ISEhICBcXFxcHTQAAFFs/AUgBAQEsWQEBBzAAAB8mLVJSUlI/REQNQwczAABY
+ WjcBQgEBAUQBAQErRwAASzg7VShUYF9EXw1AJDwAACoVMgEWAQEBRAEBAQxOAABFFTIyMjIyMjIyMjIV
+ CgAAVxUBAQEBAQEBAQEBFRsAAEoVAyIeDx0JGhIhBRUOAABWFRUVFRUVFRUVFRUVGAAAAAQvHC4QYiUL
+ STVBMQYAAAAAAAAAAAAAAAAAAAAAAP//AACAAwAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB
+ AACAAQAAgAEAAIABAACAAQAAwAEAAP//AAA=
+</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableLoader.cs b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableLoader.cs
new file mode 100644
index 0000000..1fd6f8f
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/PlugIns/ViewTable/ViewTableLoader.cs
@@ -0,0 +1,37 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using MiniSqlQuery.Core;
+using MiniSqlQuery.PlugIns.ViewTable.Commands;
+
+namespace MiniSqlQuery.PlugIns.ViewTable
+{
+ /// <summary>The view table loader.</summary>
+ public class ViewTableLoader : PluginLoaderBase
+ {
+ /// <summary>Initializes a new instance of the <see cref="ViewTableLoader"/> class.</summary>
+ public ViewTableLoader()
+ : base("View Table Data", "A Mini SQL Query Plugin for viewing table data.", 50)
+ {
+ }
+
+ /// <summary>Iinitialize the plug in.</summary>
+ public override void InitializePlugIn()
+ {
+ Services.RegisterComponent<IViewTable, ViewTableForm>("ViewTableForm");
+
+ // the DB inspector may not be present
+ if (Services.HostWindow.DatabaseInspector != null)
+ {
+ Services.HostWindow.DatabaseInspector.TableMenu.Items.Insert(
+ 0, CommandControlBuilder.CreateToolStripMenuItem<ViewTableFromInspectorCommand>());
+ }
+
+ Services.HostWindow.AddPluginCommand<ViewTableFormCommand>();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Properties/AssemblyInfo.cs b/minisqlquery-master/src/MiniSqlQuery/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..cf68406
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Properties/AssemblyInfo.cs
@@ -0,0 +1,19 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System.Reflection;
+
+[assembly: AssemblyTitle("Mini SQL Query")]
+[assembly: AssemblyDescription(
+ "Mini SQL Query by Paul Kohler is a minimalist SQL query tool for multiple providers (MSSQL, Oracle, OLEDB, MS Access files etc). " +
+ "The goal of the Mini SQL Query tool is to allow a developer or trouble-shooter to quickly diagnose issues or make changes to a database using a tool with a small footprint, that is fast and easy to use."
+ )]
+[assembly: AssemblyProduct("MiniSqlQuery")]
+[assembly: AssemblyVersion("1.19.11.03")]
+[assembly: AssemblyFileVersion("1.19.11.03")]
+
+// see also CommonAssemblyInfo.cs
diff --git a/minisqlquery-master/src/MiniSqlQuery/Properties/Resources.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..56812a4
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Properties/Resources.Designer.cs
@@ -0,0 +1,315 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MiniSqlQuery.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MiniSqlQuery.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Could not populate with current connection string - .
+ /// </summary>
+ internal static string BindNewConnectionStringBuilder_Could_not_populate_with_current_connection_string___ {
+ get {
+ return ResourceManager.GetString("BindNewConnectionStringBuilder_Could_not_populate_with_current_connection_string_" +
+ "__", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Mini SQL Query Change Log
+ ///=========================
+ ///
+ ///2019-11-03 ENH: Upgraded framework version from fsdfsd8 with other package updates and minor fixes.
+ ///2019-11-03 ENH: Upgraded framework version from 4.6.2 to 4.8 with other package updates and minor fixes.
+ ///2019-06-23 ENH: Upgraded framework version from 3.5 to 4.6.2 with other package updates.
+ ///2016-07-02 FIX: Fix for generic schema errors
+ ///2016-01-28 FIX: Fix for the print dialog never showing up properly
+ ///2015-01-23 ENH: Improved the View Table scre [rest of string was truncated]";.
+ /// </summary>
+ internal static string ChangeLog {
+ get {
+ return ResourceManager.GetString("ChangeLog", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Connected to '{0}' successfully..
+ /// </summary>
+ internal static string Connected_to_0_successfully {
+ get {
+ return ResourceManager.GetString("Connected_to_0_successfully", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Connection Failed.
+ /// </summary>
+ internal static string Connection_Failed {
+ get {
+ return ResourceManager.GetString("Connection_Failed", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Connection Successful.
+ /// </summary>
+ internal static string Connection_Successful {
+ get {
+ return ResourceManager.GetString("Connection_Successful", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Database.
+ /// </summary>
+ internal static string Database {
+ get {
+ return ResourceManager.GetString("Database", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Failed connecting to '{0}'.{1}{2}.
+ /// </summary>
+ internal static string Failed_connecting_to_0_1_2 {
+ get {
+ return ResourceManager.GetString("Failed_connecting_to_0_1_2", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to GNU LESSER GENERAL PUBLIC LICENSE
+ /// Version 3, 29 June 2007
+ ///
+ /// Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ /// Everyone is permitted to copy and distribute verbatim copies
+ /// of this license document, but changing it is not allowed.
+ ///
+ ///
+ /// This version of the GNU Lesser General Public License incorporates
+ ///the terms and conditions of version 3 of the GNU General Public
+ ///License, supplemented by the additional permissions listed below.
+ /// [rest of string was truncated]";.
+ /// </summary>
+ internal static string LicenseMiniSqlQuery {
+ get {
+ return ResourceManager.GetString("LicenseMiniSqlQuery", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Messages.
+ /// </summary>
+ internal static string Messages {
+ get {
+ return ResourceManager.GetString("Messages", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ ///<html xmlns="http://www.w3.org/1999/xhtml">
+ ///<head>
+ /// <title>Mini SQL Query Read Me</title>
+ /// <style type="text/css">
+ /// h1, h2, h3, h4
+ /// {
+ /// font-family: Verdana;
+ /// }
+ /// blockquote, p, ul, ol, li
+ /// {
+ /// font-family: Verdana;
+ /// font-size: small;
+ /// }
+ /// </style>
+ ///</head>
+ ///<body>
+ /// <h3>
+ /// Mini SQL Query
+ /// </h3>
+ /// <blockquote>
+ /// <p>
+ /// "<b>Mini SQL Query</b> from by Paul Kohler [rest of string was truncated]";.
+ /// </summary>
+ internal static string ReadMe {
+ get {
+ return ResourceManager.GetString("ReadMe", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Reload Connection?.
+ /// </summary>
+ internal static string Reload_Connection {
+ get {
+ return ResourceManager.GetString("Reload_Connection", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Save Changes?.
+ /// </summary>
+ internal static string Save_Changes {
+ get {
+ return ResourceManager.GetString("Save_Changes", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to <?xml version="1.0"?>
+ ///<!--
+ ///Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+ ///This source code is made available under the terms of the GNU Lesser General Public License v3.0
+ ///https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+ ///-->
+ ///<SyntaxDefinition name = "SQL" extensions = ".sql">
+ /// <Properties>
+ /// <Property name="LineComment" value="--"/>
+ /// </Properties>
+ /// <Digits name = "Digits" bold = "true" italic = "false" color = "Blue"/>
+ /// <RuleSets>
/// [rest of string was truncated]";.
+ /// </summary>
+ internal static string SqlModeXshd {
+ get {
+ return ResourceManager.GetString("SqlModeXshd", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Table: .
+ /// </summary>
+ internal static string Table_colon {
+ get {
+ return ResourceManager.GetString("Table_colon", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Table: (none).
+ /// </summary>
+ internal static string Table_none {
+ get {
+ return ResourceManager.GetString("Table_none", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Tables.
+ /// </summary>
+ internal static string Tables {
+ get {
+ return ResourceManager.GetString("Tables", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Templates.
+ /// </summary>
+ internal static string TemplatesDirectoryName {
+ get {
+ return ResourceManager.GetString("TemplatesDirectoryName", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The connection details have changed, do you want to save?
+ ///.
+ /// </summary>
+ internal static string The_connection_details_have_changed__do_you_want_to_save {
+ get {
+ return ResourceManager.GetString("The_connection_details_have_changed__do_you_want_to_save", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The connections have changed, would you like to refresh the database connection?.
+ /// </summary>
+ internal static string The_connections_have_changed__would_you_like_to_refresh_the_database_connection {
+ get {
+ return ResourceManager.GetString("The_connections_have_changed__would_you_like_to_refresh_the_database_connection", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to View Data.
+ /// </summary>
+ internal static string ViewData {
+ get {
+ return ResourceManager.GetString("ViewData", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to View Data Error.
+ /// </summary>
+ internal static string ViewDataError {
+ get {
+ return ResourceManager.GetString("ViewDataError", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Views.
+ /// </summary>
+ internal static string Views {
+ get {
+ return ResourceManager.GetString("Views", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/minisqlquery-master/src/MiniSqlQuery/Properties/Resources.resx b/minisqlquery-master/src/MiniSqlQuery/Properties/Resources.resx
new file mode 100644
index 0000000..6d9a6a2
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Properties/Resources.resx
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="LicenseMiniSqlQuery" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\license-minisqlquery.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+ </data>
+ <data name="ReadMe" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\..\ReadMe.htm;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+ </data>
+ <data name="SqlModeXshd" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\sql-mode.xshd;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+ </data>
+ <data name="TemplatesDirectoryName" xml:space="preserve">
+ <value>Templates</value>
+ </data>
+ <data name="Messages" xml:space="preserve">
+ <value>Messages</value>
+ </data>
+ <data name="ViewData" xml:space="preserve">
+ <value>View Data</value>
+ </data>
+ <data name="Table_none" xml:space="preserve">
+ <value>Table: (none)</value>
+ </data>
+ <data name="ViewDataError" xml:space="preserve">
+ <value>View Data Error</value>
+ </data>
+ <data name="Table_colon" xml:space="preserve">
+ <value>Table: </value>
+ </data>
+ <data name="Database" xml:space="preserve">
+ <value>Database</value>
+ </data>
+ <data name="Tables" xml:space="preserve">
+ <value>Tables</value>
+ </data>
+ <data name="Views" xml:space="preserve">
+ <value>Views</value>
+ </data>
+ <data name="BindNewConnectionStringBuilder_Could_not_populate_with_current_connection_string___" xml:space="preserve">
+ <value>Could not populate with current connection string - </value>
+ </data>
+ <data name="Connected_to_0_successfully" xml:space="preserve">
+ <value>Connected to '{0}' successfully.</value>
+ </data>
+ <data name="Failed_connecting_to_0_1_2" xml:space="preserve">
+ <value>Failed connecting to '{0}'.{1}{2}</value>
+ <comment>
+ 0, conn name; 1, nl; 2, exp msg
+ </comment>
+ </data>
+ <data name="The_connection_details_have_changed__do_you_want_to_save" xml:space="preserve">
+ <value>The connection details have changed, do you want to save?
+</value>
+ </data>
+ <data name="Save_Changes" xml:space="preserve">
+ <value>Save Changes?</value>
+ </data>
+ <data name="Connection_Successful" xml:space="preserve">
+ <value>Connection Successful</value>
+ </data>
+ <data name="Connection_Failed" xml:space="preserve">
+ <value>Connection Failed</value>
+ </data>
+ <data name="The_connections_have_changed__would_you_like_to_refresh_the_database_connection" xml:space="preserve">
+ <value>The connections have changed, would you like to refresh the database connection?</value>
+ </data>
+ <data name="Reload_Connection" xml:space="preserve">
+ <value>Reload Connection?</value>
+ </data>
+ <data name="ChangeLog" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\..\ChangeLog.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Properties/Settings.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..75153ec
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Properties/Settings.Designer.cs
@@ -0,0 +1,172 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MiniSqlQuery.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("yyyy-MM-dd HH:mm:ss.fff")]
+ public string DateTimeFormat {
+ get {
+ return ((string)(this["DateTimeFormat"]));
+ }
+ set {
+ this["DateTimeFormat"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string DefaultConnectionDefinitionFilename {
+ get {
+ return ((string)(this["DefaultConnectionDefinitionFilename"]));
+ }
+ set {
+ this["DefaultConnectionDefinitionFilename"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool EnableQueryBatching {
+ get {
+ return ((bool)(this["EnableQueryBatching"]));
+ }
+ set {
+ this["EnableQueryBatching"] = value;
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute(@"SQL Files (*.sql)|*.sql|Mini SQL Template Files (*.mt)|*.mt|ASPX Files (*.asp;*.aspx;*.asax;*.asmx)|*.asp;*.aspx;*.asax;*.asmx|Batch Files (*.bat;*.cmd)|*.bat;*.cmd|BOO Files (*.boo)|*.boo|Coco Files (*.atg)|*.atg|C++ Files (*.cpp;*.cc;*.c;*.h)|*.cpp;*.cc;*.c;*.h|C# Files (*.cs)|*.cs|HTML Files (*.htm*)|*.htm*|Java Files (*.java)|*.java|JavaScript Files (*.js)|*.js|Patch Files (*.patch;*.diff)|*.patch;*.diff|PHP Files (*.php*)|*.php*|TeX Files (*.tex)|*.tex|VB.NET Files (*.vb)|*.vb|XML Files (*.xml;*.resx)|*.xml;*.resx|All Files (*.*)|*.*")]
+ public string FileDialogFilter {
+ get {
+ return ((string)(this["FileDialogFilter"]));
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool IncludeReadOnlyColumnsInExport {
+ get {
+ return ((bool)(this["IncludeReadOnlyColumnsInExport"]));
+ }
+ set {
+ this["IncludeReadOnlyColumnsInExport"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool LoadExternalPlugins {
+ get {
+ return ((bool)(this["LoadExternalPlugins"]));
+ }
+ set {
+ this["LoadExternalPlugins"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("Default - MSSQL Master@localhost")]
+ public string NammedConnection {
+ get {
+ return ((string)(this["NammedConnection"]));
+ }
+ set {
+ this["NammedConnection"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("<NULL>")]
+ public string NullText {
+ get {
+ return ((string)(this["NullText"]));
+ }
+ set {
+ this["NullText"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("*.PlugIn.dll")]
+ public string PlugInFileFilter {
+ get {
+ return ((string)(this["PlugInFileFilter"]));
+ }
+ set {
+ this["PlugInFileFilter"] = value;
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("*.sql")]
+ public string SqlFileFilter {
+ get {
+ return ((string)(this["SqlFileFilter"]));
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("XML Files (*.xml)|*.xml|All Files (*.*)|*.*")]
+ public string XmlFileDialogFilter {
+ get {
+ return ((string)(this["XmlFileDialogFilter"]));
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("30")]
+ public int CommandTimeout {
+ get {
+ return ((int)(this["CommandTimeout"]));
+ }
+ set {
+ this["CommandTimeout"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.Collections.Specialized.StringCollection MostRecentFiles {
+ get {
+ return ((global::System.Collections.Specialized.StringCollection)(this["MostRecentFiles"]));
+ }
+ set {
+ this["MostRecentFiles"] = value;
+ }
+ }
+ }
+}
diff --git a/minisqlquery-master/src/MiniSqlQuery/Properties/Settings.settings b/minisqlquery-master/src/MiniSqlQuery/Properties/Settings.settings
new file mode 100644
index 0000000..4492c6a
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Properties/Settings.settings
@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="MiniSqlQuery.Properties" GeneratedClassName="Settings">
+ <Profiles />
+ <Settings>
+ <Setting Name="DateTimeFormat" Type="System.String" Scope="User">
+ <Value Profile="(Default)">yyyy-MM-dd HH:mm:ss.fff</Value>
+ </Setting>
+ <Setting Name="DefaultConnectionDefinitionFilename" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
+ <Setting Name="EnableQueryBatching" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
+ <Setting Name="FileDialogFilter" Type="System.String" Scope="Application">
+ <Value Profile="(Default)">SQL Files (*.sql)|*.sql|Mini SQL Template Files (*.mt)|*.mt|ASPX Files (*.asp;*.aspx;*.asax;*.asmx)|*.asp;*.aspx;*.asax;*.asmx|Batch Files (*.bat;*.cmd)|*.bat;*.cmd|BOO Files (*.boo)|*.boo|Coco Files (*.atg)|*.atg|C++ Files (*.cpp;*.cc;*.c;*.h)|*.cpp;*.cc;*.c;*.h|C# Files (*.cs)|*.cs|HTML Files (*.htm*)|*.htm*|Java Files (*.java)|*.java|JavaScript Files (*.js)|*.js|Patch Files (*.patch;*.diff)|*.patch;*.diff|PHP Files (*.php*)|*.php*|TeX Files (*.tex)|*.tex|VB.NET Files (*.vb)|*.vb|XML Files (*.xml;*.resx)|*.xml;*.resx|All Files (*.*)|*.*</Value>
+ </Setting>
+ <Setting Name="IncludeReadOnlyColumnsInExport" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">False</Value>
+ </Setting>
+ <Setting Name="LoadExternalPlugins" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">True</Value>
+ </Setting>
+ <Setting Name="NammedConnection" Type="System.String" Scope="User">
+ <Value Profile="(Default)">Default - MSSQL Master@localhost</Value>
+ </Setting>
+ <Setting Name="NullText" Type="System.String" Scope="User">
+ <Value Profile="(Default)"><NULL></Value>
+ </Setting>
+ <Setting Name="PlugInFileFilter" Type="System.String" Scope="User">
+ <Value Profile="(Default)">*.PlugIn.dll</Value>
+ </Setting>
+ <Setting Name="SqlFileFilter" Type="System.String" Scope="Application">
+ <Value Profile="(Default)">*.sql</Value>
+ </Setting>
+ <Setting Name="XmlFileDialogFilter" Type="System.String" Scope="Application">
+ <Value Profile="(Default)">XML Files (*.xml)|*.xml|All Files (*.*)|*.*</Value>
+ </Setting>
+ <Setting Name="CommandTimeout" Type="System.Int32" Scope="User">
+ <Value Profile="(Default)">30</Value>
+ </Setting>
+ <Setting Name="MostRecentFiles" Type="System.Collections.Specialized.StringCollection" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
+ </Settings>
+</SettingsFile>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/QueryForm.cs b/minisqlquery-master/src/MiniSqlQuery/QueryForm.cs
new file mode 100644
index 0000000..b507757
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/QueryForm.cs
@@ -0,0 +1,1017 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Drawing.Printing;
+using System.IO;
+using System.Windows.Forms;
+using ICSharpCode.TextEditor;
+using ICSharpCode.TextEditor.Document;
+using ICSharpCode.TextEditor.Gui.CompletionWindow;
+using MiniSqlQuery.Commands;
+using MiniSqlQuery.Core;
+using MiniSqlQuery.Core.Commands;
+using MiniSqlQuery.Properties;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MiniSqlQuery
+{
+ /// <summary>The query form.</summary>
+ public partial class QueryForm : DockContent, IQueryEditor, IPrintableContent
+ {
+ /// <summary>The _host window.</summary>
+ private readonly IHostWindow _hostWindow;
+
+ /// <summary>The _services.</summary>
+ private readonly IApplicationServices _services;
+
+ /// <summary>The _settings.</summary>
+ private readonly IApplicationSettings _settings;
+
+ /// <summary>The _sync lock.</summary>
+ private static object _syncLock = new object();
+
+ /// <summary>Stores the widths of the columns for this window.</summary>
+ private Dictionary<string, int> _columnSizes = new Dictionary<string, int>();
+
+ /// <summary>When tru the grid is being resized on fill, used to avoid overriting column width values.</summary>
+ private bool _resizingGrid;
+
+ /// <summary>The _highlighting provider loaded.</summary>
+ private bool _highlightingProviderLoaded;
+
+ /// <summary>The _is dirty.</summary>
+ private bool _isDirty;
+
+ /// <summary>The _runner.</summary>
+ private QueryRunner _runner;
+
+ /// <summary>The status message for this window.</summary>
+ private string _status = string.Empty;
+
+ /// <summary>The row count for this window (tab dependent).</summary>
+ private int? _rowCount;
+
+ /// <summary>The _text find service.</summary>
+ private ITextFindService _textFindService;
+
+ private bool _cleaningTabs;
+
+ TextArea _textArea;
+ CodeCompletionWindow _completionWindow;
+
+ /// <summary>Initializes a new instance of the <see cref="QueryForm"/> class.</summary>
+ public QueryForm()
+ {
+ InitializeComponent();
+
+ txtQuery.ContextMenuStrip = contextMenuStripQuery;
+ LoadHighlightingProvider();
+ txtQuery.Document.DocumentChanged += DocumentDocumentChanged;
+ _textArea = txtQuery.ActiveTextAreaControl.TextArea;
+
+ contextMenuStripQuery.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<ExecuteTaskCommand>());
+ contextMenuStripQuery.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CancelTaskCommand>());
+
+ editorContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<SaveFileCommand>());
+ editorContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
+ editorContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseActiveWindowCommand>());
+ editorContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseAllWindowsCommand>());
+ editorContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CopyQueryEditorFileNameCommand>());
+
+ CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(editorContextMenuStrip);
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="QueryForm"/> class.</summary>
+ /// <param name="services">The services.</param>
+ /// <param name="settings">The settings.</param>
+ /// <param name="hostWindow">The host window.</param>
+ public QueryForm(IApplicationServices services, IApplicationSettings settings, IHostWindow hostWindow)
+ : this()
+ {
+ _services = services;
+ _settings = settings;
+ _hostWindow = hostWindow;
+
+ var completionProvider = _services.Resolve<ICompletionProvider>();
+ if (completionProvider.Enabled)
+ {
+ _textArea.KeyEventHandler += completionProvider.KeyEventHandlerFired;
+ }
+ }
+
+ public CodeCompletionWindow CodeCompletionWindow
+ {
+ get { return _completionWindow; }
+ set
+ {
+ _completionWindow = value;
+ if (_completionWindow != null)
+ {
+ _completionWindow.Closed += CompletionWindowClosed;
+ }
+ }
+ }
+
+ private void CompletionWindowClosed(object sender, EventArgs e)
+ {
+ if (_completionWindow != null)
+ {
+ _completionWindow.Closed -= CompletionWindowClosed;
+ _completionWindow.Dispose();
+ _completionWindow = null;
+ }
+ }
+
+ /// <summary>Gets or sets AllText.</summary>
+ public string AllText
+ {
+ get { return txtQuery.Text; }
+ set { txtQuery.Text = value; }
+ }
+
+ /// <summary>
+ /// Gets a reference to the batch of queries.
+ /// </summary>
+ /// <value>The query batch.</value>
+ public QueryBatch Batch
+ {
+ get { return _runner == null ? null : _runner.Batch; }
+ }
+
+ /// <summary>Gets a value indicating whether CanReplaceText.</summary>
+ public bool CanReplaceText
+ {
+ get { return true; }
+ }
+
+ /// <summary>Gets or sets CursorColumn.</summary>
+ public int CursorColumn
+ {
+ get { return txtQuery.ActiveTextAreaControl.Caret.Column; }
+ set { txtQuery.ActiveTextAreaControl.Caret.Column = value; }
+ }
+
+ /// <summary>Gets or sets CursorLine.</summary>
+ public int CursorLine
+ {
+ get { return txtQuery.ActiveTextAreaControl.Caret.Line; }
+ set { txtQuery.ActiveTextAreaControl.Caret.Line = value; }
+ }
+
+ /// <summary>Gets CursorOffset.</summary>
+ public int CursorOffset
+ {
+ get { return txtQuery.ActiveTextAreaControl.Caret.Offset; }
+ }
+
+ /// <summary>Gets EditorControl.</summary>
+ public Control EditorControl
+ {
+ get { return txtQuery; }
+ }
+
+
+ /// <summary>Gets FileFilter.</summary>
+ public string FileFilter
+ {
+ get { return "SQL Files (*.sql)|*.sql|All Files (*.*)|*.*"; }
+ }
+
+ /// <summary>Gets or sets FileName.</summary>
+ public string FileName
+ {
+ get { return txtQuery.FileName; }
+ set
+ {
+ txtQuery.FileName = value;
+
+ SetTabTextByFilename();
+ }
+ }
+
+ /// <summary>Gets a value indicating whether IsBusy.</summary>
+ public bool IsBusy { get; private set; }
+
+ /// <summary>Gets or sets a value indicating whether IsDirty.</summary>
+ public bool IsDirty
+ {
+ get { return _isDirty; }
+ set
+ {
+ if (_isDirty != value)
+ {
+ _isDirty = value;
+ SetTabTextByFilename();
+ }
+ }
+ }
+
+ /// <summary>Gets PrintDocument.</summary>
+ public PrintDocument PrintDocument
+ {
+ get { return txtQuery.PrintDocument; }
+ }
+
+ /// <summary>Gets SelectedText.</summary>
+ public string SelectedText
+ {
+ get { return txtQuery.ActiveTextAreaControl.SelectionManager.SelectedText; }
+ }
+
+ /// <summary>Gets TextFindService.</summary>
+ public ITextFindService TextFindService
+ {
+ get
+ {
+ if (_textFindService == null)
+ {
+ _textFindService = _services.Resolve<ITextFindService>();
+ }
+
+ return _textFindService;
+ }
+ }
+
+ /// <summary>Gets TotalLines.</summary>
+ public int TotalLines
+ {
+ get { return txtQuery.Document.TotalNumberOfLines; }
+ }
+
+ /// <summary>The execute query.</summary>
+ /// <param name="sql">The sql.</param>
+ public void ExecuteQuery(string sql)
+ {
+ if (IsBusy)
+ {
+ _hostWindow.DisplaySimpleMessageBox(this, "Please wait for the current operation to complete.", "Busy");
+ return;
+ }
+
+ if (_settings.ConnectionDefinition == null)
+ {
+ _hostWindow.DisplaySimpleMessageBox(this, "Please select a connection.", "Select a Connection");
+ return;
+ }
+
+ lock (_syncLock)
+ {
+ IsBusy = true;
+ }
+
+ _runner = QueryRunner.Create(_settings.ProviderFactory, _settings.ConnectionDefinition.ConnectionString, _settings.EnableQueryBatching, _settings.CommandTimeout);
+ UseWaitCursor = true;
+ queryBackgroundWorker.RunWorkerAsync(sql);
+ }
+
+ /// <summary>The load highlighting provider.</summary>
+ public void LoadHighlightingProvider()
+ {
+ if (_highlightingProviderLoaded)
+ {
+ return;
+ }
+
+ // see: http://wiki.sharpdevelop.net/Syntax%20highlighting.ashx
+ string dir = Path.GetDirectoryName(GetType().Assembly.Location);
+ FileSyntaxModeProvider fsmProvider = new FileSyntaxModeProvider(dir);
+ HighlightingManager.Manager.AddSyntaxModeFileProvider(fsmProvider); // Attach to the text editor.
+ txtQuery.SetHighlighting("SQL");
+ _highlightingProviderLoaded = true;
+ }
+
+ /// <summary>The clear selection.</summary>
+ public void ClearSelection()
+ {
+ txtQuery.ActiveTextAreaControl.SelectionManager.ClearSelection();
+ }
+
+ /// <summary>The highlight string.</summary>
+ /// <param name="offset">The offset.</param>
+ /// <param name="length">The length.</param>
+ public void HighlightString(int offset, int length)
+ {
+ if (offset < 0 || length < 1)
+ {
+ return;
+ }
+
+ int endPos = offset + length;
+ txtQuery.ActiveTextAreaControl.SelectionManager.SetSelection(
+ txtQuery.Document.OffsetToPosition(offset),
+ txtQuery.Document.OffsetToPosition(endPos));
+ SetCursorByOffset(endPos);
+ }
+
+ /// <summary>The insert text.</summary>
+ /// <param name="text">The text.</param>
+ public void InsertText(string text)
+ {
+ if (string.IsNullOrEmpty(text))
+ {
+ return;
+ }
+
+ int offset = txtQuery.ActiveTextAreaControl.Caret.Offset;
+
+ // if some text is selected we want to replace it
+ if (txtQuery.ActiveTextAreaControl.SelectionManager.IsSelected(offset))
+ {
+ offset = txtQuery.ActiveTextAreaControl.SelectionManager.SelectionCollection[0].Offset;
+ txtQuery.ActiveTextAreaControl.SelectionManager.RemoveSelectedText();
+ }
+
+ txtQuery.Document.Insert(offset, text);
+ int newOffset = offset + text.Length; // new offset at end of inserted text
+
+ // now reposition the caret if required to be after the inserted text
+ if (CursorOffset != newOffset)
+ {
+ SetCursorByOffset(newOffset);
+ }
+
+ txtQuery.Focus();
+ }
+
+ /// <summary>The load file.</summary>
+ public void LoadFile()
+ {
+ txtQuery.LoadFile(FileName);
+ IsDirty = false;
+ }
+
+ /// <summary>The save file.</summary>
+ /// <exception cref="InvalidOperationException"></exception>
+ public void SaveFile()
+ {
+ if (FileName == null)
+ {
+ throw new InvalidOperationException("The 'FileName' cannot be null");
+ }
+
+ txtQuery.SaveFile(FileName);
+ IsDirty = false;
+ }
+
+ /// <summary>The set syntax.</summary>
+ /// <param name="name">The name.</param>
+ public void SetSyntax(string name)
+ {
+ LoadHighlightingProvider();
+ txtQuery.SetHighlighting(name);
+ }
+
+
+ /// <summary>The find string.</summary>
+ /// <param name="value">The value.</param>
+ /// <param name="startIndex">The start index.</param>
+ /// <param name="comparisonType">The comparison type.</param>
+ /// <returns>The find string.</returns>
+ public int FindString(string value, int startIndex, StringComparison comparisonType)
+ {
+ if (string.IsNullOrEmpty(value) || startIndex < 0)
+ {
+ return -1;
+ }
+
+ string text = AllText;
+ int pos = text.IndexOf(value, startIndex, comparisonType);
+ if (pos > -1)
+ {
+ ClearSelection();
+ HighlightString(pos, value.Length);
+ }
+
+ return pos;
+ }
+
+ /// <summary>The replace string.</summary>
+ /// <param name="value">The value.</param>
+ /// <param name="startIndex">The start index.</param>
+ /// <param name="length">The length.</param>
+ /// <returns>The replace string.</returns>
+ public bool ReplaceString(string value, int startIndex, int length)
+ {
+ if (value == null || startIndex < 0 || length < 0)
+ {
+ return false;
+ }
+
+ if ((startIndex + length) > AllText.Length)
+ {
+ return false;
+ }
+
+ txtQuery.Document.Replace(startIndex, length, value);
+
+ return true;
+ }
+
+ /// <summary>The set text find service.</summary>
+ /// <param name="textFindService">The text find service.</param>
+ public void SetTextFindService(ITextFindService textFindService)
+ {
+ // accept nulls infering a reset
+ _textFindService = textFindService;
+ }
+
+ /// <summary>The set cursor by location.</summary>
+ /// <param name="line">The line.</param>
+ /// <param name="column">The column.</param>
+ /// <returns>The set cursor by location.</returns>
+ public bool SetCursorByLocation(int line, int column)
+ {
+ if (line > TotalLines)
+ {
+ return false;
+ }
+
+ txtQuery.ActiveTextAreaControl.Caret.Line = line;
+ txtQuery.ActiveTextAreaControl.Caret.Column = column;
+
+ return true;
+ }
+
+ /// <summary>The set cursor by offset.</summary>
+ /// <param name="offset">The offset.</param>
+ /// <returns>The set cursor by offset.</returns>
+ public bool SetCursorByOffset(int offset)
+ {
+ if (offset >= 0)
+ {
+ txtQuery.ActiveTextAreaControl.Caret.Position = txtQuery.Document.OffsetToPosition(offset);
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>The cancel task.</summary>
+ public void CancelTask()
+ {
+ if (queryBackgroundWorker.IsBusy && _runner != null)
+ {
+ _runner.Cancel();
+ }
+ }
+
+ /// <summary>The execute task.</summary>
+ public void ExecuteTask()
+ {
+ if (!string.IsNullOrEmpty(SelectedText))
+ {
+ ExecuteQuery(SelectedText);
+ }
+ else
+ {
+ ExecuteQuery(AllText);
+ }
+ }
+
+ /// <summary>The set status.</summary>
+ /// <param name="text">The text.</param>
+ public void SetStatus(string text)
+ {
+ _status = text;
+ UpdateHostStatus();
+ }
+
+ public void SetRowCount(int? rows)
+ {
+ _rowCount = rows;
+ UpdateHostStatus();
+ }
+
+ /// <summary>The create default font.</summary>
+ /// <returns></returns>
+ protected Font CreateDefaultFont()
+ {
+ return new Font("Courier New", 8.25F, FontStyle.Regular, GraphicsUnit.Point);
+ }
+
+ /// <summary>The update host status.</summary>
+ protected void UpdateHostStatus()
+ {
+ _hostWindow.SetStatus(this, _status);
+ _hostWindow.SetResultCount(this, _rowCount);
+ }
+
+ /// <summary>The create query complete message.</summary>
+ /// <param name="start">The start.</param>
+ /// <param name="end">The end.</param>
+ /// <returns>The create query complete message.</returns>
+ private static string CreateQueryCompleteMessage(DateTime start, DateTime end)
+ {
+ TimeSpan ts = end.Subtract(start);
+ string msg = string.Format(
+ "Query complete, {0:00}:{1:00}.{2:000}",
+ ts.Minutes,
+ ts.Seconds,
+ ts.Milliseconds);
+ return msg;
+ }
+
+ /// <summary>The add tables.</summary>
+ private void AddTables()
+ {
+ ClearGridsAndTabs();
+ SetRowCount(null);
+
+ if (Batch != null)
+ {
+ string nullText = _settings.NullText;
+ int counter = 1;
+
+ _resizingGrid = true;
+
+ foreach (Query query in Batch.Queries)
+ {
+ DataSet ds = query.Result;
+ if (ds != null)
+ {
+ foreach (DataTable dt in ds.Tables)
+ {
+ DataGridView grid = new DataGridView();
+ DataGridViewCellStyle cellStyle = new DataGridViewCellStyle();
+
+ grid.AllowUserToAddRows = false;
+ grid.AllowUserToDeleteRows = false;
+ grid.Dock = DockStyle.Fill;
+ grid.Name = "gridResults_" + counter;
+ grid.ReadOnly = true;
+ grid.DataSource = dt;
+ grid.DataError += GridDataError;
+ grid.DefaultCellStyle = cellStyle;
+ cellStyle.NullValue = nullText;
+ cellStyle.Font = CreateDefaultFont();
+ grid.DataBindingComplete += GridDataBindingComplete;
+ grid.Disposed += GridDisposed;
+ grid.ColumnWidthChanged += OnColumnWidthChanged;
+
+
+ TabPage tabPage = new TabPage();
+ tabPage.Controls.Add(grid);
+ tabPage.Name = "tabPageResults_" + counter;
+ tabPage.Padding = new Padding(3);
+ tabPage.Text = string.Format("{0}/Table {1}", ds.DataSetName, counter);
+ tabPage.UseVisualStyleBackColor = false;
+
+ _resultsTabControl.TabPages.Add(tabPage);
+
+ // create a reasonable default max width for columns
+ int maxColWidth = Math.Max(grid.ClientSize.Width / 2, 100);
+
+ // Autosize the columns then change the widths, gleaned from SO - http://stackoverflow.com/a/1031871/276563
+ grid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells);
+ for (int i = 0; i < grid.Columns.Count; i++)
+ {
+ int columnWidth = grid.Columns[i].Width;
+ grid.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
+
+ string headerText = grid.Columns[i].HeaderText;
+ if (!string.IsNullOrEmpty(headerText) && _columnSizes.ContainsKey(headerText))
+ {
+ // use the previous column size in case its been adjusted etc
+ grid.Columns[i].Width = _columnSizes[headerText];
+ }
+ else
+ {
+ // reset to a the smaller of the 2 sizes, this is mainly for the bigger text columns that throw the size out
+ grid.Columns[i].Width = Math.Min(columnWidth, maxColWidth);
+
+ if (!string.IsNullOrEmpty(headerText))
+ {
+ _columnSizes[headerText] = grid.Columns[i].Width;
+ }
+ }
+ }
+
+ // set the row count for the first tab for now.
+ if (counter == 1)
+ {
+ SetRowCount(dt.Rows.Count);
+ }
+
+ counter++;
+ }
+ }
+ }
+
+ if (!string.IsNullOrEmpty(Batch.Messages))
+ {
+ RichTextBox rtf = new RichTextBox();
+ rtf.Font = CreateDefaultFont();
+ rtf.Dock = DockStyle.Fill;
+ rtf.ScrollBars = RichTextBoxScrollBars.ForcedBoth;
+ rtf.Text = Batch.Messages;
+
+ TabPage tabPage = new TabPage();
+ tabPage.Controls.Add(rtf);
+ tabPage.Name = "tabPageResults_Messages";
+ tabPage.Padding = new Padding(3);
+ tabPage.Dock = DockStyle.Fill;
+ tabPage.Text = Resources.Messages;
+ tabPage.UseVisualStyleBackColor = false;
+
+ _resultsTabControl.TabPages.Add(tabPage);
+ }
+
+ _resizingGrid = false;
+ }
+ }
+
+ public void OnColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
+ {
+ if (_resizingGrid)
+ {
+ return;
+ }
+
+ string headerText = e.Column.HeaderText;
+ if (!string.IsNullOrEmpty(headerText))
+ {
+ _columnSizes[headerText] = e.Column.Width;
+ }
+ }
+
+ /// <summary>Iterate backweards through list of tabs disposing grid and removing the tab page.</summary>
+ private void ClearGridsAndTabs()
+ {
+ try
+ {
+ _cleaningTabs = true;
+
+ for (int i = _resultsTabControl.TabPages.Count - 1; i >= 0; i--)
+ {
+ TabPage tabPage = _resultsTabControl.TabPages[i];
+ if (tabPage.Controls.Count > 0)
+ {
+ tabPage.Controls[0].Dispose(); // dispose grid
+ }
+
+ _resultsTabControl.TabPages.Remove(tabPage);
+ tabPage.Dispose();
+ }
+ }
+ finally
+ {
+ _cleaningTabs = false;
+ }
+ }
+
+ private void SetResultCountOnTabSelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (_cleaningTabs)
+ {
+ return;
+ }
+
+ // get the tab
+ var tabPage = _resultsTabControl.TabPages[_resultsTabControl.SelectedIndex];
+
+ // get the grid control, should be first
+ var dataGridView = tabPage.Controls[0] as DataGridView;
+
+ // default to blank row count
+ int? rows = null;
+ if (dataGridView != null)
+ {
+ var data = dataGridView.DataSource as DataTable;
+ if (data != null)
+ {
+ rows = data.Rows.Count;
+ }
+ }
+ _rowCount = rows;
+
+ UpdateHostStatus();
+ }
+
+ /// <summary>The document document changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void DocumentDocumentChanged(object sender, DocumentEventArgs e)
+ {
+ IsDirty = true;
+ }
+
+ /// <summary>Change the format style of date time columns. This has to be done post-bind.</summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void GridDataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
+ {
+ DataGridView grid = sender as DataGridView;
+ if (grid == null)
+ {
+ return;
+ }
+
+ DataTable dt = grid.DataSource as DataTable;
+ if (dt == null)
+ {
+ return;
+ }
+
+ string nullText = _settings.NullText;
+ string dateTimeFormat = _settings.DateTimeFormat;
+
+ for (int i = 0; i < dt.Columns.Count; i++)
+ {
+ if (dt.Columns[i].DataType == typeof(DateTime))
+ {
+ DataGridViewCellStyle dateCellStyle = new DataGridViewCellStyle();
+ dateCellStyle.NullValue = nullText;
+ dateCellStyle.Format = dateTimeFormat;
+ grid.Columns[i].DefaultCellStyle = dateCellStyle;
+ }
+ }
+ }
+
+ /// <summary>The grid data error.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void GridDataError(object sender, DataGridViewDataErrorEventArgs e)
+ {
+ e.ThrowException = false;
+ }
+
+ /// <summary>Clean up event subscriptions.</summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void GridDisposed(object sender, EventArgs e)
+ {
+ DataGridView grid = sender as DataGridView;
+ if (grid == null)
+ {
+ return;
+ }
+
+ grid.DataBindingComplete -= GridDataBindingComplete;
+ grid.Disposed -= GridDisposed;
+ grid.ColumnWidthChanged -= OnColumnWidthChanged;
+ }
+
+ /// <summary>The query form_ activated.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void QueryForm_Activated(object sender, EventArgs e)
+ {
+ UpdateHostStatus();
+ }
+
+ /// <summary>The query form_ deactivate.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void QueryForm_Deactivate(object sender, EventArgs e)
+ {
+ _hostWindow.SetStatus(this, string.Empty);
+ }
+
+ /// <summary>The query form_ form closing.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void QueryForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (_isDirty)
+ {
+ DialogResult saveFile = _hostWindow.DisplayMessageBox(
+ this,
+ "Contents changed, do you want to save the file?\r\n" + TabText, "Save Changes?",
+ MessageBoxButtons.YesNoCancel,
+ MessageBoxIcon.Question,
+ MessageBoxDefaultButton.Button1,
+ 0,
+ null,
+ null);
+
+ if (saveFile == DialogResult.Cancel)
+ {
+ e.Cancel = true;
+ }
+ else if (saveFile == DialogResult.Yes)
+ {
+ CommandManager.GetCommandInstance<SaveFileCommand>().Execute();
+ }
+ }
+ }
+
+ /// <summary>The query form_ load.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void QueryForm_Load(object sender, EventArgs e)
+ {
+ }
+
+ /// <summary>The runner batch progress.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void RunnerBatchProgress(object sender, BatchProgressEventArgs e)
+ {
+ // push the progress % through to the background worker
+ decimal i = Math.Max(1, e.Index);
+ decimal count = Math.Max(1, e.Count);
+ queryBackgroundWorker.ReportProgress(Convert.ToInt32(i / count * 100m));
+ }
+
+ /// <summary>The set tab text by filename.</summary>
+ private void SetTabTextByFilename()
+ {
+ string dirty = string.Empty;
+ string text = "Untitled";
+ string tabtext;
+
+ if (_isDirty)
+ {
+ dirty = " *";
+ }
+
+ if (txtQuery.FileName != null)
+ {
+ text = FileName;
+ tabtext = Path.GetFileName(FileName);
+ }
+ else
+ {
+ text += _settings.GetUntitledDocumentCounter();
+ tabtext = text;
+ }
+
+ TabText = tabtext + dirty;
+ ToolTipText = text + dirty;
+ }
+
+ /// <summary>The copy tool strip menu item_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void copyToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ CopyForm win = null;
+
+ try
+ {
+ DataGridView grid = (DataGridView)_resultsTabControl.SelectedTab.Controls[0];
+
+ if (grid.SelectedCells.Count == 0)
+ {
+ return;
+ }
+
+ win = new CopyForm();
+
+ if (win.ShowDialog() == DialogResult.Cancel)
+ {
+ return;
+ }
+
+ SortedList headers = new SortedList();
+ SortedList rows = new SortedList();
+
+ string delimiter = win.Delimiter;
+ string line = string.Empty;
+
+ for (int i = 0; i < grid.SelectedCells.Count; i++)
+ {
+ DataGridViewCell cell = grid.SelectedCells[i];
+ DataGridViewColumn col = cell.OwningColumn;
+
+ if (!headers.ContainsKey(col.Index))
+ {
+ headers.Add(col.Index, col.Name);
+ }
+
+ if (!rows.ContainsKey(cell.RowIndex))
+ {
+ rows.Add(cell.RowIndex, cell.RowIndex);
+ }
+ }
+
+ if (win.IncludeHeaders)
+ {
+ for (int i = 0; i < headers.Count; i++)
+ {
+ line += (string)headers.GetByIndex(i);
+ if (i != headers.Count)
+ {
+ line += delimiter;
+ }
+ }
+
+ line += "\r\n";
+ }
+
+ for (int i = 0; i < rows.Count; i++)
+ {
+ DataGridViewRow row = grid.Rows[(int)rows.GetKey(i)];
+ DataGridViewCellCollection cells = row.Cells;
+
+ for (int j = 0; j < headers.Count; j++)
+ {
+ DataGridViewCell cell = cells[(int)headers.GetKey(j)];
+
+ if (cell.Selected)
+ {
+ line += cell.Value;
+ }
+
+ if (j != (headers.Count - 1))
+ {
+ line += delimiter;
+ }
+ }
+
+ line += "\r\n";
+ }
+
+ if (!string.IsNullOrEmpty(line))
+ {
+ Clipboard.Clear();
+ Clipboard.SetText(line);
+
+ _hostWindow.SetStatus(this, "Selected data has been copied to your clipboard");
+ }
+ }
+ finally
+ {
+ if (win != null)
+ {
+ win.Dispose();
+ }
+ }
+ }
+
+ /// <summary>The query background worker_ do work.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void queryBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
+ {
+ string sql = (string)e.Argument;
+ _runner.BatchProgress += RunnerBatchProgress;
+ _runner.ExecuteQuery(sql);
+ }
+
+ /// <summary>The query background worker_ progress changed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void queryBackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
+ {
+ SetStatus(string.Format("Processing batch {0}%...", e.ProgressPercentage));
+ }
+
+ /// <summary>The query background worker_ run worker completed.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void queryBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+ {
+ try
+ {
+ _runner.BatchProgress -= RunnerBatchProgress;
+ if (e.Error != null)
+ {
+ // todo: improve!
+ _hostWindow.DisplaySimpleMessageBox(this, e.Error.Message, "Error");
+ SetStatus(e.Error.Message);
+ }
+ else
+ {
+ _hostWindow.SetPointerState(Cursors.Default);
+ string message = CreateQueryCompleteMessage(_runner.Batch.StartTime, _runner.Batch.EndTime);
+ if (_runner.Exception != null)
+ {
+ message = "ERROR - " + message;
+ }
+
+ AddTables();
+ SetStatus(message);
+ txtQuery.Focus();
+ }
+ }
+ finally
+ {
+ UseWaitCursor = false;
+ lock (_syncLock)
+ {
+ IsBusy = false;
+ }
+ }
+ }
+
+ /// <summary>The select all tool strip menu item_ click.</summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ DataGridView grid = (DataGridView)_resultsTabControl.SelectedTab.Controls[0];
+ grid.SelectAll();
+ }
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/QueryForm.Designer.cs b/minisqlquery-master/src/MiniSqlQuery/QueryForm.Designer.cs
new file mode 100644
index 0000000..fc39665
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/QueryForm.Designer.cs
@@ -0,0 +1,211 @@
+namespace MiniSqlQuery
+{
+ partial class QueryForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QueryForm));
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.txtQuery = new ICSharpCode.TextEditor.TextEditorControl();
+ this.contextMenuStripQuery = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this._resultsTabControl = new System.Windows.Forms.TabControl();
+ this.ctxDataGrid = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tabPageResults = new System.Windows.Forms.TabPage();
+ this.gridResults1 = new System.Windows.Forms.DataGridView();
+ this.editorContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.queryBackgroundWorker = new System.ComponentModel.BackgroundWorker();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ this._resultsTabControl.SuspendLayout();
+ this.ctxDataGrid.SuspendLayout();
+ this.tabPageResults.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.gridResults1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+ this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer1.Name = "splitContainer1";
+ this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.txtQuery);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this._resultsTabControl);
+ this.splitContainer1.Size = new System.Drawing.Size(1037, 508);
+ this.splitContainer1.SplitterDistance = 230;
+ this.splitContainer1.TabIndex = 0;
+ //
+ // txtQuery
+ //
+ this.txtQuery.ContextMenuStrip = this.contextMenuStripQuery;
+ this.txtQuery.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.txtQuery.EnableFolding = false;
+ this.txtQuery.IsReadOnly = false;
+ this.txtQuery.Location = new System.Drawing.Point(0, 0);
+ this.txtQuery.Name = "txtQuery";
+ this.txtQuery.ShowEOLMarkers = true;
+ this.txtQuery.ShowSpaces = true;
+ this.txtQuery.ShowTabs = true;
+ this.txtQuery.Size = new System.Drawing.Size(1037, 230);
+ this.txtQuery.TabIndex = 1;
+ //
+ // contextMenuStripQuery
+ //
+ this.contextMenuStripQuery.Name = "contextMenuStripQuery";
+ this.contextMenuStripQuery.Size = new System.Drawing.Size(61, 4);
+ //
+ // _resultsTabControl
+ //
+ this._resultsTabControl.ContextMenuStrip = this.ctxDataGrid;
+ this._resultsTabControl.Controls.Add(this.tabPageResults);
+ this._resultsTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+ this._resultsTabControl.Location = new System.Drawing.Point(0, 0);
+ this._resultsTabControl.Name = "_resultsTabControl";
+ this._resultsTabControl.SelectedIndex = 0;
+ this._resultsTabControl.Size = new System.Drawing.Size(1037, 274);
+ this._resultsTabControl.TabIndex = 0;
+ this._resultsTabControl.SelectedIndexChanged += new System.EventHandler(this.SetResultCountOnTabSelectedIndexChanged);
+ //
+ // ctxDataGrid
+ //
+ this.ctxDataGrid.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.selectAllToolStripMenuItem,
+ this.toolStripSeparator1,
+ this.copyToolStripMenuItem});
+ this.ctxDataGrid.Name = "ctxDataGrid";
+ this.ctxDataGrid.Size = new System.Drawing.Size(153, 76);
+ //
+ // selectAllToolStripMenuItem
+ //
+ this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
+ this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.selectAllToolStripMenuItem.Text = "Select All";
+ this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
+ //
+ // copyToolStripMenuItem
+ //
+ this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
+ this.copyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.copyToolStripMenuItem.Text = "Copy Selected";
+ this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
+ //
+ // tabPageResults
+ //
+ this.tabPageResults.Controls.Add(this.gridResults1);
+ this.tabPageResults.Location = new System.Drawing.Point(4, 22);
+ this.tabPageResults.Name = "tabPageResults";
+ this.tabPageResults.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageResults.Size = new System.Drawing.Size(1029, 248);
+ this.tabPageResults.TabIndex = 0;
+ this.tabPageResults.Text = "Results";
+ this.tabPageResults.UseVisualStyleBackColor = true;
+ //
+ // gridResults1
+ //
+ this.gridResults1.AllowUserToAddRows = false;
+ this.gridResults1.AllowUserToDeleteRows = false;
+ this.gridResults1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.ColumnHeader;
+ this.gridResults1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.gridResults1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.gridResults1.Location = new System.Drawing.Point(3, 3);
+ this.gridResults1.Name = "gridResults1";
+ this.gridResults1.ReadOnly = true;
+ this.gridResults1.Size = new System.Drawing.Size(1023, 242);
+ this.gridResults1.TabIndex = 0;
+ //
+ // editorContextMenuStrip
+ //
+ this.editorContextMenuStrip.Name = "editorContextMenuStrip";
+ this.editorContextMenuStrip.Size = new System.Drawing.Size(61, 4);
+ //
+ // queryBackgroundWorker
+ //
+ this.queryBackgroundWorker.WorkerReportsProgress = true;
+ this.queryBackgroundWorker.WorkerSupportsCancellation = true;
+ this.queryBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.queryBackgroundWorker_DoWork);
+ this.queryBackgroundWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.queryBackgroundWorker_ProgressChanged);
+ this.queryBackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.queryBackgroundWorker_RunWorkerCompleted);
+ //
+ // QueryForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1037, 508);
+ this.Controls.Add(this.splitContainer1);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "QueryForm";
+ this.TabPageContextMenuStrip = this.editorContextMenuStrip;
+ this.TabText = "Query";
+ this.Text = "Query";
+ this.Activated += new System.EventHandler(this.QueryForm_Activated);
+ this.Deactivate += new System.EventHandler(this.QueryForm_Deactivate);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.QueryForm_FormClosing);
+ this.Load += new System.EventHandler(this.QueryForm_Load);
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ this.splitContainer1.ResumeLayout(false);
+ this._resultsTabControl.ResumeLayout(false);
+ this.ctxDataGrid.ResumeLayout(false);
+ this.tabPageResults.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.gridResults1)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.TabControl _resultsTabControl;
+ private System.Windows.Forms.TabPage tabPageResults;
+ private System.Windows.Forms.DataGridView gridResults1;
+ private System.Windows.Forms.ContextMenuStrip contextMenuStripQuery;
+ private ICSharpCode.TextEditor.TextEditorControl txtQuery;
+ private System.Windows.Forms.ContextMenuStrip editorContextMenuStrip;
+ protected System.ComponentModel.BackgroundWorker queryBackgroundWorker;
+ private System.Windows.Forms.ContextMenuStrip ctxDataGrid;
+ private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
+ }
+}
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/QueryForm.resx b/minisqlquery-master/src/MiniSqlQuery/QueryForm.resx
new file mode 100644
index 0000000..ef6fa08
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/QueryForm.resx
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="contextMenuStripQuery.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>132, 20</value>
+ </metadata>
+ <metadata name="ctxDataGrid.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>657, 20</value>
+ </metadata>
+ <metadata name="editorContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>300, 20</value>
+ </metadata>
+ <metadata name="queryBackgroundWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>483, 20</value>
+ </metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAA////ALeCRwDrxpoA4qxfAJBbMQD74ssAwZ2AANOOVwDizroA5K6GAPvv5gDOr5UArYJfAPnV
+ tQCaaUEA2J5vALiQbQDYu6IAo3RPAMGNUwDot3cA7tnBAKp1QADu39MA6sCMAPzp2AD3x6IA2JZjAP34
+ 8QDZpXsA7dCyAOnLpgC3hlYA0JpVAPrcvwDapFsA4p1pANWujADmsm0A6ryBAN+4hwCVYTkA38azAMek
+ hQD3z60AyJRXALF7QwC9iEsAnmk5AOfUwwD16uIA9d/GAOCgcAD97d8A+uXSANaSXQD159gA//v5AOzc
+ zQDLj1oA0p1xAPTawADeqF0AxI5OANebagD99ewA5LBoAMqUUgD64cYAuYVLAPjr2QD53cQAuYZSALSF
+ WQD8+fUA/fDiAP3x6wD79O8A+ujbAPnavAD96tsA//78AP3p1QD/9vAA+/PqAPXt4gD759QA++PQAPvt
+ 4QD7698A++DJAPnbwgD9+vcA/PbwAP3w5wDUj1kA+ObTAPrkzAD538cA+t7CAOvKpQDWuqMA/fHkAP3r
+ 3gD969gA+uLNAPjcwAD52sAA+dy9AP317gD76dUA+uXQAPjewgDw2cEA+uHKAPrcwwD53cEA///9AP7+
+ /QD//fsA//z6AP78+QD++/cA/fn0AP738QD98OUA/PDkAPzv4gD75tMA+uPRAPvjzAD74cgA+uDHAPne
+ xQD628EA+Nu/APjavQD//v0A/fr2AP728QD86tsA+uLKAPrdwwD53cMA+t3CAPndwgD63cEA+dzCAPnc
+ wQD53cAA+tvAAPrbvwD528AA+dy/APjbwAD43L8A+du8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAUFBQUqDxMNBQAAAAARZisyGDNOi4paCwcAAAAALAEBAQFSe32MCk8MAAAAADFKHhBB
+ HDhgCCWCEgAAAAAAJn4bLQ6JcUViQgkAAAAAACF3ZCOZmXWXdGg7FwAAAABJepqIa1yVko9XVi8AAAAA
+ RnuVnJyblpaQBksCAAAAADBeY20jh4+RSFt5FAAAAABAOTdQnZiTk0iEeC4AAAAAAHJZbJSGhY5qcIo8
+ RAAAAAAfVHODWIFvGo12PRYiAAAAZXhTaVE2TGd/ATU6KQAAAAMBgF9Nbh1deQF7PiQAAAAZAQEBAXxV
+ R2E0ID8AAAAABCgVJ0MEBAQEAAAAAPAHAACABwAAgAcAAIAHAADABwAAwAMAAMADAADAAwAAwAMAAMAD
+ AADgAQAA4AAAAOAAAADgAAAA4AEAAOAPAAA=
+</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/script.ico b/minisqlquery-master/src/MiniSqlQuery/script.ico
new file mode 100644
index 0000000..fdb67a7
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/script.ico differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/SQL-Mode.xshd b/minisqlquery-master/src/MiniSqlQuery/SQL-Mode.xshd
new file mode 100644
index 0000000..508631e
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/SQL-Mode.xshd
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+This source code is made available under the terms of the GNU Lesser General Public License v3.0
+https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+-->
+<SyntaxDefinition name = "SQL" extensions = ".sql">
+ <Properties>
+ <Property name="LineComment" value="--"/>
+ </Properties>
+ <Digits name = "Digits" bold = "true" italic = "false" color = "Blue"/>
+ <RuleSets>
+ <RuleSet ignorecase = "true">
+ <Delimiters>&<>~!%^*()-+=|\#/{}[]:;"' , .?</Delimiters>
+ <Span name="String" bold="false" italic="false" color="Red" stopateol="false">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+ <Span name = "LineComment" bold = "false" italic = "false" color = "Green" stopateol = "true">
+ <Begin>--</Begin>
+ </Span>
+ <Span name = "BlockComment" bold = "false" italic = "false" color = "Green" stopateol = "false">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+ <KeyWords name="JoinKeywords" bold="true" italic="false" color="Purple">
+ <Key word="INNER" />
+ <Key word="JOIN" />
+ <Key word="LEFT" />
+ <Key word="RIGHT" />
+ <Key word="OUTER" />
+ <Key word="UNION" />
+ </KeyWords>
+ <KeyWords name="AliasKeywords" bold="false" italic="false" color="Maroon">
+ <Key word="AS" />
+ </KeyWords>
+ <KeyWords name="ComparisonKeywords" bold="true" italic="false" color="Navy">
+ <Key word="AND" />
+ <Key word="OR" />
+ <Key word="LIKE" />
+ </KeyWords>
+ <KeyWords name="SpecializedKeywords" bold="true" italic="false" color="Gray">
+ <Key word="TOP" />
+ <Key word="LIMIT" />
+ <Key word="OPENDATASOURCE" />
+ <Key word="GO" />
+ </KeyWords>
+ <KeyWords name="DestructiveKeywords" bold="true" italic="false" color="Red">
+ <Key word="DROP" />
+ <Key word="DELETE" />
+ <Key word="TRUNCATE" />
+ </KeyWords>
+ <KeyWords name="SqlKeywordsBold" bold="true" italic="false" color="Blue">
+ <Key word="BEGIN" />
+ <Key word="END" />
+ <Key word="EXEC" />
+ <Key word="CREATE" />
+ <Key word="COMMIT" />
+ <Key word="RAISERROR" />
+ <Key word="ROLLBACK" />
+ <Key word="TRAN" />
+ <Key word="TRANSACTION" />
+ <Key word="USE" />
+ <Key word="USER" />
+ <Key word="VIEW" />
+ </KeyWords>
+ <KeyWords name="SqlKeywordsNormal" bold="false" italic="false" color="Blue">
+ <Key word="ADD" />
+ <Key word="ALL" />
+ <Key word="ANY" />
+ <Key word="ASC" />
+ <Key word="BETWEEN" />
+ <Key word="BREAK" />
+ <Key word="BY" />
+ <Key word="CASCADE" />
+ <Key word="CASE" />
+ <Key word="CHECK" />
+ <Key word="CHECKPOINT" />
+ <Key word="CLOSE" />
+ <Key word="COALESCE" />
+ <Key word="COLLATE" />
+ <Key word="COLUMN" />
+ <Key word="COMPUTE" />
+ <Key word="CONSTRAINT" />
+ <Key word="CONTAINS" />
+ <Key word="CONTINUE" />
+ <Key word="CONVERT" />
+ <Key word="CROSS" />
+ <Key word="CURSOR" />
+ <Key word="DECLARE" />
+ <Key word="DEFAULT" />
+ <Key word="DESC" />
+ <Key word="DISTINCT" />
+ <Key word="DOUBLE" />
+ <Key word="ELSE" />
+ <Key word="ESCAPE" />
+ <Key word="EXCEPT" />
+ <Key word="EXECUTE" />
+ <Key word="EXISTS" />
+ <Key word="EXIT" />
+ <Key word="FETCH" />
+ <Key word="FOR" />
+ <Key word="FROM" />
+ <Key word="FULL" />
+ <Key word="FUNCTION" />
+ <Key word="GOTO" />
+ <Key word="GROUP" />
+ <Key word="HAVING" />
+ <Key word="IDENTITY" />
+ <Key word="IDENTITY_INSERT" />
+ <Key word="IDENTITYCOL" />
+ <Key word="IF" />
+ <Key word="IN" />
+ <Key word="INSERT" />
+ <Key word="INTO" />
+ <Key word="IS" />
+ <Key word="KEY" />
+ <Key word="NOCHECK" />
+ <Key word="NOT" />
+ <Key word="NULL" />
+ <Key word="NULLIF" />
+ <Key word="OF" />
+ <Key word="OFF" />
+ <Key word="OFFSETS" />
+ <Key word="ON" />
+ <Key word="OPEN" />
+ <Key word="ORDER" />
+ <Key word="OVER" />
+ <Key word="PRECISION" />
+ <Key word="PROC" />
+ <Key word="PROCEDURE" />
+ <Key word="PUBLIC" />
+ <Key word="READ" />
+ <Key word="READTEXT" />
+ <Key word="REFERENCES" />
+ <Key word="RESTORE" />
+ <Key word="RESTRICT" />
+ <Key word="RETURN" />
+ <Key word="ROWCOUNT" />
+ <Key word="RULE" />
+ <Key word="SAVE" />
+ <Key word="SELECT" />
+ <Key word="SET" />
+ <Key word="SETUSER" />
+ <Key word="SOME" />
+ <Key word="TABLE" />
+ <Key word="THEN" />
+ <Key word="TO" />
+ <Key word="TRIGGER" />
+ <Key word="UNIQUE" />
+ <Key word="UPDATE" />
+ <Key word="VALUES" />
+ <Key word="VARYING" />
+ <Key word="WAITFOR" />
+ <Key word="WHEN" />
+ <Key word="WHERE" />
+ <Key word="WHILE" />
+ <Key word="WITH" />
+ </KeyWords>
+ </RuleSet>
+ </RuleSets>
+</SyntaxDefinition>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/Create Table.sql.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/Create Table.sql.mt
new file mode 100644
index 0000000..dcf75f1
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/Create Table.sql.mt
@@ -0,0 +1,9 @@
+#@get TableName
+IF OBJECT_ID('${TableName}', 'U') IS NOT NULL
+ DROP TABLE [${TableName}]
+
+CREATE TABLE [${TableName}]
+(
+ ${TableName}Id INT IDENTITY NOT NULL,
+ CONSTRAINT PK_${TableName}Id PRIMARY KEY (${TableName}Id)
+)
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/New.sql.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/New.sql.mt
new file mode 100644
index 0000000..b727d9d
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/New.sql.mt
@@ -0,0 +1,7 @@
+/********************************************************\
+ File:
+ Name: ${Host.UserName}
+ Date: ${Host.Date("dd MMM yyyy")}
+\********************************************************/
+
+
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/New.txt.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/New.txt.mt
new file mode 100644
index 0000000..5f28270
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/New.txt.mt
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/New.xml.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/New.xml.mt
new file mode 100644
index 0000000..d77d8cd
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/New.xml.mt
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<root>
+
+</root>
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Advanced Looping.txt.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Advanced Looping.txt.mt
new file mode 100644
index 0000000..18ed558
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Advanced Looping.txt.mt
@@ -0,0 +1,26 @@
+## The following script demonstraits the advanced looping abilities using foreach.
+
+#foreach ($row in ${Data.Get(null, "Categories").Rows})
+#beforeall
+
+ I am before everything
+
+#before
+ >>> (before each item)
+#each
+ "${Host.Data.ColumnValue($row, "Category Name")}"
+#after
+ <<< (after each item)
+#between
+ (i am between each line)
+#odd
+ [I am an odd row...]
+#even
+ [I am an even row]
+#nodata
+ (I appear if theres no data)
+#afterall
+
+ I am last.
+
+#end
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - CSharp Model.cs.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - CSharp Model.cs.mt
new file mode 100644
index 0000000..36bba22
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - CSharp Model.cs.mt
@@ -0,0 +1,8 @@
+#foreach ($table in $Host.Model.Tables)
+public class ${table.Name}
+{
+#foreach ($c in $table.Columns)
+ public ${c.DbType.SystemType} ${Host.ToPascalCase($c.Name)} { get; set; }
+#end
+}
+#end
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Plugin Access.txt.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Plugin Access.txt.mt
new file mode 100644
index 0000000..3d0cee8
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Plugin Access.txt.mt
@@ -0,0 +1,8 @@
+#@import-plugin MiniSqlQuery.PlugIns.CoreApplicationPlugIn
+
+\${MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginName}:
+ "${MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginName}"
+\${MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginDescription}
+ "${MiniSqlQuery_PlugIns_CoreApplicationPlugIn.PluginDescription}"
+
+If the plugin also contains methods etc these can also be executed.
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Tables and Columns and DATA.txt.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Tables and Columns and DATA.txt.mt
new file mode 100644
index 0000000..4f49d3c
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Tables and Columns and DATA.txt.mt
@@ -0,0 +1,14 @@
+ConnectionString: "${Host.Model.ConnectionString}"
+ProviderName: "${Host.Model.ProviderName}"
+
+#foreach ($table in ${Host.Model.Tables})
+Table Data: ${table.FullName} (Row count: ${Data.Get(${table.Schema}, ${table.Name}).Rows.Count})
+
+#set($dataTable = $Host.Data.Get(${table.Schema}, ${table.Name}))
+#foreach ($row in $dataTable.Rows)
+#foreach ($c in ${table.Columns})
+${c.Name}: ${Host.Data.ColumnValue($row, $c.Name)}
+#end ## table columns
+#end ## table rows
+#end ## foreach table
+
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Tables and Columns.txt.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Tables and Columns.txt.mt
new file mode 100644
index 0000000..fd60248
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - Tables and Columns.txt.mt
@@ -0,0 +1,28 @@
+ConnectionString: "${Host.Model.ConnectionString}"
+ProviderName: "${Host.Model.ProviderName}"
+
+#foreach ($table in ${Host.Model.Tables})
+Table: ${table.FullName}
+#foreach ($c in ${table.Columns})
+ * Column.Name: ${c.Name}
+ DbType.Summary: ${c.DbType.Summary}
+ Name: ${c.DbType.Name}
+ Length: ${c.DbType.Length}
+ Precision: ${c.DbType.Precision}
+ Scale: ${c.DbType.Scale}
+ SystemType: ${c.DbType.SystemType}
+ Nullable: ${c.Nullable}
+ IsKey: ${c.IsKey}
+ IsUnique: ${c.IsUnique}
+ IsRowVersion: ${c.IsRowVersion}
+ IsIdentity: ${c.IsIdentity}
+ IsAutoIncrement: ${c.IsAutoIncrement}
+ IsReadOnly: ${c.IsReadOnly}
+ IsWritable: ${c.IsWritable}
+ HasFK: ${c.HasFK}
+#if($c.HasFK)
+ ${c.ForeignKeyReference.ReferenceTable.FullName}.${c.ForeignKeyReference.ReferenceColumn.Name}
+#end ## hasFK
+#end ## foreach column
+#end ## foreach table
+
diff --git a/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - WPF View Model.cs.mt b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - WPF View Model.cs.mt
new file mode 100644
index 0000000..35b3a84
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery/Templates/Sample - WPF View Model.cs.mt
@@ -0,0 +1,38 @@
+## Example WPF "View Model" template
+## Assumes the use of something like http://mvvmfoundation.codeplex.com/ for the base classes etc
+
+## NOTE - "WIP"
+
+#foreach ($table in $Host.Model.Tables)
+#set($classNm = ${Host.ToPascalCase($table.Name)} )
+public class ${classNm}ViewModel : ObservableObject
+{
+ private ${classNm}Entity _entity;
+
+ public ${classNm}ViewModel(${classNm}Entity entity)
+ {
+ _entity = entity;
+ }
+#foreach ($c in $table.Columns)
+#set($nm=$Host.ToPascalCase($c.Name))
+
+ public $c.DbType.SystemType.Name ${nm}
+ {
+ get { return _entity.${nm}; }
+ set
+ {
+ if (_entity.${nm} != value)
+ {
+ _entity.${nm} = value;
+ OnPropertyChanged("${nm}");
+ }
+ }
+ }
+#end
+
+ //TODO - sample commands, save etc
+}
+
+
+
+#end
\ No newline at end of file
diff --git a/minisqlquery-master/src/MiniSqlQuery/x64/SQLite.Interop.dll b/minisqlquery-master/src/MiniSqlQuery/x64/SQLite.Interop.dll
new file mode 100644
index 0000000..2f59ce9
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/x64/SQLite.Interop.dll differ
diff --git a/minisqlquery-master/src/MiniSqlQuery/x86/SQLite.Interop.dll b/minisqlquery-master/src/MiniSqlQuery/x86/SQLite.Interop.dll
new file mode 100644
index 0000000..344b9ed
Binary files /dev/null and b/minisqlquery-master/src/MiniSqlQuery/x86/SQLite.Interop.dll differ