mac
2023-10-20 fba7be989c27154db963cfce1ddd7b01d71e8b21
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 },