예제 #1
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);
        }
예제 #2
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);
        }