HDL_ON/DAL/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </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"; HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -239,7 +239,7 @@ int h = time / (60 * 60); int m = time % (60 * 60) / 60; int s = (time % (60 * 60) % 60); view2.btnState.Text = inputs.hold_time + "s"; view2.btnState.Text = LogicMethod.Current.getTimeStr(inputs.hold_time); view2.btnState.Name = h + ":" + m + ":" + s; this.hold_time = inputs.hold_time; } @@ -1400,7 +1400,7 @@ this.hold_time = (h + m + s).ToString(); if (button != null) { button.Text = this.hold_time + "s"; button.Text = LogicMethod.Current.getTimeStr(this.hold_time); button.Name = timeValue; } selectedState = device.spk + "_" + timeValue; HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -489,7 +489,7 @@ string value = this.GetKeyValue("people_status", dicList); if (string.IsNullOrEmpty(value)) { inputView.btnState.Text = inputCondition.hold_time + "s"; inputView.btnState.Text = LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s",""); break; } @@ -502,8 +502,8 @@ } if (!string.IsNullOrEmpty(inputCondition.hold_time) && int.Parse(inputCondition.hold_time) > 0) { inputView.btnState.Text += "持续" + inputCondition.hold_time + "s"; int time = int.Parse(inputCondition.hold_time); inputView.btnState.Text += "持续" + LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s", ""); } @@ -2292,7 +2292,7 @@ foreach (var dic in dicList) { string value = dic["value"]; if (value == "open") if (value == "on"|| value == "open") { button1.Text = Language.StringByID(StringId.onLogic); } @@ -2893,29 +2893,30 @@ string state = ""; var minutes = timeValue / 60; var seconds = timeValue % 60; if (minutes != 0) { if (seconds == 0) { state = minutes.ToString() + Language.StringByID(StringId.minute); } else { state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s); } } else { if (seconds != 0) { state = seconds.ToString() + Language.StringByID(StringId.s); } } if (!string.IsNullOrEmpty(state)) { state = Language.StringByID(StringId.delayLogic) + state; } return state; return LogicMethod.Current.getTimeStr(strTimeValue).Replace("0s",""); //if (minutes != 0) //{ // if (seconds == 0) // { // state = minutes.ToString() + Language.StringByID(StringId.minute); // } // else // { // state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s); // } //} //else //{ // if (seconds != 0) // { // state = seconds.ToString() + Language.StringByID(StringId.s); // } //} //if (!string.IsNullOrEmpty(state)) //{ // state = Language.StringByID(StringId.delayLogic) + state; //} //return state; } /// <summary> /// 获取显示面熟文本 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -189,7 +189,7 @@ list.AddRange(list2); list.AddRange(FunctionList.List.groupControls); #if DEBUG //GetTestDevice(ref list, true); GetTestDevice(ref list, true); #endif return list; } @@ -998,6 +998,63 @@ return Entity.DB_ResidenceData.Instance.CurrentRegion.isOtherShare; } } /// <summary> /// 拼接时间格式//"{h}h{m}min{s}s"; /// </summary> /// <param name="totalSeconds">秒(没有默认传入0)</param> /// <returns></returns> public string getTimeStr(string totalSeconds) { try { if (string.IsNullOrEmpty(totalSeconds)) { return ""; } int time = int.Parse(totalSeconds); int h = time / (60 * 60); int m = time % (60 * 60) / 60; int s = (time % (60 * 60) % 60); if (h == 0 && m != 0 && s != 0) { return $"{m}min{s}s"; } else if (h == 0 && m == 0 && s != 0) { return $"{s}s"; } else if (h == 0 && m != 0 && s == 0) { return $"{m}min"; } else if (h != 0 && m == 0 && s != 0) { return $"{h}h{s}s"; } else if (h != 0 && m == 0 && s == 0) { return $"{h}h"; } else if (h != 0 && m != 0 && s == 0) { return $"{h}h{m}min"; } else if (h != 0 && m != 0 && s != 0) { return $"{h}h{m}min{s}s"; } else if (h == 0 && m == 0 && s == 0) { return $"0s"; } return ""; } catch { return ""; } } #region 高德坐标转WGS84坐标 /// <summary> @@ -1242,7 +1299,7 @@ new Entity.Function { sid = "12345678921", name = "通用开关", spk = Entity.SPK.OtherCommon }, //new Entity.Function { sid = "12345678933456", name = "门锁", spk = Entity.SPK.DoorLock }, // new Entity.Function { sid = "1234567895444", name = "视频门锁", spk = Entity.SPK.VideoDoorLock }, //new Entity.Function { sid = "12345678968888", name = "人体存在传感器", spk = Entity.SPK.SensorPirHold }, new Entity.Function { sid = "123456789688889", name = "人体存在传感器", spk = Entity.SPK.SensorPirHold }, new Entity.Function { sid = "12345678968888", name = "测试猫眼", spk = Entity.SPK.Peephole }, new Entity.Function { sid = "12345678968889", name = "测试萤石摄像头", spk = Entity.SPK.Ev_Ipcam }, // new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 }, HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -1046,7 +1046,7 @@ LogicView.FunTypeView delayView = new LogicView.FunTypeView(); delayView.frameLayout.Y = bottomY; delayView.btnText.TextID = StringId.Delay; delayView.btnState.Text = strdelay + "s"; delayView.btnState.Text = LogicMethod.Current.getTimeStr(strdelay); fLayout.AddChidren(delayView.FLayoutView()); ///赋值对象 this.btnDelay = delayView.btnState; @@ -1056,9 +1056,9 @@ InpOrOutLogicMethod inpOrOutLogicMethod = new InpOrOutLogicMethod(); inpOrOutLogicMethod.Delayed(this, strdelay, (value) => { selectedState = "delay_" + strdelay; strdelay = value.ToString(); delayView.btnState.Text = strdelay + "s"; delayView.btnState.Text = LogicMethod.Current.getTimeStr(strdelay); selectedState = "delay_" + strdelay; }); }; @@ -1291,7 +1291,7 @@ if (this.btnDelay != null) { ///延时显示文本 this.btnDelay.Text = outputs.delay + "s"; this.btnDelay.Text =LogicMethod.Current.getTimeStr(outputs.delay); this.strdelay = outputs.delay; } InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4, attribute);