MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:rburnett Date:April 21 2006 5:02pm
Subject:Connector/NET commit: r226 - in trunk/VSTools: . Editors Nodes
View as plain text  
Added:
   trunk/VSTools/Editors/TableEditor.Designer.cs
Modified:
   trunk/VSTools/EditorFactory.cs
   trunk/VSTools/Editors/TableEditor.cs
   trunk/VSTools/Editors/TableEditor.resx
   trunk/VSTools/MyVSTools.csproj
   trunk/VSTools/Nodes/ColumnNode.cs
   trunk/VSTools/Nodes/MyHierarchyNode.cs
   trunk/VSTools/Nodes/ServerNode.cs
   trunk/VSTools/Nodes/TableNode.cs
   trunk/VSTools/Nodes/ViewNode.cs
Log:
EditorFactory.cs
   Generalized this code to work with any node type
TableEditor.cs
   Completely revamped table editor that is not using PropertyGrid
ColumnNode.cs
TableNode.cs
   Added properties for use in TableEditor
MyHierarchyNode.cs
   Added Debugtrace calls
ServerNode.cs
   Added NewQuery command support
ViewNode.cs
   Added GetEditor override

Modified: trunk/VSTools/EditorFactory.cs
===================================================================
--- trunk/VSTools/EditorFactory.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/EditorFactory.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -121,8 +121,8 @@
 
             // Create the Document (editor)
             ServerNode parent = (pvHier as ServerNode);
-            ProcedureNode pn = (ProcedureNode)parent.NodeFromId(itemid);
-            BaseEditor newEditor = pn.GetEditor();
+            ExplorerNode node = (ExplorerNode)parent.NodeFromId(itemid);
+            BaseEditor newEditor = node.GetEditor();
             ppunkDocView = Marshal.GetIUnknownForObject(newEditor);
             ppunkDocData = Marshal.GetIUnknownForObject(newEditor);
             pbstrEditorCaption = "";

