| | |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | | { |
| | | /// <summary> |
| | | /// 埃克斯主界面 |
| | | /// </summary> |
| | | public class AksPage : FrameLayout |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | |
| | | /// 删除设备后需要更新界面的回调 |
| | | /// </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) |
| | | { |
| | |
| | | { |
| | | case IntType.Player: |
| | | { |
| | | AksMusicPage aksMusicPage = new AksMusicPage(); |
| | | this.vv.AddChidren(aksMusicPage); |
| | | aksMusicPage.Show(); |
| | | aksMusicPage.action += (type) => |
| | | MusicPage musicPage = new MusicPage(); |
| | | this.vv.AddChidren(musicPage); |
| | | musicPage.Show(); |
| | | musicPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | } |
| | | break; |
| | | case IntType.HiFi: { } break; |
| | | case IntType.TV: { } break; |
| | | case IntType.STB: { } break; |
| | | case IntType.Projector: { } break; |
| | | case IntType.Control: { } break; |
| | | case IntType.HiFi: |
| | | { |
| | | GfPage gfPage = new GfPage(); |
| | | this.vv.AddChidren(gfPage); |
| | | gfPage.Show(); |
| | | gfPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | |
| | | } |
| | | break; |
| | | case IntType.TV: |
| | | { |
| | | |
| | | TvPage tvPage = new TvPage(); |
| | | this.vv.AddChidren(tvPage); |
| | | tvPage.Show(); |
| | | tvPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | } |
| | | break; |
| | | case IntType.STB: |
| | | { |
| | | JdhPage jdhPage = new JdhPage(); |
| | | this.vv.AddChidren(jdhPage); |
| | | jdhPage.Show(); |
| | | jdhPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | } |
| | | break; |
| | | case IntType.Projector: |
| | | { |
| | | TyyPage tyyPage = new TyyPage(); |
| | | this.vv.AddChidren(tyyPage); |
| | | tyyPage.Show(); |
| | | tyyPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | } |
| | | break; |
| | | case IntType.Control: |
| | | { |
| | | YkqPage ykqPage = new YkqPage(); |
| | | this.vv.AddChidren(ykqPage); |
| | | ykqPage.Show(); |
| | | ykqPage.action += (type) => |
| | | { |
| | | SelectedType(); |
| | | }; |
| | | } |
| | | 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(); |