| | |
| | | /// 删除设备后需要更新界面的回调 |
| | | /// </summary> |
| | | public Action action; |
| | | |
| | | /// <summary> |
| | | /// 记录当前设备 |
| | | /// </summary> |
| | | public IntType currnetIntType= IntType.none; |
| | | |
| | | public VerticalScrolViewLayout vv; |
| | |
| | | }); |
| | | } |
| | | /// <summary> |
| | | /// 切换界面 |
| | | ///1 = 播放器 |
| | | ///2 = 功放 |
| | | ///3 = 电视 |
| | | ///4 = 机顶盒 |
| | | ///5 = 投影仪 |
| | | ///6 = 万能遥控器 |
| | | /// 切换界面(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器) |
| | | /// </summary> |
| | | private void SwitchUI(IntType type) |
| | | { |
| | |
| | | }; |
| | | } |
| | | break; |
| | | case IntType.HiFi: { } break; |
| | | case IntType.HiFi: { |
| | | GFPage gFPage = new GFPage(); |
| | | this.vv.AddChidren(gFPage); |
| | | gFPage.Show(); |
| | | gFPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | |
| | | } break; |
| | | case IntType.TV: { } break; |
| | | case IntType.STB: { } break; |
| | | case IntType.Projector: { } break; |
| | | case IntType.Projector: { |
| | | TYYPage tYYPage = new TYYPage(); |
| | | this.vv.AddChidren(tYYPage); |
| | | tYYPage.Show(); |
| | | tYYPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | } break; |
| | | case IntType.Control: { } break; |
| | | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 选中类型 |
| | | ///1 = 播放器 |
| | | ///2 = 功放 |
| | | ///3 = 电视 |
| | | ///4 = 机顶盒 |
| | | ///5 = 投影仪 |
| | | ///6 = 万能遥控器 |
| | | /// 选中类型弹框(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器) |
| | | /// </summary> |
| | | /// <param name="button">显示文本</param> |
| | | private void SelectedType() |
| | | { |
| | | var deviceTypeList = GetTypeDictionary().Values.ToList(); |
| | | ///之前的状态文本 |
| | | string currCondition = Language.StringByID(StringId.bofangqi); |
| | | string ccurrnetDeviceStr= this.GetValueString(this.currnetIntType); |
| | | PublicInterface conditionView = new PublicInterface(); |
| | | conditionView.SingleSelectionShow(this, deviceTypeList, "设备选择", currCondition |
| | | , (stateValue) => |
| | | conditionView.SingleSelectionShow(this, deviceTypeList, "设备选择", ccurrnetDeviceStr |
| | | , (valueStr) => |
| | | { |
| | | //界面显示选中值 |
| | | //button.Text = stateValue; |
| | | var intType = this.GetKeyIntType(stateValue); |
| | | var intType = this.GetKeyIntType(valueStr); |
| | | this.SwitchUI(intType); |
| | | |
| | | }); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// 初始化字典 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private Dictionary<IntType, string> GetTypeDictionary() |
| | |
| | | dic.Add(IntType.Control, Language.StringByID(StringId.xuniyaokongqi)); |
| | | return dic; |
| | | } |
| | | /// <summary> |
| | | /// 获取设备 |
| | | /// </summary> |
| | | /// <param name="value">(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器)</param> |
| | | /// <returns></returns> |
| | | private IntType GetKeyIntType(string value) |
| | | { |
| | | var dic = this.GetTypeDictionary(); |
| | |
| | | } |
| | | return IntType.none; |
| | | } |
| | | /// <summary> |
| | | /// 获取设备名称 |
| | | /// </summary> |
| | | /// <param name="key">(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器)</param> |
| | | /// <returns></returns> |
| | | private string GetValueString(IntType key) |
| | | { |
| | | var dic = this.GetTypeDictionary(); |