wxr
2023-09-14 8f9f20698e1256a58ee6894a9bc168a9dfb37861
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -48,7 +48,7 @@
                {
                    case "1":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png";
                            foreach (var dic in dicList)
                            {
@@ -130,7 +130,7 @@
                    case "2":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png";
                            string value= this.GetKeyValue("timesection", dicList);
                            string value = this.GetKeyValue("timesection", dicList);
                            inputView.btnText.Text = Language.StringByID(StringId.timeHorizon) + ": " + value;
                        }
                        break;
@@ -418,7 +418,7 @@
                                    break;
                                case SPK.VideoDoorLock:
                                    {
                                        string s = string.Empty;
                                        string userName = string.Empty;
                                        string tag = string.Empty;
                                        for (int b = 0; b < dicList.Count; b++)
                                        {
@@ -429,11 +429,9 @@
                                            //s += ",";
                                            //tag += FaceItem.userId;
                                            //tag += "_";
                                            var userName = dic["value"].ToString();
                                            s += userName;
                                            s += ",";
                                            userName = dic["value"].ToString();
                                        }
                                        inputView.btnState.Text = s;
                                        inputView.btnState.Text = RemoveLastStr(userName);
                                    }
                                    break;
                                case SPK.doorgate:
@@ -495,7 +493,7 @@
                                            break;
                                        }
                                        inputView.btnState.Text = Language.StringByID(StringId.wuren);
                                        if (value == "true")
                                        {
@@ -841,7 +839,7 @@
                                else if (device.spk == SPK.SensorTemperature)
                                {
                                   this.SensorView(thisView, device, "temperature", indexVulae);
                                    this.SensorView(thisView, device, "temperature", indexVulae);
                                }
                                else if (device.spk == SPK.SensorHumidity)
@@ -1502,7 +1500,8 @@
                                        if (stateStr.StartsWith(";"))
                                        {
                                            stateStr = stateStr.Substring(1, stateStr.Length - 1);
                                        } else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
                                        }
                                        else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
                                        {
                                            stateStr = stateStr.Substring(0, stateStr.Length - 3);
                                        }
@@ -2460,7 +2459,7 @@
                    break;
                case SPK.VideoDoorLock:
                    {
                        string s = string.Empty;
                        string userName = string.Empty;
                        string tag = string.Empty;
                        for (int b = 0; b < dicList.Count; b++)
                        {
@@ -2471,11 +2470,10 @@
                            //s += ",";
                            //tag += FaceItem.userId;
                            //tag += "_";
                            var userName = dic["value"].ToString();
                            s += userName;
                            s += ",";
                            userName = dic["value"].ToString();
                        }
                        button1.Text = s;
                        button1.Text = RemoveLastStr(userName);
                        button1.Tag = tag;
                    }
                    break;
@@ -2542,7 +2540,7 @@
                                        }
                                    }
                                    break;
                                case "set_volume":
                                    {
                                        if (button2 == null)
@@ -3005,7 +3003,7 @@
            Input inputedit = Logic.currlogic.input[indexVulae];
            ///状态值
            string stateValue = "";
            for (int i=0;i<inputedit.condition.Count;i++)
            for (int i = 0; i < inputedit.condition.Count; i++)
            {
                var dic = inputedit.condition[i];
                string comparator = dic["comparator"];
@@ -3106,6 +3104,20 @@
            return face;
        }
        /// <summary>
        /// 删除最后一个 ","
        /// </summary>
        /// <param name="s">字符串</param>
        /// <returns></returns>
        public string RemoveLastStr(string s)
        {
            if (string.IsNullOrEmpty(s))
            {
                return string.Empty;
            }
            return s.Replace("[","").Replace("]","").Replace("\"","").TrimEnd(',');
        }
    }
}