Added: trunk/VSTools/Editors/TableEditor.Designer.cs
===================================================================
--- trunk/VSTools/Editors/TableEditor.Designer.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Editors/TableEditor.Designer.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -0,0 +1,507 @@
+namespace MySql.VSTools
+{
+    partial class TableEditor
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 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.label1 = new System.Windows.Forms.Label();
+            this.tableName = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.columnsPage = new System.Windows.Forms.TabPage();
+            this.removeButton = new System.Windows.Forms.Button();
+            this.addColumn = new System.Windows.Forms.Button();
+            this.columnList = new System.Windows.Forms.ListView();
+            this.nameColumn = new System.Windows.Forms.ColumnHeader();
+            this.typeColumn = new System.Windows.Forms.ColumnHeader();
+            this.lengthColumn = new System.Windows.Forms.ColumnHeader();
+            this.allowNull = new System.Windows.Forms.ColumnHeader();
+            this.binary = new System.Windows.Forms.ColumnHeader();
+            this.zero = new System.Windows.Forms.ColumnHeader();
+            this.constraintsPage = new System.Windows.Forms.TabPage();
+            this.indexesPage = new System.Windows.Forms.TabPage();
+            this.optionsPage = new System.Windows.Forms.TabPage();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.maxRows = new System.Windows.Forms.TextBox();
+            this.avgRowLen = new System.Windows.Forms.TextBox();
+            this.minRows = new System.Windows.Forms.TextBox();
+            this.useChecksum = new System.Windows.Forms.CheckBox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.rowFormat = new System.Windows.Forms.ComboBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.indexDirectory = new System.Windows.Forms.TextBox();
+            this.dataDirectory = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.tableType = new System.Windows.Forms.ComboBox();
+            this.sqlPage = new System.Windows.Forms.TabPage();
+            this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+            this.tableSchema = new System.Windows.Forms.TextBox();
+            this.tabControl1.SuspendLayout();
+            this.columnsPage.SuspendLayout();
+            this.optionsPage.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.groupBox1.SuspendLayout();
+            this.sqlPage.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(7, 11);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(68, 13);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "Table Name:";
+            // 
+            // tableName
+            // 
+            this.tableName.Location = new System.Drawing.Point(90, 5);
+            this.tableName.Name = "tableName";
+            this.tableName.Size = new System.Drawing.Size(247, 20);
+            this.tableName.TabIndex = 1;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(7, 37);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(79, 13);
+            this.label2.TabIndex = 2;
+            this.label2.Text = "Table Schema:";
+            // 
+            // tabControl1
+            // 
+            this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.tabControl1.Controls.Add(this.columnsPage);
+            this.tabControl1.Controls.Add(this.constraintsPage);
+            this.tabControl1.Controls.Add(this.indexesPage);
+            this.tabControl1.Controls.Add(this.optionsPage);
+            this.tabControl1.Controls.Add(this.sqlPage);
+            this.tabControl1.Location = new System.Drawing.Point(7, 69);
+            this.tabControl1.Name = "tabControl1";
+            this.tabControl1.SelectedIndex = 0;
+            this.tabControl1.Size = new System.Drawing.Size(640, 403);
+            this.tabControl1.TabIndex = 3;
+            // 
+            // columnsPage
+            // 
+            this.columnsPage.Controls.Add(this.removeButton);
+            this.columnsPage.Controls.Add(this.addColumn);
+            this.columnsPage.Controls.Add(this.columnList);
+            this.columnsPage.Location = new System.Drawing.Point(4, 22);
+            this.columnsPage.Name = "columnsPage";
+            this.columnsPage.Padding = new System.Windows.Forms.Padding(3);
+            this.columnsPage.Size = new System.Drawing.Size(632, 377);
+            this.columnsPage.TabIndex = 0;
+            this.columnsPage.Text = "Columns";
+            this.columnsPage.UseVisualStyleBackColor = true;
+            // 
+            // removeButton
+            // 
+            this.removeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.removeButton.Location = new System.Drawing.Point(91, 229);
+            this.removeButton.Name = "removeButton";
+            this.removeButton.Size = new System.Drawing.Size(75, 23);
+            this.removeButton.TabIndex = 5;
+            this.removeButton.Text = "Remove";
+            this.removeButton.UseVisualStyleBackColor = true;
+            // 
+            // addColumn
+            // 
+            this.addColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.addColumn.Location = new System.Drawing.Point(10, 230);
+            this.addColumn.Name = "addColumn";
+            this.addColumn.Size = new System.Drawing.Size(75, 23);
+            this.addColumn.TabIndex = 3;
+            this.addColumn.Text = "Add...";
+            this.addColumn.UseVisualStyleBackColor = true;
+            // 
+            // columnList
+            // 
+            this.columnList.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.columnList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.nameColumn,
+            this.typeColumn,
+            this.lengthColumn,
+            this.allowNull,
+            this.binary,
+            this.zero});
+            this.columnList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
+            this.columnList.Location = new System.Drawing.Point(6, 6);
+            this.columnList.Name = "columnList";
+            this.columnList.Size = new System.Drawing.Size(620, 217);
+            this.columnList.TabIndex = 0;
+            this.columnList.UseCompatibleStateImageBehavior = false;
+            this.columnList.View = System.Windows.Forms.View.Details;
+            this.columnList.SizeChanged += new System.EventHandler(this.columnList_SizeChanged);
+            // 
+            // nameColumn
+            // 
+            this.nameColumn.Text = "Name";
+            this.nameColumn.Width = 135;
+            // 
+            // typeColumn
+            // 
+            this.typeColumn.Text = "Type";
+            // 
+            // lengthColumn
+            // 
+            this.lengthColumn.Text = "Length";
+            // 
+            // allowNull
+            // 
+            this.allowNull.Text = "Null";
+            this.allowNull.Width = 34;
+            // 
+            // binary
+            // 
+            this.binary.Text = "Binary";
+            this.binary.Width = 45;
+            // 
+            // zero
+            // 
+            this.zero.Text = "Zero";
+            this.zero.Width = 46;
+            // 
+            // constraintsPage
+            // 
+            this.constraintsPage.Location = new System.Drawing.Point(4, 22);
+            this.constraintsPage.Name = "constraintsPage";
+            this.constraintsPage.Padding = new System.Windows.Forms.Padding(3);
+            this.constraintsPage.Size = new System.Drawing.Size(632, 377);
+            this.constraintsPage.TabIndex = 1;
+            this.constraintsPage.Text = "Constraints";
+            this.constraintsPage.UseVisualStyleBackColor = true;
+            // 
+            // indexesPage
+            // 
+            this.indexesPage.Location = new System.Drawing.Point(4, 22);
+            this.indexesPage.Name = "indexesPage";
+            this.indexesPage.Size = new System.Drawing.Size(632, 377);
+            this.indexesPage.TabIndex = 2;
+            this.indexesPage.Text = "Indexes";
+            this.indexesPage.UseVisualStyleBackColor = true;
+            // 
+            // optionsPage
+            // 
+            this.optionsPage.Controls.Add(this.groupBox2);
+            this.optionsPage.Controls.Add(this.groupBox1);
+            this.optionsPage.Location = new System.Drawing.Point(4, 22);
+            this.optionsPage.Name = "optionsPage";
+            this.optionsPage.Padding = new System.Windows.Forms.Padding(3);
+            this.optionsPage.Size = new System.Drawing.Size(632, 377);
+            this.optionsPage.TabIndex = 3;
+            this.optionsPage.Text = "Options";
+            this.optionsPage.UseVisualStyleBackColor = true;
+            this.optionsPage.Click += new System.EventHandler(this.optionsPage_Click);
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox2.Controls.Add(this.maxRows);
+            this.groupBox2.Controls.Add(this.avgRowLen);
+            this.groupBox2.Controls.Add(this.minRows);
+            this.groupBox2.Controls.Add(this.useChecksum);
+            this.groupBox2.Controls.Add(this.label9);
+            this.groupBox2.Controls.Add(this.label8);
+            this.groupBox2.Controls.Add(this.label7);
+            this.groupBox2.Controls.Add(this.rowFormat);
+            this.groupBox2.Controls.Add(this.label6);
+            this.groupBox2.Location = new System.Drawing.Point(6, 134);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(620, 107);
+            this.groupBox2.TabIndex = 3;
+            this.groupBox2.TabStop = false;
+            this.groupBox2.Text = "Row Options";
+            // 
+            // maxRows
+            // 
+            this.maxRows.Location = new System.Drawing.Point(339, 46);
+            this.maxRows.Name = "maxRows";
+            this.maxRows.Size = new System.Drawing.Size(120, 20);
+            this.maxRows.TabIndex = 11;
+            // 
+            // avgRowLen
+            // 
+            this.avgRowLen.Location = new System.Drawing.Point(123, 74);
+            this.avgRowLen.Name = "avgRowLen";
+            this.avgRowLen.Size = new System.Drawing.Size(120, 20);
+            this.avgRowLen.TabIndex = 10;
+            // 
+            // minRows
+            // 
+            this.minRows.Location = new System.Drawing.Point(123, 48);
+            this.minRows.Name = "minRows";
+            this.minRows.Size = new System.Drawing.Size(120, 20);
+            this.minRows.TabIndex = 9;
+            // 
+            // useChecksum
+            // 
+            this.useChecksum.AutoSize = true;
+            this.useChecksum.Location = new System.Drawing.Point(250, 23);
+            this.useChecksum.Name = "useChecksum";
+            this.useChecksum.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
+            this.useChecksum.Size = new System.Drawing.Size(98, 17);
+            this.useChecksum.TabIndex = 8;
+            this.useChecksum.Text = "Use Checksum";
+            this.useChecksum.UseVisualStyleBackColor = true;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Location = new System.Drawing.Point(6, 76);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(111, 13);
+            this.label9.TabIndex = 7;
+            this.label9.Text = "Average Row Length:";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Location = new System.Drawing.Point(249, 49);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(84, 13);
+            this.label8.TabIndex = 3;
+            this.label8.Text = "Maximum Rows:";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(8, 49);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(81, 13);
+            this.label7.TabIndex = 2;
+            this.label7.Text = "Minimum Rows:";
+            // 
+            // rowFormat
+            // 
+            this.rowFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.rowFormat.FormattingEnabled = true;
+            this.rowFormat.Items.AddRange(new object[] {
+            "Compact",
+            "Default",
+            "Dynamic",
+            "Fixed",
+            "Compressed"});
+            this.rowFormat.Location = new System.Drawing.Point(122, 20);
+            this.rowFormat.Name = "rowFormat";
+            this.rowFormat.Size = new System.Drawing.Size(121, 21);
+            this.rowFormat.TabIndex = 1;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(22, 23);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(67, 13);
+            this.label6.TabIndex = 0;
+            this.label6.Text = "Row Format:";
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox1.Controls.Add(this.indexDirectory);
+            this.groupBox1.Controls.Add(this.dataDirectory);
+            this.groupBox1.Controls.Add(this.label5);
+            this.groupBox1.Controls.Add(this.label4);
+            this.groupBox1.Controls.Add(this.label3);
+            this.groupBox1.Controls.Add(this.tableType);
+            this.groupBox1.Location = new System.Drawing.Point(6, 6);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
+            this.groupBox1.Size = new System.Drawing.Size(620, 122);
+            this.groupBox1.TabIndex = 2;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "Storage";
+            // 
+            // indexDirectory
+            // 
+            this.indexDirectory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.indexDirectory.Location = new System.Drawing.Point(95, 77);
+            this.indexDirectory.Name = "indexDirectory";
+            this.indexDirectory.Size = new System.Drawing.Size(517, 20);
+            this.indexDirectory.TabIndex = 5;
+            // 
+            // dataDirectory
+            // 
+            this.dataDirectory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.dataDirectory.Location = new System.Drawing.Point(95, 51);
+            this.dataDirectory.Name = "dataDirectory";
+            this.dataDirectory.Size = new System.Drawing.Size(517, 20);
+            this.dataDirectory.TabIndex = 4;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(8, 80);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(81, 13);
+            this.label5.TabIndex = 3;
+            this.label5.Text = "Index Directory:";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(11, 54);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(78, 13);
+            this.label4.TabIndex = 2;
+            this.label4.Text = "Data Directory:";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(25, 27);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(64, 13);
+            this.label3.TabIndex = 0;
+            this.label3.Text = "Table Type:";
+            // 
+            // tableType
+            // 
+            this.tableType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.tableType.FormattingEnabled = true;
+            this.tableType.Items.AddRange(new object[] {
+            "MyISAM",
+            "InnoDB",
+            "Memory",
+            "Merge",
+            "NDB",
+            "BDB",
+            "ISAM"});
+            this.tableType.Location = new System.Drawing.Point(95, 24);
+            this.tableType.Name = "tableType";
+            this.tableType.Size = new System.Drawing.Size(176, 21);
+            this.tableType.TabIndex = 1;
+            // 
+            // sqlPage
+            // 
+            this.sqlPage.Controls.Add(this.richTextBox1);
+            this.sqlPage.Location = new System.Drawing.Point(4, 22);
+            this.sqlPage.Name = "sqlPage";
+            this.sqlPage.Padding = new System.Windows.Forms.Padding(3);
+            this.sqlPage.Size = new System.Drawing.Size(632, 377);
+            this.sqlPage.TabIndex = 4;
+            this.sqlPage.Text = "SQL";
+            this.sqlPage.UseVisualStyleBackColor = true;
+            // 
+            // richTextBox1
+            // 
+            this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.richTextBox1.Location = new System.Drawing.Point(3, 3);
+            this.richTextBox1.Name = "richTextBox1";
+            this.richTextBox1.Size = new System.Drawing.Size(626, 371);
+            this.richTextBox1.TabIndex = 0;
+            this.richTextBox1.Text = "";
+            // 
+            // tableSchema
+            // 
+            this.tableSchema.Enabled = false;
+            this.tableSchema.Location = new System.Drawing.Point(90, 31);
+            this.tableSchema.Name = "tableSchema";
+            this.tableSchema.Size = new System.Drawing.Size(247, 20);
+            this.tableSchema.TabIndex = 4;
+            // 
+            // TableEditor
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.tableSchema);
+            this.Controls.Add(this.tabControl1);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.tableName);
+            this.Controls.Add(this.label1);
+            this.Name = "TableEditor";
+            this.Padding = new System.Windows.Forms.Padding(3);
+            this.Size = new System.Drawing.Size(650, 475);
+            this.tabControl1.ResumeLayout(false);
+            this.columnsPage.ResumeLayout(false);
+            this.optionsPage.ResumeLayout(false);
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.sqlPage.ResumeLayout(false);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox tableName;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TabControl tabControl1;
+        private System.Windows.Forms.TabPage columnsPage;
+        private System.Windows.Forms.TabPage constraintsPage;
+        private System.Windows.Forms.TabPage indexesPage;
+        private System.Windows.Forms.TabPage optionsPage;
+        private System.Windows.Forms.TextBox tableSchema;
+        private System.Windows.Forms.ListView columnList;
+        private System.Windows.Forms.TabPage sqlPage;
+        private System.Windows.Forms.RichTextBox richTextBox1;
+        private System.Windows.Forms.ColumnHeader nameColumn;
+        private System.Windows.Forms.ColumnHeader typeColumn;
+        private System.Windows.Forms.Button addColumn;
+        private System.Windows.Forms.Button removeButton;
+        private System.Windows.Forms.ColumnHeader lengthColumn;
+        private System.Windows.Forms.ColumnHeader allowNull;
+        private System.Windows.Forms.ColumnHeader binary;
+        private System.Windows.Forms.ColumnHeader zero;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.TextBox indexDirectory;
+        private System.Windows.Forms.TextBox dataDirectory;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ComboBox tableType;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.ComboBox rowFormat;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.CheckBox useChecksum;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.TextBox maxRows;
+        private System.Windows.Forms.TextBox avgRowLen;
+        private System.Windows.Forms.TextBox minRows;
+    }
+}

Modified: trunk/VSTools/Editors/TableEditor.cs
===================================================================
--- trunk/VSTools/Editors/TableEditor.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Editors/TableEditor.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -1,636 +1,70 @@
-// Copyright (C) 2004 MySQL AB
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-
 using System;
-using System.Collections;
+using System.Collections.Generic;
 using System.ComponentModel;
 using System.Drawing;
 using System.Data;
+using System.Text;
 using System.Windows.Forms;
-using System.Text.RegularExpressions;
+using System.Collections;
 
-
 namespace MySql.VSTools
 {
-	/// <summary>
-	/// Summary description for TableDesigner.
-	/// </summary>
-	public class TableEditor : BaseEditor
-	{
-		private System.Windows.Forms.TabControl tabControl1;
-		private System.Windows.Forms.TabPage tabPage1;
-		private System.Windows.Forms.TabPage tabPage2;
-		private System.Windows.Forms.DataGrid columnGrid;
-		private System.Windows.Forms.Label label1;
-		private System.Windows.Forms.ComboBox tableType;
-		private System.Windows.Forms.Label label2;
-		private System.Windows.Forms.Label label3;
-		private System.Windows.Forms.Label label4;
-		private System.Windows.Forms.TextBox autoIncrement;
-		private System.Windows.Forms.Label label5;
-		private System.Windows.Forms.CheckBox delayKeyWrite;
-		private System.Windows.Forms.Label label6;
-		private System.Windows.Forms.Label label7;
-		private System.Windows.Forms.TextBox minRows;
-		private System.Windows.Forms.TextBox maxRows;
-		private System.Windows.Forms.CheckBox packKeys;
-		private System.Windows.Forms.CheckBox checksum;
-		private System.Windows.Forms.TextBox comment;
-		private System.Windows.Forms.ComboBox rowFormat;
-		private System.Windows.Forms.TextBox rowLength;
-		private System.Windows.Forms.Label label8;
+    internal partial class TableEditor : BaseEditor
+    {
+        private TableNode table;
 
-		private DataTable	columnsData;
-		private System.Windows.Forms.Splitter splitter1;
+        public TableEditor(TableNode table)
+        {
+            InitializeComponent();
 
-		private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
-		private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1;
-		private DataGridComboBoxColumn	typeColumn;
-		private System.Windows.Forms.DataGridBoolColumn dataGridBoolColumn1;
+            this.table = table;
+            tableName.Text = table.Caption;
+            tableSchema.Text = table.Schema;
+            tableType.SelectedItem = table.TypeName;
+            tableType.SelectedText = table.TypeName;
+            dataDirectory.Text = table.DataDirectory;
+            indexDirectory.Text = table.IndexDirectory;
+            rowFormat.SelectedItem = table.RowFormat;
+            useChecksum.Checked = table.UseChecksum;
+            avgRowLen.Text = AsString(table.AverageRowLength);
+            minRows.Text = AsString(table.MinimumRowCount);
+            maxRows.Text = AsString(table.MaximumRowCount);
+            
+            PopulateGrid();
+        }
 
-		private string[] columnTypes = new string[] { "TINYINT", "SMALLINT",
-														"MEDIUMINT", "INT", "BIGINT", "REAL", "DOUBLE", "FLOAT",
-														"DECIMAL", "NUMERIC", "CHAR", "VARCHAR", "DATE", "TIME",
-														"TIMESTAMP", "DATETIME", "TINYBLOB", "BLOB", "MEDIUMBLOB",
-														"LONGBLOB", "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT", 
-														"ENUM", "SET" };
-		private System.Windows.Forms.TabPage tabPage3;
-		private System.Windows.Forms.TabPage tabPage4;
-		private System.Windows.Forms.TextBox sql;
-		private System.Windows.Forms.PropertyGrid propertyGrid1;
-
-		private TableDesignerColumnCollection	columns;
-		private System.Windows.Forms.TextBox tableName;
-		private TableInfo tableInfo;
-		private bool		dirty;
-
-		/// <summary> 
-		/// Required designer variable.
-		/// </summary>
-		private System.ComponentModel.Container components = null;
-
-		public TableEditor()
-		{
-			tableInfo = new TableInfo();
-			dirty = false;
-
-			// This call is required by the Windows.Forms Form Designer.
-			InitializeComponent();
-
-			DataGridTableStyle ts = columnGrid.TableStyles["TableDesignerColumnCollection"];
-			typeColumn = new DataGridComboBoxColumn( "Data Type", columnTypes, 
-				"ColumnTypeForGrid" );
-			typeColumn.NullText = "";
-
-			ts.GridColumnStyles.Clear();
-			dataGridTableStyle1.GridColumnStyles.AddRange(
-				new System.Windows.Forms.DataGridColumnStyle[] {
-					   this.dataGridTextBoxColumn1, typeColumn, this.dataGridBoolColumn1});
-
-			columns = new TableDesignerColumnCollection();
-			columnGrid.DataSource = columns; 
-		}
-
-		/// <summary> 
-		/// Clean up any resources being used.
-		/// </summary>
-		protected override void Dispose( bool disposing )
-		{
-			if( disposing )
-			{
-				if(components != null)
-				{
-					components.Dispose();
-				}
-			}
-			base.Dispose( disposing );
-		}
-
-        public override string Filename
+        private string AsString(object val)
         {
-            get { return "tablename"; }
+            if (val.Equals(0))
+                return String.Empty;
+            return val.ToString();
         }
 
-/*		public void EditTable( MySqlConnectionString conn, string tableName )
-		{
-			dbConn = conn;
-			this.tableName = tableName;
+        private void PopulateGrid()
+        {
+            columnList.Items.Clear();
 
-			if (tableName == null || tableName.Trim().Length == 0) return;
+            ArrayList cols = table.GetColumns();
+            foreach (ColumnNode node in cols)
+            {
+                ListViewItem item = columnList.Items.Add(node.Caption);
+                item.SubItems.Add(node.Typename);
+                item.SubItems.Add(node.LengthAsString);
+                item.SubItems.Add(node.CanBeNull.ToString());
+                item.SubItems.Add(node.IsBinary.ToString());
+                item.SubItems.Add(node.ZeroFill.ToString());
+            }
+        }
 
-			MySqlConnection c = new MySqlConnection( conn.CreateConnectionString() );
-			MySqlDataAdapter da = new MySqlDataAdapter("SHOW TABLE STATUS", c);
-			DataTable dt = new DataTable();
-			da.Fill(dt);
-			foreach (DataRow row in dt.Rows)
-			{
-				if ((string)row[0] == tableName) 
-				{
-					LoadTableInfo(row); break;
-				}
-			}
+        private void columnList_SizeChanged(object sender, EventArgs e)
+        {
 
-			da.SelectCommand.CommandText = "SHOW COLUMNS FROM " + tableName;
-			dt.Clear();
-			da.Fill(dt);
-			LoadColumnInfo( dt );
-		}
-*/
-		private string Normalize( string colValue )
-		{
-			if (colValue == "NULL") return String.Empty;
-			return colValue;
-		}
+        }
 
-		private void LoadColumnInfo( DataTable dt )
-		{
-/*			columns.Rows.Clear();
-			Regex reg = new Regex( @"([^( ]+)(?:[(](\d+)[,]*(\d*)[)])*.*" );
+        private void optionsPage_Click(object sender, EventArgs e)
+        {
 
-			foreach (DataRow row in dt.Rows)
-			{
-				DataRow colRow = columns.NewRow();
+        }
 
-				string colExtra = row["Extra"].ToString();
-				string type = row["Type"].ToString();
-
-				Match m = reg.Match(type);
-				if (! m.Success) throw new Exception("Error reading column information");
-
-				colRow["datatype"] = m.Groups[1].Value;
-				colRow["length"] = m.Groups[2].Value;
-				colRow["decimals"] = m.Groups[3].Value;
-				colRow["name"] = row["Field"];
-				colRow["allow_nulls"] = row["Null"].ToString() == "YES";
-				colRow["default"] = Normalize(row["Default"].ToString());
-				colRow["auto_inc"] = colExtra.IndexOf("auto_increment") != -1;
-				colRow["unsigned"] = type.IndexOf("unsigned") != -1;
-				colRow["binary"] = type.IndexOf("binary") != -1;
-				colRow["zero_fill"] = type.IndexOf("zerofill") != -1;
-				columns.Rows.Add( colRow );
-//				columns.Columns.Add( "comment", typeof(string));
-			}*/
-		}
-
-/*		private void LoadTableInfo( DataRow row )
-		{
-			tableTitle.Text = row["name"].ToString();
-			comment.Text = row["Comment"].ToString();
-			tableType.SelectedIndex = tableType.FindStringExact(row["type"].ToString());
-			rowFormat.SelectedIndex = rowFormat.FindStringExact( row["row_format"].ToString());
-			autoIncrement.Text = row["Auto_increment"].ToString();
-			rowLength.Text = row["avg_row_length"].ToString();
-
-			string optionString = row["Create_options"].ToString();
-			string[] options = optionString.Split(' ');
-			foreach (string option in options)
-			{
-				string[] parts = option.Split('=');
-				string key = parts[0].ToLower().Trim();
-				string val = parts[1].Trim();
-
-				if (key == "min_rows")
-					minRows.Text = val;
-				else if (key == "max_rows")
-					maxRows.Text = val;
-				else if (key == "delay_key_write")
-					delayKeyWrite.Checked = (val == "1");
-				else if (key == "pack_keys")
-					packKeys.Checked = (val == "1");
-				else if (key == "checksum")
-					checksum.Checked = (val == "1");
-			}
-		}
-*/
-		#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()
-		{
-			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TableEditor));
-			this.tabControl1 = new System.Windows.Forms.TabControl();
-			this.tabPage1 = new System.Windows.Forms.TabPage();
-			this.tableName = new System.Windows.Forms.TextBox();
-			this.label8 = new System.Windows.Forms.Label();
-			this.checksum = new System.Windows.Forms.CheckBox();
-			this.packKeys = new System.Windows.Forms.CheckBox();
-			this.maxRows = new System.Windows.Forms.TextBox();
-			this.minRows = new System.Windows.Forms.TextBox();
-			this.label7 = new System.Windows.Forms.Label();
-			this.label6 = new System.Windows.Forms.Label();
-			this.delayKeyWrite = new System.Windows.Forms.CheckBox();
-			this.rowLength = new System.Windows.Forms.TextBox();
-			this.label5 = new System.Windows.Forms.Label();
-			this.autoIncrement = new System.Windows.Forms.TextBox();
-			this.label4 = new System.Windows.Forms.Label();
-			this.rowFormat = new System.Windows.Forms.ComboBox();
-			this.label3 = new System.Windows.Forms.Label();
-			this.label2 = new System.Windows.Forms.Label();
-			this.comment = new System.Windows.Forms.TextBox();
-			this.tableType = new System.Windows.Forms.ComboBox();
-			this.label1 = new System.Windows.Forms.Label();
-			this.tabPage2 = new System.Windows.Forms.TabPage();
-			this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
-			this.splitter1 = new System.Windows.Forms.Splitter();
-			this.columnGrid = new System.Windows.Forms.DataGrid();
-			this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
-			this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn();
-			this.dataGridBoolColumn1 = new System.Windows.Forms.DataGridBoolColumn();
-			this.tabPage3 = new System.Windows.Forms.TabPage();
-			this.tabPage4 = new System.Windows.Forms.TabPage();
-			this.sql = new System.Windows.Forms.TextBox();
-			this.tabControl1.SuspendLayout();
-			this.tabPage1.SuspendLayout();
-			this.tabPage2.SuspendLayout();
-			((System.ComponentModel.ISupportInitialize)(this.columnGrid)).BeginInit();
-			this.tabPage4.SuspendLayout();
-			this.SuspendLayout();
-			// 
-			// tabControl1
-			// 
-			this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-				| System.Windows.Forms.AnchorStyles.Left) 
-				| System.Windows.Forms.AnchorStyles.Right)));
-			this.tabControl1.Appearance = System.Windows.Forms.TabAppearance.FlatButtons;
-			this.tabControl1.Controls.Add(this.tabPage1);
-			this.tabControl1.Controls.Add(this.tabPage2);
-			this.tabControl1.Controls.Add(this.tabPage3);
-			this.tabControl1.Controls.Add(this.tabPage4);
-			this.tabControl1.Location = new System.Drawing.Point(2, 2);
-			this.tabControl1.Name = "tabControl1";
-			this.tabControl1.SelectedIndex = 0;
-			this.tabControl1.Size = new System.Drawing.Size(432, 588);
-			this.tabControl1.TabIndex = 0;
-			// 
-			// tabPage1
-			// 
-			this.tabPage1.Controls.Add(this.tableName);
-			this.tabPage1.Controls.Add(this.label8);
-			this.tabPage1.Controls.Add(this.checksum);
-			this.tabPage1.Controls.Add(this.packKeys);
-			this.tabPage1.Controls.Add(this.maxRows);
-			this.tabPage1.Controls.Add(this.minRows);
-			this.tabPage1.Controls.Add(this.label7);
-			this.tabPage1.Controls.Add(this.label6);
-			this.tabPage1.Controls.Add(this.delayKeyWrite);
-			this.tabPage1.Controls.Add(this.rowLength);
-			this.tabPage1.Controls.Add(this.label5);
-			this.tabPage1.Controls.Add(this.autoIncrement);
-			this.tabPage1.Controls.Add(this.label4);
-			this.tabPage1.Controls.Add(this.rowFormat);
-			this.tabPage1.Controls.Add(this.label3);
-			this.tabPage1.Controls.Add(this.label2);
-			this.tabPage1.Controls.Add(this.comment);
-			this.tabPage1.Controls.Add(this.tableType);
-			this.tabPage1.Controls.Add(this.label1);
-			this.tabPage1.Location = new System.Drawing.Point(4, 25);
-			this.tabPage1.Name = "tabPage1";
-			this.tabPage1.Size = new System.Drawing.Size(424, 559);
-			this.tabPage1.TabIndex = 0;
-			this.tabPage1.Text = "Properties";
-			// 
-			// tableName
-			// 
-			this.tableName.Location = new System.Drawing.Point(12, 32);
-			this.tableName.Name = "tableName";
-			this.tableName.Size = new System.Drawing.Size(332, 20);
-			this.tableName.TabIndex = 0;
-			this.tableName.Text = "";
-			this.tableName.TextChanged += new System.EventHandler(this.ItemChanged);
-			// 
-			// label8
-			// 
-			this.label8.Location = new System.Drawing.Point(12, 12);
-			this.label8.Name = "label8";
-			this.label8.Size = new System.Drawing.Size(44, 20);
-			this.label8.TabIndex = 17;
-			this.label8.Text = "Name:";
-			this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// checksum
-			// 
-			this.checksum.Location = new System.Drawing.Point(252, 204);
-			this.checksum.Name = "checksum";
-			this.checksum.Size = new System.Drawing.Size(132, 24);
-			this.checksum.TabIndex = 9;
-			this.checksum.Text = "Maintain Checksum";
-			// 
-			// packKeys
-			// 
-			this.packKeys.Location = new System.Drawing.Point(252, 180);
-			this.packKeys.Name = "packKeys";
-			this.packKeys.Size = new System.Drawing.Size(116, 24);
-			this.packKeys.TabIndex = 8;
-			this.packKeys.Text = "Pack Keys";
-			// 
-			// maxRows
-			// 
-			this.maxRows.Location = new System.Drawing.Point(124, 188);
-			this.maxRows.Name = "maxRows";
-			this.maxRows.TabIndex = 6;
-			this.maxRows.Text = "";
-			// 
-			// minRows
-			// 
-			this.minRows.Location = new System.Drawing.Point(12, 188);
-			this.minRows.Name = "minRows";
-			this.minRows.TabIndex = 5;
-			this.minRows.Text = "";
-			// 
-			// label7
-			// 
-			this.label7.Location = new System.Drawing.Point(124, 168);
-			this.label7.Name = "label7";
-			this.label7.Size = new System.Drawing.Size(100, 20);
-			this.label7.TabIndex = 12;
-			this.label7.Text = "Max Rows:";
-			this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// label6
-			// 
-			this.label6.Location = new System.Drawing.Point(12, 168);
-			this.label6.Name = "label6";
-			this.label6.Size = new System.Drawing.Size(100, 20);
-			this.label6.TabIndex = 11;
-			this.label6.Text = "Min Rows:";
-			this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// delayKeyWrite
-			// 
-			this.delayKeyWrite.Location = new System.Drawing.Point(252, 156);
-			this.delayKeyWrite.Name = "delayKeyWrite";
-			this.delayKeyWrite.Size = new System.Drawing.Size(116, 24);
-			this.delayKeyWrite.TabIndex = 7;
-			this.delayKeyWrite.Text = "Delay Key Write";
-			// 
-			// rowLength
-			// 
-			this.rowLength.Location = new System.Drawing.Point(124, 136);
-			this.rowLength.Name = "rowLength";
-			this.rowLength.Size = new System.Drawing.Size(108, 20);
-			this.rowLength.TabIndex = 4;
-			this.rowLength.Text = "";
-			// 
-			// label5
-			// 
-			this.label5.Location = new System.Drawing.Point(124, 116);
-			this.label5.Name = "label5";
-			this.label5.Size = new System.Drawing.Size(160, 20);
-			this.label5.TabIndex = 8;
-			this.label5.Text = "Average Row Length (bytes):";
-			this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// autoIncrement
-			// 
-			this.autoIncrement.Location = new System.Drawing.Point(12, 136);
-			this.autoIncrement.Name = "autoIncrement";
-			this.autoIncrement.TabIndex = 3;
-			this.autoIncrement.Text = "";
-			// 
-			// label4
-			// 
-			this.label4.Location = new System.Drawing.Point(12, 116);
-			this.label4.Name = "label4";
-			this.label4.Size = new System.Drawing.Size(100, 20);
-			this.label4.TabIndex = 6;
-			this.label4.Text = "Auto Increment:";
-			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// rowFormat
-			// 
-			this.rowFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-			this.rowFormat.Items.AddRange(new object[] {
-														   "Fixed",
-														   "Dynamic"});
-			this.rowFormat.Location = new System.Drawing.Point(184, 84);
-			this.rowFormat.Name = "rowFormat";
-			this.rowFormat.Size = new System.Drawing.Size(160, 21);
-			this.rowFormat.TabIndex = 2;
-			// 
-			// label3
-			// 
-			this.label3.Location = new System.Drawing.Point(184, 64);
-			this.label3.Name = "label3";
-			this.label3.Size = new System.Drawing.Size(76, 20);
-			this.label3.TabIndex = 4;
-			this.label3.Text = "Row Format:";
-			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// label2
-			// 
-			this.label2.Location = new System.Drawing.Point(12, 220);
-			this.label2.Name = "label2";
-			this.label2.Size = new System.Drawing.Size(80, 20);
-			this.label2.TabIndex = 3;
-			this.label2.Text = "Comment";
-			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// comment
-			// 
-			this.comment.Location = new System.Drawing.Point(12, 240);
-			this.comment.MaxLength = 60;
-			this.comment.Multiline = true;
-			this.comment.Name = "comment";
-			this.comment.Size = new System.Drawing.Size(372, 48);
-			this.comment.TabIndex = 10;
-			this.comment.Text = "";
-			// 
-			// tableType
-			// 
-			this.tableType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-			this.tableType.Items.AddRange(new object[] {
-														   "BerkeleyDB",
-														   "HEAP",
-														   "ISAM",
-														   "InnoDB",
-														   "Merge",
-														   "MyISAM"});
-			this.tableType.Location = new System.Drawing.Point(12, 84);
-			this.tableType.Name = "tableType";
-			this.tableType.Size = new System.Drawing.Size(160, 21);
-			this.tableType.TabIndex = 1;
-			// 
-			// label1
-			// 
-			this.label1.Location = new System.Drawing.Point(12, 64);
-			this.label1.Name = "label1";
-			this.label1.Size = new System.Drawing.Size(44, 20);
-			this.label1.TabIndex = 0;
-			this.label1.Text = "Type:";
-			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-			// 
-			// tabPage2
-			// 
-			this.tabPage2.Controls.Add(this.propertyGrid1);
-			this.tabPage2.Controls.Add(this.splitter1);
-			this.tabPage2.Controls.Add(this.columnGrid);
-			this.tabPage2.DockPadding.All = 4;
-			this.tabPage2.Location = new System.Drawing.Point(4, 25);
-			this.tabPage2.Name = "tabPage2";
-			this.tabPage2.Size = new System.Drawing.Size(424, 559);
-			this.tabPage2.TabIndex = 1;
-			this.tabPage2.Text = "Columns";
-			// 
-			// propertyGrid1
-			// 
-			this.propertyGrid1.CommandsVisibleIfAvailable = true;
-			this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
-			this.propertyGrid1.HelpVisible = false;
-			this.propertyGrid1.LargeButtons = false;
-			this.propertyGrid1.LineColor = System.Drawing.SystemColors.ScrollBar;
-			this.propertyGrid1.Location = new System.Drawing.Point(4, 263);
-			this.propertyGrid1.Name = "propertyGrid1";
-			this.propertyGrid1.Size = new System.Drawing.Size(416, 292);
-			this.propertyGrid1.TabIndex = 3;
-			this.propertyGrid1.Text = "propertyGrid1";
-			this.propertyGrid1.ToolbarVisible = false;
-			this.propertyGrid1.ViewBackColor = System.Drawing.SystemColors.Window;
-			this.propertyGrid1.ViewForeColor = System.Drawing.SystemColors.WindowText;
-			// 
-			// splitter1
-			// 
-			this.splitter1.BackColor = System.Drawing.SystemColors.ControlDark;
-			this.splitter1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-			this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
-			this.splitter1.Location = new System.Drawing.Point(4, 260);
-			this.splitter1.Name = "splitter1";
-			this.splitter1.Size = new System.Drawing.Size(416, 3);
-			this.splitter1.TabIndex = 1;
-			this.splitter1.TabStop = false;
-			// 
-			// columnGrid
-			// 
-			this.columnGrid.CaptionVisible = false;
-			this.columnGrid.DataMember = "";
-			this.columnGrid.Dock = System.Windows.Forms.DockStyle.Top;
-			this.columnGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText;
-			this.columnGrid.Location = new System.Drawing.Point(4, 4);
-			this.columnGrid.Name = "columnGrid";
-			this.columnGrid.Size = new System.Drawing.Size(416, 256);
-			this.columnGrid.TabIndex = 0;
-			this.columnGrid.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
-																								   this.dataGridTableStyle1});
-			this.columnGrid.CurrentCellChanged += new System.EventHandler(this.columnGrid_CurrentCellChanged);
-			// 
-			// dataGridTableStyle1
-			// 
-			this.dataGridTableStyle1.DataGrid = this.columnGrid;
-			this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
-																												  this.dataGridTextBoxColumn1,
-																												  this.dataGridBoolColumn1});
-			this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
-			this.dataGridTableStyle1.MappingName = "TableDesignerColumnCollection";
-			// 
-			// dataGridTextBoxColumn1
-			// 
-			this.dataGridTextBoxColumn1.Format = "";
-			this.dataGridTextBoxColumn1.FormatInfo = null;
-			this.dataGridTextBoxColumn1.HeaderText = "Column Name";
-			this.dataGridTextBoxColumn1.MappingName = "ColumnName";
-			this.dataGridTextBoxColumn1.Width = 75;
-			// 
-			// dataGridBoolColumn1
-			// 
-			this.dataGridBoolColumn1.AllowNull = false;
-			this.dataGridBoolColumn1.FalseValue = false;
-			this.dataGridBoolColumn1.HeaderText = "Allow Nulls";
-			this.dataGridBoolColumn1.MappingName = "AllowNull";
-			this.dataGridBoolColumn1.NullValue = ((object)(resources.GetObject("dataGridBoolColumn1.NullValue")));
-			this.dataGridBoolColumn1.TrueValue = true;
-			this.dataGridBoolColumn1.Width = 75;
-			// 
-			// tabPage3
-			// 
-			this.tabPage3.Location = new System.Drawing.Point(4, 25);
-			this.tabPage3.Name = "tabPage3";
-			this.tabPage3.Size = new System.Drawing.Size(424, 559);
-			this.tabPage3.TabIndex = 2;
-			this.tabPage3.Text = "Indexes";
-			// 
-			// tabPage4
-			// 
-			this.tabPage4.Controls.Add(this.sql);
-			this.tabPage4.Location = new System.Drawing.Point(4, 25);
-			this.tabPage4.Name = "tabPage4";
-			this.tabPage4.Size = new System.Drawing.Size(424, 559);
-			this.tabPage4.TabIndex = 3;
-			this.tabPage4.Text = "SQL";
-			// 
-			// sql
-			// 
-			this.sql.Dock = System.Windows.Forms.DockStyle.Fill;
-			this.sql.Location = new System.Drawing.Point(0, 0);
-			this.sql.Multiline = true;
-			this.sql.Name = "sql";
-			this.sql.Size = new System.Drawing.Size(424, 559);
-			this.sql.TabIndex = 0;
-			this.sql.Text = "textBox1";
-			// 
-			// TableDesigner
-			// 
-			this.Controls.Add(this.tabControl1);
-			this.Name = "TableDesigner";
-			this.Size = new System.Drawing.Size(436, 592);
-			this.tabControl1.ResumeLayout(false);
-			this.tabPage1.ResumeLayout(false);
-			this.tabPage2.ResumeLayout(false);
-			((System.ComponentModel.ISupportInitialize)(this.columnGrid)).EndInit();
-			this.tabPage4.ResumeLayout(false);
-			this.ResumeLayout(false);
-
-		}
-		#endregion
-
-		private void columnGrid_CurrentCellChanged(object sender, System.EventArgs e)
-		{
-			int row = columnGrid.CurrentRowIndex;
-			this.propertyGrid1.SelectedObject = (TableDesignerColumn)columns[ row ];
-		}
-
-		private void ItemChanged(object sender, System.EventArgs e)
-		{
-			dirty = false;
-
-			if (tableName.Text.Trim() != tableInfo.Name)
-				dirty = true;
-
-			EnvDTE.Window w = (EnvDTE.Window)this.Tag;
-
-			if (tableName.Text.Trim().Length > 0)
-				w.Caption = tableName.Text.Trim();
-			else if (tableInfo.Name.Length > 0)
-				w.Caption = tableInfo.Name;
-			else
-				w.Caption = "New Table";
-
-			if (dirty)
-				w.Caption += "*";
-		}
-
-	}
-
-	internal class TableInfo 
-	{
-		public TableInfo() 
-		{
-			Name = String.Empty;
-		}
-
-		public string Name;
-	}
+    }
 }

Modified: trunk/VSTools/Editors/TableEditor.resx
===================================================================
--- trunk/VSTools/Editors/TableEditor.resx	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Editors/TableEditor.resx	2006-04-21 17:02:20 UTC (rev 226)
@@ -3,7 +3,7 @@
   <!-- 
     Microsoft ResX Schema 
     
-    Version 1.3
+    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 
@@ -14,16 +14,17 @@
     
     ... ado.net/XML headers & schema ...
     <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">1.3</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">this is my long string</data>
+    <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">
-        [base64 mime encoded serialized .NET Framework object]
+        <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">
-        [base64 mime encoded string representing a byte array form of the .NET Framework object]
+        <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 
@@ -35,7 +36,7 @@
     Classes that don't support this are serialized and stored with the 
     mimetype set.
     
-    The mimetype is used forserialized objects, and tells the 
+    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:
     
@@ -45,7 +46,7 @@
     
     mimetype: application/x-microsoft.net.object.binary.base64
     value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
     
     mimetype: application/x-microsoft.net.object.soap.base64
@@ -59,18 +60,37 @@
             : 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" msdata:Ordinal="1" />
+              <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">
@@ -89,363 +109,12 @@
     <value>text/microsoft-resx</value>
   </resheader>
   <resheader name="version">
