예제 #1
0
파일: DFBind.cs 프로젝트: Hengle/Tetris-1
 public static ISubscription bind <A, Control>(
     this RxList <A> list, int max, string maxName,
     Fn <int, Control> getControl, Act <Control, A> onChange
     ) where Control : dfControl
 {
     return(list.bind(max, maxName, (i, observable) => {
         var control = getControl(i);
         return observable.subscribe(opt => {
             control.SetIsActive(opt.isDefined);
             opt.each(v => onChange(control, v));
         });
     }));
 }