| | |
| | | /// 列表最大值 |
| | | /// </summary> |
| | | private int mListCount; |
| | | |
| | | public Action<KeypadEntity> selectAction = null; |
| | | /// <summary> |
| | | /// 按键回调 |
| | | /// </summary> |
| | | public Action<KeypadEntity> selectKeyAction = null; |
| | | /// <summary> |
| | | /// 影片回调 |
| | | /// </summary> |
| | | public Action<MovieLibrary> selectImageAction = null; |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity) |
| | | { |
| | | selectAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | } |
| | | }); |
| | | |
| | |
| | | /// 动态加载按键界面 |
| | | /// </summary> |
| | | /// <param name="mList">列表</param> |
| | | /// <param name="list">列表中索引,表示某一条宽度加宽</param> |
| | | /// <param name="list"> 列表中索引,表示某一条宽度加宽,没有默认(new List<int>)</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | public void LoadButtonPage(List<KeypadEntity> mList, List<int> list,int defaultIndex=-1) |
| | | { |
| | |
| | | { |
| | | if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity) |
| | | { |
| | | selectAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | } |
| | | }); |
| | | |
| | |
| | | return; |
| | | } |
| | | button.IsSelected = true; |
| | | selectAction?.Invoke((KeypadEntity)button.Tag); |
| | | selectKeyAction?.Invoke((KeypadEntity)button.Tag); |
| | | }; |
| | | button.MouseUpEventHandler += (sen, e) => |
| | | { |
| | |
| | | |
| | | imageFram.SetClickListener((fl) => |
| | | { |
| | | if (imageFram.Tag != null&& imageFram.Tag is KeypadEntity) |
| | | if (imageFram.Tag != null&& imageFram.Tag is MovieLibrary) |
| | | { |
| | | selectAction?.Invoke((KeypadEntity)imageFram.Tag); |
| | | selectImageAction?.Invoke((MovieLibrary)imageFram.Tag); |
| | | } |
| | | }); |
| | | //if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i) |
| | | //{ |
| | | // selectAction?.Invoke((int)imageFram.Tag); |
| | | // selectImageAction?.Invoke((int)imageFram.Tag); |
| | | //} |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="mRowNumber">一行多少个元素</param> |
| | | /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param> |
| | | public void LoadImagePage(List<KeypadEntity> mList, int mRowNumber) |
| | | public void LoadImagePage(List<MovieLibrary> mList, int mRowNumber) |
| | | { |
| | | if (mList == null || mList.Count == 0) |
| | | { |
| | |
| | | } |
| | | imageFram.SetClickListener((fl) => |
| | | { |
| | | if (imageFram.Tag != null) |
| | | if (imageFram.Tag != null && imageFram.Tag is MovieLibrary) |
| | | { |
| | | selectAction?.Invoke((KeypadEntity)imageFram.Tag); |
| | | selectImageAction?.Invoke((MovieLibrary)imageFram.Tag); |
| | | } |
| | | }); |
| | | |
| | | //if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i) |
| | | //{ |
| | | // selectAction?.Invoke((int)imageFram.Tag); |
| | | // selectImageAction?.Invoke((MovieLibrary)imageFram.Tag); |
| | | //} |
| | | |
| | | |
| | |
| | | keypad.category = filters.category; |
| | | keypad.filterValue = filters.filterValue; |
| | | keypad.filterName = filters.filterName; |
| | | selectAction?.Invoke(keypad); |
| | | selectKeyAction?.Invoke(keypad); |
| | | }; |
| | | horizontal.InitControl(filterCategory.filters, defaultIndex); |
| | | |