public List <Control> CreateConditionActionParameterTable(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            var noCSharpControls = new List <Control>();

            RecorderControl = new CommandItemControl("guirecorder_helper", Resources.command_camera, "Element Recorder");
            RecorderControl.Hide();

            noCSharpControls.Add(commandControls.CreateDefaultLabelFor("v_ActionType", ConditionCommand));
            ActionDropdown = commandControls.CreateDropdownFor("v_ActionType", ConditionCommand);
            noCSharpControls.AddRange(commandControls.CreateUIHelpersFor("v_ActionType", ConditionCommand, new Control[] { ActionDropdown }, editor));
            ActionDropdown.SelectionChangeCommitted += Action_SelectionChangeCommitted;
            noCSharpControls.Add(ActionDropdown);

            noCSharpControls.Add(commandControls.CreateDefaultLabelFor("v_ActionParameterTable", ConditionCommand));

            RecorderControl.Click += (sender, e) => ShowElementRecorder(sender, e, editor, commandControls);
            noCSharpControls.Add(RecorderControl);

            ActionGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_ActionParameterTable", ConditionCommand);
            ActionGridViewHelper.AllowUserToAddRows    = false;
            ActionGridViewHelper.AllowUserToDeleteRows = false;
            ActionGridViewHelper.MouseEnter           += ActionGridViewHelper_MouseEnter;

            noCSharpControls.AddRange(commandControls.CreateUIHelpersFor("v_ActionParameterTable", ConditionCommand, new Control[] { ActionGridViewHelper }, editor));
            noCSharpControls.Add(ActionGridViewHelper);
            return(noCSharpControls);
        }
Esempio n. 2
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));

            _searchParameterControls = new List <Control>();
            _searchParameterControls.Add(commandControls.CreateDefaultLabelFor("v_WebSearchParameter", this));
            _searchParameterControls.AddRange(commandControls.CreateUIHelpersFor("v_WebSearchParameter", this, new Control[] { _searchGridViewHelper }, editor));

            _searchParameterControls.Add(_searchGridViewHelper);
            RenderedControls.AddRange(_searchParameterControls);

            _elementActionDropdown = (ComboBox)commandControls.CreateDropdownFor("v_WebAction", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_WebAction", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_WebAction", this, new Control[] { _elementActionDropdown }, editor));
            _elementActionDropdown.SelectionChangeCommitted += ElementActionDropdown_SelectionChangeCommitted;
            RenderedControls.Add(_elementActionDropdown);

            _elementParameterControls = new List <Control>();
            _elementParameterControls.Add(commandControls.CreateDefaultLabelFor("v_WebActionParameterTable", this));
            _elementParameterControls.AddRange(commandControls.CreateUIHelpersFor("v_WebActionParameterTable", this, new Control[] { _elementsGridViewHelper }, editor));
            _elementParameterControls.Add(_elementsGridViewHelper);
            RenderedControls.AddRange(_elementParameterControls);

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InputText", this, editor));

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_TextExtractionType", this));
            var selectionControl = commandControls.CreateDropdownFor("v_TextExtractionType", this);

            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_TextExtractionType", this, new Control[] { selectionControl }, editor));
            selectionControl.SelectionChangeCommitted += TextExtraction_SelectionChangeCommitted;
            RenderedControls.Add(selectionControl);

            var textExtractionGridViewControls = new List <Control>();

            textExtractionGridViewControls.Add(commandControls.CreateDefaultLabelFor("v_TextExtractionTable", this));

            var textExtractionGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_TextExtractionTable", this);

            textExtractionGridViewHelper.AllowUserToAddRows    = false;
            textExtractionGridViewHelper.AllowUserToDeleteRows = false;

            textExtractionGridViewControls.AddRange(commandControls.CreateUIHelpersFor("v_TextExtractionTable", this, new Control[] { textExtractionGridViewHelper }, editor));
            textExtractionGridViewControls.Add(textExtractionGridViewHelper);
            RenderedControls.AddRange(textExtractionGridViewControls);

            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InputText", this, editor));

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_TextExtractionType", this));
            var selectionControl = (ComboBox)commandControls.CreateDropdownFor("v_TextExtractionType", this);

            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_TextExtractionType", this, new Control[] { selectionControl }, editor));
            selectionControl.SelectionChangeCommitted += TextExtraction_SelectionChangeCommitted;
            RenderedControls.Add(selectionControl);

            _parametersGridViewHelper = new DataGridView();
            _parametersGridViewHelper.AllowUserToAddRows    = true;
            _parametersGridViewHelper.AllowUserToDeleteRows = true;
            _parametersGridViewHelper.Size = new Size(350, 125);
            _parametersGridViewHelper.ColumnHeadersHeight = 30;
            _parametersGridViewHelper.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            _parametersGridViewHelper.DataBindings.Add("DataSource", this, "v_TextExtractionTable", false, DataSourceUpdateMode.OnPropertyChanged);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_TextExtractionTable", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_TextExtractionTable", this, new Control[] { _parametersGridViewHelper }, editor));
            RenderedControls.Add(_parametersGridViewHelper);

            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));

            return(RenderedControls);
        }
Esempio n. 5
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            _actionDropdown = commandControls.CreateDropdownFor("v_LoopActionType", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_LoopActionType", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_LoopActionType", this, new Control[] { _actionDropdown }, editor));
            _actionDropdown.SelectionChangeCommitted += loopAction_SelectionChangeCommitted;
            RenderedControls.Add(_actionDropdown);

            _parameterControls = new List <Control>();
            _parameterControls.Add(commandControls.CreateDefaultLabelFor("v_ActionParameterTable", this));
            _recorderControl.Click += (sender, e) => ShowLoopElementRecorder(sender, e, editor, commandControls);
            _parameterControls.Add(_recorderControl);

            _loopGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_ActionParameterTable", this);
            _loopGridViewHelper.AllowUserToAddRows    = false;
            _loopGridViewHelper.AllowUserToDeleteRows = false;
            _loopGridViewHelper.MouseEnter           += LoopGridViewHelper_MouseEnter;

            _parameterControls.AddRange(commandControls.CreateUIHelpersFor("v_ActionParameterTable", this, new Control[] { _loopGridViewHelper }, editor));
            _parameterControls.Add(_loopGridViewHelper);

            RenderedControls.AddRange(_parameterControls);

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            UIPictureBox imageCapture = new UIPictureBox();

            imageCapture.Width  = 200;
            imageCapture.Height = 200;
            imageCapture.DataBindings.Add("EncodedImage", this, "v_ImageCapture", false, DataSourceUpdateMode.OnPropertyChanged);

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ImageCapture", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageCapture", this, new Control[] { imageCapture }, editor));
            RenderedControls.Add(imageCapture);

            _imageActionDropdown = (ComboBox)commandControls.CreateDropdownFor("v_ImageAction", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ImageAction", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageAction", this, new Control[] { _imageActionDropdown }, editor));
            _imageActionDropdown.SelectionChangeCommitted += ImageAction_SelectionChangeCommitted;
            RenderedControls.Add(_imageActionDropdown);

            _imageParameterControls = new List <Control>();
            _imageParameterControls.Add(commandControls.CreateDefaultLabelFor("v_ImageActionParameterTable", this));
            _imageParameterControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageActionParameterTable", this, new Control[] { _imageGridViewHelper }, editor));
            _imageParameterControls.Add(_imageGridViewHelper);
            RenderedControls.AddRange(_imageParameterControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_MatchAccuracy", this, editor));

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            var imageCapture = commandControls.CreateDefaultPictureBoxFor("v_ImageCapture", this);

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ImageCapture", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageCapture", this, new Control[] { imageCapture }, editor));
            RenderedControls.Add(imageCapture);

            _imageActionDropdown = commandControls.CreateDropdownFor("v_ImageAction", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ImageAction", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageAction", this, new Control[] { _imageActionDropdown }, editor));
            _imageActionDropdown.SelectionChangeCommitted += ImageAction_SelectionChangeCommitted;
            RenderedControls.Add(_imageActionDropdown);

            _imageParameterControls = new List <Control>();
            _imageParameterControls.Add(commandControls.CreateDefaultLabelFor("v_ImageActionParameterTable", this));

            _imageGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_ImageActionParameterTable", this);
            _imageGridViewHelper.AllowUserToAddRows    = false;
            _imageGridViewHelper.AllowUserToDeleteRows = false;
            //_imageGridViewHelper.AllowUserToResizeRows = false;
            _imageGridViewHelper.MouseEnter += ImageGridViewHelper_MouseEnter;

            _imageParameterControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageActionParameterTable", this, new Control[] { _imageGridViewHelper }, editor));
            _imageParameterControls.Add(_imageGridViewHelper);
            RenderedControls.AddRange(_imageParameterControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_MatchAccuracy", this, editor));

            return(RenderedControls);
        }
Esempio n. 8
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            //create file path and helpers
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_taskPath", this));
            var taskPathControl = commandControls.CreateDefaultInputFor("v_taskPath", this);

            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_taskPath", this, new Control[] { taskPathControl }, editor));
            RenderedControls.Add(taskPathControl);
            taskPathControl.TextChanged += TaskPathControl_TextChanged;

            _passParameters           = new CheckBox();
            _passParameters.AutoSize  = true;
            _passParameters.Text      = "Assign Variables";
            _passParameters.Font      = new Font("Segoe UI Light", 12);
            _passParameters.ForeColor = Color.White;
            _passParameters.DataBindings.Add("Checked", this, "v_AssignVariables", false, DataSourceUpdateMode.OnPropertyChanged);
            _passParameters.CheckedChanged += (sender, e) => PassParametersCheckbox_CheckedChanged(sender, e, editor);
            commandControls.CreateDefaultToolTipFor("v_AssignVariables", this, _passParameters);
            RenderedControls.Add(_passParameters);

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_VariableAssignments", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_VariableAssignments", this, new Control[] { _assignmentsGridViewHelper }, editor));
            RenderedControls.Add(_assignmentsGridViewHelper);

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            //create helper control
            CommandItemControl helperControl = new CommandItemControl();

            helperControl.Padding        = new Padding(10, 0, 0, 0);
            helperControl.ForeColor      = Color.AliceBlue;
            helperControl.Font           = new Font("Segoe UI Semilight", 10);
            helperControl.CommandImage   = Resources.command_camera;
            helperControl.CommandDisplay = "Element Recorder";
            helperControl.Click         += new EventHandler((s, e) => ShowRecorder(s, e, editor));

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));

            if (v_SeleniumSearchParameters.Rows.Count == 0)
            {
                v_SeleniumSearchParameters.Rows.Add(true, "XPath", "");
                v_SeleniumSearchParameters.Rows.Add(false, "ID", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Name", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Tag Name", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Class Name", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Link Text", "");
                v_SeleniumSearchParameters.Rows.Add(false, "CSS Selector", "");
            }

            //create search parameters
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_SeleniumSearchParameters", this));
            RenderedControls.Add(helperControl);
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_SeleniumSearchParameters", this, new Control[] { _searchParametersGridViewHelper }, editor));
            RenderedControls.Add(_searchParametersGridViewHelper);

            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_SeleniumSearchOption", this, editor));

            _elementActionDropdown = (ComboBox)commandControls.CreateDropdownFor("v_SeleniumElementAction", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_SeleniumElementAction", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_SeleniumElementAction", this, new Control[] { _elementActionDropdown }, editor));
            _elementActionDropdown.SelectionChangeCommitted += SeleniumAction_SelectionChangeCommitted;
            RenderedControls.Add(_elementActionDropdown);

            _actionParametersControls = new List <Control>();
            _actionParametersControls.Add(commandControls.CreateDefaultLabelFor("v_WebActionParameterTable", this));
            _actionParametersControls.AddRange(commandControls.CreateUIHelpersFor("v_WebActionParameterTable", this, new Control[] { _actionParametersGridViewHelper }, editor));
            _actionParametersControls.Add(_actionParametersGridViewHelper);
            RenderedControls.AddRange(_actionParametersControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_Timeout", this, editor));

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));

            CommandItemControl buildConnectionStringControl = new CommandItemControl("connectionString", Resources.command_database, "Build Connection String");

            buildConnectionStringControl.Click += (sender, e) => BuildConnectionString(sender, e);

            CommandItemControl testConnectionControl = new CommandItemControl("connectionTest", Resources.command_database, "Test Connection");

            testConnectionControl.Click += async(sender, e) => await TestConnection(sender, e, editor);

            _connectionString = commandControls.CreateDefaultInputFor("v_ConnectionString", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ConnectionString", this));
            RenderedControls.Add(buildConnectionStringControl);
            RenderedControls.Add(testConnectionControl);
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ConnectionString", this, new[] { _connectionString }, editor));
            RenderedControls.Add(_connectionString);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_ConnectionStringPassword", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_TestConnection", this, editor));

            return(RenderedControls);
        }
Esempio n. 11
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_DataTable", this, editor));

            CommandItemControl loadSchemaControl = new CommandItemControl("columnNameLoader", Resources.command_spreadsheet, "Load Column Names From Existing DataTable");

            loadSchemaControl.Click += LoadSchemaControl_Click;

            var dataRowDataControls = new List <Control>();

            dataRowDataControls.Add(commandControls.CreateDefaultLabelFor("v_DataRowDataTable", this));
            var gridview = commandControls.CreateDefaultDataGridViewFor("v_DataRowDataTable", this);

            dataRowDataControls.AddRange(commandControls.CreateUIHelpersFor("v_DataRowDataTable", this, new Control[] { gridview }, editor));
            dataRowDataControls.Add(loadSchemaControl);
            dataRowDataControls.Add(gridview);

            RenderedControls.AddRange(dataRowDataControls);

            _dataTableCreationCommands = editor.ConfiguredCommands.Where(f => f is CreateDataTableCommand)
                                         .Select(f => (CreateDataTableCommand)f)
                                         .ToList();

            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));

            return(RenderedControls);
        }
Esempio n. 12
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            _userInputGridViewHelper          = commandControls.CreateDefaultDataGridViewFor("v_UserInputConfig", this);
            _userInputGridViewHelper.KeyDown += UserInputDataGridView_KeyDown;

            var typefield = new DataGridViewComboBoxColumn();

            typefield.Items.Add("TextBox");
            typefield.Items.Add("CheckBox");
            typefield.Items.Add("ComboBox");
            typefield.HeaderText       = "Input Type";
            typefield.DataPropertyName = "Type";
            _userInputGridViewHelper.Columns.Add(typefield);

            var field = new DataGridViewTextBoxColumn();

            field.HeaderText       = "Input Label";
            field.DataPropertyName = "Label";
            _userInputGridViewHelper.Columns.Add(field);

            field                  = new DataGridViewTextBoxColumn();
            field.HeaderText       = "Input Size (X,Y)";
            field.DataPropertyName = "Size";
            _userInputGridViewHelper.Columns.Add(field);

            field                  = new DataGridViewTextBoxColumn();
            field.HeaderText       = "Default Value";
            field.DataPropertyName = "DefaultValue";
            _userInputGridViewHelper.Columns.Add(field);

            field                  = new DataGridViewTextBoxColumn();
            field.HeaderText       = "Assigned Variable";
            field.DataPropertyName = "StoreInVariable";
            _userInputGridViewHelper.Columns.Add(field);

            _userInputGridViewHelper.AllowUserToAddRows = false;
            _userInputGridViewHelper.AllowDrop          = true;
            _userInputGridViewHelper.MouseDown         += UserInputGridViewHelper_MouseDown;
            _userInputGridViewHelper.MouseUp           += UserInputGridViewHelper_MouseUp;
            _userInputGridViewHelper.MouseMove         += UserInputGridViewHelper_MouseMove;
            _userInputGridViewHelper.DragOver          += UserInputGridViewHelper_DragOver;
            _userInputGridViewHelper.DragDrop          += UserInputGridViewHelper_DragDrop;

            _addRowControl        = new CommandItemControl("AddInput", Resources.command_input, "Add Input Parameter");
            _addRowControl.Click += (sender, e) => AddInputParameter(sender, e, editor);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InputHeader", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InputDirections", this, editor));

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_UserInputConfig", this));
            RenderedControls.Add(_addRowControl);
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_UserInputConfig", this, new Control[] { _userInputGridViewHelper }, editor));
            RenderedControls.Add(_userInputGridViewHelper);

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_QueryType", this, editor));

            var queryControls = commandControls.CreateDefaultInputGroupFor("v_Query", this, editor);
            var queryBox      = (TextBox)queryControls[2];

            queryBox.Multiline = true;
            queryBox.Height    = 150;
            RenderedControls.AddRange(queryControls);

            //set up query parameter controls
            _queryParametersGridView = commandControls.CreateDefaultDataGridViewFor("v_QueryParameters", this);
            _queryParametersGridView.AutoGenerateColumns = false;
            _queryParametersGridView.AllowUserToAddRows  = false;

            var selectColumn = new DataGridViewComboBoxColumn();

            selectColumn.HeaderText       = "Type";
            selectColumn.DataPropertyName = "Parameter Type";
            selectColumn.DataSource       = new string[] { "STRING", "BOOLEAN", "DECIMAL", "INT16",
                                                           "INT32", "INT64", "DATETIME", "DOUBLE",
                                                           "SINGLE", "GUID", "BYTE", "BYTE[]" };
            _queryParametersGridView.Columns.Add(selectColumn);

            var paramNameColumn = new DataGridViewTextBoxColumn();

            paramNameColumn.HeaderText       = "Name";
            paramNameColumn.DataPropertyName = "Parameter Name";
            _queryParametersGridView.Columns.Add(paramNameColumn);

            var paramValueColumn = new DataGridViewTextBoxColumn();

            paramValueColumn.HeaderText       = "Value";
            paramValueColumn.DataPropertyName = "Parameter Value";
            _queryParametersGridView.Columns.Add(paramValueColumn);

            _queryParametersControls = new List <Control>();
            _queryParametersControls.Add(commandControls.CreateDefaultLabelFor("v_QueryParameters", this));
            _queryParametersControls.AddRange(commandControls.CreateUIHelpersFor("v_QueryParameters", this, new Control[] { _queryParametersGridView }, editor));

            CommandItemControl helperControl = new CommandItemControl("add_param_helper", Resources.command_database, "Add Parameter");

            helperControl.Click += (sender, e) => AddParameter(sender, e);

            _queryParametersControls.Add(helperControl);
            _queryParametersControls.Add(_queryParametersGridView);
            RenderedControls.AddRange(_queryParametersControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_QueryTimeout", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));
            return(RenderedControls);
        }
Esempio n. 14
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            NativeHelper.AddDefaultSearchRows(v_SeleniumSearchParameters);
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));

            CommandItemControl obWebRecorderControl = new CommandItemControl("OBWebRecorder", Resources.command_camera, "OB Web Element Recorder");

            obWebRecorderControl.Click += new EventHandler((s, e) => ShowRecorder(s, e, editor, commandControls));

            //disabled native chrome recorder for 1.5.0
            var searchParameterControls = commandControls.CreateDefaultWebElementDataGridViewGroupFor("v_SeleniumSearchParameters", this, editor,
                                                                                                      new Control[] { obWebRecorderControl, NativeHelper.NativeChromeRecorderControl(v_SeleniumSearchParameters, editor) });

            searchParameterControls.Last().MouseEnter += ActionParametersGridViewHelper_MouseEnter;
            RenderedControls.AddRange(searchParameterControls);

            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_SeleniumSearchOption", this, editor));

            _elementActionDropdown = commandControls.CreateDropdownFor("v_SeleniumElementAction", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_SeleniumElementAction", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_SeleniumElementAction", this, new Control[] { _elementActionDropdown }, editor));
            _elementActionDropdown.SelectionChangeCommitted += SeleniumAction_SelectionChangeCommitted;
            RenderedControls.Add(_elementActionDropdown);

            _actionParametersControls = new List <Control>();
            _actionParametersControls.Add(commandControls.CreateDefaultLabelFor("v_WebActionParameterTable", this));

            _actionParametersGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_WebActionParameterTable", this);
            _actionParametersGridViewHelper.AllowUserToAddRows    = false;
            _actionParametersGridViewHelper.AllowUserToDeleteRows = false;
            _actionParametersGridViewHelper.MouseEnter           += ActionParametersGridViewHelper_MouseEnter;

            _actionParametersControls.AddRange(commandControls.CreateUIHelpersFor("v_WebActionParameterTable", this,
                                                                                  new Control[] { _actionParametersGridViewHelper }, editor));
            _actionParametersControls.Add(_actionParametersGridViewHelper);
            RenderedControls.AddRange(_actionParametersControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_Timeout", this, editor));

            return(RenderedControls);
        }