-    <value>1.3</value>
+    <value>2.0</value>
   </resheader>
   <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <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=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <data name="tabControl1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabControl1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="tabControl1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabControl1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabControl1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabControl1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>4, 4</value>
-  </data>
-  <data name="tabPage1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="tabPage1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>4, 4</value>
-  </data>
-  <data name="tableName.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tableName.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="tableName.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label8.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label8.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label8.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="checksum.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="checksum.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="checksum.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="packKeys.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="packKeys.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="packKeys.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="maxRows.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="maxRows.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="maxRows.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="minRows.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="minRows.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="minRows.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label7.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label7.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label7.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label6.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label6.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label6.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="delayKeyWrite.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="delayKeyWrite.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="delayKeyWrite.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="rowLength.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="rowLength.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="rowLength.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label5.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label5.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label5.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="autoIncrement.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="autoIncrement.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="autoIncrement.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="rowFormat.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="rowFormat.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="rowFormat.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="comment.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="comment.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="comment.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tableType.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tableType.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="tableType.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="tabPage2.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage2.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage2.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>4, 4</value>
-  </data>
-  <data name="propertyGrid1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="propertyGrid1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="propertyGrid1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="splitter1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="splitter1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="splitter1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="columnGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="columnGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="columnGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dataGridTableStyle1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dataGridTableStyle1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dataGridTextBoxColumn1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dataGridTextBoxColumn1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dataGridBoolColumn1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dataGridBoolColumn1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dataGridBoolColumn1.NullValue" mimetype="application/x-microsoft.net.object.binary.base64">
-    <value>
-        AAEAAAD/////AQAAAAAAAAAEAQAAAB9TeXN0ZW0uVW5pdHlTZXJpYWxpemF0aW9uSG9sZGVyAwAAAARE
-        YXRhCVVuaXR5VHlwZQxBc3NlbWJseU5hbWUBAAEICgIAAAAGAgAAAAAL
-</value>
-  </data>
-  <data name="tabPage3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="tabPage3.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage3.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage3.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>4, 4</value>
-  </data>
-  <data name="tabPage4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="tabPage4.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage4.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="tabPage4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="tabPage4.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>4, 4</value>
-  </data>
-  <data name="sql.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="sql.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="sql.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>80</value>
-  </data>
-  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>(Default)</value>
-  </data>
-  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.Name">
-    <value>TableDesigner</value>
-  </data>
-  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>4, 4</value>
-  </data>
 </root>
