private void ShowIfElementRecorder(object sender, EventArgs e) { //get command reference Core.Automation.Commands.UIAutomationCommand cmd = new Core.Automation.Commands.UIAutomationCommand(); //create recorder UI.Forms.Supplemental.frmThickAppElementRecorder newElementRecorder = new UI.Forms.Supplemental.frmThickAppElementRecorder(); newElementRecorder.searchParameters = cmd.v_UIASearchParameters; //show form newElementRecorder.ShowDialog(); var sb = new StringBuilder(); sb.AppendLine("Element Properties Found!"); sb.AppendLine(Environment.NewLine); sb.AppendLine("Element Search Method - Element Search Parameter"); foreach (DataRow rw in cmd.v_UIASearchParameters.Rows) { if (rw.ItemArray[2].ToString().Trim() == string.Empty) { continue; } sb.AppendLine(rw.ItemArray[1].ToString() + " - " + rw.ItemArray[2].ToString()); } DataGridView ifActionBox = IfGridViewHelper; ifActionBox.Rows[0].Cells[1].Value = newElementRecorder.cboWindowTitle.Text; MessageBox.Show(sb.ToString()); }
private static void ShowElementRecorder(object sender, EventArgs e, UI.Forms.frmCommandEditor editor) { //get command reference Core.Automation.Commands.UIAutomationCommand cmd = (Core.Automation.Commands.UIAutomationCommand)editor.selectedCommand; //create recorder UI.Forms.Supplemental.frmThickAppElementRecorder newElementRecorder = new UI.Forms.Supplemental.frmThickAppElementRecorder(); newElementRecorder.searchParameters = cmd.v_UIASearchParameters; //show form newElementRecorder.ShowDialog(); ComboBox txtWindowName = (ComboBox)editor.flw_InputVariables.Controls["v_WindowName"]; txtWindowName.Text = newElementRecorder.cboWindowTitle.Text; editor.WindowState = FormWindowState.Normal; editor.BringToFront(); }
public void ShowRecorder(object sender, EventArgs e) { //get command reference //create recorder UI.Forms.Supplemental.frmThickAppElementRecorder newElementRecorder = new UI.Forms.Supplemental.frmThickAppElementRecorder(); newElementRecorder.searchParameters = this.v_UIASearchParameters; //show form newElementRecorder.ShowDialog(); WindowNameControl.Text = newElementRecorder.cboWindowTitle.Text; this.v_UIASearchParameters.Rows.Clear(); foreach (DataRow rw in newElementRecorder.searchParameters.Rows) { this.v_UIASearchParameters.ImportRow(rw); } SearchParametersGridViewHelper.DataSource = this.v_UIASearchParameters; SearchParametersGridViewHelper.Refresh(); }