| | |
| | | #endregion |
| | | |
| | | #region 区域变量 |
| | | /// <summary> |
| | | /// 需要显示的功能总数,影响到界面显示 |
| | | /// </summary> |
| | | int showdFunctionCount = 0; |
| | | Room room; |
| | | string showedFunctionRoomId = "0"; |
| | |
| | | { |
| | | Y = showdFunctionTypeRow.Bottom, |
| | | Height = Application.GetRealHeight(518 - 40 - 62), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(functionListView); |
| | | |
| | | foreach (var function in DB_ResidenceData.residenceData.functionList.functions) |
| | | foreach (var function in DB_ResidenceData.functionList.GetAllFunction()) |
| | | { |
| | | function.roomIdList.Remove(null); |
| | | if (function.roomIdList.Count > 0 ) |
| | |
| | | case FunctionCategory.Music: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png"; |
| | | break; |
| | | case FunctionCategory.Sensor: |
| | | switch(function.functionType) |
| | | { |
| | | case FunctionType.PM25: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconPm25.png"; |
| | | break; |
| | | case FunctionType.CO2: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconCO2.png"; |
| | | break; |
| | | case FunctionType.TVOC: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTVOC.png"; |
| | | break; |
| | | case FunctionType.Humidity: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconHumidity.png"; |
| | | break; |
| | | case FunctionType.Temp: |
| | | btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTemp.png"; |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (!btnAllocated.IsSelected) |
| | | { |
| | | var btnFunctionName = new Button() |
| | | { |
| | | X = btnFunctionIcon.Right + Application.GetRealWidth(3), |
| | | X = btnFunctionIcon.Right + Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(200), |
| | | Text = function.name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | { |
| | | var btnFunctionName = new Button() |
| | | { |
| | | X = btnFunctionIcon.Right + Application.GetRealWidth(3), |
| | | X = btnFunctionIcon.Right + Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(30), |
| | | Height = Application.GetRealHeight(40), |
| | | Text = function.name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | |
| | | |
| | | var btnFunctionFloorName = new Button() |
| | | { |
| | | X = btnFunctionIcon.Right + Application.GetRealWidth(3), |
| | | Y = btnFunctionName.Bottom, |
| | | X = btnFunctionIcon.Right + Application.GetRealWidth(12), |
| | | Y = Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(20), |
| | | Text = function.GetRoomListName(), |
| | |
| | | Height = Application.GetRealWidth(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | foreach (var tempRoom in DB_ResidenceData.residenceData.rooms) |
| | | foreach (var tempRoom in DB_ResidenceData.rooms) |
| | | { |
| | | |
| | | Button btnRoom = new Button() |