HDL-ON_Android/Assets/Language.ini | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_Android/Properties/AndroidManifest.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_iOS/Info.plist | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_iOS/Resources/Language.ini | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/ApiUtlis.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/HDLCommon.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Common/R.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/DAL/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/Entity/FunctionList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI1-Login/LoginPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/2-Classification/SceneControlZone.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SiriIntents/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL-ON_Android/Assets/Language.ini
@@ -564,6 +564,7 @@ 577=Close 578=Mechanical Arm 579=Cancellation 580=Are you sure to delete this combined dimming? @@ -1793,6 +1794,7 @@ 577=阀门已打开 578=机械手 579=立即注销 580=确定删除该组合调光吗? @@ -2999,7 +3001,7 @@ 577=Закрыть 578=Mechanical Arm 579=Cancellation 580=Are you sure to delete this combined dimming? 2532=Visitor Invitation Record 2533=Visitor management @@ -4212,6 +4214,8 @@ 577=Cerrar 578=Mechanical Arm 579=Cancellation 580=Are you sure to delete this combined dimming? 2532=Visitor Invitation Record 2533=Visitor management @@ -5409,6 +5413,7 @@ 576=Отворено 577=Затвори 579=Cancellation 580=Are you sure to delete this combined dimming? 1000=Влажност в стаята HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202211111"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202211161"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--友盟--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> <string>1.6.202210281</string> <string>1.6.202211161</string> <key>CFBundleVersion</key> <string>1.6.210281</string> <string>1.6.211161</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> HDL-ON_iOS/Resources/Language.ini
@@ -564,6 +564,7 @@ 577=Close 578=Mechanical Arm 579=Cancellation 580=Are you sure to delete this combined dimming? @@ -1793,6 +1794,7 @@ 577=阀门已打开 578=机械手 579=立即注销 580=确定删除该组合调光吗? @@ -2999,7 +3001,7 @@ 577=Закрыть 578=Mechanical Arm 579=Cancellation 580=Are you sure to delete this combined dimming? 2532=Visitor Invitation Record 2533=Visitor management @@ -4212,6 +4214,8 @@ 577=Cerrar 578=Mechanical Arm 579=Cancellation 580=Are you sure to delete this combined dimming? 2532=Visitor Invitation Record 2533=Visitor management @@ -5409,6 +5413,7 @@ 576=Отворено 577=Затвори 579=Cancellation 580=Are you sure to delete this combined dimming? 1000=Влажност в стаята HDL_ON/Common/ApiUtlis.cs
@@ -51,6 +51,8 @@ /// 读取场景数据完成 /// </summary> bool complateScene = false; //线程结束时间 DateTime endTime1; /// <summary> /// 校验网关是否在线 @@ -69,7 +71,7 @@ /// <summary> /// 下载数据完成标记 /// </summary> public bool DownloadDataComplete = true; public bool DownloadDataComplete = false; /// <summary> /// 下载数据 /// </summary> @@ -77,8 +79,8 @@ { if (MainPage.InternetStatus == 0 || MainPage.NoLoginMode) return; //线程开始时间 var endTime = DateTime.Now.AddSeconds(5); endTime1 = DateTime.Now.AddSeconds(25); complateDevice = complateScene = false; MainPage.Log($"开始同步云端数据"); @@ -102,7 +104,6 @@ MainPage.Log($"刷新token失败"); return; } endTime = DateTime.Now.AddSeconds(5); MainPage.Log($"刷新token成功"); //===================刷新住宅信息======================= code = Ins.HttpRequest.GetHomePager(); @@ -111,7 +112,6 @@ MainPage.Log($"刷新住宅信息失败"); return; } endTime = DateTime.Now.AddSeconds(5); MainPage.Log($"刷新住宅信息成功"); //===================刷新个人信息======================= code = Ins.HttpRequest.GetUserInfo(); @@ -120,7 +120,6 @@ MainPage.Log($"刷新个人信息失败"); return; } endTime = DateTime.Now.AddSeconds(5); MainPage.Log($"刷新个人信息成功"); //int count = 0; @@ -148,7 +147,6 @@ var roomResult = Ins.HttpRequest.GetRoomList(); if (roomResult.Code == StateCode.SUCCESS) { endTime = DateTime.Now.AddSeconds(100); MainPage.Log($"读取房间信息成功"); var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<SpatialApiPack>(roomResult.Data.ToString()); if (revData == null) @@ -158,7 +156,6 @@ { SpatialInfo.CurrentSpatial.UpdateSpatialList(revData.list); } endTime = DateTime.Now.AddSeconds(5); } else { @@ -174,7 +171,6 @@ var deviceResult = Ins.HttpRequest.GetDeviceList("30", "1"); if (deviceResult.Code == StateCode.SUCCESS) { endTime = DateTime.Now.AddSeconds(5); //MainPage.Log($"读取设备信息成功"); //MainPage.Log($"sid列表获取====" + deviceResult.Data.ToString()); @@ -198,11 +194,10 @@ } catch (Exception ex) { } finally { complateDevice = true; } string delFile = ""; @@ -237,7 +232,6 @@ FunctionList.List.IniFunctionList(newFunction.savePath); MainPage.Log($"============设备============{iiii++}"); } endTime = DateTime.Now.AddSeconds(5); } else { @@ -250,7 +244,7 @@ finally { complateDevice = true; MainPage.Log($"============设备============完成"); MainPage.Log($"============设备============完成" + FunctionList.List.Functions.Count); } }) { IsBackground = true }.Start(); @@ -260,11 +254,10 @@ { try { complateScene = true; complateScene = false; var pack = Ins.HttpRequest.GetSceneList(); if (pack.Code == StateCode.SUCCESS) { endTime = DateTime.Now.AddSeconds(100); MainPage.Log($"读取场景数据成功"); var sceneList = JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString()); if (sceneList == null) @@ -306,7 +299,6 @@ IMessageCommon.Current.ShowErrorInfoAlter(packInfo.Code); } } endTime = DateTime.Now.AddSeconds(5); } else { @@ -424,8 +416,6 @@ Application.RunOnMainThread(() => { MainPage.Log($"结束读取云端数据线程"); endTime = DateTime.MinValue; DownloadDataComplete = true; if (waitPage != null) { waitPage.RemoveFromParent(); @@ -435,7 +425,13 @@ //不考虑网关情况,直接订阅 DAL.Mqtt.MqttClient.InitState(); FunctionList.List.Read3tyFunctionStatus(); try { FunctionList.List.Read3tyFunctionStatus(); }catch(Exception ex) { MainPage.Log("读取第三方设备状态失败:"+ex.Message); } } }); downloadDataThread.IsBackground = true; @@ -447,9 +443,9 @@ { try { while (endTime > DateTime.Now) while (endTime1 > DateTime.Now) { if (DownloadDataComplete && complateDevice && complateScene) if ( complateDevice && complateScene) { break; } @@ -481,37 +477,6 @@ } }) { IsBackground = true }.Start(); ////下载光伏数据 //new System.Threading.Thread(() => { // try // {//00 // HttpServerRequest http = new HttpServerRequest(); // var packData = http.GetInverterList(); // if (packData != null) // { // if (packData.Code == StateCode.SUCCESS) // { // var inverterList = JsonConvert.DeserializeObject<List<InverterInfo>>(packData.Data.ToString()); // if (inverterList!= null) // { // FunctionList.List.InverterList = inverterList; // } // } // } // } // catch (Exception ex) // { // MainPage.Log($"读取光伏数据异常:{ex.Message}"); // } //}) { IsBackground = true }.Start(); } /// <summary> HDL_ON/Common/HDLCommon.cs
@@ -102,7 +102,7 @@ NewVersionUrl = appVersionRes.packageUrl }; #if __IOS__ mForceUpdateInfo.NewVersionUrl = appVersionRes.iosUrl; mForceUpdateInfo.NewVersionUrl = appVersionRes.packageUrl; #endif //解析更新内容详情 //var reasonStrJson = GetReasonStrJson(appVersionRes.remark); HDL_ON/Common/R.cs
@@ -5,6 +5,10 @@ public static class StringId { /// <summary> /// 是否确定删除组合调光 /// </summary> public const int DoYouWantDelCombinedDimming = 580; /// <summary> /// 注销 /// </summary> public const int Cancellation = 579; HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </summary> public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> HDL_ON/Entity/FunctionList.cs
@@ -428,7 +428,6 @@ /// <summary> /// 删除场景 /// todo /// </summary> public void DeleteScene(Scene scene,bool upSevser) { HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -218,6 +218,7 @@ etAccount.Text = "tf@smarttech.com.ua"; etAccount.Text = "455740454@qq.com"; etAccount.Text = "18688565449"; etAccount.Text = "support7@hdlautomation.com"; } else { HDL_ON/UI/UI2/2-Classification/SceneControlZone.cs
@@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Threading; using HDL_ON.Common; using HDL_ON.DAL.Server; using HDL_ON.Entity; using HDL_ON.UI.CSS; @@ -128,7 +129,6 @@ { if (scene.functions.Count == 0) { var waitPage = new Loading(); new Thread(() => { @@ -206,6 +206,69 @@ btnName.MouseUpEventHandler = upEvent; btnFromFloor.MouseUpEventHandler = upEvent; this.MouseUpEventHandler = upEvent; EventHandler<MouseEventArgs> delEvent = (sender, e) => { Action action = () =>{ var waitPage = new Loading(); MainPage.BaseView.AddChidren(waitPage); waitPage.Start(""); new System.Threading.Thread(() => { try { var pm = new HttpServerRequest(); var packCode = pm.DeleteScene(scene.userSceneId); if (packCode == StateCode.SUCCESS) { FileUtlis.Files.DeleteFile(scene.savePath); try { foreach (var sss in FunctionList.List.scenes) { if (sss.userSceneId == scene.userSceneId) { FunctionList.List.scenes.Remove(sss); break; } } } catch { } Application.RunOnMainThread(() => { this.RemoveFromParent(); }); } else { Application.RunOnMainThread(() => { IMessageCommon.Current.ShowErrorInfoAlter(packCode); }); } } catch { } finally { Application.RunOnMainThread(() => { if(waitPage!= null) { waitPage.RemoveFromParent(); waitPage = null; } }); } }) { IsBackground = true }.Start(); }; new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DoYouWantDelCombinedDimming, action); }; btnName.MouseLongEventHandler = delEvent; btnFromFloor.MouseLongEventHandler = delEvent; this.MouseLongEventHandler = delEvent; } else { HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
@@ -254,8 +254,8 @@ contentView.AddChidren(btnMinValuesText); int progress = 0; int.TryParse(function.GetAttrState(FunctionAttributeKey.SetTemp),out progress); //int progress = 0; //int.TryParse(function.GetAttrState(FunctionAttributeKey.SetTemp),out progress); tempBar = new DiyImageSeekBar() { @@ -268,7 +268,7 @@ ThumbImageHeight = Application.GetRealHeight(51), ProgressBarColor = function.trait_on_off.curValue.ToString() == "on" ? curColor : CSS_Color.DividingLineColor, MaxValue = 14, Progress = progress - 16, Progress = setTempValue - 16, SeekBarPadding = Application.GetRealWidth(20), IsProgressTextShow = false, ProgressChangeDelayTime = 0, HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -375,6 +375,7 @@ public void ShowDialog() { commandDic.Clear(); commandDic.Add(FunctionAttributeKey.OnOff, "off"); listSwitch = lights.FindAll((obj) => obj.spk == SPK.LightSwitch); @@ -382,9 +383,31 @@ lightCCT = lights.FindAll((obj) => obj.spk == SPK.LightCCT); lightRGB = lights.FindAll((obj) => obj.spk == SPK.LightRGB); var hadDimming = lightDimming.Count > 0; var hadCCT = lightCCT.Count > 0; var hadRGB = lightRGB.Count > 0; if ( hadRGB) { commandDic.Add(FunctionAttributeKey.RGB, lightRGB[0].GetAttrState(FunctionAttributeKey.RGB)); commandDic.Add(FunctionAttributeKey.Brightness, lightRGB[0].GetAttrState(FunctionAttributeKey.Brightness)); } if (hadCCT) { commandDic.Add(FunctionAttributeKey.CCT, lightCCT[0].GetAttrState(FunctionAttributeKey.CCT)); if (!commandDic.ContainsKey(FunctionAttributeKey.Brightness)) { commandDic.Add(FunctionAttributeKey.Brightness, lightCCT[0].GetAttrState(FunctionAttributeKey.Brightness)); } } if (hadDimming) { if (!commandDic.ContainsKey(FunctionAttributeKey.Brightness)) { commandDic.Add(FunctionAttributeKey.Brightness, lightCCT[0].GetAttrState(FunctionAttributeKey.Brightness)); } } var bodyView = new FrameLayout(); this.AddChidren(bodyView); @@ -435,9 +458,17 @@ X = Application.GetRealWidth(12) + btnTitle.Right, Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Public/Edit.png", //SelectedImagePath = "Public/HookIcon.png" }; titleView.AddChidren(btnEditIcon); if (string.IsNullOrEmpty(scene.userSceneId)) { titleView.AddChidren(btnEditIcon); } else { btnTitle.Text = scene.name; btnTitle.Width = btnTitle.GetTextWidth()+ Application.GetRealWidth(10); btnTitle.Gravity = Gravity.Center; } Action<string> callBack = (str) => { @@ -646,175 +677,198 @@ contentView.AddChidren(bottomView); bottomView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); var btnCacel = new Button() if (string.IsNullOrEmpty(scene.userSceneId)) { Width = Application.GetRealWidth(172), Height = Application.GetRealHeight(44), TextAlignment = TextAlignment.Center, TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.TextualColor, TextID = StringId.Cancel, }; bottomView.AddChidren(btnCacel); var btnSave = new Button() { X = Application.GetRealWidth(172), Width = Application.GetRealWidth(172), Height = Application.GetRealHeight(46), BackgroundColor = CSS_Color.MainColor, TextColor = CSS_Color.MainBackgroundColor, TextAlignment = TextAlignment.Center, TextSize = CSS_FontSize.SubheadingFontSize, TextID = StringId.Save }; bottomView.AddChidren(btnSave); //例:右下圆角 大小为50 int mRectCornerID = HDLUtils.RectCornerBottomRight; btnSave.SetCornerWithSameRadius((uint)Application.GetRealWidth(14), mRectCornerID); btnCacel.MouseUpEventHandler = (sender, e) => { this.Close(); //var waitPage = new Loading(); //MainPage.BaseView.AddChidren(waitPage); //waitPage.Start(Language.StringByID(StringId.PleaseWait)); //new Thread(() => //{ // try // { // foreach (var light in lights) // { // Dictionary<string, string> sendDate = new Dictionary<string, string>(); // //赋值场景功能数据 // foreach (var attr in light.GetAttributes()) // { // if (commandDic.ContainsKey(attr)) // { // try // { // sendDate.Add(attr, commandDic[attr]); // } // catch { } // } // } // Control.Ins.SendWriteCommand(light, sendDate); // Thread.Sleep(50); // } // } // catch // { } // finally // { // Application.RunOnMainThread(() => // { // waitPage.Hide(); // new PublicAssmebly().TipMsgAutoClose("组合控制已执行", true); // if (waitPage != null) // { // //backAction(null); // waitPage.RemoveFromParent(); // } // }); // } //}) //{ IsBackground = true }.Start(); }; btnSave.MouseUpEventHandler = (sender, e) => { if (string.IsNullOrEmpty(scene.name)) var btnCacel = new Button() { new Tip() { CloseTime = 1, Text = Language.StringByID(StringId.NameCannotBeEmpty), Direction = AMPopTipDirection.None, }.Show(bodyView); return; } foreach (var tempRoom in FunctionList.List.scenes) Width = Application.GetRealWidth(172), Height = Application.GetRealHeight(44), TextAlignment = TextAlignment.Center, TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.TextualColor, TextID = StringId.Cancel, }; bottomView.AddChidren(btnCacel); var btnSave = new Button() { if (scene.name == tempRoom.name) X = Application.GetRealWidth(172), Width = Application.GetRealWidth(172), Height = Application.GetRealHeight(46), BackgroundColor = CSS_Color.MainColor, TextColor = CSS_Color.MainBackgroundColor, TextAlignment = TextAlignment.Center, TextSize = CSS_FontSize.SubheadingFontSize, TextID = StringId.Save }; bottomView.AddChidren(btnSave); //例:右下圆角 大小为50 int mRectCornerID = HDLUtils.RectCornerBottomRight; btnSave.SetCornerWithSameRadius((uint)Application.GetRealWidth(14), mRectCornerID); btnCacel.MouseUpEventHandler = (sender, e) => { this.Close(); //var waitPage = new Loading(); //MainPage.BaseView.AddChidren(waitPage); //waitPage.Start(Language.StringByID(StringId.PleaseWait)); //new Thread(() => //{ // try // { // foreach (var light in lights) // { // Dictionary<string, string> sendDate = new Dictionary<string, string>(); // //赋值场景功能数据 // foreach (var attr in light.GetAttributes()) // { // if (commandDic.ContainsKey(attr)) // { // try // { // sendDate.Add(attr, commandDic[attr]); // } // catch { } // } // } // Control.Ins.SendWriteCommand(light, sendDate); // Thread.Sleep(50); // } // } // catch // { } // finally // { // Application.RunOnMainThread(() => // { // waitPage.Hide(); // new PublicAssmebly().TipMsgAutoClose("组合控制已执行", true); // if (waitPage != null) // { // //backAction(null); // waitPage.RemoveFromParent(); // } // }); // } //}) //{ IsBackground = true }.Start(); }; btnSave.MouseUpEventHandler = (sender, e) => { if (string.IsNullOrEmpty(scene.name)) { new PublicAssmebly().TipMsg(StringId.Tip, StringId.NameAlreadyExists); new Tip() { CloseTime = 1, Text = Language.StringByID(StringId.NameCannotBeEmpty), Direction = AMPopTipDirection.None, }.Show(bodyView); return; } } var waitPage = new Loading(); MainPage.BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); new Thread(() => { try foreach (var tempRoom in FunctionList.List.scenes) { var serverScene = new Scene(); for (int i = 0; i < lights.Count; i++) if (scene.name == tempRoom.name) { var light = lights[i]; new PublicAssmebly().TipMsg(StringId.Tip, StringId.NameAlreadyExists); return; } } var waitPage = new Loading(); MainPage.BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); new Thread(() => { try { var serverScene = new Scene(); for (int i = 0; i < lights.Count; i++) { var light = lights[i]; //赋值场景功能数据 foreach (var attr in light.GetAttributes()) { if (commandDic.ContainsKey(attr)) { try if (commandDic.ContainsKey(attr)) { light.SetAttrState(attr, commandDic[attr]); try { light.SetAttrState(attr, commandDic[attr]); } catch { } } catch { } } } //转换场景的功能对象 var sceneFunction = light.ConvertSceneFunction(); //查询有没有存在 var temp = scene.functions.Find((obj) => obj.sid == sceneFunction.sid); //赋值 if (temp != null) { temp = sceneFunction; } else { scene.functions.Add(sceneFunction); } } var result = FunctionList.List.AddScene(scene, out serverScene); Application.RunOnMainThread(() => { if (result == StateCode.SUCCESS) { scene.userSceneId = serverScene.userSceneId; FunctionList.List.scenes.Add(scene); backAction?.Invoke(scene); this.Close(); } else { if (result == "124005") IMessageCommon.Current.ShowErrorInfoAlter(Language.StringByID(StringId.GatewayOffline)); { temp = sceneFunction; } else IMessageCommon.Current.ShowErrorInfoAlter(result); { scene.functions.Add(sceneFunction); } } }); } catch { } finally { Application.RunOnMainThread(() => { waitPage.Hide(); waitPage.RemoveFromParent(); }); } }) { IsBackground = true, Priority = ThreadPriority.AboveNormal }.Start(); }; var result = FunctionList.List.AddScene(scene, out serverScene); Application.RunOnMainThread(() => { if (result == StateCode.SUCCESS) { scene.userSceneId = serverScene.userSceneId; FunctionList.List.scenes.Add(scene); backAction?.Invoke(scene); this.Close(); } else { if (result == "124005") IMessageCommon.Current.ShowErrorInfoAlter(Language.StringByID(StringId.GatewayOffline)); else IMessageCommon.Current.ShowErrorInfoAlter(result); } }); } catch { } finally { Application.RunOnMainThread(() => { waitPage.Hide(); waitPage.RemoveFromParent(); }); } }) { IsBackground = true, Priority = ThreadPriority.AboveNormal }.Start(); }; } else { var btnCacel = new Button() { Height = Application.GetRealHeight(44), TextAlignment = TextAlignment.Center, TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.TextualColor, TextID = StringId.Close, }; bottomView.AddChidren(btnCacel); //例:右下圆角 大小为50 //int mRectCornerID = HDLUtils.RectCornerBottomRight; //btnSave.SetCornerWithSameRadius((uint)Application.GetRealWidth(14), mRectCornerID); btnCacel.MouseUpEventHandler = (sender, e) => { this.Close(); }; } @@ -833,8 +887,8 @@ /// <param name="attrView"></param> void LoadDimmingAttrView(VerticalScrolViewLayout attrView) { commandDic.TryAdd(FunctionAttributeKey.Percent, "0"); string briValue = ""; commandDic.TryGetValue(FunctionAttributeKey.Percent,out briValue); var dimmingView = new FrameLayout() { @@ -939,6 +993,10 @@ { #region 色温 string valueStr = "2700"; commandDic.TryGetValue(FunctionAttributeKey.Percent, out valueStr); int value = Convert.ToInt32(valueStr) / 100; var cctView = new FrameLayout() { Height = Application.GetRealHeight(54 + 11) @@ -1001,9 +1059,7 @@ barColorTemplatrue.SeekBarBackgroundColor = 0x00000000; cctView.AddChidren(barColorTemplatrue); barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2; var cct = 27; //int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.CCT).value, out cct); barColorTemplatrue.Progress = cct; barColorTemplatrue.Progress = value; //设置初始值 btnTempClolor.Text = Language.StringByID(StringId.ColorTemperature) + " " + (barColorTemplatrue.Progress * 100 + "K"); barColorTemplatrue.OnProgressChangedEvent = (sender, e) => @@ -1052,7 +1108,9 @@ { #region RGB commandDic.TryAdd(FunctionAttributeKey.RGB, "255,255,255"); string value = "255,255,255"; commandDic.TryGetValue(FunctionAttributeKey.Percent, out value); var rgbView = new FrameLayout() { @@ -1122,6 +1180,10 @@ string rgbString = (e2[0] + "," + e2[1] + "," + e2[2]).ToString(); commandDic[FunctionAttributeKey.RGB] = rgbString; btnCurColor.BackgroundColor = (uint)(0xFF000000 + tempLight.GetRGBcolor(rgbString)); foreach (var rgbTemp in lightRGB) { rgbTemp.SetAttrState(FunctionAttributeKey.RGB, rgbString); } }; colorPicker.MouseDownEventHandler += (sender, e) => { @@ -1139,6 +1201,14 @@ btnWhiteRound.Visible = true; } }; colorPicker.MouseUpEventHandler = (sender, e) => { foreach (var rgbTemp in lightRGB) { Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.RGB, tempLight.GetRGBcolorString(rgbTemp)); Control.Ins.SendWriteCommand(rgbTemp, d, false, 0); } }; colorPicker.MouseMoveEventHandler += (sender, e) => { SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </summary> public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary>