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

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

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

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

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_KeyActions", this));

            _keystrokeGridHelper = commandControls.CreateDefaultDataGridViewFor("v_KeyActions", this);
            _keystrokeGridHelper.AutoGenerateColumns = false;

            DataGridViewComboBoxColumn propertyName = new DataGridViewComboBoxColumn();

            propertyName.DataSource       = CommonMethods.GetAvailableKeys();
            propertyName.HeaderText       = "Selected Key";
            propertyName.DataPropertyName = "Key";
            _keystrokeGridHelper.Columns.Add(propertyName);

            DataGridViewComboBoxColumn propertyValue = new DataGridViewComboBoxColumn();

            propertyValue.DataSource = new List <string> {
                "Key Press (Down + Up)", "Key Down", "Key Up"
            };
            propertyValue.HeaderText       = "Selected Action";
            propertyValue.DataPropertyName = "Action";
            _keystrokeGridHelper.Columns.Add(propertyValue);

            RenderedControls.Add(_keystrokeGridHelper);

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

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

            RenderedControls.AddRange(commandControls.CreateDefaultWindowControlGroupFor("v_WindowName", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_TextToSend", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultDropdownGroupFor("v_EncryptionOption", this, editor));

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

            RenderedControls.AddRange(commandControls.CreateDefaultWindowControlGroupFor("v_WindowName", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_FolderPath", this, editor));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_FileName", this, editor));
            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.CreateDefaultWindowControlGroupFor("v_WindowName", this, editor));

            _keystrokeGridHelper = new DataGridView();
            _keystrokeGridHelper.DataBindings.Add("DataSource", this, "v_KeyActions", false, DataSourceUpdateMode.OnPropertyChanged);
            _keystrokeGridHelper.AllowUserToDeleteRows = true;
            _keystrokeGridHelper.AutoGenerateColumns   = false;
            _keystrokeGridHelper.Width  = 500;
            _keystrokeGridHelper.Height = 140;

            DataGridViewComboBoxColumn propertyName = new DataGridViewComboBoxColumn();

            propertyName.DataSource       = Common.GetAvailableKeys();
            propertyName.HeaderText       = "Selected Key";
            propertyName.DataPropertyName = "Key";
            _keystrokeGridHelper.Columns.Add(propertyName);

            DataGridViewComboBoxColumn propertyValue = new DataGridViewComboBoxColumn();

            propertyValue.DataSource = new List <string> {
                "Key Press (Down + Up)", "Key Down", "Key Up"
            };
            propertyValue.HeaderText       = "Selected Action";
            propertyValue.DataPropertyName = "Action";
            _keystrokeGridHelper.Columns.Add(propertyValue);

            _keystrokeGridHelper.ColumnHeadersHeight   = 30;
            _keystrokeGridHelper.AutoSizeColumnsMode   = DataGridViewAutoSizeColumnsMode.Fill;
            _keystrokeGridHelper.AllowUserToAddRows    = true;
            _keystrokeGridHelper.AllowUserToDeleteRows = true;

            RenderedControls.Add(commandControls.CreateDefaultLabelFor("v_KeyActions", this));
            RenderedControls.Add(_keystrokeGridHelper);

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

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

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

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

            imageCapture.MouseEnter += ImageGridViewHelper_MouseEnter;
            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));
            RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_Timeout", this, editor));

            return(RenderedControls);
        }
Esempio n. 7
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);
        }