| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | 630=炫彩功能 |
| | | 631=起始颜色 |
| | | 632=结束颜色 |
| | | 633=工作时长 |
| | | 633=炫彩周期 |
| | | 634=推荐 |
| | | 635=当前颜色 |
| | | 636=色值号为6位(由纯数字/数字+字母组合) |
| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | 630=炫彩功能 |
| | | 631=起始颜色 |
| | | 632=结束颜色 |
| | | 633=工作时长 |
| | | 633=炫彩周期 |
| | | 634=推荐 |
| | | 635=当前颜色 |
| | | 636=色值号为6位(由纯数字/数字+字母组合) |
| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | 630=Colorful function |
| | | 631=Starting color |
| | | 632=End color |
| | | 633=Working hours |
| | | 633=Colorful cycle |
| | | 634=Recommen |
| | | 635=Current Color |
| | | 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |
| | |
| | | public static void Log(string msg) |
| | | { |
| | | #if DEBUG |
| | | if (msg.Contains("收到数据")) |
| | | Console.WriteLine(msg); |
| | | #endif |
| | | } |
| | |
| | | sceneFunctionInfo += " "+ perState.value + "°"; |
| | | } |
| | | |
| | | var perColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if(perColorful != null) |
| | | { |
| | | if(perColorful.value == "on") |
| | | sceneFunctionInfo += " " + Language.StringByID(StringId.HorseRaceLamp); |
| | | else |
| | | sceneFunctionInfo = Language.StringByID(StringId.Close) + " " + Language.StringByID(StringId.HorseRaceLamp); |
| | | } |
| | | |
| | | return sceneFunctionInfo; |
| | | } |
| | | |
| | |
| | | { |
| | | isColorful = true; |
| | | LoadColorfulRow(colorfulStatus); |
| | | isColorful = colorfulStatus.value == "on"; |
| | | } |
| | | } |
| | | foreach (var attr in sceneFunction.status) |
| | |
| | | { |
| | | if (isOnStatus) |
| | | { |
| | | |
| | | if (isColorful) |
| | | { |
| | | sceneFunction.status.Clear(); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "on" }); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.Colorful, value = "on" }); |
| | | } |
| | | else |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | this.RemoveFromParent(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | UpdataFunctionRow(); |
| | | } |
| | | |
| | | void UpdataFunctionRow() |
| | |
| | | |
| | | dialog.Show(); |
| | | |
| | | pView.MouseUpEventHandler = (sender, e) => { |
| | | pView.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | btnCancel.MouseUpEventHandler = (sender, e) => { |
| | | btnCancel.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | btnOn.MouseUpEventHandler = (sender, e) => |
| | |
| | | MainPage.Log($"场景配置异常3:{ex.Message}"); |
| | | } |
| | | }; |
| | | btnOff.MouseUpEventHandler = (sender,e) =>{ |
| | | btnOff.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | trait.value = "off"; |
| | | isOnStatus = false; |
| | | try |
| | | { |
| | | sceneFunction.status.Find((obj) => obj.key == trait.key).value = "off"; |
| | |
| | | btn.Text = trait.GetValueText() + trait.GetUintString(); |
| | | if (trait.key == FunctionAttributeKey.OnOff) |
| | | { |
| | | isOnStatus = false; |
| | | var temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness); |
| | | if (temp == null) |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | else if(function.spk == SPK.LightRGB) |
| | | { |
| | | contentView.AddChidren(new Button |
| | | { |
| | | Height = Application.GetRealHeight(8), |
| | | }); |
| | | //else if(function.spk == SPK.LightRGB) |
| | | //{ |
| | | // contentView.AddChidren(new Button |
| | | // { |
| | | // Height = Application.GetRealHeight(8), |
| | | // }); |
| | | |
| | | var list = FunctionList.List.GetSeries(); |
| | | foreach (var temp in list) |
| | | { |
| | | // var list = FunctionList.List.GetSeries(); |
| | | // foreach (var temp in list) |
| | | // { |
| | | |
| | | #region |
| | | var viewRow0 = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(viewRow0); |
| | | // #region |
| | | // var viewRow0 = new FrameLayout() |
| | | // { |
| | | // Height = Application.GetRealHeight(55), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | // }; |
| | | // contentView.AddChidren(viewRow0); |
| | | |
| | | |
| | | var btnRowTitle0 = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Text = temp.name, |
| | | }; |
| | | viewRow0.AddChidren(btnRowTitle0); |
| | | // var btnRowTitle0 = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(16), |
| | | // Width = Application.GetRealWidth(160), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.SubheadingFontSize, |
| | | // Text = temp.name, |
| | | // }; |
| | | // viewRow0.AddChidren(btnRowTitle0); |
| | | |
| | | var btnSwtichIcon0 = new Button() |
| | | { |
| | | X = Application.GetRealWidth(322), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(36), |
| | | Height = Application.GetMinRealAverage(36), |
| | | UnSelectedImagePath = "Public/Switch_2.png", |
| | | SelectedImagePath = "Public/SwitchOn_2.png", |
| | | }; |
| | | viewRow0.AddChidren(btnSwtichIcon0); |
| | | // var btnSwtichIcon0 = new Button() |
| | | // { |
| | | // X = Application.GetRealWidth(322), |
| | | // Gravity = Gravity.CenterVertical, |
| | | // Width = Application.GetMinRealAverage(36), |
| | | // Height = Application.GetMinRealAverage(36), |
| | | // UnSelectedImagePath = "Public/Switch_2.png", |
| | | // SelectedImagePath = "Public/SwitchOn_2.png", |
| | | // }; |
| | | // viewRow0.AddChidren(btnSwtichIcon0); |
| | | |
| | | DeviceMessageRules deviceMessageRules = new DeviceMessageRules() |
| | | { |
| | | deviceId = function.deviceId |
| | | }; |
| | | // DeviceMessageRules deviceMessageRules = new DeviceMessageRules() |
| | | // { |
| | | // deviceId = function.deviceId |
| | | // }; |
| | | |
| | | btnSwtichIcon0.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | // btnSwtichIcon0.MouseUpEventHandler = (sender, e) => |
| | | // { |
| | | |
| | | }; |
| | | // }; |
| | | |
| | | viewRow0.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(54), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(1) |
| | | }); |
| | | #endregion |
| | | } |
| | | // viewRow0.AddChidren(new Button() |
| | | // { |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Y = Application.GetRealHeight(54), |
| | | // BackgroundColor = CSS_Color.DividingLineColor, |
| | | // Width = Application.GetRealWidth(343), |
| | | // Height = Application.GetRealHeight(1) |
| | | // }); |
| | | // #endregion |
| | | // } |
| | | |
| | | } |
| | | //} |
| | | |
| | | LoadEventList(); |
| | | } |
| | |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.Stan; |
| | | using HDL_ON.UI.CSS; |
| | |
| | | btnStartColor.BackgroundColor = color; |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulBegin, color); |
| | | }; |
| | | var rgbView = new ColorfulSettingPage(action); |
| | | var rgbView = new ColorfulSettingPage(function, action,true); |
| | | MainPage.BasePageView.AddChidren(rgbView); |
| | | rgbView.LoadPage(function.GetAttrState(FunctionAttributeKey.ColorfulBegin)); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | Radius = (uint)Application.GetRealWidth(14), |
| | | BorderColor = CSS_Color.DividingLineColor, |
| | | BorderWidth = 1, |
| | | BackgroundColor = (uint)(0xFF000000 + lightTemp.GetRGBcolor(function.GetAttrState(FunctionAttributeKey.ColorfulBegin))) |
| | | BackgroundColor = (uint)(0xFF000000 + lightTemp.GetRGBcolor(function.GetAttrState(FunctionAttributeKey.ColorfulEnd))) |
| | | }; |
| | | endColorView.AddChidren(btnEndColor); |
| | | |
| | |
| | | btnEndColor.BackgroundColor = color; |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulEnd, color); |
| | | }; |
| | | var rgbView = new ColorfulSettingPage(action); |
| | | var rgbView = new ColorfulSettingPage(function, action,false); |
| | | MainPage.BasePageView.AddChidren(rgbView); |
| | | rgbView.LoadPage(function.GetAttrState(FunctionAttributeKey.ColorfulEnd)); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region 工作时长 |
| | | #region 炫彩周期 |
| | | var workHoursView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | |
| | | btnWorkHours.Text = hour + "时"; |
| | | btnWorkHours.Text += minute + "分"; |
| | | btnWorkHours.Text += second + "秒"; |
| | | new System.Threading.Thread(() => { |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, (hour * 360 + minute * 60 + second).ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }) { IsBackground = true }.Start(); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | Height = Application.GetRealHeight(210), |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | }; |
| | | for (int i = 0; i <= 23; i += 1) |
| | | for (int i = 0; i <= 15; i += 1) |
| | | { |
| | | item1.Add(i+Language.StringByID(StringId.h)); |
| | | } |
| | |
| | | using System; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | |
| | | |
| | | Action<uint> backAction; |
| | | public uint curColor = 0; |
| | | |
| | | public ColorfulSettingPage(Action<uint> action) |
| | | bool isSatrtColor = false; |
| | | byte redColor = 0; |
| | | byte greenColor = 0; |
| | | byte blueColor = 0; |
| | | Function function; |
| | | public ColorfulSettingPage(Function device, Action<uint> action,bool isStart) |
| | | { |
| | | bodyView = this; |
| | | function = device; |
| | | backAction = action; |
| | | isSatrtColor = isStart; |
| | | } |
| | | |
| | | public void LoadPage(string curColorString) |
| | |
| | | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(()=> { |
| | | backAction?.Invoke(curColor) ; |
| | | }); |
| | | |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64+34), |
| | | Height = Application.GetRealHeight(500), |
| | | Height = Application.GetRealHeight(570), |
| | | ScrollEnabled = false, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 推荐 |
| | | var recommendView = new FrameLayout() |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 当前颜色 |
| | | var curColorView = new FrameLayout() |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealHeight(30) |
| | | }); |
| | | |
| | | #region 保存 |
| | | var btnConfrim = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextID = StringId.Save, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | }; |
| | | contentView.AddChidren(btnConfrim); |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | backAction?.Invoke(curColor) ; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | if (isSatrtColor) |
| | | d.Add(FunctionAttributeKey.ColorfulBegin, redColor + "," + greenColor + "," + blueColor); |
| | | else |
| | | d.Add(FunctionAttributeKey.ColorfulEnd, redColor + "," + greenColor + "," + blueColor); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }; |
| | | |
| | | |
| | | #endregion |
| | | |
| | | colorPicker.ColorChaged += (sender2, color) => { |
| | | byte redColor = color[0]; |
| | | byte greenColor = color[1]; |
| | | byte blueColor = color[2]; |
| | | redColor = color[0]; |
| | | greenColor = color[1]; |
| | | blueColor = color[2]; |
| | | |
| | | int recolor = redColor * 256 * 256 + greenColor * 256 + blueColor; |
| | | |
| | |
| | | using System; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | |
| | | /// 色盘里面那个会滑动的球 |
| | | /// </summary> |
| | | Button btnWhiteRound; |
| | | /// <summary> |
| | | /// 炫彩开关按钮 |
| | | /// </summary> |
| | | Button btnColorfulSwitch; |
| | | |
| | | #endregion |
| | | |
| | | #region 区域变量 |
| | |
| | | dimmerBar = new DiyImageSeekBar() |
| | | { |
| | | X = Application.GetRealWidth(35 + 22), |
| | | Y = Application.GetRealHeight(312 - magriHeight), |
| | | Y = Application.GetRealHeight(316 - magriHeight), |
| | | Width = Application.GetRealWidth(210), |
| | | Height = Application.GetRealHeight(54), |
| | | SeekBarViewHeight = Application.GetRealHeight(8), |
| | |
| | | var btnGradualChangeMinValuesText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), |
| | | Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(22), |
| | | Height = Application.GetRealHeight(21), |
| | | Text = "0s", |
| | |
| | | var btnGradualChangeMaxValuesText = new Button() |
| | | { |
| | | X = barFadeTime.Right, |
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), |
| | | Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(35), |
| | | Height = Application.GetRealHeight(21), |
| | | Text = "10s", |
| | |
| | | }; |
| | | controlView.AddChidren(btnGradualChangeMaxValuesText); |
| | | #endregion |
| | | heightMore = 70; |
| | | //heightMore += 70; |
| | | |
| | | } |
| | | |
| | |
| | | { |
| | | #region 炫彩功能 |
| | | |
| | | |
| | | var btnGradualChangeText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(375+ heightMore- magriHeight), |
| | | Y = Application.GetRealHeight(heightMore + magriHeight), |
| | | Width = Application.GetRealWidth(224), |
| | | Height = Application.GetRealHeight(21), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | }; |
| | | controlView.AddChidren(btnGradualChangeText); |
| | | |
| | | var btnGradualChangeMinValuesText = new Button() |
| | | var btnEditColorful = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), |
| | | Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(22), |
| | | Height = Application.GetRealHeight(21), |
| | | UnSelectedImagePath = "Public/Edit.png", |
| | | }; |
| | | controlView.AddChidren(btnGradualChangeMinValuesText); |
| | | btnGradualChangeMinValuesText.MouseUpEventHandler = (sender, e) => { |
| | | controlView.AddChidren(btnEditColorful); |
| | | btnEditColorful.MouseUpEventHandler = (sender, e) => { |
| | | var rgbView = new ColorfulInfoPage(function); |
| | | MainPage.BasePageView.AddChidren(rgbView); |
| | | rgbView.LoadPage(); |
| | |
| | | |
| | | var barColorful = new FrameLayout() |
| | | { |
| | | X = btnGradualChangeMinValuesText.Right + Application.GetRealWidth(15), |
| | | Y = Application.GetRealHeight(412 + heightMore-magriHeight), |
| | | X = btnEditColorful.Right + Application.GetRealWidth(15), |
| | | Y = Application.GetRealHeight(27 + heightMore + magriHeight), |
| | | Width = Application.GetRealWidth(180), |
| | | Height = Application.GetRealHeight(8), |
| | | BackgroundImagePath = "FunctionIcon/Light/ColorfulBar.png", |
| | | }; |
| | | controlView.AddChidren(barColorful); |
| | | |
| | | var btnGradualChangeMaxValuesText = new Button() |
| | | btnColorfulSwitch = new Button() |
| | | { |
| | | X = barColorful.Right + Application.GetRealWidth(8), |
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), |
| | | Y = btnGradualChangeText.Bottom,// + Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(38), |
| | | Height = Application.GetRealHeight(24), |
| | | UnSelectedImagePath = "Public/Switch.png" |
| | | UnSelectedImagePath = "Public/Switch.png", |
| | | SelectedImagePath = "Public/SwitchOn.png", |
| | | }; |
| | | controlView.AddChidren(btnGradualChangeMaxValuesText); |
| | | controlView.AddChidren(btnColorfulSwitch); |
| | | |
| | | btnColorfulSwitch.MouseUpEventHandler = (sender, e) => { |
| | | btnColorfulSwitch.IsSelected = !btnColorfulSwitch.IsSelected; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var controlColorfulState = btnColorfulSwitch.IsSelected ? "on" : "off"; |
| | | function.SetAttrState(FunctionAttributeKey.Colorful, controlColorfulState); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.Colorful, controlColorfulState); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log($"控制炫彩开关异常:{ex.Message}"); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | { |
| | | bodyView.btnCurColor.BorderColor = 0x00000000; |
| | | } |
| | | try |
| | | { |
| | | var colorfulState = updateTemp.GetAttribute(FunctionAttributeKey.Colorful); |
| | | if (colorfulState != null) |
| | | { |
| | | if(bodyView.btnColorfulSwitch!= null) |
| | | { |
| | | bodyView.btnColorfulSwitch.IsSelected = colorfulState.curValue.ToString() == "on"; |
| | | } |
| | | } |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log($"更新RGB 炫彩开关状态异常:{ex.Message}"); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |