黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -26,7 +26,7 @@
            middle = new VerticalRefreshLayout
            {
                Y = view.topRowLayout.Bottom,
                Height = Application.GetRealHeight(1920 - 184),
                Height = Application.GetRealHeight(Method.H - 184),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
@@ -130,23 +130,7 @@
        public void SelectedUserID(Send.MembershipIfon user)
        {
            //元素超出9个就用上下滑动控件;
            VerticalScrolViewLayout vV = null;
            int count = user.UserIdMode.Count;
            if (count > 9)
            {
                ///元素超出9个;
                count = 6;
                //元素超出9个就用上下滑动控件;
                vV = new VerticalScrolViewLayout
                {
                    Y = Application.GetRealHeight(140 + 20),
                    Height = Application.GetRealHeight(160 * count),
                };
                //清除之前的控件;
                vV.RemoveAll();
            }
            #region  -------取消   完成
            var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
            this.AddChidren(flMain);
@@ -161,13 +145,28 @@
            flMain.MouseUpEventHandler += clickcancel;
            completeView.Btncancel.MouseUpEventHandler += clickcancel;
            #endregion
            //元素超出9个就用上下滑动控件;
            VerticalScrolViewLayout vV = null;
            if (count > 9)
            {
                ///元素超出9个;
                count = 6;
                //元素超出9个就用上下滑动控件;
                vV = new VerticalScrolViewLayout
                {
                    Y = Application.GetRealHeight(140 + 20),
                    Height = Application.GetRealHeight(160 * count),
                };
                //元素超出9个就用上下滑动控件;
                completeView.Show(count).AddChidren(vV);
                //清除之前的控件;
                vV.RemoveAll();
            }
            ///定两个变量记录之前的只值;
            string userId = "";
            string openMode = "";
            string accountName = "";
            string SelectedDeviceStatuscondition = "";
            for (int i = 0; i < user.UserIdMode.Count; i++)
            {
                var userifon = user.UserIdMode[i];
@@ -175,8 +174,7 @@
                mFunView lockView = new mFunView();
                if (user.UserIdMode.Count > 9)
                {
                    //元素超出9个就用上下滑动控件;
                    completeView.Show(count).AddChidren(vV);
                    vV.AddChidren(lockView.Show());
                }
                else
@@ -245,8 +243,6 @@
                }
            }
            completeView.Btncomplete.MouseUpEventHandler += (sender, e) =>
            {
                var lockConditionsInfo = new Dictionary<string, string>();
@@ -263,6 +259,9 @@
                accounts.Add("Type", "1");
                accounts.Add("Account", Config.Instance.Guid);
                accounts.Add("AccountName",accountName);
                ///mac+端口是为识别是那个门锁;
                accounts.Add("Option4", Send.CurrentDoorLock.DeviceAddr);
                accounts.Add("Option2", Send.CurrentDoorLock.DeviceEpoint.ToString());
                accounts.Add("UserId", userId);
                if (SelectedDeviceStatuscondition != "")
                {
@@ -332,7 +331,7 @@
                {
                    if (conditionsIndex == -1)
                    {
                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
                        var alert = new ShowMsgControl(ShowMsgType.Normal,
                   Language.StringByID(MyInternationalizationString.usertip),
                   Language.StringByID(MyInternationalizationString.confrim));
                        alert.Show();