Ejemplo n.º 1
0
        private void ShowIfElementRecorder(object sender, EventArgs e)
        {
            //get command reference
            UIAutomationCommand cmd = new UIAutomationCommand();

            //create recorder
            frmThickAppElementRecorder newElementRecorder = new 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());
        }
Ejemplo n.º 2
0
        private static void ShowElementRecorder(object sender, EventArgs e, IfrmCommandEditor editor)
        {
            //get command reference
            UIAutomationCommand cmd = (UIAutomationCommand)((frmCommandEditor)editor).SelectedCommand;

            //create recorder
            frmThickAppElementRecorder newElementRecorder = new frmThickAppElementRecorder();

            newElementRecorder.SearchParameters = cmd.v_UIASearchParameters;

            //show form
            newElementRecorder.ShowDialog();

            ComboBox txtWindowName = (ComboBox)((frmCommandEditor)editor).flw_InputVariables.Controls["v_WindowName"];

            txtWindowName.Text = newElementRecorder.cboWindowTitle.Text;

            ((frmCommandEditor)editor).WindowState = FormWindowState.Normal;
            ((frmCommandEditor)editor).BringToFront();
        }
        public void ShowRecorder(object sender, EventArgs e)
        {
            //get command reference
            //create recorder
            frmThickAppElementRecorder newElementRecorder = new frmThickAppElementRecorder();

            newElementRecorder.SearchParameters = v_UIASearchParameters;

            //show form
            newElementRecorder.ShowDialog();

            WindowNameControl.Text = newElementRecorder.cboWindowTitle.Text;

            v_UIASearchParameters.Rows.Clear();
            foreach (DataRow rw in newElementRecorder.SearchParameters.Rows)
            {
                v_UIASearchParameters.ImportRow(rw);
            }

            SearchParametersGridViewHelper.DataSource = v_UIASearchParameters;
            SearchParametersGridViewHelper.Refresh();
        }