예제 #1
0
 public T AddEvent(string _EventName, UiFunction _PropValueFunc)
 {
     Myself.Events = Myself.Events ?? new Dictionary <string, List <UiFunction> >();
     if (!Myself.Events.ContainsKey(_EventName))
     {
         Myself.Events.Add(_EventName, new List <UiFunction>());
     }
     Myself.Events[_EventName].Add(_PropValueFunc);
     return(Myself);
 }
예제 #2
0
        public void AddProp(string _PropName, object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
        {
            if (_PropValue == null && _PropValueFunc == null && _Index == null)
            {
                return;
            }
            if (!this.ContainsKey(_PropName))
            {
                this.Add(_PropName, new Prop());
            }

            this[_PropName].Set(_PropValue, _PropValueFunc, _Index);
        }
예제 #3
0
        public void Set(object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
        {
            if (_PropValue != null)
            {
                this.Values = this.Values ?? new List <object>();
                this.Values.Add(_PropValue);
            }

            if (_PropValueFunc != null)
            {
                this.Funcs = this.Funcs ?? new List <UiFunction>();
                this.Funcs.Add(_PropValueFunc);
            }
            if (_Index != null)
            {
                if (this.Indexs == null)
                {
                    this.Indexs = new List <string>();
                }
                this.Indexs.Add(_Index);
            }
        }
예제 #4
0
 public T data_target(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("data-target", true));
 }
예제 #5
0
 public T aria_expanded(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-expanded", true));
 }
예제 #6
0
 public T aria_label(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-label", true));
 }
예제 #7
0
 public T type(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("type", value, fun, index));
 }
예제 #8
0
 public T AddContent(object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
 {
     Myself.Contents = Myself.Contents ?? new Prop();
     Myself.Contents.Set(_PropValue, _PropValueFunc, _Index);
     return(Myself);
 }
예제 #9
0
 public static T Button(string classes = null, string content = null, UiFunction ufunc = null)
 {
     return(New(Tag.button, classes, null, content).OnClick(ufunc));
 }
예제 #10
0
 public T OnChange(UiFunction ufunc)
 {
     return(AddEvent("onChange", ufunc));
 }
예제 #11
0
 public T placeholder(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("placeholder", value, fun, index));
 }
예제 #12
0
 public T For(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("for", value, fun, index));
 }
예제 #13
0
 public T activeClassName(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("activeClassName", value, fun, index));
 }
예제 #14
0
 public T height(int?value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("height", value, fun, index));
 }
예제 #15
0
 public T width(int?value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("width", value, fun, index));
 }
예제 #16
0
 public T href(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("href", value, fun, index));
 }
예제 #17
0
 public T Content(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddContent(value, fun, index));
 }
예제 #18
0
 public T aria_hidden(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-hidden", true));
 }
예제 #19
0
 //--------------------------------------- Events ---------------------------------//
 public T OnClick(UiFunction ufunc)
 {
     return(AddEvent("onClick", ufunc));
 }
예제 #20
0
 public T max(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("max", value, fun, index));
 }
예제 #21
0
 public T ShowIf(string var = null, UiFunction func = null)
 {
     return(AddProp("ShowIf", null, func, var));
 }
예제 #22
0
 public T colspan(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("colspan", value, fun, index));
 }
예제 #23
0
 public T AddProp(string _PropName, object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
 {
     Myself.Props = Myself.Props ?? new PropList();
     Myself.Props.AddProp(_PropName, _PropValue, _PropValueFunc, _Index);
     return(Myself);
 }
예제 #24
0
 public T role(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("role", true));
 }
예제 #25
0
 public T rows(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("rows", value, fun, index));
 }
예제 #26
0
 public T AddValidator(UiFunction func)
 {
     Validators = Validators ?? new List <UiFunction>();
     Validators.Add(func);
     return(Myself);
 }