WJC
2019-12-03 f8b647c263f068babb8efcc19ff4e74026a4bd28
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -14,6 +14,7 @@
        Button selectedIcon = new Button();
        VerticalScrolViewLayout middle;
        public int conditionsIndex = -1;
        public async void Show()
        {
            #region  最上面的布局代码
@@ -177,14 +178,7 @@
                flMain.RemoveFromParent();
            };
            var lockcolorfra = new FrameLayout
            {
                Width = Application.GetRealWidth(1080),
                Height = Application.GetRealHeight(100),
                Y = Application.GetRealHeight(1920 - 100),
                BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
            };
            flMain.AddChidren(lockcolorfra);
            var lockcolorfra1 = new FrameLayout
            {
@@ -196,6 +190,7 @@
                Radius = (uint)Application.GetRealHeight(60),
            };
            flMain.AddChidren(lockcolorfra1);
            lockcolorfra1.SetCornerWithSameRadius(20, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            #region  -------取消   完成
            var lockRow = new RowLayout
@@ -284,27 +279,7 @@
                    TextSize = 14,
                };
                doorlockRow.AddChidren(doorlockBtn);
                //(0按键/3卡/15指纹)
                //switch (userIdmode.OpenMode.ToString())
                //{
                //    case "0":
                //        {
                //            doorlockBtn.Text = Language.StringByID(MyInternationalizationString.lockpassword);
                //        }
                //        break;
                //    case "3":
                //        {
                //            doorlockBtn.Text = Language.StringByID(MyInternationalizationString.ic);
                //        }
                //        break;
                //    case "15":
                //        {
                //            doorlockBtn.Text = Language.StringByID(MyInternationalizationString.fingerprint);
                //        }
                //        break;
                //}
                var doorlockSelected = new Button
                {
                    X = Application.GetRealWidth(860),
@@ -395,7 +370,7 @@
                        {
                            if (Common.Logic.CurrentLogic.Accounts[i]["Type"] == "1")
                            {
                                if (Common.Logic.CurrentLogic.Accounts[i]["Account"] == membershipIfon.UserName + modeName && Common.Logic.CurrentLogic.Accounts[i]["UserId"] == attriButeData2)
                                if (Common.Logic.CurrentLogic.Accounts[i]["UserId"] == attriButeData2)
                                {
                                    addAccount = true;
                                    break;
@@ -409,13 +384,16 @@
                    }
                    else
                    {
                        ///找出之前的旧数据移除掉,再重新添加新数据;
                        string accountuserId = Common.Logic.CurrentLogic.Conditions[conditionsIndex]["AttriButeData2"];
                        Common.Logic.CurrentLogic.Conditions.RemoveAt(conditionsIndex);
                        Common.Logic.CurrentLogic.Conditions.Insert(conditionsIndex, lockConditionsInfo);
                        for (int i = 0; i < Common.Logic.CurrentLogic.Accounts.Count; i++)
                        {
                            if (Common.Logic.CurrentLogic.Accounts[i]["Type"] == "1")
                            {
                                if (Common.Logic.CurrentLogic.Accounts[i]["UserId"] == attriButeData2)
                                ///找出之前的旧数据移除掉,再重新添加新数据;
                                if (Common.Logic.CurrentLogic.Accounts[i]["UserId"] == accountuserId)
                                {
                                    Common.Logic.CurrentLogic.Accounts.RemoveAt(i);
                                    Common.Logic.CurrentLogic.Accounts.Insert(i, accounts);