private void ButtonEditQuery_Click(object sender, EventArgs e) { var queryDesigner = new QueryDesignerForm(); if (queryDesigner.ShowDialog() == DialogResult.OK) { BodyEdit.Text = queryDesigner.Query; DataSchemaEdit.DataSourceSchema = BuildDataSchema(queryDesigner.SelectObjects); } }
// Query Builder Button clicked. private void btnQueryBuilder_Click(object sender, System.EventArgs e) { Cursor cursor = Cursor.Current; // save cursor, probably Arrow Cursor.Current = Cursors.WaitCursor; // hourglass cursor QueryDesignerForm form = new QueryDesignerForm(Command.Connection, this.CommandText); Cursor.Current = cursor; // resored Arrow cursor DialogResult rc = form.ShowDialog(); if (rc != DialogResult.OK) { return; } txtbox.Text = form.CommandText; // return the CommandText this.CommandText = form.CommandText; } // btnQueryBuilder_Click