Esempio n. 15
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            //create file path and helpers
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_TaskPath", this));
            var taskPathControl = commandControls.CreateDefaultInputFor("v_TaskPath", this);

            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_TaskPath", this, new Control[] { taskPathControl }, editor));
            RenderedControls.Add(taskPathControl);
            taskPathControl.TextChanged += TaskPathControl_TextChanged;

            _passParameters           = new CheckBox();
            _passParameters.AutoSize  = true;
            _passParameters.Text      = "Assign Arguments";
            _passParameters.Font      = new Font("Segoe UI Light", 12);
            _passParameters.ForeColor = Color.White;
            _passParameters.DataBindings.Add("Checked", this, "v_AssignArguments", false, DataSourceUpdateMode.OnPropertyChanged);
            _passParameters.CheckedChanged += async(sender, e) => await PassParametersCheckbox_CheckedChanged(sender, e, editor);

            commandControls.CreateDefaultToolTipFor("v_AssignArguments", this, _passParameters);
            RenderedControls.Add(_passParameters);

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ArgumentAssignments", this));
            _assignmentsGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_ArgumentAssignments", this);
            _assignmentsGridViewHelper.AllowUserToAddRows    = false;
            _assignmentsGridViewHelper.AllowUserToDeleteRows = false;
            //refresh gridview
            _assignmentsGridViewHelper.MouseEnter += async(sender, e) => await PassParametersCheckbox_CheckedChanged(_passParameters, null, editor, true);

            if (!_passParameters.Checked)
            {
                _assignmentsGridViewHelper.Hide();
            }

            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ArgumentAssignments", this, new Control[] { _assignmentsGridViewHelper }, editor));
            RenderedControls.Add(_assignmentsGridViewHelper);

            return(RenderedControls);
        }
Esempio n. 16
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            //create standard group controls
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_JsonObject", this, editor));

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ParseObjects", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ParseObjects", this, new[] { _parseObjectsGridViewHelper }, editor));
            RenderedControls.Add(_parseObjectsGridViewHelper);

            return(RenderedControls);
        }
Esempio n. 17
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            var imageCapture = commandControls.CreateDefaultPictureBoxFor("v_ImageCapture", this);


            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ImageCapture", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageCapture", this, new Control[] { imageCapture }, editor));
            RenderedControls.Add(imageCapture);

            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));

            return(RenderedControls);
        }
Esempio n. 18
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_FilePath", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_ClassName", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_MethodName", this, editor));

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_MethodParameters", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_MethodParameters", this, new Control[] { _parametersGridViewHelper }, editor));
            RenderedControls.Add(_parametersGridViewHelper);

            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            UIPictureBox imageCapture = new UIPictureBox();

            imageCapture.Width  = 200;
            imageCapture.Height = 200;
            imageCapture.DataBindings.Add("EncodedImage", this, "v_ImageCapture", false, DataSourceUpdateMode.OnPropertyChanged);

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_ImageCapture", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_ImageCapture", this, new Control[] { imageCapture }, editor));
            RenderedControls.Add(imageCapture);

            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultDataGridViewGroupFor("v_WebSearchParameter", this, editor));


            _elementActionDropdown = commandControls.CreateDropdownFor("v_WebAction", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_WebAction", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_WebAction", this, new Control[] { _elementActionDropdown }, editor));
            _elementActionDropdown.SelectionChangeCommitted += ElementActionDropdown_SelectionChangeCommitted;
            RenderedControls.Add(_elementActionDropdown);

            _elementParameterControls = commandControls.CreateDefaultDataGridViewGroupFor("v_WebActionParameterTable", this, editor);
            ((DataGridView)_elementParameterControls[2]).AllowUserToAddRows = false;
            RenderedControls.AddRange(_elementParameterControls);

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));

            _ieBrowerNameDropdown = commandControls.CreateDropdownFor("v_IEBrowserName", this);
            var shellWindows = new ShellWindows();

            foreach (IWebBrowser2 shellWindow in shellWindows)
            {
                if (shellWindow.Document is HTMLDocument)
                {
                    _ieBrowerNameDropdown.Items.Add(shellWindow.Document.Title);
                }
            }
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_IEBrowserName", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_IEBrowserName", this, new Control[] { _ieBrowerNameDropdown }, editor));
            RenderedControls.Add(_ieBrowerNameDropdown);

            return(RenderedControls);
        }
