HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/groupControl_blue.pngHDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/groupControl_white.pngHDL-ON_Android/HDL-ON_Android.csproj
@@ -400,7 +400,7 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen1.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\selectlocation.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\ColorfulBar.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\groupControl_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_white.png" /> <AndroidAsset Include="Assets\h5\index.html" /> <AndroidAsset Include="Assets\h5\static\index.63b34199.css" /> HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1560,8 +1560,8 @@ <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockClose1.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen1.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Light\ColorfulBar.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_white.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\groupControl_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\groupControl_white.png" /> <BundleResource Include="Resources\h5\index.html" /> <BundleResource Include="Resources\h5\static\index.63b34199.css" /> <BundleResource Include="Resources\h5\static\images\coal-save-ic.png" /> HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/groupControl_blue.pngHDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/groupControl_white.pngHDL_ON/Entity/Function/Function.cs
@@ -100,7 +100,7 @@ /// <returns></returns> public FunctionAttributes GetAttribute(string key) { var attr = attributes.Find((a) => a.key == key); var attr = GetFunctionAttributes().Find((a) => a.key == key); return attr; } @@ -799,11 +799,36 @@ public SceneFunction ConvertSceneFunction() { var sFunc = new SceneFunction(); var list = new List<FunctionAttributes>(); if(spk == SPK.GroupControl) { var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); if (gc != null) { foreach (var temp in gc.sids) { var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid); if (light != null) { foreach (var attr in light.attributes) { if (list.Find((obj) => obj.key == attr.key) == null) { list.Add(attr); } } } } } } foreach (var attr in attributes) else { list.AddRange(attributes); } foreach (var attr in list) { //窗帘同时发送开关跟百分比会有问题, if(spk == SPK.CurtainRoller || spk == SPK.CurtainTrietex || spk == SPK.CurtainDream) HDL_ON/Entity/Function/Scene.cs
@@ -560,6 +560,10 @@ private Function ConvertFunctionObject() { var localFunction = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.sid == sid); if(localFunction == null) { localFunction = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); } return localFunction; } HDL_ON/UI/MainPage.cs
@@ -530,7 +530,10 @@ public static int LoadEvent_BackAction() { int result = 0; Application.RunOnMainThread(() => { try { if (Inverter.Ins.H5Page.Parent != null) { @@ -554,6 +557,8 @@ { result = 2;//无法再后退,可以执行退到桌面 } else { if (BasePageView.ChildrenCount > 1) { int index = BasePageView.ChildrenCount - 1; @@ -597,6 +602,11 @@ { result = 2;//无法再后退,可以执行退到桌面 } } }catch(Exception ex) { MainPage.Log($"加载安卓后退异常:{ex.Message}"); } }); return result; } HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -931,6 +931,7 @@ { name = "群控测试", collect = true, sid = "234567876545678765", uids = new List<string>() { "1405771024583090178", HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -80,6 +80,10 @@ /// </summary> Button btnChangeScene; /// <summary> /// 切换显示场组控按钮 /// </summary> Button btnChangeGroupControl; /// <summary> /// 功能显示区域 /// </summary> PageLayout contentView; @@ -92,6 +96,10 @@ /// </summary> VerticalScrolViewLayout sceneFunctionView; /// <summary> /// 组控控制区域 /// </summary> VerticalScrolViewLayout gcFunctionView; /// <summary> /// 功能区域集合 /// </summary> List<FrameLayout> functionViews; @@ -100,8 +108,11 @@ #region 区域变量 /// <summary> /// 当前显示对控制类型是否是设备功能控制 /// 0 功能 /// 1 场景 /// 2 群控 /// </summary> bool CurShowTypeIsFunction = true; int CurShowTypeContent = 0; #endregion #region 报警信息 @@ -149,10 +160,7 @@ bodyView.EndHeaderRefreshing(); Common.ApiUtlis.Ins.DownloadData(); LoadContentView(); if (!CurShowTypeIsFunction) { contentView.PageIndex = 1; } contentView.PageIndex = CurShowTypeContent; }; topView = new FrameLayout() { @@ -172,10 +180,7 @@ refreshLayout.EndHeaderRefreshing(); Common.ApiUtlis.Ins.DownloadData(); LoadContentView(); if(!CurShowTypeIsFunction) { contentView.PageIndex = 1; } contentView.PageIndex = CurShowTypeContent; }; topView = new FrameLayout() { @@ -565,6 +570,78 @@ bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(20), BackgroundColor = 0x00000000 }); if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) { changeView = new FrameLayout() { //Y = Application.GetRealHeight(20) + topView.Bottom, Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(334), Height = Application.GetRealHeight(62), BackgroundImagePath = "Collection/ChangeViewbg.png", }; bodyView.AddChidren(changeView); btnChangeFunction = new Button() { X = Application.GetRealWidth(10), Width = Application.GetRealWidth(114 - 10), TextID = StringId.Functions, SelectedTextColor = CSS_Color.MainColor, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.HeadlineFontSize, TextAlignment = TextAlignment.Center, IsSelected = true, IsBold = true, }; changeView.AddChidren(btnChangeFunction); Button btnLine = new Button() { X = btnChangeFunction.Right, Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(1), Height = Application.GetRealHeight(14), BackgroundColor = CSS_Color.PromptingColor1, }; changeView.AddChidren(btnLine); btnChangeScene = new Button() { X = btnLine.Right, Width = Application.GetRealWidth(114 - 10), TextID = StringId.Scenes, SelectedTextColor = CSS_Color.MainColor, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.Center, }; changeView.AddChidren(btnChangeScene); Button btnLine2 = new Button() { X = btnChangeScene.Right, Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(1), Height = Application.GetRealHeight(14), BackgroundColor = CSS_Color.PromptingColor1, }; changeView.AddChidren(btnLine2); btnChangeGroupControl = new Button() { X = btnLine2.Right, Width = Application.GetRealWidth(114 - 10), TextID = StringId.GroupControl, SelectedTextColor = CSS_Color.MainColor, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.Center, }; changeView.AddChidren(btnChangeGroupControl); } else { changeView = new FrameLayout() { //Y = Application.GetRealHeight(20) + topView.Bottom, @@ -610,6 +687,7 @@ TextAlignment = TextAlignment.Center, }; changeView.AddChidren(btnChangeScene); } #endregion #region ContextView @@ -667,12 +745,12 @@ sceneFunctionView = new VerticalScrolViewLayout(); contentView.AddChidren(sceneFunctionView); LoadSceneFunctionControlZone(); if (CurShowTypeIsFunction) contentView.PageIndex = CurShowTypeContent; if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) { contentView.PageIndex = 0; }else { contentView.PageIndex = 1; gcFunctionView = new VerticalScrolViewLayout(); contentView.AddChidren(gcFunctionView); LoadGroupControlFunctionControlZone(); } LoadEvent_ChangeShowedFunctionType(); @@ -704,15 +782,13 @@ sceneFunctionView = new VerticalScrolViewLayout(); contentView.AddChidren(sceneFunctionView); LoadSceneFunctionControlZone(); if (CurShowTypeIsFunction) if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) { contentView.PageIndex = 0; gcFunctionView = new VerticalScrolViewLayout(); contentView.AddChidren(gcFunctionView); LoadGroupControlFunctionControlZone(); } else { contentView.PageIndex = 1; } contentView.PageIndex = CurShowTypeContent; LoadEvent_ChangeShowedFunctionType(); @@ -739,7 +815,7 @@ int index = 0; var list = new List<Function>(); list.AddRange(FunctionList.List.GetDeviceFunctionList()); list.AddRange(FunctionList.List.groupControls);//加入群控 //list.AddRange(FunctionList.List.groupControls);//加入群控 foreach (var function in list) { //音乐模块有主从关系,需要特殊处理 @@ -833,8 +909,93 @@ } deviceFunctionView.AddChidren(new Button { Height = Application.GetRealHeight(30) }); #endregion } /// <summary> /// 加载群控功能显示区域 /// </summary> void LoadGroupControlFunctionControlZone() { #region ContextView gcFunctionView.RemoveAll(); functionViews.Clear(); var rowView = new FrameLayout(); try { int index = 0; foreach (var function in FunctionList.List.groupControls) { if (index % 2 == 0) { rowView = new FrameLayout() { Height = Application.GetRealWidth(140), }; gcFunctionView.AddChidren(rowView); } var functionView_X = Application.GetRealWidth((182 + 7) * (index % 2)); if (index % 2 == 0) { functionView_X += Application.GetRealWidth(7); } var functionView = new FrameLayout() { X = functionView_X, Width = Application.GetRealWidth(182), Height = Application.GetRealWidth(140), Radius = (uint)Application.GetRealWidth(12), Tag = function.sid }; rowView.AddChidren(functionView); functionViews.Add(functionView); var btnbg = new Button() { UnSelectedImagePath = "Collection/Functionbg.png", SelectedImagePath = "Collection/FunctionOnbg.png", Tag = function.sid }; functionView.AddChidren(btnbg); LoadDeviceFunctionDiv(functionView, function); index++; } if (index == 0) { var view = new FrameLayout(); deviceFunctionView.AddChidren(view); var btnNoCollectionBg = new Button() { Y = Application.GetRealHeight(20), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(180), Height = Application.GetRealWidth(180), UnSelectedImagePath = "Collection/NoCollectionBg.png", }; view.AddChidren(btnNoCollectionBg); var btnNoCollectionTip = new Button() { Height = Application.GetRealHeight(42), Y = btnNoCollectionBg.Bottom, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, //TextID = StringId.TipNoFunctionCollcetion, }; view.AddChidren(btnNoCollectionTip); } } catch (Exception ex) { MainPage.Log("homepage error : " + ex.Message); } gcFunctionView.AddChidren(new Button { Height = Application.GetRealHeight(30) }); #endregion } /// <summary> /// 加载场景功能显示区域 /// </summary> @@ -1060,6 +1221,7 @@ SelectedImagePath = "Collection/CollectionWhiteIcon.png", UnSelectedImagePath = "Collection/CollectionIcon.png", }; if (function.spk != SPK.GroupControl)//群控默认显示 view.AddChidren(btnCollection); //2020-12-16 如果是成员隐藏收藏功能 //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -334,16 +334,9 @@ btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeScene.IsSelected = false; btnChangeScene.IsBold = false; CurShowTypeIsFunction = true; CurShowTypeContent = 0; contentView.PageIndex = 0; }; //var client = new BlufiClient(); //client.PostPackageLengthLimit = 128; //client.RequestDeviceScan(); //client.RequestDeviceStatus(); //client.BlufiDelegate.Blufi_DidReceiveDeviceScanResponse(); btnChangeScene.MouseUpEventHandler = (sender, e) => { @@ -353,7 +346,7 @@ btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeFunction.IsSelected = false; btnChangeFunction.IsBold = false; CurShowTypeIsFunction = false; CurShowTypeContent = 1; contentView.PageIndex = 1; }; @@ -368,7 +361,7 @@ btnChangeScene.IsSelected = false; btnChangeScene.IsBold = false; } else else if (contentView.PageIndex == 1) { btnChangeScene.IsSelected = true; btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; @@ -378,6 +371,93 @@ btnChangeFunction.IsBold = false; } }; if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) { btnChangeGroupControl.MouseUpEventHandler = (sender, e) => { btnChangeFunction.IsSelected = false; btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeFunction.IsBold = false; btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeScene.IsSelected = false; btnChangeScene.IsBold = false; btnChangeGroupControl.IsSelected = true; btnChangeGroupControl.TextSize = CSS.CSS_FontSize.HeadlineFontSize; btnChangeGroupControl.IsBold = true; CurShowTypeContent = 2; contentView.PageIndex = 2; }; btnChangeFunction.MouseUpEventHandler = (sender, e) => { btnChangeFunction.IsSelected = true; btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; btnChangeFunction.IsBold = true; btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeScene.IsSelected = false; btnChangeScene.IsBold = false; CurShowTypeContent = 0; contentView.PageIndex = 0; btnChangeGroupControl.IsSelected = false; btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeGroupControl.IsBold = false; }; btnChangeScene.MouseUpEventHandler = (sender, e) => { btnChangeScene.IsSelected = true; btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; btnChangeScene.IsBold = true; btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeFunction.IsSelected = false; btnChangeFunction.IsBold = false; CurShowTypeContent = 1; contentView.PageIndex = 1; btnChangeGroupControl.IsSelected = false; btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeGroupControl.IsBold = false; }; contentView.PageChange = (sender, e) => { if (contentView.PageIndex == 0) { btnChangeFunction.IsSelected = true; btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; btnChangeFunction.IsBold = true; btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeScene.IsSelected = false; btnChangeScene.IsBold = false; btnChangeGroupControl.IsSelected = false; btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeGroupControl.IsBold = false; } else if (contentView.PageIndex == 1) { btnChangeScene.IsSelected = true; btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; btnChangeScene.IsBold = true; btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeFunction.IsSelected = false; btnChangeFunction.IsBold = false; btnChangeGroupControl.IsSelected = false; btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeGroupControl.IsBold = false; } else if (contentView.PageIndex == 2) { btnChangeFunction.IsSelected = false; btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeFunction.IsBold = false; btnChangeScene.TextSize = CSS.CSS_FontSize.TextFontSize; btnChangeScene.IsSelected = false; btnChangeScene.IsBold = false; btnChangeGroupControl.IsSelected = true; btnChangeGroupControl.TextSize = CSS.CSS_FontSize.HeadlineFontSize; btnChangeGroupControl.IsBold = true; } }; } } /// <summary> HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -446,6 +446,7 @@ }; if ( !SPK.ArmSensorSpkList().Contains(function.spk) && function.spk != SPK.DoorLock && function.spk != SPK.GroupControl && !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && { bodyDiv.AddChidren(btnCollectionIcon); HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -485,12 +485,19 @@ scene.functions.Remove(scenefunction); continue; } try { //将spk实体里面的min max值放入场景功能实体里,要不然数据会丢失 2022-06-21 16:06:45 foreach (var tt in scenefunction.status) { foreach (var tt in scenefunction.status) { tt.min = scenefunction.localFunction.GetAttribute(tt.key).min; tt.max = scenefunction.localFunction.GetAttribute(tt.key).max; tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value; } }catch(Exception ex) { MainPage.Log($"场景加载功能列表异常:{ex.Message}"); } i++; var row = new RowLayout() HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -1903,7 +1903,7 @@ } LoadFunctionRow(onOffStatus); if (sceneFunction.localFunction.spk == SPK.LightRGB) if (sceneFunction.localFunction.spk == SPK.LightRGB || sceneFunction.localFunction.spk == SPK.GroupControl) { var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); if (colorfulStatus != null) @@ -1982,6 +1982,9 @@ btnConfrim.MouseUpEventHandler = (sender, e) => { if (sceneFunction.localFunction.spk == SPK.GroupControl) { } else { if (isOnStatus) { if (isColorful) @@ -2001,11 +2004,10 @@ } else { if (isColorful) { } else { } sceneFunction.status.Clear(); sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "off" }); } } var temp = scene.functions.Find((obj) => obj.sid == sceneFunction.sid); if (temp != null) @@ -2066,7 +2068,7 @@ { if (view.Tag.ToString() != FunctionAttributeKey.OnOff) { if (isColorful) if (isColorful && sceneFunction.localFunction.spk == SPK.LightRGB) { if(view.Tag.ToString() != FunctionAttributeKey.Colorful) { HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
@@ -549,6 +549,12 @@ var groupControlTypes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupControlType>>(pack.Data.ToString()); if (groupControlTypes != null && groupControlTypes.Count > 0) { //groupControlType = new GroupControlType { // type = "LIGHT", // typeName ="灯光控制", // spks = new List<string> { "light.switch" }, // spkAttrs = new List<string> { "on_off" } //}; groupControlType = groupControlTypes[0]; Application.RunOnMainThread(() => { LoadLightRow(lightList); HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
@@ -84,11 +84,11 @@ UnSelectedImagePath = "Collection/CollectionGrayIcon.png", IsSelected = function.collect }; controlView.AddChidren(btnCollection); btnCollection.MouseUpEventHandler += (sender, e) => { btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected; function.CollectFunction(); }; //controlView.AddChidren(btnCollection); //btnCollection.MouseUpEventHandler += (sender, e) => { // btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected; // function.CollectFunction(); //};