示例#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 aria_label(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-label", 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 type(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("type", value, fun, index));
 }
示例#7
0
 public T role(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("role", true));
 }
示例#8
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);
 }
示例#9
0
 void IUiComponent.AddEvent(string _EventName, UiFunction _PropValueFunc)
 {
     this.AddEvent(_EventName, _PropValueFunc);
 }
示例#10
0
 public T For(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("for", value, fun, index));
 }
示例#11
0
 //--------------------------------------- Events ---------------------------------//
 public T OnClick(UiFunction ufunc)
 {
     return(AddEvent("onClick", ufunc));
 }
示例#12
0
 public T height(int?value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("height", 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 width(int?value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("width", value, fun, index));
 }
示例#15
0
 public T href(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("href", value, fun, index));
 }
示例#16
0
 public T Content(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddContent(value, fun, index));
 }
示例#17
0
 public T data_target(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("data-target", true));
 }
示例#18
0
 public T placeholder(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("placeholder", value, fun, index));
 }
示例#19
0
 public T aria_hidden(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-hidden", true));
 }
示例#20
0
 public T max(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("max", value, fun, index));
 }
示例#21
0
 public T OnChange(UiFunction ufunc)
 {
     return(AddEvent("onChange", ufunc));
 }
示例#22
0
 void IUiComponent.AddProp(string _PropName, object _PropValue, UiFunction _PropValueFunc, string _Index)
 {
     this.AddProp(_PropName, _PropValue, _PropValueFunc, _Index);
 }
示例#23
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);
 }
示例#24
0
 public T rows(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("rows", value, fun, index));
 }
示例#25
0
 public T colspan(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("colspan", value, fun, index));
 }
示例#26
0
 void IUiComponent.AddContent(object _PropValue, UiFunction _PropValueFunc, string _Index)
 {
     this.AddContent(_PropValue, _PropValueFunc, _Index);
 }