\ No newline at end of file

Modified: trunk/VSTools/MyVSTools.csproj
===================================================================
--- trunk/VSTools/MyVSTools.csproj	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/MyVSTools.csproj	2006-04-21 17:02:20 UTC (rev 226)
@@ -107,11 +107,14 @@
     <Compile Include="Editors\StoredProcedureEditor.cs">
       <SubType>UserControl</SubType>
     </Compile>
+    <Compile Include="Editors\TableDesignerColumn.cs" />
+    <Compile Include="Editors\TableDesignerColumnCollection.cs" />
     <Compile Include="Editors\TableEditor.cs">
       <SubType>UserControl</SubType>
     </Compile>
-    <Compile Include="Editors\TableDesignerColumn.cs" />
-    <Compile Include="Editors\TableDesignerColumnCollection.cs" />
+    <Compile Include="Editors\TableEditor.Designer.cs">
+      <DependentUpon>TableEditor.cs</DependentUpon>
+    </Compile>
     <Compile Include="Nodes\ColumnNode.cs" />
     <Compile Include="Nodes\ExplorerNode.cs" />
     <Compile Include="Nodes\MyHierarchyNode.cs" />

Modified: trunk/VSTools/Nodes/ColumnNode.cs
===================================================================
--- trunk/VSTools/Nodes/ColumnNode.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Nodes/ColumnNode.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -16,6 +16,40 @@
             columnDef = row;
         }
 
