public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls) { base.Render(editor, commandControls); RenderedControls.AddRange(commandControls.CreateDataGridViewGroupFor("v_ColumnNameDataTable", 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.CreateDefaultInputGroupFor("v_RetryCount", this, editor)); RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_RetryInterval", this, editor)); //get script variables for feeding into if builder form _scriptVariables = editor.ScriptVariables; _scriptElements = editor.ScriptElements; //create controls var controls = commandControls.CreateDataGridViewGroupFor("v_IfConditionsTable", this, editor); _ifConditionHelper = controls[2] as DataGridView; //handle helper click var helper = controls[1] as CommandItemControl; helper.Click += (sender, e) => CreateIfCondition(sender, e); //add for rendering RenderedControls.AddRange(controls); //define if condition helper _ifConditionHelper.Width = 450; _ifConditionHelper.Height = 200; _ifConditionHelper.AutoGenerateColumns = false; _ifConditionHelper.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None; _ifConditionHelper.Columns.Add(new DataGridViewTextBoxColumn() { HeaderText = "Condition", DataPropertyName = "Statement", ReadOnly = true, AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }); _ifConditionHelper.Columns.Add(new DataGridViewTextBoxColumn() { HeaderText = "CommandData", DataPropertyName = "CommandData", ReadOnly = true, Visible = false }); _ifConditionHelper.Columns.Add(new DataGridViewButtonColumn() { HeaderText = "Edit", UseColumnTextForButtonValue = true, Text = "Edit", Width = 45 }); _ifConditionHelper.Columns.Add(new DataGridViewButtonColumn() { HeaderText = "Delete", UseColumnTextForButtonValue = true, Text = "Delete", Width = 60 }); _ifConditionHelper.AllowUserToAddRows = false; _ifConditionHelper.AllowUserToDeleteRows = true; _ifConditionHelper.CellContentClick += IfConditionHelper_CellContentClick; return(RenderedControls); }
public override List <Control> Render(IfrmCommandEditor editor, ICommandControls commandControls) { base.Render(editor, commandControls); RenderedControls.AddRange(commandControls.CreateDefaultInputGroupFor("v_DataTable", this, editor)); RenderedControls.AddRange(commandControls.CreateDataGridViewGroupFor("v_DataRowDataTable", this, editor)); CommandItemControl loadSchemaControl = new CommandItemControl(); loadSchemaControl.ForeColor = Color.White; loadSchemaControl.Font = new Font("Segoe UI Semilight", 10); loadSchemaControl.CommandDisplay = "Load Column Names From Existing DataTable"; loadSchemaControl.CommandImage = Resources.command_spreadsheet; loadSchemaControl.Click += LoadSchemaControl_Click; RenderedControls.Add(loadSchemaControl); _dataTableCreationCommands = editor.ConfiguredCommands.Where(f => f is CreateDataTableCommand) .Select(f => (CreateDataTableCommand)f) .ToList(); return(RenderedControls); }