Esempio n. 22
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            //create search param grid
            _searchParametersGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_UIASearchParameters", this);

            DataGridViewCheckBoxColumn enabled = new DataGridViewCheckBoxColumn();

            enabled.HeaderText       = "Enabled";
            enabled.DataPropertyName = "Enabled";
            _searchParametersGridViewHelper.Columns.Add(enabled);

            DataGridViewTextBoxColumn propertyName = new DataGridViewTextBoxColumn();

            propertyName.HeaderText       = "Parameter Name";
            propertyName.DataPropertyName = "Parameter Name";
            _searchParametersGridViewHelper.Columns.Add(propertyName);

            DataGridViewTextBoxColumn propertyValue = new DataGridViewTextBoxColumn();

            propertyValue.HeaderText       = "Parameter Value";
            propertyValue.DataPropertyName = "Parameter Value";

            _searchParametersGridViewHelper.Columns.Add(propertyValue);
            _searchParametersGridViewHelper.AllowUserToAddRows    = false;
            _searchParametersGridViewHelper.AllowUserToDeleteRows = false;
            _searchParametersGridViewHelper.MouseEnter           += ActionParametersGridViewHelper_MouseEnter;

            //create actions
            _actionParametersGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_UIAActionParameters", this);
            _actionParametersGridViewHelper.AllowUserToAddRows    = false;
            _actionParametersGridViewHelper.AllowUserToDeleteRows = false;
            _actionParametersGridViewHelper.MouseEnter           += ActionParametersGridViewHelper_MouseEnter;

            propertyName                  = new DataGridViewTextBoxColumn();
            propertyName.HeaderText       = "Parameter Name";
            propertyName.DataPropertyName = "Parameter Name";
            _actionParametersGridViewHelper.Columns.Add(propertyName);

            propertyValue                  = new DataGridViewTextBoxColumn();
            propertyValue.HeaderText       = "Parameter Value";
            propertyValue.DataPropertyName = "Parameter Value";
            _actionParametersGridViewHelper.Columns.Add(propertyValue);

            //create helper control
            CommandItemControl helperControl = new CommandItemControl();

            helperControl.Padding        = new Padding(10, 0, 0, 0);
            helperControl.ForeColor      = Color.AliceBlue;
            helperControl.Font           = new Font("Segoe UI Semilight", 10);
            helperControl.CommandImage   = Resources.command_camera;
            helperControl.CommandDisplay = "Element Recorder";
            helperControl.Click         += (sender, e) => ShowRecorder(sender, e, commandControls);

            //window name
            RenderedControls.AddRange(commandControls.CreateDefaultWindowControlGroupFor("v_WindowName", this, editor));

            //automation type
            var automationTypeGroup = commandControls.CreateDefaultDropdownGroupFor("v_AutomationType", this, editor);

            _automationTypeControl = (ComboBox)automationTypeGroup.Where(f => f is ComboBox).FirstOrDefault();
            _automationTypeControl.SelectionChangeCommitted += UIAType_SelectionChangeCommitted;
            RenderedControls.AddRange(automationTypeGroup);

            //create search parameters
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_UIASearchParameters", this));
            RenderedControls.Add(helperControl);
            RenderedControls.Add(_searchParametersGridViewHelper);

            //create action parameters
            _actionParametersControls = new List <Control>();
            _actionParametersControls.Add(commandControls.CreateDefaultLabelFor("v_UIAActionParameters", this));
            _actionParametersControls.AddRange(commandControls.CreateUIHelpersFor("v_UIAActionParameters", this, new Control[] { _actionParametersGridViewHelper }, editor));
            _actionParametersControls.Add(_actionParametersGridViewHelper);
            RenderedControls.AddRange(_actionParametersControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_Timeout", this, editor));

            return(RenderedControls);
        }
