Beispiel #1
0
        private void ShowEditor(object sender, EventArgs e)
        {
            TextBox origin = (TextBox)sender;

            if (
                (comboBox1.SelectedItem.ToString().Equals("Generic T-SQL Query Collector Type")) ||
                (comboBox1.SelectedItem.ToString().Equals("Extended T-SQL Query Collector Type"))
                )
            {
                TSQLParametersEditor editor = new TSQLParametersEditor(origin.Text);
                editor.ShowDialog(this);
                origin.Text = CollectorUtils.FormatXMLDocument(editor.ReturnValue);
            }
            else
            {
                if (comboBox1.SelectedItem.ToString().Equals("Extended XE Reader Collector Type"))
                {
                    XEReaderParametersEditor editor = new XEReaderParametersEditor(origin.Text);
                    editor.ShowDialog(this);
                    origin.Text = CollectorUtils.FormatXMLDocument(editor.ReturnValue);
                }
                else
                {
                    XMLEditor dialog = new XMLEditor(origin.Text);
                    dialog.ShowDialog(this);
                    origin.Text = dialog.ReturnValue;
                }
            }
        }
        private void ShowXMLEditor(object sender, EventArgs e)
        {
            TextBox   origin = (TextBox)sender;
            XMLEditor dialog = new XMLEditor(origin.Text);

            dialog.ShowDialog(this);
            origin.Text = dialog.ReturnValue;
        }
Beispiel #3
0
 private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 1)
     {
         DataGridViewCell cell   = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
         Object           value  = cell.Value;
         String           text   = value == null ? "" : value.ToString();
         XMLEditor        dialog = new XMLEditor(text, "SQL");
         dialog.ShowDialog(this);
         cell.Value = dialog.ReturnValue;
     }
 }