Modified:
trunk/VSTools/Editors/BaseEditor.cs
trunk/VSTools/Editors/TableEditor.Designer.cs
trunk/VSTools/Editors/TableEditor.cs
trunk/VSTools/MyExplorerWindow.cs
trunk/VSTools/Nodes/FunctionNode.cs
trunk/VSTools/Nodes/TableNode.cs
trunk/mysqlclient/PerformanceMonitor.cs
Log:
1. PerformanceMonitor.cs - fixed problem where it would try to activate an instance when the category was not created.
2. Got drop on all objects working.
Modified: trunk/VSTools/Editors/BaseEditor.cs
===================================================================
--- trunk/VSTools/Editors/BaseEditor.cs 2006-04-25 00:25:41 UTC (rev 230)
+++ trunk/VSTools/Editors/BaseEditor.cs 2006-04-25 01:26:54 UTC (rev 231)
@@ -24,6 +24,9 @@
protected ExplorerNode editingNode;
private ServiceProvider vsServiceProvider = null;
+ public BaseEditor()
+ {
+ }
public BaseEditor(ExplorerNode node)
: base()
Modified: trunk/VSTools/Editors/TableEditor.Designer.cs
===================================================================
--- trunk/VSTools/Editors/TableEditor.Designer.cs 2006-04-25 00:25:41 UTC (rev 230)
+++ trunk/VSTools/Editors/TableEditor.Designer.cs 2006-04-25 01:26:54 UTC (rev 231)
@@ -90,6 +90,7 @@
this.tableName.Name = "tableName";
this.tableName.Size = new System.Drawing.Size(247, 20);
this.tableName.TabIndex = 1;
+ this.tableName.TextChanged += new System.EventHandler(this.common_changed);
//
// label2
//
@@ -220,7 +221,7 @@
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.Size = new System.Drawing.Size(632, 243);
this.constraintsPage.TabIndex = 1;
this.constraintsPage.Text = "Constraints";
this.constraintsPage.UseVisualStyleBackColor = true;
@@ -229,7 +230,7 @@
//
this.indexesPage.Location = new System.Drawing.Point(4, 22);
this.indexesPage.Name = "indexesPage";
- this.indexesPage.Size = new System.Drawing.Size(632, 377);
+ this.indexesPage.Size = new System.Drawing.Size(632, 243);
this.indexesPage.TabIndex = 2;
this.indexesPage.Text = "Indexes";
this.indexesPage.UseVisualStyleBackColor = true;
@@ -241,7 +242,7 @@
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.Size = new System.Drawing.Size(632, 243);
this.optionsPage.TabIndex = 3;
this.optionsPage.Text = "Options";
this.optionsPage.UseVisualStyleBackColor = true;
@@ -272,6 +273,7 @@
this.maxRows.Name = "maxRows";
this.maxRows.Size = new System.Drawing.Size(120, 20);
this.maxRows.TabIndex = 11;
+ this.maxRows.TextChanged += new System.EventHandler(this.common_changed);
//
// avgRowLen
//
@@ -279,6 +281,7 @@
this.avgRowLen.Name = "avgRowLen";
this.avgRowLen.Size = new System.Drawing.Size(120, 20);
this.avgRowLen.TabIndex = 10;
+ this.avgRowLen.TextChanged += new System.EventHandler(this.common_changed);
//
// minRows
//
@@ -286,6 +289,7 @@
this.minRows.Name = "minRows";
this.minRows.Size = new System.Drawing.Size(120, 20);
this.minRows.TabIndex = 9;
+ this.minRows.TextChanged += new System.EventHandler(this.common_changed);
//
// useChecksum
//
@@ -339,6 +343,7 @@
this.rowFormat.Name = "rowFormat";
this.rowFormat.Size = new System.Drawing.Size(121, 21);
this.rowFormat.TabIndex = 1;
+ this.rowFormat.SelectedIndexChanged += new System.EventHandler(this.common_changed);
//
// label6
//
@@ -375,6 +380,7 @@
this.indexDirectory.Name = "indexDirectory";
this.indexDirectory.Size = new System.Drawing.Size(517, 20);
this.indexDirectory.TabIndex = 5;
+ this.indexDirectory.TextChanged += new System.EventHandler(this.common_changed);
//
// dataDirectory
//
@@ -384,6 +390,7 @@
this.dataDirectory.Name = "dataDirectory";
this.dataDirectory.Size = new System.Drawing.Size(517, 20);
this.dataDirectory.TabIndex = 4;
+ this.dataDirectory.TextChanged += new System.EventHandler(this.common_changed);
//
// label5
//
@@ -428,6 +435,7 @@
this.tableType.Name = "tableType";
this.tableType.Size = new System.Drawing.Size(176, 21);
this.tableType.TabIndex = 1;
+ this.tableType.SelectedIndexChanged += new System.EventHandler(this.common_changed);
//
// sqlPage
//
@@ -435,7 +443,7 @@
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.Size = new System.Drawing.Size(632, 243);
this.sqlPage.TabIndex = 4;
this.sqlPage.Text = "SQL";
this.sqlPage.UseVisualStyleBackColor = true;
@@ -445,7 +453,7 @@
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.Size = new System.Drawing.Size(626, 237);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
Modified: trunk/VSTools/Editors/TableEditor.cs
===================================================================
--- trunk/VSTools/Editors/TableEditor.cs 2006-04-25 00:25:41 UTC (rev 230)
+++ trunk/VSTools/Editors/TableEditor.cs 2006-04-25 01:26:54 UTC (rev 231)
@@ -18,6 +18,13 @@
private Font wingDingFont;
private ArrayList columns;
+ public TableEditor()
+ {
+ InitializeComponent();
+
+ if (DesignMode) return;
+ }
+
public TableEditor(TableNode table) : base(table)
{
InitializeComponent();
@@ -121,7 +128,12 @@
selItem.SubItems[7].Text = selNode.Collation;
}
+ private void common_changed(object sender, EventArgs e)
+ {
+ }
+
+
}
}
Modified: trunk/VSTools/MyExplorerWindow.cs
===================================================================
--- trunk/VSTools/MyExplorerWindow.cs 2006-04-25 00:25:41 UTC (rev 230)
+++ trunk/VSTools/MyExplorerWindow.cs 2006-04-25 01:26:54 UTC (rev 231)
@@ -32,7 +32,6 @@
private ITrackSelection trackSel;
private SelectionContainer selectContainer;
private List<ServerNode> serverList;
- private object clientFrame;
private IVsUIHierarchyWindow hierarchyWindow;
/// <summary>
@@ -54,8 +53,6 @@
this.BitmapResourceID = 300;
this.BitmapIndex = 1;
-
- //control = new ExplorerControl(this);
serverList = new List<ServerNode>();
}
@@ -121,8 +118,13 @@
}
}
- public void UpdateSelection()
+ public void UpdateSelection(Object o)
{
+ if (selectContainer == null)
+ selectContainer = new SelectionContainer();
+ ArrayList selObjects = new ArrayList();
+ selObjects.Add(o);
+ selectContainer.SelectedObjects = selObjects;
ITrackSelection track = TrackSelection;
if (track != null)
track.OnSelectChange((ISelectionContainer)selectContainer);
Modified: trunk/VSTools/Nodes/FunctionNode.cs
===================================================================
--- trunk/VSTools/Nodes/FunctionNode.cs 2006-04-25 00:25:41 UTC (rev 230)
+++ trunk/VSTools/Nodes/FunctionNode.cs 2006-04-25 01:26:54 UTC (rev 231)
@@ -48,6 +48,9 @@
case PkgCmdIDList.cmdidOpen:
OpenEditor();
break;
+ default:
+ base.DoCommand(commandId);
+ break;
}
}
Modified: trunk/VSTools/Nodes/TableNode.cs
===================================================================
--- trunk/VSTools/Nodes/TableNode.cs 2006-04-25 00:25:41 UTC (rev 230)
+++ trunk/VSTools/Nodes/TableNode.cs 2006-04-25 01:26:54 UTC (rev 231)
@@ -156,35 +156,9 @@
return editor;
}
- private void Delete()
+ protected override string GetDeleteSql()
{
- // first make sure the user is sure
- if (MessageBox.Show(String.Format(MyVSTools.GetResourceString("DeleteConfirm"),
- tableDef["TABLE_NAME"]),
- MyVSTools.GetResourceString("DeleteConfirmTitle"),
- MessageBoxButtons.YesNo,
- MessageBoxIcon.Question) == DialogResult.No)
- return;
-
- System.Data.Common.DbConnection conn;
- conn = GetOpenConnection();
- System.Data.Common.DbCommand cmd = conn.CreateCommand();
- cmd.CommandText = "DROP TABLE " + tableDef["TABLE_SCHEMA"] + "." +
- tableDef["TABLE_NAME"];
- try
- {
- cmd.ExecuteNonQuery();
- //delete was successful, remove this node
- // this.Remove();
- //TODO: do the remove
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message,
- String.Format(MyVSTools.GetResourceString("UnableToDeleteTitle"),
- tableDef["TABLE_NAME"]),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
+ return String.Format("DROP TABLE {0}.{1}", Schema, Caption);
}
private void ShowTableData()
Modified: trunk/mysqlclient/PerformanceMonitor.cs
===================================================================
--- trunk/mysqlclient/PerformanceMonitor.cs 2006-04-25 00:25:41 UTC (rev 230)
+++ trunk/mysqlclient/PerformanceMonitor.cs 2006-04-25 01:26:54 UTC (rev 231)
@@ -18,14 +18,17 @@
if (categoryName == null)
{
categoryName = ".NET Data Provider for MySQL";
- if (PerformanceCounterCategory.CounterExists("HardProcedureQueries",
- categoryName))
- procedureHardQueries = new PerformanceCounter(categoryName,
- "HardProcedureQueries", false);
- if (PerformanceCounterCategory.CounterExists("SoftProcedureQueries",
- categoryName))
- procedureSoftQueries = new PerformanceCounter(categoryName,
- "SoftProcedureQueries", false);
+ if (PerformanceCounterCategory.Exists(categoryName))
+ {
+ if (PerformanceCounterCategory.CounterExists("HardProcedureQueries",
+ categoryName))
+ procedureHardQueries = new PerformanceCounter(categoryName,
+ "HardProcedureQueries", false);
+ if (PerformanceCounterCategory.CounterExists("SoftProcedureQueries",
+ categoryName))
+ procedureSoftQueries = new PerformanceCounter(categoryName,
+ "SoftProcedureQueries", false);
+ }
}
}
| Thread |
|---|
| • Connector/NET commit: r231 - in trunk: VSTools VSTools/Editors VSTools/Nodes mysqlclient | rburnett | 25 Apr |