Initial commit
This commit is contained in:
129
OpenDBDiff.Schema.SQLServer2005/ClassDiagrams.cd
Normal file
129
OpenDBDiff.Schema.SQLServer2005/ClassDiagrams.cd
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.SQLServerSchemaBase">
|
||||
<Position X="16" Y="2" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="ExtendedProperties" />
|
||||
</ShowAsCollectionAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Code" Collapsed="true">
|
||||
<Position X="15" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.CLRCode" Collapsed="true">
|
||||
<Position X="11.5" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.CLRStoredProcedure">
|
||||
<Position X="10.5" Y="7.25" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier />
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="Parameters" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.CLRTrigger" Collapsed="true">
|
||||
<Position X="12.75" Y="7.25" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Table">
|
||||
<Position X="6" Y="4.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier />
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="Constraints" />
|
||||
<Property Name="Indexes" />
|
||||
</ShowAsCollectionAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Constraint">
|
||||
<Position X="3.75" Y="4.5" Width="1.5" />
|
||||
<NestedTypes>
|
||||
<Enum Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Constraint.ConstraintType" Collapsed="true">
|
||||
<TypeIdentifier />
|
||||
</Enum>
|
||||
</NestedTypes>
|
||||
<TypeIdentifier />
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Columns" />
|
||||
</ShowAsAssociation>
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Columns">
|
||||
<Position X="8" Y="6.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAIAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAQAAEABA=</HashCode>
|
||||
<FileName>Model\Columns.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.ConstraintColumns" Collapsed="true">
|
||||
<Position X="0.75" Y="7.75" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.View" Collapsed="true">
|
||||
<Position X="17.25" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Trigger" Collapsed="true">
|
||||
<Position X="19.5" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.StoredProcedure" Collapsed="true">
|
||||
<Position X="15" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Database">
|
||||
<Position X="28.5" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="DDLTriggers" />
|
||||
<Property Name="CLRProcedures" />
|
||||
<Property Name="Tables" />
|
||||
</ShowAsCollectionAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Index">
|
||||
<Position X="24" Y="4.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
</Compartments>
|
||||
<NestedTypes>
|
||||
<Enum Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Index.IndexTypeEnum" Collapsed="true">
|
||||
<TypeIdentifier />
|
||||
</Enum>
|
||||
</NestedTypes>
|
||||
<TypeIdentifier />
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="Columns" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.IndexColumn" Collapsed="true">
|
||||
<Position X="26.25" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Parameter" Collapsed="true">
|
||||
<Position X="10.5" Y="9.75" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.Synonym" Collapsed="true">
|
||||
<Position X="21.75" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.UserDataType" Collapsed="true">
|
||||
<Position X="8.25" Y="4.5" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
</Class>
|
||||
<Class Name="OpenDBDiff.Schema.SQLServer.Generates.Model.ExtendedProperty" Collapsed="true">
|
||||
<Position X="16" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier />
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Font Name="Tahoma" Size="8.25" />
|
||||
</ClassDiagram>
|
||||
154
OpenDBDiff.Schema.SQLServer2005/Front/AddExclusionPatternForm.Designer.cs
generated
Normal file
154
OpenDBDiff.Schema.SQLServer2005/Front/AddExclusionPatternForm.Designer.cs
generated
Normal file
@@ -0,0 +1,154 @@
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
partial class AddExclusionPatternForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private 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.label2 = new System.Windows.Forms.Label();
|
||||
this.cboObjects = new System.Windows.Forms.ComboBox();
|
||||
this.txtFilter = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.ApplyButton = new System.Windows.Forms.Button();
|
||||
this.CancelFormButton = 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.label2);
|
||||
this.groupBox1.Controls.Add(this.cboObjects);
|
||||
this.groupBox1.Controls.Add(this.txtFilter);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.ForeColor = System.Drawing.SystemColors.HotTrack;
|
||||
this.groupBox1.Location = new System.Drawing.Point(7, 3);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(310, 71);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Filter";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label2.Location = new System.Drawing.Point(7, 43);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(68, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "Object Type:";
|
||||
//
|
||||
// cboObjects
|
||||
//
|
||||
this.cboObjects.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cboObjects.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboObjects.FormattingEnabled = true;
|
||||
this.cboObjects.Location = new System.Drawing.Point(82, 40);
|
||||
this.cboObjects.Name = "cboObjects";
|
||||
this.cboObjects.Size = new System.Drawing.Size(223, 21);
|
||||
this.cboObjects.TabIndex = 2;
|
||||
//
|
||||
// txtFilter
|
||||
//
|
||||
this.txtFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtFilter.Location = new System.Drawing.Point(82, 13);
|
||||
this.txtFilter.Name = "txtFilter";
|
||||
this.txtFilter.Size = new System.Drawing.Size(222, 20);
|
||||
this.txtFilter.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label1.Location = new System.Drawing.Point(6, 16);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(69, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Filter Pattern:";
|
||||
//
|
||||
// ApplyButton
|
||||
//
|
||||
this.ApplyButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ApplyButton.Location = new System.Drawing.Point(242, 80);
|
||||
this.ApplyButton.Name = "ApplyButton";
|
||||
this.ApplyButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.ApplyButton.TabIndex = 1;
|
||||
this.ApplyButton.Text = "Apply";
|
||||
this.ApplyButton.UseVisualStyleBackColor = true;
|
||||
this.ApplyButton.Click += new System.EventHandler(this.ApplyButton_Click);
|
||||
//
|
||||
// CancelFormButton
|
||||
//
|
||||
this.CancelFormButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CancelFormButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CancelFormButton.Location = new System.Drawing.Point(161, 80);
|
||||
this.CancelFormButton.Name = "CancelFormButton";
|
||||
this.CancelFormButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.CancelFormButton.TabIndex = 2;
|
||||
this.CancelFormButton.Text = "Cancel";
|
||||
this.CancelFormButton.UseVisualStyleBackColor = true;
|
||||
this.CancelFormButton.Click += new System.EventHandler(this.CancelFormButton_Click);
|
||||
//
|
||||
// AddExclusionPatternForm
|
||||
//
|
||||
this.AcceptButton = this.ApplyButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.CancelFormButton;
|
||||
this.ClientSize = new System.Drawing.Size(324, 107);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.CancelFormButton);
|
||||
this.Controls.Add(this.ApplyButton);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "AddExclusionPatternForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Filters";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private GroupBox groupBox1;
|
||||
private TextBox txtFilter;
|
||||
private Label label1;
|
||||
private ComboBox cboObjects;
|
||||
private Label label2;
|
||||
private Button ApplyButton;
|
||||
private Button CancelFormButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using OpenDBDiff.Schema.SQLServer.Generates.Options;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
public partial class AddExclusionPatternForm : Form
|
||||
{
|
||||
private SqlOption sqlOption;
|
||||
private int indexFilter;
|
||||
|
||||
public AddExclusionPatternForm(SqlOption sqlOption)
|
||||
: this(sqlOption, -1)
|
||||
{ }
|
||||
|
||||
public AddExclusionPatternForm(SqlOption sqlOption, int Index)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
PopulateObjectTypeDropDownList();
|
||||
|
||||
this.sqlOption = sqlOption;
|
||||
indexFilter = Index;
|
||||
if (indexFilter != -1)
|
||||
{
|
||||
txtFilter.Text = sqlOption.Filters.Items[indexFilter].FilterPattern;
|
||||
cboObjects.SelectedValue = sqlOption.Filters.Items[indexFilter].ObjectType;
|
||||
}
|
||||
}
|
||||
|
||||
private string GetEnumDescription(Enum value)
|
||||
{
|
||||
FieldInfo fi = value.GetType().GetField(value.ToString());
|
||||
|
||||
DescriptionAttribute[] attributes =
|
||||
(DescriptionAttribute[])fi.GetCustomAttributes(
|
||||
typeof(DescriptionAttribute),
|
||||
false);
|
||||
|
||||
if (attributes != null &&
|
||||
attributes.Length > 0)
|
||||
return attributes[0].Description;
|
||||
else
|
||||
return value.ToString();
|
||||
}
|
||||
|
||||
private void PopulateObjectTypeDropDownList()
|
||||
{
|
||||
var data = Enum.GetValues(typeof(ObjectType)).Cast<ObjectType>()
|
||||
.Select(ot => new { ObjectType = ot, Description = GetEnumDescription(ot) })
|
||||
.OrderBy(a => a.Description)
|
||||
.ToList();
|
||||
|
||||
cboObjects.DataSource = data;
|
||||
cboObjects.DisplayMember = "Description";
|
||||
cboObjects.ValueMember = "ObjectType";
|
||||
}
|
||||
|
||||
private void CancelFormButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void ApplyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cboObjects.SelectedItem == null)
|
||||
{
|
||||
MessageBox.Show(this, "All fields are required.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
var fi = new SqlOptionFilterItem((ObjectType)Enum.Parse(typeof(ObjectType), cboObjects.SelectedValue.ToString(), true), txtFilter.Text);
|
||||
|
||||
if (sqlOption.Filters.Items.Contains(fi))
|
||||
{
|
||||
MessageBox.Show(this, string.Format("The list of name filters already includes an entry for text '{0}' of type '{1}'", fi.FilterPattern, fi.ObjectType.ToString()), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (indexFilter == -1)
|
||||
sqlOption.Filters.Items.Add(fi);
|
||||
else
|
||||
{
|
||||
sqlOption.Filters.Items[indexFilter].FilterPattern = fi.FilterPattern;
|
||||
sqlOption.Filters.Items[indexFilter].ObjectType = fi.ObjectType;
|
||||
}
|
||||
HandlerHelper.RaiseOnChange();
|
||||
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
13
OpenDBDiff.Schema.SQLServer2005/Front/HandlerHelper.cs
Normal file
13
OpenDBDiff.Schema.SQLServer2005/Front/HandlerHelper.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
public static class HandlerHelper
|
||||
{
|
||||
public delegate void SaveFilterHandler();
|
||||
public static event SaveFilterHandler OnChange;
|
||||
|
||||
public static void RaiseOnChange()
|
||||
{
|
||||
OnChange?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
26
OpenDBDiff.Schema.SQLServer2005/Front/SQLServerComparer.cs
Normal file
26
OpenDBDiff.Schema.SQLServer2005/Front/SQLServerComparer.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using OpenDBDiff.Front;
|
||||
using OpenDBDiff.Schema.Model;
|
||||
using OpenDBDiff.Schema.SQLServer.Generates.Generates;
|
||||
using System;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
public class SQLServerComparer : IDatabaseComparer
|
||||
{
|
||||
public IDatabase Compare(IDatabase origin, IDatabase destination)
|
||||
{
|
||||
if (origin is Model.Database && destination is Model.Database)
|
||||
{
|
||||
return Generate.Compare(origin as Model.Database, destination as Model.Database);
|
||||
}
|
||||
else if (!(origin is Model.Database))
|
||||
{
|
||||
throw new NotSupportedException("Origin database type not supported: " + origin.GetType());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new NotSupportedException("Destination database type not supported: " + destination.GetType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
39
OpenDBDiff.Schema.SQLServer2005/Front/SQLServerGenerator.cs
Normal file
39
OpenDBDiff.Schema.SQLServer2005/Front/SQLServerGenerator.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using OpenDBDiff.Front;
|
||||
using OpenDBDiff.Schema.Events;
|
||||
using OpenDBDiff.Schema.Model;
|
||||
using OpenDBDiff.Schema.SQLServer.Generates.Generates;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
public class SQLServerGenerator : IGenerator
|
||||
{
|
||||
private readonly Generate Generate;
|
||||
|
||||
public event ProgressEventHandler.ProgressHandler OnProgress;
|
||||
|
||||
public SQLServerGenerator(string connectionString, IOption option)
|
||||
{
|
||||
this.Generate = new Generate()
|
||||
{
|
||||
ConnectionString = connectionString,
|
||||
Options = new Options.SqlOption(option)
|
||||
};
|
||||
this.Generate.OnProgress += new ProgressEventHandler.ProgressHandler(args =>
|
||||
{
|
||||
if (OnProgress != null)
|
||||
OnProgress.Invoke(args);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public int GetMaxValue()
|
||||
{
|
||||
return Generate.MaxValue;
|
||||
}
|
||||
|
||||
public IDatabase Process()
|
||||
{
|
||||
return this.Generate.Process();
|
||||
}
|
||||
}
|
||||
}
|
||||
151
OpenDBDiff.Schema.SQLServer2005/Front/SQLServerProjectHandler.cs
Normal file
151
OpenDBDiff.Schema.SQLServer2005/Front/SQLServerProjectHandler.cs
Normal file
@@ -0,0 +1,151 @@
|
||||
using OpenDBDiff.Front;
|
||||
using OpenDBDiff.Schema.Model;
|
||||
using OpenDBDiff.Schema.SQLServer.Generates.Options;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
public class SQLServerProjectHandler : IProjectHandler
|
||||
{
|
||||
private SqlServerConnectFront DestinationControl;
|
||||
private SqlServerConnectFront SourceControl;
|
||||
private SQLServerGenerator SourceGenerator;
|
||||
private SQLServerGenerator DestinationGenerator;
|
||||
|
||||
private SqlOption Option;
|
||||
|
||||
public IFront CreateDestinationSelector()
|
||||
{
|
||||
this.DestinationControl = new SqlServerConnectFront
|
||||
{
|
||||
ServerName = "(local)",
|
||||
UseWindowsAuthentication = true,
|
||||
UserName = "sa",
|
||||
Password = "",
|
||||
DatabaseName = ""
|
||||
};
|
||||
|
||||
this.DestinationControl.Location = new Point(1, 1);
|
||||
this.DestinationControl.Name = "DestinationControl";
|
||||
this.DestinationControl.Anchor = (AnchorStyles)((int)AnchorStyles.Bottom + (int)AnchorStyles.Left + (int)AnchorStyles.Right);
|
||||
this.DestinationControl.TabIndex = 10;
|
||||
this.DestinationControl.Text = "Destination database:";
|
||||
|
||||
return this.DestinationControl;
|
||||
}
|
||||
|
||||
public IFront CreateSourceSelector()
|
||||
{
|
||||
this.SourceControl = new SqlServerConnectFront
|
||||
{
|
||||
ServerName = "(local)",
|
||||
UseWindowsAuthentication = true,
|
||||
UserName = "sa",
|
||||
Password = "",
|
||||
DatabaseName = ""
|
||||
};
|
||||
|
||||
SourceControl.Location = new Point(1, 1);
|
||||
SourceControl.Name = "SourceControl";
|
||||
SourceControl.Anchor = (AnchorStyles)((int)AnchorStyles.Bottom + (int)AnchorStyles.Left + (int)AnchorStyles.Right);
|
||||
SourceControl.TabIndex = 10;
|
||||
SourceControl.Text = "Source database:";
|
||||
|
||||
return SourceControl;
|
||||
}
|
||||
|
||||
public IDatabaseComparer GetDatabaseComparer()
|
||||
{
|
||||
return new SQLServerComparer();
|
||||
}
|
||||
|
||||
public IGenerator SetDestinationGenerator(string connectionString, IOption options)
|
||||
{
|
||||
DestinationGenerator = new SQLServerGenerator(connectionString, options);
|
||||
return DestinationGenerator;
|
||||
}
|
||||
|
||||
public IGenerator SetSourceGenerator(string connectionString, IOption options)
|
||||
{
|
||||
SourceGenerator = new SQLServerGenerator(connectionString, options);
|
||||
return SourceGenerator;
|
||||
}
|
||||
|
||||
public string GetDestinationConnectionString()
|
||||
{
|
||||
return DestinationControl.ConnectionString;
|
||||
}
|
||||
|
||||
public string GetDestinationDatabaseName()
|
||||
{
|
||||
return DestinationControl.DatabaseName;
|
||||
}
|
||||
|
||||
public string GetDestinationServerName()
|
||||
{
|
||||
return DestinationControl.ServerName;
|
||||
}
|
||||
|
||||
public string GetSourceConnectionString()
|
||||
{
|
||||
return SourceControl.ConnectionString;
|
||||
}
|
||||
|
||||
public string GetSourceDatabaseName()
|
||||
{
|
||||
return SourceControl.DatabaseName;
|
||||
}
|
||||
|
||||
public string GetSourceServerName()
|
||||
{
|
||||
return SourceControl.ServerName;
|
||||
}
|
||||
|
||||
public IOption GetDefaultProjectOptions()
|
||||
{
|
||||
if (Option == null)
|
||||
{
|
||||
Option = new Options.SqlOption();
|
||||
}
|
||||
return Option;
|
||||
}
|
||||
|
||||
public void SetProjectOptions(IOption option)
|
||||
{
|
||||
if (option == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(option));
|
||||
}
|
||||
else if (!(option is SqlOption))
|
||||
{
|
||||
throw new NotSupportedException($"This project handler only supports {nameof(SqlOption)} options. {option.GetType().Name} not supported");
|
||||
}
|
||||
Option = option as SqlOption;
|
||||
}
|
||||
|
||||
public OptionControl CreateOptionControl()
|
||||
{
|
||||
return new SqlOptionsFront();
|
||||
}
|
||||
|
||||
public string GetScriptLanguage()
|
||||
{
|
||||
return "mssql";
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
{
|
||||
this.SourceControl.Dispose();
|
||||
this.DestinationControl.Dispose();
|
||||
this.SourceControl = null;
|
||||
this.DestinationControl = null;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "SQLServer 2005 or higher";
|
||||
}
|
||||
}
|
||||
}
|
||||
1576
OpenDBDiff.Schema.SQLServer2005/Front/SqlOptionsFront.Designer.cs
generated
Normal file
1576
OpenDBDiff.Schema.SQLServer2005/Front/SqlOptionsFront.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
279
OpenDBDiff.Schema.SQLServer2005/Front/SqlOptionsFront.cs
Normal file
279
OpenDBDiff.Schema.SQLServer2005/Front/SqlOptionsFront.cs
Normal file
@@ -0,0 +1,279 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using OpenDBDiff.Schema.Model;
|
||||
using OpenDBDiff.Schema.SQLServer.Generates.Options;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
public partial class SqlOptionsFront : OpenDBDiff.Front.OptionControl
|
||||
{
|
||||
private SqlOption SQLOption;
|
||||
|
||||
public SqlOptionsFront()
|
||||
{
|
||||
InitializeComponent();
|
||||
HandlerHelper.OnChange += new HandlerHelper.SaveFilterHandler(HandlerHelper_OnChange);
|
||||
}
|
||||
|
||||
public void HandlerHelper_OnChange()
|
||||
{
|
||||
LoadFilters();
|
||||
}
|
||||
|
||||
private void LoadFilters()
|
||||
{
|
||||
lstFilters.Items.Clear();
|
||||
foreach (SqlOptionFilterItem item in SQLOption.Filters.Items)
|
||||
{
|
||||
var lview = new ListViewItem(item.FilterPattern);
|
||||
lview.SubItems.Add(item.ObjectType.ToString());
|
||||
lstFilters.Items.Add(lview);
|
||||
};
|
||||
}
|
||||
|
||||
public override void Load(Schema.Model.IOption option)
|
||||
{
|
||||
this.SQLOption = new SqlOption(option);
|
||||
txtBlob.Text = SQLOption.Defaults.DefaultBlobValue;
|
||||
txtDate.Text = SQLOption.Defaults.DefaultDateValue;
|
||||
txtDefaultInteger.Text = SQLOption.Defaults.DefaultIntegerValue;
|
||||
txtDefaultReal.Text = SQLOption.Defaults.DefaultRealValue;
|
||||
txtNText.Text = SQLOption.Defaults.DefaultNTextValue;
|
||||
txtText.Text = SQLOption.Defaults.DefaultTextValue;
|
||||
txtVariant.Text = SQLOption.Defaults.DefaultVariantValue;
|
||||
txtTime.Text = SQLOption.Defaults.DefaultTime;
|
||||
txtXML.Text = SQLOption.Defaults.DefaultXml;
|
||||
|
||||
chkCompAssemblys.Checked = SQLOption.Ignore.FilterAssemblies;
|
||||
chkCompCLRFunctions.Checked = SQLOption.Ignore.FilterCLRFunction;
|
||||
chkCompCLRStore.Checked = SQLOption.Ignore.FilterCLRStoredProcedure;
|
||||
chkCompCLRTrigger.Checked = SQLOption.Ignore.FilterCLRTrigger;
|
||||
chkCompCLRUDT.Checked = SQLOption.Ignore.FilterCLRUDT;
|
||||
|
||||
chkConstraints.Checked = SQLOption.Ignore.FilterConstraint;
|
||||
chkConstraintsPK.Checked = SQLOption.Ignore.FilterConstraintPK;
|
||||
chkConstraintsFK.Checked = SQLOption.Ignore.FilterConstraintFK;
|
||||
chkConstraintsUK.Checked = SQLOption.Ignore.FilterConstraintUK;
|
||||
chkConstraintsCheck.Checked = SQLOption.Ignore.FilterConstraintCheck;
|
||||
|
||||
chkCompExtendedProperties.Checked = SQLOption.Ignore.FilterExtendedProperties;
|
||||
chkCompFunciones.Checked = SQLOption.Ignore.FilterFunction;
|
||||
chkIndex.Checked = SQLOption.Ignore.FilterIndex;
|
||||
chkIndexFillFactor.Checked = SQLOption.Ignore.FilterIndexFillFactor;
|
||||
chkIndexIncludeColumns.Checked = SQLOption.Ignore.FilterIndexIncludeColumns;
|
||||
chkIndexFilter.Checked = SQLOption.Ignore.FilterIndexFilter;
|
||||
chkFullText.Checked = SQLOption.Ignore.FilterFullText;
|
||||
chkFullTextPath.Checked = SQLOption.Ignore.FilterFullTextPath;
|
||||
|
||||
chkCompSchemas.Checked = SQLOption.Ignore.FilterSchema;
|
||||
chkCompStoredProcedure.Checked = SQLOption.Ignore.FilterStoredProcedure;
|
||||
chkTableOption.Checked = SQLOption.Ignore.FilterTableOption;
|
||||
chkTables.Checked = SQLOption.Ignore.FilterTable;
|
||||
chkTablesColumnIdentity.Checked = SQLOption.Ignore.FilterColumnIdentity;
|
||||
chkTablesColumnCollation.Checked = SQLOption.Ignore.FilterColumnCollation;
|
||||
chkTableLockEscalation.Checked = SQLOption.Ignore.FilterTableLockEscalation;
|
||||
chkTableChangeTracking.Checked = SQLOption.Ignore.FilterTableChangeTracking;
|
||||
|
||||
chkTablesColumnOrder.Checked = SQLOption.Ignore.FilterColumnOrder;
|
||||
chkIgnoreNotForReplication.Checked = SQLOption.Ignore.FilterNotForReplication;
|
||||
|
||||
chkCompTriggersDDL.Checked = SQLOption.Ignore.FilterDDLTriggers;
|
||||
chkCompTriggers.Checked = SQLOption.Ignore.FilterTrigger;
|
||||
chkCompUDT.Checked = SQLOption.Ignore.FilterUserDataType;
|
||||
chkCompVistas.Checked = SQLOption.Ignore.FilterView;
|
||||
chkCompXMLSchemas.Checked = SQLOption.Ignore.FilterXMLSchema;
|
||||
chkFileGroups.Checked = SQLOption.Ignore.FilterTableFileGroup;
|
||||
chkCompUsers.Checked = SQLOption.Ignore.FilterUsers;
|
||||
chkCompRoles.Checked = SQLOption.Ignore.FilterRoles;
|
||||
chkCompRules.Checked = SQLOption.Ignore.FilterRules;
|
||||
|
||||
IncludeSynonymsCheckBox.Checked = SQLOption.Ignore.FilterSynonyms;
|
||||
|
||||
if (SQLOption.Script.AlterObjectOnSchemaBinding)
|
||||
optScriptSchemaBindingAlter.Checked = true;
|
||||
else
|
||||
optScriptSchemaDrop.Checked = true;
|
||||
|
||||
if (SQLOption.Comparison.CaseSensityType == SqlOptionComparison.CaseSensityOptions.Automatic)
|
||||
rdoCaseAutomatic.Checked = true;
|
||||
if (SQLOption.Comparison.CaseSensityType == SqlOptionComparison.CaseSensityOptions.CaseInsensity)
|
||||
rdoCaseInsensitive.Checked = true;
|
||||
if (SQLOption.Comparison.CaseSensityType == SqlOptionComparison.CaseSensityOptions.CaseSensity)
|
||||
rdoCaseSensitive.Checked = true;
|
||||
|
||||
if (SQLOption.Comparison.CaseSensityInCode == SqlOptionComparison.CaseSensityOptions.CaseInsensity)
|
||||
rdoCaseInsensityInCode.Checked = true;
|
||||
if (SQLOption.Comparison.CaseSensityInCode == SqlOptionComparison.CaseSensityOptions.CaseSensity)
|
||||
rdoCaseSensityInCode.Checked = true;
|
||||
|
||||
chkIgnoreWhiteSpaceInCode.Checked = SQLOption.Comparison.IgnoreWhiteSpacesInCode;
|
||||
|
||||
chkReloadDB.Checked = SQLOption.Comparison.ReloadComparisonOnUpdate;
|
||||
|
||||
LoadFilters();
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
SQLOption.Defaults.DefaultBlobValue = txtBlob.Text;
|
||||
SQLOption.Defaults.DefaultDateValue = txtDate.Text;
|
||||
SQLOption.Defaults.DefaultIntegerValue = txtDefaultInteger.Text;
|
||||
SQLOption.Defaults.DefaultNTextValue = txtNText.Text;
|
||||
SQLOption.Defaults.DefaultRealValue = txtDefaultReal.Text;
|
||||
SQLOption.Defaults.DefaultTextValue = txtText.Text;
|
||||
SQLOption.Defaults.DefaultVariantValue = txtVariant.Text;
|
||||
SQLOption.Defaults.DefaultTime = txtTime.Text;
|
||||
SQLOption.Defaults.DefaultXml = txtXML.Text;
|
||||
|
||||
SQLOption.Ignore.FilterAssemblies = chkCompAssemblys.Checked;
|
||||
SQLOption.Ignore.FilterCLRFunction = chkCompCLRFunctions.Checked && chkCompAssemblys.Checked;
|
||||
SQLOption.Ignore.FilterCLRStoredProcedure = chkCompCLRStore.Checked && chkCompAssemblys.Checked;
|
||||
SQLOption.Ignore.FilterCLRTrigger = chkCompCLRTrigger.Checked && chkCompAssemblys.Checked;
|
||||
SQLOption.Ignore.FilterCLRUDT = chkCompCLRUDT.Checked && chkCompAssemblys.Checked;
|
||||
|
||||
SQLOption.Ignore.FilterConstraint = chkConstraints.Checked;
|
||||
SQLOption.Ignore.FilterConstraintPK = chkConstraintsPK.Checked;
|
||||
SQLOption.Ignore.FilterConstraintFK = chkConstraintsFK.Checked;
|
||||
SQLOption.Ignore.FilterConstraintUK = chkConstraintsUK.Checked;
|
||||
SQLOption.Ignore.FilterConstraintCheck = chkConstraintsCheck.Checked;
|
||||
|
||||
SQLOption.Ignore.FilterFunction = chkCompFunciones.Checked;
|
||||
|
||||
SQLOption.Ignore.FilterIndex = chkIndex.Checked;
|
||||
SQLOption.Ignore.FilterIndexFillFactor = chkIndexFillFactor.Checked && chkIndex.Checked;
|
||||
SQLOption.Ignore.FilterIndexIncludeColumns = chkIndexIncludeColumns.Checked && chkIndex.Checked;
|
||||
SQLOption.Ignore.FilterIndexFilter = chkIndexFilter.Checked && chkIndex.Checked;
|
||||
|
||||
SQLOption.Ignore.FilterSchema = chkCompSchemas.Checked;
|
||||
SQLOption.Ignore.FilterStoredProcedure = chkCompStoredProcedure.Checked;
|
||||
|
||||
SQLOption.Ignore.FilterTable = chkTables.Checked;
|
||||
SQLOption.Ignore.FilterColumnIdentity = chkTablesColumnIdentity.Checked && chkTables.Checked;
|
||||
SQLOption.Ignore.FilterColumnCollation = chkTablesColumnCollation.Checked && chkTables.Checked;
|
||||
SQLOption.Ignore.FilterColumnOrder = chkTablesColumnOrder.Checked && chkTables.Checked;
|
||||
SQLOption.Ignore.FilterTableOption = chkTableOption.Checked && chkTables.Checked;
|
||||
SQLOption.Ignore.FilterTableLockEscalation = chkTableLockEscalation.Checked && chkTables.Checked;
|
||||
SQLOption.Ignore.FilterTableChangeTracking = chkTableChangeTracking.Checked && chkTables.Checked;
|
||||
|
||||
SQLOption.Ignore.FilterTableFileGroup = chkFileGroups.Checked;
|
||||
SQLOption.Ignore.FilterTrigger = chkCompTriggers.Checked;
|
||||
SQLOption.Ignore.FilterDDLTriggers = chkCompTriggersDDL.Checked;
|
||||
SQLOption.Ignore.FilterUserDataType = chkCompUDT.Checked;
|
||||
SQLOption.Ignore.FilterView = chkCompVistas.Checked;
|
||||
SQLOption.Ignore.FilterXMLSchema = chkCompXMLSchemas.Checked;
|
||||
SQLOption.Ignore.FilterExtendedProperties = chkCompExtendedProperties.Checked;
|
||||
SQLOption.Ignore.FilterUsers = chkCompUsers.Checked;
|
||||
SQLOption.Ignore.FilterRoles = chkCompRoles.Checked;
|
||||
SQLOption.Ignore.FilterRules = chkCompRules.Checked;
|
||||
SQLOption.Ignore.FilterFullText = chkFullText.Checked;
|
||||
SQLOption.Ignore.FilterFullTextPath = chkFullTextPath.Checked;
|
||||
SQLOption.Ignore.FilterSynonyms = IncludeSynonymsCheckBox.Checked;
|
||||
|
||||
SQLOption.Ignore.FilterNotForReplication = chkIgnoreNotForReplication.Checked;
|
||||
SQLOption.Script.AlterObjectOnSchemaBinding = optScriptSchemaBindingAlter.Checked;
|
||||
|
||||
if (rdoCaseAutomatic.Checked)
|
||||
SQLOption.Comparison.CaseSensityType = SqlOptionComparison.CaseSensityOptions.Automatic;
|
||||
if (rdoCaseInsensitive.Checked)
|
||||
SQLOption.Comparison.CaseSensityType = SqlOptionComparison.CaseSensityOptions.CaseInsensity;
|
||||
if (rdoCaseSensitive.Checked)
|
||||
SQLOption.Comparison.CaseSensityType = SqlOptionComparison.CaseSensityOptions.CaseSensity;
|
||||
|
||||
if (rdoCaseInsensityInCode.Checked)
|
||||
SQLOption.Comparison.CaseSensityInCode = SqlOptionComparison.CaseSensityOptions.CaseInsensity;
|
||||
if (rdoCaseSensityInCode.Checked)
|
||||
SQLOption.Comparison.CaseSensityInCode = SqlOptionComparison.CaseSensityOptions.CaseSensity;
|
||||
|
||||
SQLOption.Comparison.IgnoreWhiteSpacesInCode = chkIgnoreWhiteSpaceInCode.Checked;
|
||||
SQLOption.Comparison.ReloadComparisonOnUpdate = chkReloadDB.Checked;
|
||||
|
||||
FireOptionChanged(SQLOption);
|
||||
}
|
||||
public Schema.Model.IOption GetOption()
|
||||
{
|
||||
return SQLOption;
|
||||
}
|
||||
|
||||
private void chkCompIndices_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
chkIndexFillFactor.Enabled = chkIndex.Checked;
|
||||
chkIndexIncludeColumns.Enabled = chkIndex.Checked;
|
||||
chkIndexFilter.Enabled = chkIndex.Checked;
|
||||
chkIndexRowLock.Enabled = chkIndex.Checked;
|
||||
}
|
||||
|
||||
private void chkCompTablas_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
chkTablesColumnCollation.Enabled = chkTables.Checked;
|
||||
chkTablesColumnIdentity.Enabled = chkTables.Checked;
|
||||
chkTablesColumnOrder.Enabled = chkTables.Checked;
|
||||
chkTableChangeTracking.Enabled = chkTables.Checked;
|
||||
chkTableLockEscalation.Enabled = chkTables.Checked;
|
||||
chkTableOption.Enabled = chkTables.Checked;
|
||||
}
|
||||
|
||||
private void btnApply_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstFilters.SelectedItems.Count > 0)
|
||||
{
|
||||
AddExclusionPatternForm itemForm = new AddExclusionPatternForm(SQLOption, lstFilters.SelectedItems[0].Index);
|
||||
itemForm.ShowDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddExclusionPatternForm itemForm = new AddExclusionPatternForm(SQLOption);
|
||||
itemForm.ShowDialog(this);
|
||||
}
|
||||
|
||||
private void chkConstraints_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
chkConstraintsFK.Enabled = chkConstraints.Checked;
|
||||
chkConstraintsPK.Enabled = chkConstraints.Checked;
|
||||
chkConstraintsUK.Enabled = chkConstraints.Checked;
|
||||
chkConstraintsCheck.Enabled = chkConstraints.Checked;
|
||||
}
|
||||
|
||||
private void chkFullText_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
chkFullTextPath.Enabled = chkFullText.Checked;
|
||||
}
|
||||
|
||||
private void chkCompAssemblys_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
chkCompCLRStore.Enabled = chkCompAssemblys.Checked;
|
||||
chkCompCLRTrigger.Enabled = chkCompAssemblys.Checked;
|
||||
chkCompCLRFunctions.Enabled = chkCompAssemblys.Checked;
|
||||
chkCompCLRUDT.Enabled = chkCompAssemblys.Checked;
|
||||
}
|
||||
|
||||
private void DeleteNameFilterButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lstFilters.SelectedItems.Count > 0)
|
||||
{
|
||||
foreach (ListViewItem item in lstFilters.Items)
|
||||
{
|
||||
if (item.Selected)
|
||||
{
|
||||
var type = (ObjectType)Enum.Parse(typeof(ObjectType), item.SubItems[1].Text);
|
||||
var fi = new SqlOptionFilterItem(type, item.Text);
|
||||
if (SQLOption.Filters.Items.Contains(fi))
|
||||
SQLOption.Filters.Items.Remove(fi);
|
||||
}
|
||||
}
|
||||
LoadFilters();
|
||||
}
|
||||
}
|
||||
|
||||
private void lstFilters_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (lstFilters.SelectedItems.Count > 0)
|
||||
{
|
||||
AddExclusionPatternForm itemForm = new AddExclusionPatternForm(SQLOption, lstFilters.SelectedItems[0].Index);
|
||||
itemForm.ShowDialog(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
OpenDBDiff.Schema.SQLServer2005/Front/SqlOptionsFront.resx
Normal file
120
OpenDBDiff.Schema.SQLServer2005/Front/SqlOptionsFront.resx
Normal file
@@ -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>
|
||||
237
OpenDBDiff.Schema.SQLServer2005/Front/SqlServerConnectFront.Designer.cs
generated
Normal file
237
OpenDBDiff.Schema.SQLServer2005/Front/SqlServerConnectFront.Designer.cs
generated
Normal file
@@ -0,0 +1,237 @@
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
partial class SqlServerConnectFront
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private 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 Component 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.txtPassword = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.cboServer = new System.Windows.Forms.ComboBox();
|
||||
this.cboAuthentication = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.cboDatabase = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtUsername = new System.Windows.Forms.TextBox();
|
||||
this.btnTest = new System.Windows.Forms.Button();
|
||||
this.lblName = new System.Windows.Forms.Label();
|
||||
this.gradientPanel1 = new System.Windows.Forms.Panel();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.gradientPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtPassword
|
||||
//
|
||||
this.txtPassword.Location = new System.Drawing.Point(82, 107);
|
||||
this.txtPassword.Name = "txtPassword";
|
||||
this.txtPassword.PasswordChar = '*';
|
||||
this.txtPassword.Size = new System.Drawing.Size(180, 20);
|
||||
this.txtPassword.TabIndex = 3;
|
||||
this.txtPassword.TextChanged += new System.EventHandler(this.txtPassword_TextChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(3, 110);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(56, 13);
|
||||
this.label4.TabIndex = 16;
|
||||
this.label4.Text = "Password:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(3, 84);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(58, 13);
|
||||
this.label3.TabIndex = 15;
|
||||
this.label3.Text = "Username:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 31);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(66, 13);
|
||||
this.label2.TabIndex = 14;
|
||||
this.label2.Text = "Server Host:";
|
||||
//
|
||||
// cboServer
|
||||
//
|
||||
this.cboServer.FormattingEnabled = true;
|
||||
this.cboServer.Items.AddRange(new object[] {
|
||||
"(local)"});
|
||||
this.cboServer.Location = new System.Drawing.Point(82, 28);
|
||||
this.cboServer.Name = "cboServer";
|
||||
this.cboServer.Size = new System.Drawing.Size(180, 21);
|
||||
this.cboServer.TabIndex = 0;
|
||||
this.cboServer.SelectedIndexChanged += new System.EventHandler(this.cboServer_SelectedIndexChanged);
|
||||
this.cboServer.DropDown += new System.EventHandler(this.cboServer_DropDown);
|
||||
this.cboServer.TextChanged += new System.EventHandler(this.cboServer_TextChanged);
|
||||
//
|
||||
// cboAuthentication
|
||||
//
|
||||
this.cboAuthentication.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboAuthentication.FormattingEnabled = true;
|
||||
this.cboAuthentication.Items.AddRange(new object[] {
|
||||
"Windows Authentication",
|
||||
"SQL Server Authentication"});
|
||||
this.cboAuthentication.Location = new System.Drawing.Point(82, 55);
|
||||
this.cboAuthentication.Name = "cboAuthentication";
|
||||
this.cboAuthentication.Size = new System.Drawing.Size(180, 21);
|
||||
this.cboAuthentication.TabIndex = 1;
|
||||
this.cboAuthentication.SelectedIndexChanged += new System.EventHandler(this.cboAuthentication_SelectedIndexChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(3, 58);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(75, 13);
|
||||
this.label5.TabIndex = 20;
|
||||
this.label5.Text = "Authentication";
|
||||
//
|
||||
// cboDatabase
|
||||
//
|
||||
this.cboDatabase.FormattingEnabled = true;
|
||||
this.cboDatabase.Location = new System.Drawing.Point(82, 133);
|
||||
this.cboDatabase.Name = "cboDatabase";
|
||||
this.cboDatabase.Size = new System.Drawing.Size(223, 21);
|
||||
this.cboDatabase.TabIndex = 4;
|
||||
this.cboDatabase.DropDown += new System.EventHandler(this.cboDatabase_DropDown);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(3, 136);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(56, 13);
|
||||
this.label6.TabIndex = 23;
|
||||
this.label6.Text = "Database:";
|
||||
//
|
||||
// txtUsername
|
||||
//
|
||||
this.txtUsername.Location = new System.Drawing.Point(82, 81);
|
||||
this.txtUsername.Name = "txtUsername";
|
||||
this.txtUsername.Size = new System.Drawing.Size(180, 20);
|
||||
this.txtUsername.TabIndex = 2;
|
||||
this.txtUsername.TextChanged += new System.EventHandler(this.txtUsername_TextChanged);
|
||||
//
|
||||
// btnTest
|
||||
//
|
||||
this.btnTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.btnTest.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.btnTest.Location = new System.Drawing.Point(327, 126);
|
||||
this.btnTest.Name = "btnTest";
|
||||
this.btnTest.Size = new System.Drawing.Size(54, 28);
|
||||
this.btnTest.TabIndex = 5;
|
||||
this.btnTest.Text = "Test";
|
||||
this.btnTest.UseVisualStyleBackColor = true;
|
||||
this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
|
||||
//
|
||||
// lblName
|
||||
//
|
||||
this.lblName.AutoSize = true;
|
||||
this.lblName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblName.Location = new System.Drawing.Point(17, 5);
|
||||
this.lblName.Name = "lblName";
|
||||
this.lblName.Size = new System.Drawing.Size(105, 13);
|
||||
this.lblName.TabIndex = 24;
|
||||
this.lblName.Text = "Source Database";
|
||||
//
|
||||
// gradientPanel1
|
||||
//
|
||||
this.gradientPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.gradientPanel1.Controls.Add(this.pictureBox1);
|
||||
this.gradientPanel1.Controls.Add(this.lblName);
|
||||
this.gradientPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.gradientPanel1.Name = "gradientPanel1";
|
||||
this.gradientPanel1.Size = new System.Drawing.Size(384, 24);
|
||||
this.gradientPanel1.TabIndex = 26;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pictureBox1.Image = global::OpenDBDiff.Schema.SQLServer.Generates.Properties.Resources.database_yellow;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(2, 3);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(15, 18);
|
||||
this.pictureBox1.TabIndex = 27;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// SqlServerConnectFront
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.gradientPanel1);
|
||||
this.Controls.Add(this.cboDatabase);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.btnTest);
|
||||
this.Controls.Add(this.cboAuthentication);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.cboServer);
|
||||
this.Controls.Add(this.txtPassword);
|
||||
this.Controls.Add(this.txtUsername);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Name = "SqlServerConnectFront";
|
||||
this.Size = new System.Drawing.Size(384, 156);
|
||||
this.gradientPanel1.ResumeLayout(false);
|
||||
this.gradientPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TextBox txtPassword;
|
||||
private TextBox txtUsername;
|
||||
private Label label4;
|
||||
private Label label3;
|
||||
private Label label2;
|
||||
private ComboBox cboServer;
|
||||
private ComboBox cboAuthentication;
|
||||
private Label label5;
|
||||
private Button btnTest;
|
||||
private ComboBox cboDatabase;
|
||||
private Label label6;
|
||||
private Label lblName;
|
||||
private Panel gradientPanel1;
|
||||
private PictureBox pictureBox1;
|
||||
}
|
||||
}
|
||||
309
OpenDBDiff.Schema.SQLServer2005/Front/SqlServerConnectFront.cs
Normal file
309
OpenDBDiff.Schema.SQLServer2005/Front/SqlServerConnectFront.cs
Normal file
@@ -0,0 +1,309 @@
|
||||
using OpenDBDiff.Front;
|
||||
using OpenDBDiff.Schema.SQLServer.Generates.Front.Util;
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
|
||||
{
|
||||
public partial class SqlServerConnectFront : UserControl, IFront
|
||||
{
|
||||
private Boolean isDatabaseFilled = false;
|
||||
private Boolean isServerFilled = false;
|
||||
|
||||
private delegate void clearCombo();
|
||||
|
||||
private delegate void addCombo(string item);
|
||||
|
||||
public SqlServerConnectFront()
|
||||
{
|
||||
InitializeComponent();
|
||||
cboAuthentication.SelectedIndex = 1;
|
||||
}
|
||||
|
||||
private void cboAuthentication_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
txtUsername.Enabled = cboAuthentication.SelectedIndex == 1;
|
||||
txtPassword.Enabled = cboAuthentication.SelectedIndex == 1;
|
||||
isDatabaseFilled = false;
|
||||
ClearDatabase();
|
||||
}
|
||||
|
||||
public string ErrorConnection { get; private set; }
|
||||
|
||||
public bool UseWindowsAuthentication
|
||||
{
|
||||
get
|
||||
{
|
||||
return cboAuthentication.SelectedIndex == 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
cboAuthentication.SelectedIndex = (value ? 0 : 1);
|
||||
}
|
||||
}
|
||||
|
||||
public string DatabaseName
|
||||
{
|
||||
get { return cboDatabase.Text; }
|
||||
set { cboDatabase.Text = value; }
|
||||
}
|
||||
|
||||
public string UserName
|
||||
{
|
||||
get { return txtUsername.Text; }
|
||||
set { txtUsername.Text = value; }
|
||||
}
|
||||
|
||||
public string Password
|
||||
{
|
||||
get { return txtPassword.Text; }
|
||||
set { txtPassword.Text = value; }
|
||||
}
|
||||
|
||||
public override string Text
|
||||
{
|
||||
get { return lblName.Text; }
|
||||
set { lblName.Text = value; }
|
||||
}
|
||||
|
||||
public string ServerName
|
||||
{
|
||||
get { return cboServer.Text; }
|
||||
set { cboServer.Text = value; }
|
||||
}
|
||||
|
||||
public Boolean TestConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection connection = new SqlConnection())
|
||||
{
|
||||
connection.ConnectionString = this.ConnectionString;
|
||||
connection.Open();
|
||||
connection.Close();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrorConnection = ex.Message;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private string BuildConnectionString(string server, string database)
|
||||
{
|
||||
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
|
||||
builder.DataSource = server.Trim();
|
||||
|
||||
// if database is ommitted the connection will be established to the default database for the user
|
||||
if (!string.IsNullOrEmpty(database))
|
||||
builder.InitialCatalog = database.Trim();
|
||||
|
||||
builder.IntegratedSecurity = true;
|
||||
return builder.ConnectionString;
|
||||
}
|
||||
|
||||
private string BuildConnectionString(string server, string database, string username, string password)
|
||||
{
|
||||
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(BuildConnectionString(server, database));
|
||||
|
||||
builder.IntegratedSecurity = false;
|
||||
builder.UserID = username;
|
||||
builder.Password = password;
|
||||
return builder.ConnectionString;
|
||||
}
|
||||
|
||||
public string ConnectionStringToDefaultDatabase
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cboAuthentication.SelectedIndex == 1)
|
||||
return BuildConnectionString(cboServer.Text, null, txtUsername.Text, txtPassword.Text);
|
||||
else
|
||||
return BuildConnectionString(cboServer.Text, null);
|
||||
}
|
||||
}
|
||||
|
||||
public string ConnectionStringToMasterDatabase
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cboAuthentication.SelectedIndex == 1)
|
||||
return BuildConnectionString(cboServer.Text, "master", txtUsername.Text, txtPassword.Text);
|
||||
else
|
||||
return BuildConnectionString(cboServer.Text, "master");
|
||||
}
|
||||
}
|
||||
|
||||
public string ConnectionString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cboAuthentication.SelectedIndex == 1)
|
||||
return BuildConnectionString(cboServer.Text, cboDatabase.Text, txtUsername.Text, txtPassword.Text);
|
||||
else
|
||||
return BuildConnectionString(cboServer.Text, cboDatabase.Text);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
var builder = new SqlConnectionStringBuilder(value);
|
||||
|
||||
ServerName = builder.DataSource;
|
||||
UseWindowsAuthentication = builder.IntegratedSecurity;
|
||||
if (UseWindowsAuthentication)
|
||||
{
|
||||
UserName = "";
|
||||
Password = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
UserName = builder.UserID;
|
||||
Password = builder.Password;
|
||||
}
|
||||
DatabaseName = builder.InitialCatalog;
|
||||
}
|
||||
else
|
||||
{
|
||||
cboAuthentication.SelectedIndex = 1;
|
||||
UserName = "";
|
||||
Password = "";
|
||||
ServerName = "(local)";
|
||||
DatabaseName = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Control Control
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnTest_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (TestConnection())
|
||||
MessageBox.Show(this, "Test successful!", "Test", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else
|
||||
MessageBox.Show(this, "Test failed!\r\n" + ErrorConnection, "Test", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
private void AddComboItem(string item)
|
||||
{
|
||||
if (!InvokeRequired)
|
||||
cboDatabase.Items.Add(item);
|
||||
else
|
||||
{
|
||||
addCombo add = new addCombo(AddComboItem);
|
||||
Invoke(add, new string[] { item });
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearDatabase()
|
||||
{
|
||||
if (!InvokeRequired)
|
||||
cboDatabase.Items.Clear();
|
||||
else
|
||||
{
|
||||
clearCombo clear = new clearCombo(ClearDatabase);
|
||||
Invoke(clear);
|
||||
}
|
||||
}
|
||||
|
||||
private void FillDatabase()
|
||||
{
|
||||
if (!isDatabaseFilled)
|
||||
{
|
||||
String connectionString = ConnectionStringToDefaultDatabase;
|
||||
ClearDatabase();
|
||||
using (SqlConnection conn = new SqlConnection(connectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand command = new SqlCommand("SELECT name,database_id FROM sys.databases ORDER BY Name", conn))
|
||||
{
|
||||
using (SqlDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
AddComboItem(reader["Name"].ToString());
|
||||
}
|
||||
isDatabaseFilled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cboServer_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
isDatabaseFilled = false;
|
||||
}
|
||||
|
||||
private void txtUsername_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
isDatabaseFilled = false;
|
||||
ClearDatabase();
|
||||
}
|
||||
|
||||
private void txtPassword_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
isDatabaseFilled = false;
|
||||
ClearDatabase();
|
||||
}
|
||||
|
||||
private void cboServer_DropDown(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!isServerFilled)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
SqlServerList.Get().ForEach(item => cboServer.Items.Add(item));
|
||||
isServerFilled = true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(this, ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
|
||||
private void cboDatabase_DropDown(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
FillDatabase();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Cursor = Cursors.Default;
|
||||
cboDatabase.Items.Clear();
|
||||
MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
|
||||
private void cboServer_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
isDatabaseFilled = false;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format($"Server: {ServerName}, Database: {DatabaseName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
120
OpenDBDiff.Schema.SQLServer2005/Front/SqlServerConnectFront.resx
Normal file
120
OpenDBDiff.Schema.SQLServer2005/Front/SqlServerConnectFront.resx
Normal file
@@ -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>
|
||||
32
OpenDBDiff.Schema.SQLServer2005/Front/Util/SqlServerList.cs
Normal file
32
OpenDBDiff.Schema.SQLServer2005/Front/Util/SqlServerList.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Sql;
|
||||
|
||||
namespace OpenDBDiff.Schema.SQLServer.Generates.Front.Util
|
||||
{
|
||||
internal static class SqlServerList
|
||||
{
|
||||
public static List<string> Get()
|
||||
{
|
||||
SqlDataSourceEnumerator sqlSource = SqlDataSourceEnumerator.Instance;
|
||||
DataTable dt = sqlSource.GetDataSources();
|
||||
|
||||
List<string> serverList = new List<string>();
|
||||
string serverName = null;
|
||||
string instanceName = null;
|
||||
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
serverName = dr["ServerName"].ToString();
|
||||
instanceName = dr["InstanceName"] != null ? dr["InstanceName"].ToString() : null;
|
||||
|
||||
if (string.IsNullOrEmpty(instanceName))
|
||||
serverList.Add(serverName);
|
||||
else
|
||||
serverList.Add(string.Format("{0}\\{1}", serverName, instanceName));
|
||||
}
|
||||
|
||||
return serverList;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{EF2F571E-A7AD-40BE-8500-50A039159FC1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpenDBDiff.Schema.SQLServer.Generates</RootNamespace>
|
||||
<AssemblyName>OpenDBDiff.Schema.SQLServer</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>OpenDBDiff.Schema.SQLServer.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<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>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRules>-Microsoft.Naming#CA1702;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1714;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1704;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1717;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1701;-Microsoft.Naming#CA1703;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726</CodeAnalysisRules>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRules>-Microsoft.Naming#CA1702;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1714;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1704;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1717;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1701;-Microsoft.Naming#CA1703;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726</CodeAnalysisRules>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\OpenDBDiff\Properties\AssemblyVersionInfo.cs">
|
||||
<Link>Properties\AssemblyVersionInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Front\AddExclusionPatternForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Front\AddExclusionPatternForm.Designer.cs">
|
||||
<DependentUpon>AddExclusionPatternForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Front\HandlerHelper.cs" />
|
||||
<Compile Include="Front\SqlOptionsFront.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Front\SqlOptionsFront.Designer.cs">
|
||||
<DependentUpon>SqlOptionsFront.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Front\SQLServerComparer.cs" />
|
||||
<Compile Include="Front\SqlServerConnectFront.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Front\SqlServerConnectFront.Designer.cs">
|
||||
<DependentUpon>SqlServerConnectFront.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Front\SQLServerGenerator.cs" />
|
||||
<Compile Include="Front\SQLServerProjectHandler.cs" />
|
||||
<Compile Include="Front\Util\SqlServerList.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenDBDiff.Front\OpenDBDiff.Front.csproj">
|
||||
<Project>{E82CFC94-DE8C-4EDD-AA0C-F78ABAE03768}</Project>
|
||||
<Name>DBDiff.Front</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenDBDiff.Schema.SQLServer.Generates\OpenDBDiff.Schema.SQLServer.Generates.csproj">
|
||||
<Project>{32ac9af6-db93-4354-b69f-6dbc65c70867}</Project>
|
||||
<Name>DBDiff.Schema.SQLServer.Generates</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenDBDiff.Schema\OpenDBDiff.Schema.csproj">
|
||||
<Project>{406558A0-1B98-4D0E-B8B6-2013700B065A}</Project>
|
||||
<Name>DBDiff.Schema</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\.editorconfig">
|
||||
<Link>.editorconfig</Link>
|
||||
</None>
|
||||
<None Include="OpenDBDiff.Schema.SQLServer.snk" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Front\AddExclusionPatternForm.resx">
|
||||
<DependentUpon>AddExclusionPatternForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Front\SqlOptionsFront.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>SqlOptionsFront.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Front\SqlServerConnectFront.resx">
|
||||
<DependentUpon>SqlServerConnectFront.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ClassDiagrams.cd" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\database_yellow.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
BIN
OpenDBDiff.Schema.SQLServer2005/OpenDBDiff.Schema.SQLServer.snk
Normal file
BIN
OpenDBDiff.Schema.SQLServer2005/OpenDBDiff.Schema.SQLServer.snk
Normal file
Binary file not shown.
27
OpenDBDiff.Schema.SQLServer2005/Properties/AssemblyInfo.cs
Normal file
27
OpenDBDiff.Schema.SQLServer2005/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenDBDiff.Schema.SQLServer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("OpenDBDiff.Schema.SQLServer")]
|
||||
[assembly: AssemblyCopyright("OpenDBDiff")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("4f1e8d72-25ec-41e6-b56a-0091796271c8")]
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution = true)]
|
||||
73
OpenDBDiff.Schema.SQLServer2005/Properties/Resources.Designer.cs
generated
Normal file
73
OpenDBDiff.Schema.SQLServer2005/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 OpenDBDiff.Schema.SQLServer.Generates.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", "4.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("OpenDBDiff.Schema.SQLServer.Generates.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 resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap database_yellow {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("database_yellow", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
124
OpenDBDiff.Schema.SQLServer2005/Properties/Resources.resx
Normal file
124
OpenDBDiff.Schema.SQLServer2005/Properties/Resources.resx
Normal file
@@ -0,0 +1,124 @@
|
||||
<?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="database_yellow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\database_yellow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
OpenDBDiff.Schema.SQLServer2005/Resources/database_yellow.png
Normal file
BIN
OpenDBDiff.Schema.SQLServer2005/Resources/database_yellow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Reference in New Issue
Block a user