Esempio n. 1
0
 private void SetPersistedValueFor(ParameterControlDTO controlDto)
 {
     if (PersistedValues.ContainsKey(controlDto.Id))
     {
         Definitions.SetValue(controlDto.Control, PersistedValues[controlDto.Id]);
     }
 }
Esempio n. 2
0
        private static Control CreateRowFor(ParameterControlDTO parameterControlDto)
        {
            var rowContainer = new HtmlGenericControl("div");

            rowContainer.Attributes.Add("class", "parameter-control-container");
            var control = parameterControlDto.Control;

            if (parameterControlDto.ShowLabel)
            {
                var label = new Label
                {
                    AssociatedControlID = parameterControlDto.Id,
                    Text    = parameterControlDto.LabelText,
                    ToolTip = parameterControlDto.Description
                };
                rowContainer.Controls.Add(label);
            }
            else
            {
                var noLabelContainer = new HtmlGenericControl("div");
                noLabelContainer.Attributes.Add("title", parameterControlDto.Description);
                noLabelContainer.Attributes.Add("class", "control-without-label");
                noLabelContainer.Controls.Add(parameterControlDto.Control);
                control = noLabelContainer;
            }
            var controlContainer = new HtmlGenericControl("div");

            controlContainer.Attributes.Add("class", "control-container");
            controlContainer.Controls.Add(control);
            rowContainer.Controls.Add(controlContainer);
            return(rowContainer);
        }
Esempio n. 3
0
 private void SetPersistedValueFor(ParameterControlDTO controlDto)
 {
     if (PersistedValues.ContainsKey(controlDto.Id))
     {
         Definitions.SetValue(controlDto.Control, PersistedValues[controlDto.Id]);
     }
 }
Esempio n. 4
0
 private static Control CreateRowFor(ParameterControlDTO parameterControlDto)
 {
     var rowContainer = new HtmlGenericControl("div");
     rowContainer.Attributes.Add("class", "parameter-control-container");
     var control = parameterControlDto.Control;
     if(parameterControlDto.ShowLabel)
     {
         var label = new Label
                         {
                             AssociatedControlID = parameterControlDto.Id,
                             Text = parameterControlDto.LabelText,
                             ToolTip = parameterControlDto.Description
                         };
         rowContainer.Controls.Add(label);
     }
     else
     {
         var noLabelContainer = new HtmlGenericControl("div");
         noLabelContainer.Attributes.Add("title", parameterControlDto.Description);
         noLabelContainer.Attributes.Add("class", "control-without-label");
         noLabelContainer.Controls.Add(parameterControlDto.Control);
         control = noLabelContainer;
     }
     var controlContainer = new HtmlGenericControl("div");
     controlContainer.Attributes.Add("class", "control-container");
     controlContainer.Controls.Add(control);
     rowContainer.Controls.Add(controlContainer);
     return rowContainer;
 }