+        #region Properties
+
+        public string Typename
+        {
+            get { return columnDef["DATA_TYPE"].ToString().ToUpper(); }
+        }
+
+        public string LengthAsString
+        {
+            get
+            {
+                string len = columnDef["CHARACTER_MAXIMUM_LENGTH"].ToString();
+                if (len == "NULL") return String.Empty;
+                return len;
+            }
+        }
+
+        public bool CanBeNull
+        {
+            get { return columnDef["IS_NULLABLE"].Equals("YES"); }
+        }
+
+        public bool IsBinary
+        {
+            get { return columnDef["EXTRA"].ToString().IndexOf("binary") != -1; }
+        }
+
+        public bool ZeroFill
+        {
+            get { return columnDef["EXTRA"].ToString().IndexOf("zero") != -1; }
+        }
+
+        #endregion
+
         public override uint MenuId
         {
             get { return PkgCmdIDList.ColumnCtxtMenu; }

Modified: trunk/VSTools/Nodes/MyHierarchyNode.cs
===================================================================
--- trunk/VSTools/Nodes/MyHierarchyNode.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Nodes/MyHierarchyNode.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -134,18 +134,21 @@
 
         public int AdviseHierarchyEvents(IVsHierarchyEvents pEventSink, out uint pdwCookie)
         {
+            DebugTrace.Trace("IVsUIHierarchy::AdviseHierarchyEvents");
             pdwCookie = sinks.Add(pEventSink);
             return VSConstants.S_OK;
         }
 
         public int Close()
         {
+            DebugTrace.Trace("IVsUIHierarchy::Close");
             return VSConstants.S_OK;
         }
 
         public int ExecCommand(uint itemid, ref Guid pguidCmdGroup, uint nCmdID, 
             uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
         {
+            DebugTrace.Trace("IVsUIHierarchy::ExecCommand");
             //MessageBox.Show("guid = " + pguidCmdGroup.ToString() + ";cmdid=" + nCmdID);
             if (pguidCmdGroup == VsMenus.guidVsUIHierarchyWindowCmds)
             {
@@ -171,12 +174,14 @@
 
         public int GetCanonicalName(uint itemid, out string pbstrName)
         {
+            DebugTrace.Trace("IVsUIHierarchy::GetCanonicalName");
             pbstrName = "Dummy name";
             return VSConstants.S_OK;
         }
 
         public int GetGuidProperty(uint itemid, int propid, out Guid pguid)
         {
+            DebugTrace.Trace("IVsUIHierarchy::GetGuidProperty");
             //2016
             //2054
             pguid = Guid.NewGuid();
@@ -187,6 +192,7 @@
                                       out IntPtr ppHierarchyNested, 
                                       out uint pitemidNested)
         {
+            DebugTrace.Trace("IVsUIHierarchy::GetNestHierarchy");
             ppHierarchyNested = IntPtr.Zero;
             pitemidNested = 0;
             // If itemid is not a nested hierarchy we must return E_FAIL.
@@ -198,8 +204,12 @@
             result = null;
             ExplorerNode node = NodeFromId(itemid);
 
+            DebugTrace.Trace("IVsUIHierarchy::GetProperty");
             string propname = Enum.GetName(typeof(__VSHPROPID),
                 (__VSHPROPID)propid);
+            if (propname == null || propname == String.Empty)
+                propname = Enum.GetName(typeof(__VSHPROPID2),
+                (__VSHPROPID2)propid);
             System.Diagnostics.Trace.WriteLine("prop = " + propname + "; itemid=" + itemid);
 
             __VSHPROPID propVal = (__VSHPROPID)propid;
@@ -281,6 +291,7 @@
 
         public int GetSite(out Microsoft.VisualStudio.OLE.Interop.IServiceProvider ppSP)
         {
+            DebugTrace.Trace("IVsUIHierarchy::GetSite");
             ppSP = PackageSingleton.Package.GetMyService(typeof(
                 Microsoft.VisualStudio.OLE.Interop.IServiceProvider)) as
                 Microsoft.VisualStudio.OLE.Interop.IServiceProvider;
@@ -289,28 +300,33 @@
 
         public int ParseCanonicalName(string pszName, out uint pitemid)
         {
+            DebugTrace.Trace("IVsUIHierarchy::ParseCanonicalName");
             pitemid = 1;
             return VSConstants.S_OK;
         }
 
         public int QueryClose(out int pfCanClose)
         {
+            DebugTrace.Trace("IVsUIHierarchy::QueryClose");
             pfCanClose = 1;
             return VSConstants.S_OK;
         }
 
         public int QueryStatusCommand(uint itemid, ref Guid pguidCmdGroup, uint cCmds, Microsoft.VisualStudio.OLE.Interop.OLECMD[] prgCmds, IntPtr pCmdText)
         {
+            DebugTrace.Trace("IVsUIHierarchy::QueryStatusCommand");
             return VSConstants.S_OK;
         }
 
         public int SetGuidProperty(uint itemid, int propid, ref Guid rguid)
         {
+            DebugTrace.Trace("IVsUIHierarchy::SetGuidProperty");
             return VSConstants.S_OK;
         }
 
         public int SetProperty(uint itemid, int propid, object value)
         {
+            DebugTrace.Trace("IVsUIHierarchy::SetProperty");
             __VSHPROPID id = (__VSHPROPID)propid;
             ExplorerNode node = NodeFromId(itemid);
 
@@ -334,37 +350,44 @@
 
         public int SetSite(Microsoft.VisualStudio.OLE.Interop.IServiceProvider psp)
         {
+            DebugTrace.Trace("IVsUIHierarchy::SetSite");
             return VSConstants.E_NOTIMPL;
         }
 
         public int UnadviseHierarchyEvents(uint dwCookie)
         {
+            DebugTrace.Trace("IVsUIHierarchy::UnadviseHierarchyEvents");
             sinks.RemoveAt(dwCookie);
             return VSConstants.S_OK;
         }
 
         public int Unused0()
         {
+            DebugTrace.Trace("IVsUIHierarchy::Unused0");
             return VSConstants.E_NOTIMPL;
         }
 
         public int Unused1()
         {
+            DebugTrace.Trace("IVsUIHierarchy::Unused1");
             return VSConstants.E_NOTIMPL;
         }
 
         public int Unused2()
         {
+            DebugTrace.Trace("IVsUIHierarchy::Unused2");
             return VSConstants.E_NOTIMPL;
         }
 
         public int Unused3()
         {
+            DebugTrace.Trace("IVsUIHierarchy::Unused3");
             return VSConstants.E_NOTIMPL;
         }
 
         public int Unused4()
         {
+            DebugTrace.Trace("IVsUIHierarchy::Unused4");
             return VSConstants.E_NOTIMPL;
         }
 
@@ -374,11 +397,13 @@
 
         public int IgnoreItemFileChanges(uint itemid, int fIgnore)
         {
+            DebugTrace.Trace("IVsPersistHierarchyItem2::IgnoreItemFileChanges");
             return VSConstants.S_OK;
         }
 
         public int IsItemDirty(uint itemid, IntPtr punkDocData, out int pfDirty)
         {
+            DebugTrace.Trace("IVsPersistHierarchyItem2::IsItemDirty");
             IVsPersistDocData docData = (IVsPersistDocData)
                 Marshal.GetObjectForIUnknown(punkDocData);
             return ErrorHandler.ThrowOnFailure(docData.IsDocDataDirty(out pfDirty));
@@ -386,21 +411,26 @@
 
         public int IsItemReloadable(uint itemid, out int pfReloadable)
         {
+            DebugTrace.Trace("IVsPersistHierarchyItem2::IsItemReloadable");
             pfReloadable = 0;
             return VSConstants.S_OK;
         }
 
         public int ReloadItem(uint itemid, uint dwReserved)
         {
+            DebugTrace.Trace("IVsPersistHierarchyItem2::ReloadItem");
             return VSConstants.S_OK;
         }
 
         public int SaveItem(VSSAVEFLAGS dwSave, string pszSilentSaveAsName, uint itemid, IntPtr punkDocData, out int pfCanceled)
         {
-            pfCanceled = 0;
+            DebugTrace.Trace("IVsPersistHierarchyItem2::SaveItem");
+            ExplorerNode node = NodeFromId(itemid);
+            pfCanceled = node.Save() ? 0 : 1;
             return VSConstants.S_OK;
         }
 
         #endregion
+
     }
 }

Modified: trunk/VSTools/Nodes/ServerNode.cs
===================================================================
--- trunk/VSTools/Nodes/ServerNode.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Nodes/ServerNode.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -6,6 +6,7 @@
 using System.Data.Common;
 using MySql.Data.MySqlClient;
 using Microsoft.VisualStudio;
+using Microsoft.VisualStudio.Shell.Interop;
 
 namespace MySql.VSTools
 {
@@ -39,18 +40,36 @@
         {
             get { return PkgCmdIDList.ServerCtxtMenu; }
         }
-        /*
-        public override bool DoCommand(int commandId)
+        
+        public override void DoCommand(int commandId)
         {
             switch (commandId)
             {
-                case PkgCmdIDList.cmdidModifyConnection:
-                    Modify();
-                    return true;
+//                case PkgCmdIDList.cmdidModifyConnection:
+  //                  Modify();
+    //                break;
+                case PkgCmdIDList.cmdidNewQuery :
+                    OpenNewQuery();
+                    break;
             }
-            return base.DoCommand(commandId);
         }
-*/
+
+        private void OpenNewQuery()
+        {
+            Microsoft.VisualStudio.Shell.ToolWindowPane pane =
+                PackageSingleton.Package.FindToolWindow(typeof(QueryToolWindow),
+                PackageSingleton.ToolWindowId, true);
+            if ((null == pane) || (null == pane.Frame))
+            {
+                throw new System.Runtime.InteropServices.COMException(
+                    MyVSTools.GetResourceString("CanNotCreateQueryWindow"));
+            }
+            pane.Caption = Caption + " [Query]";
+            (pane.Window as QueryControl).Connection = GetOpenConnection();
+            IVsWindowFrame windowFrame = (IVsWindowFrame)pane.Frame;
+            Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show());
+        }
+
         public override void Populate()
         {
             if (populated) return;

Modified: trunk/VSTools/Nodes/TableNode.cs
===================================================================
--- trunk/VSTools/Nodes/TableNode.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Nodes/TableNode.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -4,6 +4,8 @@
 using System.Windows.Forms;
 using System.Data;
 using System.Data.Common;
+using System.Collections;
+using System.ComponentModel;
 
 namespace MySql.VSTools
 {
@@ -17,6 +19,82 @@
             tableDef = row;
         }
 
+        #region Properties
+
+        public string Schema
+        {
+            get { return tableDef["TABLE_SCHEMA"].ToString(); }
+        }
+
+        public string TypeName
+        {
+            get { return tableDef["ENGINE"].ToString(); }
+        }
+
+        public string DataDirectory
+        {
+            get { return String.Empty; }
+        }
+
+        public string IndexDirectory
+        {
+            get { return String.Empty; }
+        }
+
+        public string RowFormat
+        {
+            get { return tableDef["ROW_FORMAT"].ToString(); }
+        }
+
+        public bool UseChecksum
+        {
+            get { return false; }
+        }
+
+        public int MinimumRowCount
+        {
+            get { return 0; }
+        }
+
+        public int MaximumRowCount
+        {
+            get { return 0; }
+        }
+
+        [Category("Row Options")]
+        [Description("Defines how the rows in MyISAM tables should be stored.  The option " +
+                      "ValueType can be FIXED or DYNAMIC for static or variable-length row " +
+                      "format.  The utility myisampack can be used to set the type to " +
+                      "COMPRESSED.")]
+        public string Password
+        {
+            get { return "mypass"; }
+        }
+
+        [Category("Row Options")]
+        [Description("An approximation of the average row length for your table.  You " +
+                     "need to set this only for large tables with variable-sized records.")]
+        public int AverageRowLength
+        {
+            get { return Int32.Parse(tableDef["AVG_ROW_LENGTH"].ToString()); }
+        }
+
+
+        #endregion
+
+        public ArrayList GetColumns()
+        {
+            ArrayList cols = new ArrayList();
+            ExplorerNode col = FirstChild;
+            while (col != null)
+            {
+                if (col is ColumnNode)
+                    cols.Add(col);
+                col = col.NextSibling;
+            }
+            return cols;
+        }
+
         public override uint MenuId
         {
             get { return PkgCmdIDList.TableCtxtMenu; }
@@ -40,7 +118,7 @@
                     Delete();
                     break;
                 case PkgCmdIDList.cmdidOpenTableDef:
-                    EditTable();
+                    OpenEditor();
                     break;
                 case PkgCmdIDList.cmdidShowTableData:
                     ShowTableData();
@@ -51,10 +129,10 @@
             }
         }
 
-        private void EditTable()
+        internal override BaseEditor GetEditor()
         {
-            TableEditor te = new TableEditor();
-            OpenEditor(te);
+            TableEditor editor = new TableEditor(this);
+            return editor;
         }
 
         private void Delete()

Modified: trunk/VSTools/Nodes/ViewNode.cs
===================================================================
--- trunk/VSTools/Nodes/ViewNode.cs	2006-04-21 02:36:46 UTC (rev 225)
+++ trunk/VSTools/Nodes/ViewNode.cs	2006-04-21 17:02:20 UTC (rev 226)
@@ -41,5 +41,10 @@
         {
         }
 
+        internal override BaseEditor GetEditor()
+        {
+            return new SqlTextEditor(Caption, "db", "body", GetOpenConnection());
+        }
+
     }
 }

Thread
Connector/NET commit: r226 - in trunk/VSTools: . Editors Nodesrburnett21 Apr