mac
2023-09-14 3017a03979723442dc99185aa50bd45ffc1007fc
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -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:
@@ -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;
@@ -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(',');
        }
    }
}