예제 #1
0
 public IncCheckBoxControl(HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > property)
 {
     this.htmlHelper = htmlHelper;
     this.property   = property;
     this.label      = new IncLabelControl(htmlHelper, property);
     this.label.AddClass("checkbox");
 }
 public IncRadioButtonControl(HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > property)
 {
     this.htmlHelper = htmlHelper;
     this.property   = property;
     this.label      = new IncLabelControl(htmlHelper, property);
     this.label.AddClass("btn btn-default");
 }
 public IncHorizontalControl(IncLabelControl label, TInput input, IncControlBase validation)
 {
     Label      = label;
     Input      = input;
     Validation = validation;
     HelpBlock  = new IncHelpBlockControl();
     Control    = new IncDivControl();
 }
예제 #4
0
 public IncHorizontalControl(IncLabelControl label, TInput input, IncControlBase validation)
 {
     Label      = label;
     Input      = input;
     Validation = validation;
     HelpBlock  = new IncHelpBlockControl();
     AddClass("control-group");
 }
예제 #5
0
        MvcHtmlString Group <TInput>(TInput input, Action <IncHorizontalControl <TInput> > configuration) where TInput : IncControlBase
        {
            var label      = new IncLabelControl(this.htmlHelper, this.property);
            var validation = new IncValidationControl(this.htmlHelper, this.property);
            var horizontal = new IncHorizontalControl <TInput>(label, input, validation);

            configuration.Do(r => r(horizontal));

            return(horizontal.Render());
        }
        MvcHtmlString Group <TInput>(TInput input, Action <IncHorizontalControl <TInput> > configuration) where TInput : IncControlBase
        {
            var label = new IncLabelControl(htmlHelper, property);

            label.AddClass("control-label");
            var validation = new IncValidationControl(htmlHelper, property);
            var horizontal = new IncHorizontalControl <TInput>(label, input, validation);

            configuration.Do(r => r(horizontal));

            return(horizontal.ToHtmlString());
        }
 public IncHorizontalControl(IncLabelControl label, TInput input, IncControlBase validation)
 {
     Label = label;
     Label.AddClass(IncodingHtmlHelper.BootstrapVersion == BootstrapOfVersion.v3 ? "control-label col-md-3" : "control-label");
     Input = input;
     if (IncodingHtmlHelper.BootstrapVersion == BootstrapOfVersion.v3)
     {
         Input.AddClass("form-control");
     }
     Validation = validation;
     HelpBlock  = new IncHelpBlockControl();
     AddClass(IncodingHtmlHelper.BootstrapVersion == BootstrapOfVersion.v3 ? "form-group col-md-12" : "control-group");
 }