| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.UI.Music; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | } |
| | | LoadDiv(); |
| | | |
| | | if (function.functionCategory == FunctionCategory.Curtain || function.functionCategory == FunctionCategory.Scene)//窗帘没有开关按钮 |
| | | if (function.functionCategory == FunctionCategory.Curtain || function.functionCategory == FunctionCategory.Music || function.functionCategory == FunctionCategory.Scene)//窗帘没有开关按钮 |
| | | { |
| | | switch (function.functionCategory) |
| | | { |
| | | case FunctionCategory.Curtain: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; |
| | | CurtainFragment(); |
| | | break; |
| | | case FunctionCategory.Music: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png"; |
| | | MusicFragment(); |
| | | break; |
| | | case FunctionCategory.Scene: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Scene/SceneIcon.png"; |
| | |
| | | switch (function.functionType) |
| | | { |
| | | case FunctionType.AC: |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/AC/AcThinIcon.png"; |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; |
| | | LoadLastStatesButton(); |
| | | break; |
| | | case FunctionType.FloorHeating: |
| | |
| | | LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain); |
| | | #endregion |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载音乐功能控制卡片 |
| | | /// </summary> |
| | | void MusicFragment() |
| | | { |
| | | #region Music |
| | | var btnPrev = new Button() |
| | | { |
| | | X = Application.GetRealWidth(163), |
| | | Y = Application.GetRealHeight(58), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "MusicIcon/prev.png", |
| | | SelectedImagePath = "MusicIcon/prevSeletced.png", |
| | | }; |
| | | bodyDiv.AddChidren(btnPrev); |
| | | |
| | | var btnPlay = new Button() |
| | | { |
| | | X = Application.GetRealWidth(233), |
| | | Y = Application.GetRealHeight(58), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "MusicIcon/pause.png", |
| | | SelectedImagePath = "MusicIcon/play.png", |
| | | IsSelected = (function as A31MusicModel).A31PlayStatus.status == "play" , |
| | | Tag = function.functionType + "_State_" + function.sid |
| | | }; |
| | | bodyDiv.AddChidren(btnPlay); |
| | | |
| | | var btnNext = new Button() |
| | | { |
| | | X = Application.GetRealWidth(303), |
| | | Y = Application.GetRealHeight(58), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "MusicIcon/next.png", |
| | | SelectedImagePath = "MusicIcon/nextSelected.png", |
| | | }; |
| | | bodyDiv.AddChidren(btnNext); |
| | | LoadEvent_ControlMusic(btnPlay, btnNext, btnPrev, function as A31MusicModel); |
| | | #endregion |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载功能状态信息按钮 |
| | | /// </summary> |