Esempio n. 23
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            _userInputGridViewHelper          = new DataGridView();
            _userInputGridViewHelper.KeyDown += UserInputDataGridView_KeyDown;
            _userInputGridViewHelper.DataBindings.Add("DataSource", this, "v_UserInputConfig", false, DataSourceUpdateMode.OnPropertyChanged);

            var typefield = new DataGridViewComboBoxColumn();

            typefield.Items.Add("TextBox");
            typefield.Items.Add("CheckBox");
            typefield.Items.Add("ComboBox");
            typefield.HeaderText       = "Input Type";
            typefield.DataPropertyName = "Type";
            _userInputGridViewHelper.Columns.Add(typefield);

            var field = new DataGridViewTextBoxColumn();

            field.HeaderText       = "Input Label";
            field.DataPropertyName = "Label";
            _userInputGridViewHelper.Columns.Add(field);

            field                  = new DataGridViewTextBoxColumn();
            field.HeaderText       = "Input Size (X,Y)";
            field.DataPropertyName = "Size";
            _userInputGridViewHelper.Columns.Add(field);

            field                  = new DataGridViewTextBoxColumn();
            field.HeaderText       = "Default Value";
            field.DataPropertyName = "DefaultValue";
            _userInputGridViewHelper.Columns.Add(field);

            field                  = new DataGridViewTextBoxColumn();
            field.HeaderText       = "Assigned Variable";
            field.DataPropertyName = "StoreInVariable";
            _userInputGridViewHelper.Columns.Add(field);

            _userInputGridViewHelper.ColumnHeadersHeight   = 30;
            _userInputGridViewHelper.AutoSizeColumnsMode   = DataGridViewAutoSizeColumnsMode.Fill;
            _userInputGridViewHelper.AllowUserToAddRows    = false;
            _userInputGridViewHelper.AllowUserToDeleteRows = true;
            _userInputGridViewHelper.AllowDrop             = true;
            _userInputGridViewHelper.MouseDown            += UserInputGridViewHelper_MouseDown;
            _userInputGridViewHelper.MouseUp   += UserInputGridViewHelper_MouseUp;
            _userInputGridViewHelper.MouseMove += UserInputGridViewHelper_MouseMove;
            _userInputGridViewHelper.DragOver  += UserInputGridViewHelper_DragOver;
            _userInputGridViewHelper.DragDrop  += UserInputGridViewHelper_DragDrop;

            _addRowControl                = new CommandItemControl();
            _addRowControl.Padding        = new Padding(10, 0, 0, 0);
            _addRowControl.ForeColor      = Color.AliceBlue;
            _addRowControl.Font           = new Font("Segoe UI Semilight", 10);
            _addRowControl.CommandImage   = Resources.command_input;
            _addRowControl.CommandDisplay = "Add Input Parameter";
            _addRowControl.Click         += (sender, e) => AddInputParameter(sender, e, editor);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InputHeader", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InputDirections", this, editor));

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_UserInputConfig", this));
            RenderedControls.Add(_addRowControl);
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_UserInputConfig", this, new Control[] { _userInputGridViewHelper }, editor));
            RenderedControls.Add(_userInputGridViewHelper);

            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_QueryType", this, editor));

            var queryControls = commandControls.CreateDefaultInputGroupFor("v_Query", this, editor);
            var queryBox      = (TextBox)queryControls[2];

            queryBox.Multiline = true;
            queryBox.Height    = 150;
            RenderedControls.AddRange(queryControls);

            //set up query parameter controls
            _queryParametersGridView = new DataGridView();
            _queryParametersGridView.AllowUserToAddRows    = true;
            _queryParametersGridView.AllowUserToDeleteRows = true;
            _queryParametersGridView.Size = new Size(400, 250);
            _queryParametersGridView.ColumnHeadersHeight = 30;
            _queryParametersGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            _queryParametersGridView.AutoGenerateColumns = false;

            var selectColumn = new DataGridViewComboBoxColumn();

            selectColumn.HeaderText       = "Type";
            selectColumn.DataPropertyName = "Parameter Type";
            selectColumn.DataSource       = new string[] { "STRING", "BOOLEAN", "DECIMAL", "INT16",
                                                           "INT32", "INT64", "DATETIME", "DOUBLE",
                                                           "SINGLE", "GUID", "BYTE", "BYTE[]" };
            _queryParametersGridView.Columns.Add(selectColumn);

            var paramNameColumn = new DataGridViewTextBoxColumn();

            paramNameColumn.HeaderText       = "Name";
            paramNameColumn.DataPropertyName = "Parameter Name";
            _queryParametersGridView.Columns.Add(paramNameColumn);

            var paramValueColumn = new DataGridViewTextBoxColumn();

            paramValueColumn.HeaderText       = "Value";
            paramValueColumn.DataPropertyName = "Parameter Value";
            _queryParametersGridView.Columns.Add(paramValueColumn);

            _queryParametersGridView.DataBindings.Add("DataSource", this, "v_QueryParameters", false, DataSourceUpdateMode.OnPropertyChanged);

            _queryParametersControls = new List <Control>();
            _queryParametersControls.Add(commandControls.CreateDefaultLabelFor("v_QueryParameters", this));
            _queryParametersControls.AddRange(commandControls.CreateUIHelpersFor("v_QueryParameters", this, new Control[] { _queryParametersGridView }, editor));

            CommandItemControl helperControl = new CommandItemControl();

            helperControl.Padding        = new Padding(10, 0, 0, 0);
            helperControl.ForeColor      = Color.AliceBlue;
            helperControl.Font           = new Font("Segoe UI Semilight", 10);
            helperControl.Name           = "add_param_helper";
            helperControl.CommandImage   = Resources.command_database2;
            helperControl.CommandDisplay = "Add Parameter";
            helperControl.Click         += (sender, e) => AddParameter(sender, e);

            _queryParametersControls.Add(helperControl);
            _queryParametersControls.Add(_queryParametersGridView);
            RenderedControls.AddRange(_queryParametersControls);

            RenderedControls.AddRange(commandControls.CreateDefaultOutputGroupFor("v_OutputUserVariableName", this, editor));
            return(RenderedControls);
        }
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            //create helper control
            CommandItemControl helperControl = new CommandItemControl();

            helperControl.Padding        = new Padding(10, 0, 0, 0);
            helperControl.ForeColor      = Color.AliceBlue;
            helperControl.Font           = new Font("Segoe UI Semilight", 10);
            helperControl.CommandImage   = Resources.command_camera;
            helperControl.CommandDisplay = "Element Recorder";
            helperControl.Click         += new EventHandler((s, e) => ShowRecorder(s, e, editor, commandControls));

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));

            if (v_SeleniumSearchParameters.Rows.Count == 0)
            {
                v_SeleniumSearchParameters.Rows.Add(true, "XPath", "");
                v_SeleniumSearchParameters.Rows.Add(false, "ID", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Name", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Tag Name", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Class Name", "");
                v_SeleniumSearchParameters.Rows.Add(false, "Link Text", "");
                v_SeleniumSearchParameters.Rows.Add(false, "CSS Selector", "");
            }
            //create search parameters
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_SeleniumSearchParameters", this));
            RenderedControls.Add(helperControl);

            //create search param grid
            _searchParametersGridViewHelper             = commandControls.CreateDefaultDataGridViewFor("v_SeleniumSearchParameters", this);
            _searchParametersGridViewHelper.MouseEnter += ActionParametersGridViewHelper_MouseEnter;

            DataGridViewCheckBoxColumn enabled = new DataGridViewCheckBoxColumn();

            enabled.HeaderText       = "Enabled";
            enabled.DataPropertyName = "Enabled";
            enabled.FillWeight       = 30;
            _searchParametersGridViewHelper.Columns.Add(enabled);

            DataGridViewTextBoxColumn propertyName = new DataGridViewTextBoxColumn();

            propertyName.HeaderText       = "Parameter Name";
            propertyName.DataPropertyName = "Parameter Name";
            propertyName.FillWeight       = 40;
            _searchParametersGridViewHelper.Columns.Add(propertyName);

            DataGridViewTextBoxColumn propertyValue = new DataGridViewTextBoxColumn();

            propertyValue.HeaderText       = "Parameter Value";
            propertyValue.DataPropertyName = "Parameter Value";
            _searchParametersGridViewHelper.Columns.Add(propertyValue);

            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_SeleniumSearchParameters", this, new Control[] { _searchParametersGridViewHelper }, editor));
            RenderedControls.Add(_searchParametersGridViewHelper);

            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_SeleniumSearchOption", this, editor));

            _elementActionDropdown = commandControls.CreateDropdownFor("v_SeleniumElementAction", this);
            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_SeleniumElementAction", this));
            RenderedControls.AddRange(commandControls.CreateUIHelpersFor("v_SeleniumElementAction", this, new Control[] { _elementActionDropdown }, editor));
            _elementActionDropdown.SelectionChangeCommitted += SeleniumAction_SelectionChangeCommitted;
            RenderedControls.Add(_elementActionDropdown);

            _actionParametersControls = new List <Control>();
            _actionParametersControls.Add(commandControls.CreateDefaultLabelFor("v_WebActionParameterTable", this));

            _actionParametersGridViewHelper = commandControls.CreateDefaultDataGridViewFor("v_WebActionParameterTable", this);
            _actionParametersGridViewHelper.AllowUserToAddRows    = false;
            _actionParametersGridViewHelper.AllowUserToDeleteRows = false;
            _actionParametersGridViewHelper.MouseEnter           += ActionParametersGridViewHelper_MouseEnter;

            _actionParametersControls.AddRange(commandControls.CreateUIHelpersFor("v_WebActionParameterTable", this, new Control[] { _actionParametersGridViewHelper }, editor));
            _actionParametersControls.Add(_actionParametersGridViewHelper);
            RenderedControls.AddRange(_actionParametersControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_Timeout", this, editor));

            return(RenderedControls);
        }
Esempio n. 26
0
        public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls)
        {
            base.Render(editor, commandControls);

            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor));

            CommandItemControl helperControl = new CommandItemControl();

            helperControl.Padding        = new Padding(10, 0, 0, 0);
            helperControl.ForeColor      = Color.AliceBlue;
            helperControl.Font           = new Font("Segoe UI Semilight", 10);
            helperControl.Name           = "connection_helper";
            helperControl.CommandImage   = Resources.command_database2;
            helperControl.CommandDisplay = "Build Connection String";
            helperControl.Click         += (sender, e) => Button_Click(sender, e);

            _connectionString = (TextBox)commandControls.CreateDefaultInputFor("v_ConnectionString", this);

            var connectionLabel   = commandControls.CreateDefaultLabelFor("v_ConnectionString", this);
            var connectionHelpers = commandControls.CreateUIHelpersFor("v_ConnectionString", this, new[] { _connectionString }, editor);
            CommandItemControl testConnectionControl = new CommandItemControl();

            testConnectionControl.Padding        = new Padding(10, 0, 0, 0);
            testConnectionControl.ForeColor      = Color.AliceBlue;
            testConnectionControl.Font           = new Font("Segoe UI Semilight", 10);
            testConnectionControl.Name           = "connection_helper";
            testConnectionControl.CommandImage   = Resources.command_database2;
            testConnectionControl.CommandDisplay = "Test Connection";
            testConnectionControl.Click         += (sender, e) => TestConnection(sender, e);

            RenderedControls.Add(connectionLabel);
            RenderedControls.AddRange(connectionHelpers);
            RenderedControls.Add(helperControl);
            RenderedControls.Add(testConnectionControl);
            RenderedControls.Add(_connectionString);

            _connectionStringPassword = (TextBox)commandControls.CreateDefaultInputFor("v_ConnectionStringPassword", this);

            var connectionPassLabel   = commandControls.CreateDefaultLabelFor("v_ConnectionStringPassword", this);
            var connectionPassHelpers = commandControls.CreateUIHelpersFor("v_ConnectionStringPassword", this, new[] { _connectionStringPassword }, editor);

            RenderedControls.Add(connectionPassLabel);
            RenderedControls.AddRange(connectionPassHelpers);

            CommandItemControl passwordHelperControl = new CommandItemControl();

            passwordHelperControl.Padding        = new Padding(10, 0, 0, 0);
            passwordHelperControl.ForeColor      = Color.AliceBlue;
            passwordHelperControl.Font           = new Font("Segoe UI Semilight", 10);
            passwordHelperControl.Name           = "show_pass_helper";
            passwordHelperControl.CommandImage   = Resources.command_password;
            passwordHelperControl.CommandDisplay = "Show Password";
            passwordHelperControl.Click         += (sender, e) => TogglePasswordChar(passwordHelperControl, e);
            RenderedControls.Add(passwordHelperControl);

            CommandItemControl encryptHelperControl = new CommandItemControl();

            encryptHelperControl.Padding        = new Padding(10, 0, 0, 0);
            encryptHelperControl.ForeColor      = Color.AliceBlue;
            encryptHelperControl.Font           = new Font("Segoe UI Semilight", 10);
            encryptHelperControl.Name           = "show_pass_helper";
            encryptHelperControl.CommandImage   = Resources.command_password;
            encryptHelperControl.CommandDisplay = "Encrypt Password";
            encryptHelperControl.Click         += (sender, e) => EncryptPassword(passwordHelperControl, e);
            RenderedControls.Add(encryptHelperControl);

            var label = new Label();

            label.AutoSize  = true;
            label.Font      = new Font("Segoe UI Semilight", 9);
            label.ForeColor = Color.White;
            label.Text      = "NOTE: If storing the password in the textbox below, please ensure the connection string " +
                              "above contains a database-specific placeholder with #pwd to be replaced at runtime. (;Password=#pwd)";
            RenderedControls.Add(label);

            RenderedControls.Add(_connectionStringPassword);
            _connectionStringPassword.PasswordChar = '*';

            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_TestConnection", this, editor));

            return(RenderedControls);
        }