| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic coloring |
| | | 682=Group |
| | | |
| | | |
| | | |
| | |
| | | 679=组控 |
| | | 680=炫彩开关 |
| | | 681=自动炫彩测试 |
| | | 682=自动炫彩 |
| | | 682=群组 |
| | | |
| | | |
| | | |
| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic Coloring |
| | | 682=Group |
| | | 683= |
| | | |
| | | |
| | | |
| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic Coloring |
| | | 682=Group |
| | | |
| | | |
| | | |
| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic Coloring |
| | | 682=Group |
| | | |
| | | |
| | | |
| | |
| | | <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_white.png" /> |
| | | <AndroidAsset Include="Assets\h5\index.html" /> |
| | | <AndroidAsset Include="Assets\h5\static\index.63b34199.css" /> |
| | | <AndroidAsset Include="Assets\h5\static\images\coal-save-ic.png" /> |
| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorlockHelpImage4.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HorseRaceLampIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockBatteryManagementBg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\groupControl_white.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidResource Include="Resources\values\colors.xml" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.9.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307211"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.9.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307222"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--友盟--> |
| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic coloring |
| | | 682=Group |
| | | |
| | | |
| | | |
| | |
| | | 679=组控 |
| | | 680=炫彩开关 |
| | | 681=自动炫彩测试 |
| | | 682=自动炫彩 |
| | | 682=群组 |
| | | |
| | | |
| | | |
| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic Coloring |
| | | 682=Group |
| | | 683= |
| | | |
| | | |
| | | |
| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic Coloring |
| | | 682=Group |
| | | |
| | | |
| | | |
| | |
| | | 679=Group control |
| | | 680=Colorful switch |
| | | 681=Test |
| | | 682=Automatic Coloring |
| | | 682=Group |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 群组(跑马灯分组) |
| | | /// </summary> |
| | | public const int HorseRaceLampGroup = 682; |
| | | /// <summary> |
| | | /// 自动炫彩测试 |
| | | /// </summary> |
| | | public const int CulorfulTest = 681; |
| | |
| | | sceneFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(sceneFunctionView); |
| | | LoadSceneFunctionControlZone(); |
| | | contentView.PageIndex = CurShowTypeContent; |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) |
| | | { |
| | | gcFunctionView = new VerticalScrolViewLayout(); |
| | |
| | | GetUnreadPushMessages(); |
| | | RegisterGetPushMessageAction(); |
| | | |
| | | contentView.PageIndex = CurShowTypeContent; |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | |
| | | /// </summary> |
| | | void LoadGroupControlFunctionControlZone() |
| | | { |
| | | |
| | | #region ContextView |
| | | gcFunctionView.RemoveAll(); |
| | | functionViews.Clear(); |
| | |
| | | { |
| | | if (bodyView != null) |
| | | { |
| | | |
| | | if (FunctionList.List.groupControls.Count == 0) |
| | | { |
| | | bodyView.loadNavView(); |
| | | bodyView.contentView.PageIndex = 0; |
| | | } |
| | | bodyView.LoadGroupControlFunctionControlZone(); |
| | | } |
| | | } |
| | |
| | | // } |
| | | // Control.Ins.SendWriteCommand(function, d); |
| | | //} |
| | | else if (function.spk == SPK.GroupControl) |
| | | { |
| | | d.Add("on_off", function.trait_on_off.curValue.ToString()); |
| | | (function as GroupControl).Control(d); |
| | | } |
| | | else |
| | | { |
| | | d.Add("on_off", function.trait_on_off.curValue.ToString()); |
| | |
| | | { |
| | | case ShowFunction.Series: |
| | | functionCount = FunctionList.List.GetSeries().Count; |
| | | functionOnCount = FunctionList.List.GetSeries().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | //functionOnCount = FunctionList.List.GetSeries().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.IpCam: |
| | | functionCount = FunctionList.List.GetIpCamImouList().Count; |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "/" + functionCount, |
| | | }; |
| | | functionView.AddChidren(btnFunctionCount); |
| | | Button btnOpenCount = new Button() |
| | | if (item == ShowFunction.Series) |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnName.Bottom, |
| | | Width = Application.GetRealWidth(14 * functionCount.ToString().Length), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = functionOnCount.ToString(), |
| | | Tag = item + "_onCount", |
| | | BorderWidth = 0, |
| | | }; |
| | | functionView.AddChidren(btnOpenCount); |
| | | btnFunctionCount.Text = functionCount.ToString(); |
| | | } |
| | | functionView.AddChidren(btnFunctionCount); |
| | | |
| | | if (item != ShowFunction.Series) |
| | | { |
| | | Button btnOpenCount = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnName.Bottom, |
| | | Width = Application.GetRealWidth(14 * functionCount.ToString().Length), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = functionOnCount.ToString(), |
| | | Tag = item + "_onCount", |
| | | BorderWidth = 0, |
| | | }; |
| | | functionView.AddChidren(btnOpenCount); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.Classification |
| | | { |
| | | /// <summary> |
| | | /// 跑马灯页面 |
| | | /// 序列页面 |
| | | /// </summary> |
| | | public class SeriesFunctionListPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | |
| | | |
| | | Dictionary<string, List<Button>> dicGroupButtons = new Dictionary<string, List<Button>>(); |
| | | |
| | | List<string> oidList = new List<string>(); |
| | | |
| | | foreach(var rgb in FunctionList.List.GetLightList()) |
| | | { |
| | | if(rgb.spk == SPK.LightRGB) |
| | | //if(rgb.spk == SPK.LightRGB) |
| | | { |
| | | if (rgb.GetAttribute(FunctionAttributeKey.Colorful) == null) |
| | | var oid = rgb.sid.Substring(0, 16); |
| | | if (oidList.Contains(oid)) |
| | | { |
| | | continue; |
| | | } |
| | | List<Button> groupButtons = new List<Button>(); |
| | | var list = new List<Function>(); |
| | | list.Add(rgb); |
| | | var oid = rgb.sid.Substring(0, 16); |
| | | var seriesList = FunctionList.List.GetSeries().FindAll((obj) => obj.sid.StartsWith(oid)); |
| | | if (seriesList.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | oidList.Add(oid); |
| | | var list = new List<Function>(); |
| | | List<Button> groupButtons = new List<Button>(); |
| | | list.AddRange(seriesList); |
| | | var groupView = new VerticalScrolViewLayout() |
| | | { |
| | |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.MainColor, |
| | | Text = rgb.name, |
| | | Text =Language.StringByID( StringId.HorseRaceLampGroup )+ " "+ oidList.Count.ToString(), |
| | | }; |
| | | if(Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnTitle.Text = Language.StringByID(StringId.HorseRaceLampGroup) + oidList.Count.ToString(); |
| | | } |
| | | titleView.AddChidren(btnTitle); |
| | | |
| | | #endregion |
| | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | if (isAdd) |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView(); |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView(); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | FunctionList.List.groupControls.Remove(groupControl);//var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid); |
| | | var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid); |
| | | FunctionList.List.groupControls.Remove(delTemp); |
| | | //list.Remove(groupControl); |
| | | this.RemoveFromParent(); |
| | | delAction?.Invoke(); |
| | |
| | | { |
| | | try |
| | | { |
| | | var newEditDataString = Newtonsoft.Json.JsonConvert.SerializeObject(this.groupControl); |
| | | //没有更新数据则直接退出 |
| | | if (newEditDataString == editDataString) |
| | | { |
| | | this.RemoveFromParent(); |
| | | return; |
| | | } |
| | | //var newEditDataString = Newtonsoft.Json.JsonConvert.SerializeObject(this.groupControl); |
| | | //var newEditDataString1 = Newtonsoft.Json.JsonConvert.SerializeObject(groupControlLightList); |
| | | //var newEditDataString2 = Newtonsoft.Json.JsonConvert.SerializeObject(this.groupControl.sids); |
| | | ////没有更新数据则直接退出 |
| | | //if (newEditDataString == editDataString && newEditDataString1 == newEditDataString2) |
| | | //{ |
| | | // this.RemoveFromParent(); |
| | | // return; |
| | | //} |
| | | groupControl.sids.Clear(); |
| | | foreach (var light in groupControlLightList) |
| | | { |
| | |
| | | public void LoadPage() |
| | | { |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView_AddIcon("CombinedDimming", |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_AddIcon("CombinedDimming", |
| | | (s,c)=>{ |
| | | try |
| | | { |
| | |
| | | { |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid); |
| | | FunctionList.List.groupControls.Remove(delTemp); |
| | | list.Remove(groupControl); |
| | | LoadGroupControlView(list); |
| | | } |
| | |
| | | btnStartColor.MouseUpEventHandler = (sender, e) => { |
| | | Action<uint> action = (color) => { |
| | | btnStartColor.BackgroundColor = color; |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulBegin, color); |
| | | //function.SetAttrState(FunctionAttributeKey.ColorfulBegin, color); |
| | | }; |
| | | var rgbView = new ColorfulSettingPage(function, action,true); |
| | | MainPage.BasePageView.AddChidren(rgbView); |
| | |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | backAction?.Invoke(curColor) ; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | var d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | if (isSatrtColor) |
| | | { |
| | | d.Add(FunctionAttributeKey.ColorfulBegin, redColor + "," + greenColor + "," + blueColor); |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulBegin, redColor + "," + greenColor + "," + blueColor); |
| | | var color = function.GetAttrState(FunctionAttributeKey.ColorfulEnd).Split(","); |
| | | var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | d.Add(FunctionAttributeKey.ColorfulEnd, sendColorString); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | |
| | | //var color = function.GetAttrState(FunctionAttributeKey.ColorfulEnd).Split(","); |
| | | //var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | //d.Add(FunctionAttributeKey.ColorfulEnd, sendColorString); |
| | | //d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | } |
| | | else |
| | | { |
| | | var color = function.GetAttrState(FunctionAttributeKey.ColorfulBegin).Split(","); |
| | | var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | d.Add(FunctionAttributeKey.ColorfulBegin, sendColorString); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | //var color = function.GetAttrState(FunctionAttributeKey.ColorfulBegin).Split(","); |
| | | //var sendColorString = color[0] + "," + color[1] + "," + color[2]; |
| | | //d.Add(FunctionAttributeKey.ColorfulBegin, sendColorString); |
| | | //d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | d.Add(FunctionAttributeKey.ColorfulEnd, redColor + "," + greenColor + "," + blueColor); |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulEnd, redColor + "," + greenColor + "," + blueColor); |
| | | } |
| | | //d.Add(FunctionAttributeKey.Colorful, "off"); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | this.RemoveFromParent(); |
| | | }; |
| | |
| | | } |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut) |
| | | { |
| | | bodyView.RemoveAll(); |
| | | |
| | | btnCollection_Out = btnCollectionIcon; |
| | | btnFunctionName_Out = btnFunctionNameOut; |
| | | btnFromFloor_Out = btnFromFloorOut; |
| | |
| | | //}; |
| | | |
| | | |
| | | |
| | | |
| | | //回退刷新信息事件 |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_SettingIcon( () => { |
| | |
| | | { |
| | | if (newGC != null) |
| | | { |
| | | btnFunctionName.Text = btnFunctionName_Out.Text = function.name; |
| | | function.roomIds = newGC.uids; |
| | | btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = newGC.GetUidListName(); |
| | | var localTemp = FunctionList.List.groupControls.Find((obj) => obj.deviceId == newGC.deviceId); |
| | | if(localTemp!= null) |
| | | { |
| | | try |
| | | { |
| | | localTemp.sids = newGC.sids; |
| | | localTemp.name = newGC.name; |
| | | localTemp.roomIds = newGC.roomIds; |
| | | localTemp.uids = newGC.uids; |
| | | } |
| | | catch { } |
| | | function = newGC; |
| | | btnFunctionName_Out.Text = function.name; |
| | | btnFromFloor_Out.Text = function.GetRoomListName(); |
| | | LoadPage(btnCollection, btnFunctionName, btnFunctionName); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | //属性设置区域 |
| | | var attrView = new VerticalScrolViewLayout() |
| | | VerticalScrolViewLayout attrView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(52), |
| | | Width = Application.GetRealWidth(343), |
| | | ScrollEnabled = false, |
| | | }; |
| | | //属性设置区域高度 |
| | | int attrViewHight = Application.GetRealHeight(18 + 22); |
| | | |
| | | |
| | | controlView.AddChidren(attrView); |
| | | |
| | | attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); |
| | | |
| | | btnSwitch = new Button() |
| | |
| | | function.Control(d); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | if (hadRGB) |
| | |
| | | btnSwitchIcon.IsSelected = btnSwitch.IsSelected; |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | dimmerBar.Progress = 0; |
| | | } |
| | | btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | |
| | | } |
| | |
| | | { |
| | | dimmerBar.Progress = 0; |
| | | } |
| | | btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | |
| | | //attrView.AddChidren(new Button() { Height = Application.GetRealHeight(10) }); |
| | |
| | | }; |
| | | controlView.AddChidren(dimmerBar); |
| | | |
| | | |
| | | dimmerBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | if (e == 0 && lastBrightness != 0) |
| | | { |
| | | btnSwitch.IsSelected = false; |
| | | lastBrightness = 0; |
| | | } |
| | | else |
| | | { |
| | | if (lastBrightness == 0) |
| | | lastBrightness = e; |
| | | btnSwitch.IsSelected = true; |
| | | } |
| | | if (e == 0 || e == 100) |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | } |
| | | else |
| | | { |
| | | if (350 < (DateTime.Now - function.refreshTime).TotalMilliseconds) |
| | | { |
| | | function.refreshTime = DateTime.Now; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Brightness, e.ToString()); |
| | | function.Control(d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); |
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | | }; |
| | | |
| | | |
| | | var btnMaxValuesText = new Button() |
| | | { |
| | | X = dimmerBar.Right, |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | controlView.AddChidren(btnMaxValuesText); |
| | | |
| | | btnSwitch.MouseUpEventHandler += (sender, e) => { |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | | dimmerBar.Progress = 100; |
| | | } |
| | | else |
| | | { |
| | | dimmerBar.Progress = 0; |
| | | } |
| | | }; |
| | | #endregion |
| | | |
| | | int heightMore = 375 - magriHeight-20; |
| | |
| | | }; |
| | | barColorTemplatrue.MinValue = 27; |
| | | barColorTemplatrue.MaxValue = 65; |
| | | barColorTemplatrue.Progress = 38; |
| | | barColorTemplatrue.ProgressBarColor = 0x00000000;//全部透明 |
| | | barColorTemplatrue.ProgressBarUnEnableColor = 0x00000000; |
| | | barColorTemplatrue.SeekBarBackgroundColor = 0x00000000; |
| | |
| | | var btnGradualChangeText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(375 + heightMore - magriHeight), |
| | | Y = hadCCT ? Application.GetRealHeight(375 + heightMore - magriHeight) : Application.GetRealHeight(heightMore+10), |
| | | Width = Application.GetRealWidth(224), |
| | | Height = Application.GetRealHeight(21), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | |
| | | var barColorful = new FrameLayout() |
| | | { |
| | | X = btnColorfulEdit.Right + Application.GetRealWidth(15+5), |
| | | Y = Application.GetRealHeight(412 + heightMore - magriHeight), |
| | | X = btnColorfulEdit.Right + Application.GetRealWidth(15 + 5), |
| | | Width = Application.GetRealWidth(170), |
| | | //X = Application.GetRealWidth(35), |
| | | //Width = Application.GetRealWidth(170 + 41), |
| | | Y = hadCCT ? Application.GetRealHeight(412 + heightMore - magriHeight) : Application.GetRealHeight(heightMore + 50), |
| | | Height = Application.GetRealHeight(8), |
| | | BackgroundImagePath = "FunctionIcon/Light/ColorfulBar.png", |
| | | }; |