WJC
2020-03-26 eed381ca472abb06e386281e604569ebf80bbfe3
2020-03-26
15个文件已修改
576 ■■■■■ 已修改文件
.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Language.ini 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Language.ini 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs 322 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/Method.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.DS_Store
Binary files differ
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -6,22 +6,20 @@
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="GateWay" expanded="True">
            <Node name="GateWay.Droid" expanded="True">
              <Node name="Assets" expanded="True" />
            </Node>
            <Node name="Home.IOS" expanded="True">
              <Node name="Resources" expanded="True" />
            </Node>
            <Node name="Shared" expanded="True">
              <Node name="Phone" expanded="True">
                <Node name="Category" expanded="True" />
                <Node name="Device" expanded="True">
                  <Node name="Category" expanded="True" />
                  <Node name="Logic" expanded="True">
                    <Node name="LogicView" expanded="True">
                      <Node name="CompleteView.cs" selected="True" />
                    </Node>
                    <Node name="DoorLockLogic" expanded="True" />
                    <Node name="LogicCommunalPage.cs" selected="True" />
                  </Node>
                </Node>
                <Node name="UserCenter" expanded="True">
                  <Node name="DoorLock" expanded="True" />
                </Node>
                <Node name="ZigBee" expanded="True">
                  <Node name="Device" expanded="True" />
                </Node>
              </Node>
            </Node>
@@ -30,11 +28,11 @@
      </Pad>
    </Pads>
  </MonoDevelop.Ide.Workbench>
  <MonoDevelop.Ide.ItemProperties.Home.IOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" />
  <MonoDevelop.Ide.ItemProperties.Home.IOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.9992EB40-E6DD-48F4-AFED-CEB5E811ACDD" />
  <MonoDevelop.Ide.DebuggingService.PinnedWatches>
    <Watch file="../../../Shared/Phone/Device/Logic/Method.cs" line="779" offsetX="-1" offsetY="-1" expression="Phone" liveUpdate="False" />
  </MonoDevelop.Ide.DebuggingService.PinnedWatches>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore />
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -527,6 +527,7 @@
5378=推送内容不能为空.
5379=暂无联动事件{\r\n} 请点击右上角添加
5380=常开模式
5381=添加条件或者添加功能为空
ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -527,6 +527,7 @@
5378=推送内容不能为空.
5379=暂无联动事件{\r\n} 请点击右上角添加
5380=常开模式
5381=添加条件或者添加功能为空
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -18,13 +18,12 @@
        }
        public void Show()
        {
            #region  上面的布局代码
            #region  界面的布局代码
            TopView view = new TopView();
            this.AddChidren(view.TopRowView());
            view.toptitleNameBtn.TextID = MyInternationalizationString.selection;
            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
            #endregion
            #region  最下面的布局代码
            var middle = new FrameLayout
            {
                Y = view.topRowLayout.Bottom,
@@ -37,41 +36,21 @@
            timeView.iconBtn.UnSelectedImagePath = "ZigeeLogic/time.png";
            timeView.funnameBtn.TextID = MyInternationalizationString.timecondition;
            middle.AddChidren(timeView.FunFrameView());
            timeView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                TimeView();
            };
            ///设备
            FunView functionView = new FunView();
            functionView.funFrameLayout.Y = timeView.funFrameLayout.Bottom;
            functionView.iconBtn.UnSelectedImagePath = "ZigeeLogic/function.png";
            functionView.funnameBtn.TextID = MyInternationalizationString.device;
            middle.AddChidren(functionView.FunFrameView());
            functionView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                var roomAndDeviceView = new RoomAndDeviceView();
                UserView.HomePage.Instance.AddChidren(roomAndDeviceView);
                UserView.HomePage.Instance.PageIndex += 1;
                roomAndDeviceView.IfType = LogicView.IfString.Condition_Logic;
                roomAndDeviceView.Show(Language.StringByID(MyInternationalizationString.devicestate));
            };
            ///安防
            FunView securityView = new FunView();
            securityView.funFrameLayout.Y = functionView.funFrameLayout.Bottom;
            securityView.iconBtn.UnSelectedImagePath = "ZigeeLogic/security.png";
            securityView.funnameBtn.TextID = MyInternationalizationString.security;
            middle.AddChidren(securityView.FunFrameView());
            securityView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                //CurtainPanel.ButtonSet buttonSet = new CurtainPanel.ButtonSet();
                //UserView.HomePage.Instance.AddChidren(buttonSet);
                //UserView.HomePage.Instance.PageIndex += 1;
                //buttonSet.Show();
                //return;
                var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                this.AddChidren(flMain);
                SecurityView(flMain, false);
            };
            ///地理围栏
            FunView positionView = new FunView();
            positionView.funFrameLayout.Y = securityView.funFrameLayout.Bottom;
@@ -80,15 +59,32 @@
            positionView.funnameBtn.TextID = MyInternationalizationString.location;
            positionView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
            middle.AddChidren(positionView.FunFrameView());
            #endregion
            timeView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                TimeView();
            };
            functionView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                var roomAndDeviceView = new RoomAndDeviceView();
                UserView.HomePage.Instance.AddChidren(roomAndDeviceView);
                UserView.HomePage.Instance.PageIndex += 1;
                roomAndDeviceView.IfType = LogicView.IfString.Condition_Logic;
                roomAndDeviceView.Show(Language.StringByID(MyInternationalizationString.devicestate));
            };
            securityView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                this.AddChidren(flMain);
                SecurityView(flMain, false);
            };
            positionView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
                var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                this.AddChidren(flMain);
                LocationView(flMain, false);
            };
            #endregion
        }
        /// <summary>
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -17,13 +17,12 @@
        public void Show()
        {
            #region  上面的布局代码
            #region  界面布局代码
            TopView view = new TopView();
            this.AddChidren(view.TopRowView());
            view.toptitleNameBtn.TextID = MyInternationalizationString.userlist;
            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
            #endregion
            middle = new VerticalRefreshLayout
            {
                Y = view.topRowLayout.Bottom,
@@ -31,6 +30,7 @@
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            #endregion
            middle.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
@@ -95,7 +95,6 @@
        /// </summary>
        public void UserAllView(string macport)
        {
            middle.RemoveAll();
            for (int i = 0; i < Send.LockList.Count; i++)
            {
                var user = Send.LockList[i];
@@ -103,55 +102,24 @@
                {
                    continue;
                }
                var userFramelayout = new FrameLayout
                FunView userView = new FunView();
                userView.iconBtn.Visible = false;
                userView.funnameBtn.X = Application.GetRealWidth(81);
                userView.funnameBtn.Text = user.UserName;
                userView.funnextBtn.X = Application.GetRealWidth(1080 - 81 - 58);
                userView.lineBtn.X = Application.GetRealWidth(81);
                userView.lineBtn.Width = Application.GetRealWidth(1080 - 81 - 58);
                if (Send.LockList.Count - 1 == i)
                {
                    Height = Application.GetRealHeight(160),
                    BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                };
                middle.AddChidren(userFramelayout);
                var userRow = new RowLayout
                {
                    Y = Application.GetRealHeight(30),
                    Width = Application.GetRealWidth(1080 - 58 - 58),
                    Height = Application.GetRealHeight(130),
                    X = Application.GetRealWidth(58),
                    LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
                };
                userFramelayout.AddChidren(userRow);
                var usernameBtn = new Button
                {
                    Text = user.UserName,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                    Width = Application.GetRealWidth(600),
                    Height = Application.GetRealHeight(130),
                    Tag = Send.LockList[i],
                    TextSize = 14,
                };
                userRow.AddChidren(usernameBtn);
                var btntimeback = new Button
                {
                    Width = Application.GetRealWidth(58),
                    Height = Application.GetRealHeight(58),
                    UnSelectedImagePath = "ZigeeLogic/next.png",
                    X = userRow.Width - Application.GetRealWidth(58),
                    Gravity = Gravity.CenterVertical,
                };
                userRow.AddChidren(btntimeback);
                EventHandler<MouseEventArgs> userclick = (sender, e) =>
                    userView.funFrameLayout.Height = Application.GetRealHeight(160 + 20);//最后一行增加20高度;
                    userView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
                }
                middle.AddChidren(userView.FunFrameView());
                userView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
                {
                    SelectedUserID(user);
                };
                usernameBtn.MouseUpEventHandler += userclick;
                btntimeback.MouseUpEventHandler += userclick;
                userFramelayout.MouseUpEventHandler += userclick;
                userRow.MouseUpEventHandler += userclick;
            }
        }
@@ -249,6 +217,12 @@
            string attriButeId = "";
            string attriButeData2 = "";
            string modeName = "";
            ///定两个变量记录之前的只值;
            string userId = "";
            string openMode = "";
            string accountName = "";
            string SelectedDeviceStatuscondition = "";
            for (int j = 0; j < membershipIfon.UserIdMode.Count; j++)
            {
@@ -448,6 +422,6 @@
                lockLogicCommunalPage.Show(() => { });
            };
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
@@ -35,7 +35,6 @@
            }
            view.clickBtn.MouseDownEventHandler += (sender, e) =>
            {
                //UserView.HomePage.Instance.ScrollEnabled = true;//恢复左滑
                action();
                RemoveFromParent();
            };
@@ -618,7 +617,6 @@
            UserView.HomePage.Instance.AddChidren(addCondition);
            UserView.HomePage.Instance.PageIndex += 1;
            addCondition.Show();
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -39,7 +39,6 @@
                Common.Logic.CurrentLogic.LogicType = 1;//标记自动化类型
                Common.Logic.CurrentLogic.Relationship = 1;
                Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1);
                //Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext);
                var lockLogicCommunalPage = new LockLogicCommunalPage();
                UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage);
                UserView.HomePage.Instance.PageIndex += 1;
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -1324,50 +1324,7 @@
            };
        }
        /// <summary>
        /// 闪现式提示框的方法
        /// </summary>
        /// <param name="tipText">提示内容</param>
        /// <param name="second">停留时间单位为s</param>
        public void TipView(string tipText, int second = 1)
        {
            var frameLayout = new FrameLayout { BackgroundColor = 0x50000000 };
            this.AddChidren(frameLayout);
            var btn = new Button
            {
                Gravity = Gravity.Center,
                Text = tipText,
                BackgroundColor = 0xff1f1f1f,
                Width = Application.GetRealWidth(500),
                Height = Application.GetRealHeight(100),
                Radius = (uint)Application.GetRealHeight(50),
            };
            frameLayout.AddChidren(btn);
            var dateTime1 = DateTime.Now;
            new System.Threading.Thread(() =>
            {
                Application.RunOnMainThread(() =>
                {
                    while (true)
                    {
                        if ((DateTime.Now - dateTime1).TotalMilliseconds > second * 1000)
                        {
                            //默认一秒关闭
                            frameLayout.RemoveFromParent();
                            break;
                        }
                    }
                });
            })
            { IsBackground = true }.Start();
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -22,66 +22,23 @@
        {
            common = commondevice;
            editdeviceConditionsInfo = editdeviceConditions;
            #region  界面布局代码
            UserView.HomePage.Instance.ScrollEnabled = false;
            this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
            #region  最上面的布局代码
            var topRowLayout = new RowLayout
            {
                BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
                Height = Application.GetRealHeight(184),
                LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
            };
            this.AddChidren(topRowLayout);
            var titleName = new Button
            {
                TextSize = 17,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(176),
                Width = Application.GetRealWidth(600),
                Height = Application.GetRealHeight(69),
                Y = Application.GetRealHeight(92),
                TextID = MyInternationalizationString.userlist,
                IsBold = true,
            };
            topRowLayout.AddChidren(titleName);
            var clickBtn = new Button
            {
                Width = Application.GetRealWidth(81 + 51),
                Height = Application.GetRealHeight(58 + 40),
                Y = Application.GetRealHeight(98 - 40),
            };
            topRowLayout.AddChidren(clickBtn);
            clickBtn.MouseDownEventHandler += (sender, e) =>
            {
                RemoveFromParent();
            };
            var back = new Button
            {
                Width = Application.GetRealWidth(30),
                Height = Application.GetRealHeight(51),
                X = Application.GetRealWidth(81),
                Y = Application.GetRealHeight(98),
                //Gravity = Gravity.CenterVertical;
                UnSelectedImagePath = "ZigeeLogic/back.png",
            };
            topRowLayout.AddChidren(back);
            back.MouseDownEventHandler += (sender, e) =>
            {
                RemoveFromParent();
            };
            #endregion
            TopView view = new TopView();
            this.AddChidren(view.TopRowView());
            view.toptitleNameBtn.TextID = MyInternationalizationString.userlist;
            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
            middle = new VerticalRefreshLayout
            {
                Y = topRowLayout.Bottom,
                Y = view.topRowLayout.Bottom,
                Height = Application.GetRealHeight(1920 - 184),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            #endregion
            middle.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
@@ -149,222 +106,115 @@
        /// <param name="macport"></param>
        public void UserList(string macport)
        {
            foreach (var user in Send.LockList)
            for (int i=0;i<Send.LockList.Count;i++)
            {
                var user = Send.LockList[i];
                if (user.DoorLockMacPort != macport)
                {
                    continue;
                }
                var userFramelayout = new FrameLayout
                FunView userView = new FunView();
                userView.iconBtn.Visible = false;
                userView.funnameBtn.X = Application.GetRealWidth(81);
                userView.funnameBtn.Text = user.UserName;
                userView.funnextBtn.X = Application.GetRealWidth(1080 - 81 - 58);
                userView.lineBtn.X = Application.GetRealWidth(81);
                userView.lineBtn.Width = Application.GetRealWidth(1080 - 81 - 58);
                if (Send.LockList.Count - 1 == i)
                {
                    Height = Application.GetRealHeight(160),
                    BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                    // LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                };
                middle.AddChidren(userFramelayout);
                var userRow = new RowLayout
                {
                    Y = Application.GetRealHeight(30),
                    Width = Application.GetRealWidth(1080 - 81 - 58),
                    Height = Application.GetRealHeight(130),
                    X = Application.GetRealWidth(81),
                    LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
                };
                userFramelayout.AddChidren(userRow);
                var userBtn = new Button
                {
                    Text = user.UserName,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                    TextSize = 14,
                };
                userRow.AddChidren(userBtn);
                var userBack = new Button
                {
                    Width = Application.GetRealWidth(58),
                    Height = Application.GetRealHeight(58),
                    UnSelectedImagePath = "ZigeeLogic/next.png",
                    X = Application.GetRealWidth(1080 - 81 - 58 - 58),
                    Gravity = Gravity.CenterVertical,
                };
                userRow.AddChidren(userBack);
                EventHandler<MouseEventArgs> useridclick = (sender, e) =>
                {
                    User(user);
                };
                userBtn.MouseUpEventHandler += useridclick;
                userBack.MouseUpEventHandler += useridclick;
                userFramelayout.MouseUpEventHandler += useridclick;
                userRow.MouseUpEventHandler += useridclick;
                    userView.funFrameLayout.Height = Application.GetRealHeight(160 + 20);//最后一行增加20高度;
                    userView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
                }
                middle.AddChidren(userView.FunFrameView());
                userView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
                 {
                     User(user);
                 };
            }
        }
        }
        /// <summary>
        /// 当前成员信息的方法
        /// </summary>
        /// <param name="user"></param>
        public void User(Send.MembershipIfon user)
        {
            var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
            this.AddChidren(flMain);
            flMain.MouseUpEventHandler += (sender1, e1) =>
            //元素超出9个就用上下滑动控件;
            VerticalScrolViewLayout vV = null;
            int count = user.UserIdMode.Count;
            if (user.UserIdMode.Count > 9)
            {
                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
            {
                Width = Application.GetRealWidth(1080),
                Height = Application.GetRealHeight(530),
                Y = Application.GetRealHeight(1920 - 530),
                BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
                Radius = (uint)Application.GetRealHeight(60),
            };
            flMain.AddChidren(lockcolorfra1);
                ///元素超出9个;
                count = 6;
                //元素超出9个就用上下滑动控件;
                vV = new VerticalScrolViewLayout
                {
                    Y = Application.GetRealHeight(140 + 20),
                    Height = Application.GetRealHeight(160 * count),
                };
                //清除之前的控件;
                vV.RemoveAll();
            }
            #region  -------取消   完成
            var lockRow = new RowLayout
            var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
            this.AddChidren(flMain);
            CompleteView completeView = new CompleteView();
            flMain.AddChidren(completeView.Show(count));
            completeView.Btntitle.Text = user.UserName;
            EventHandler<MouseEventArgs> clickcancel = (sender, e) =>
            {
                Height = Application.GetRealHeight(140),
                LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
            };
            lockcolorfra1.AddChidren(lockRow);
            var Btncancel = new Button
            {
                TextID = MyInternationalizationString.cancel,
                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                Height = Application.GetRealHeight(140),
                Width = Application.GetRealWidth(200),
                X = Application.GetRealWidth(80),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 14,
            };
            lockRow.AddChidren(Btncancel);
            Btncancel.MouseUpEventHandler += (sender16, e16) =>
            {
                flMain.RemoveFromParent();
                UserView.HomePage.Instance.ScrollEnabled = true;
                flMain.RemoveFromParent();
            };
            flMain.MouseUpEventHandler += clickcancel;
            completeView.Btncancel.MouseUpEventHandler += clickcancel;
            var Btntitle = new Button
            {
                TextID = MyInternationalizationString.security,
                TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
                Height = Application.GetRealHeight(140),
                Width = Application.GetRealWidth(320),
                TextAlignment = TextAlignment.Center,
                X = Btncancel.Right + Application.GetRealWidth(100),
                TextSize = 16,
                Text = user.UserName,
            };
            lockRow.AddChidren(Btntitle);
            var Btncomplete = new Button
            {
                TextID = MyInternationalizationString.complete,
                TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
                Height = Application.GetRealHeight(140),
                Width = Application.GetRealWidth(200),
                TextAlignment = TextAlignment.CenterRight,
                X = Btntitle.Right + Application.GetRealWidth(100),
                TextSize = 14,
            };
            lockRow.AddChidren(Btncomplete);
            #endregion
            ///定两个变量记录之前的只值;
            string userId = "";
            string openMode = "";
            string accountname = "";
            string accountName = "";
            string SelectedDeviceStatuscondition = "";
            lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * user.UserIdMode.Count) - 20 - 50);
            lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * user.UserIdMode.Count) + 20 + 50);
            if (user.UserIdMode.Count > 9)
            {
                ///元素超出10个,暂时默认显示10;
                lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * 9) - 20 - 50);
                lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * 9) + 20 + 50);
            }
            for (int i = 0; i < user.UserIdMode.Count; i++)
            {
                var userifon = user.UserIdMode[i];
                var doorlockfra = new FrameLayout
                {
                    Height = Application.GetRealHeight(160),
                    Y = lockRow.Bottom + Application.GetRealHeight(20 + 160 * i),
                };
                lockcolorfra1.AddChidren(doorlockfra);
                var doorlockRow = new RowLayout
                mFunView lockView = new mFunView();
                if (user.UserIdMode.Count > 9)
                {
                    Y = Application.GetRealHeight(30),
                    Width = Application.GetRealWidth(920),
                    Height = Application.GetRealHeight(130),
                    X = Application.GetRealWidth(80),
                    LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
                };
                doorlockfra.AddChidren(doorlockRow);
                var doorlockBtn = new Button
                    //元素超出9个就用上下滑动控件;
                    completeView.Show(count).AddChidren(vV);
                    vV.AddChidren(lockView.Show());
                }
                else
                {
                    Width = Application.GetRealWidth(600),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
                    Text = userifon.ModeName,
                    TextSize = 14,
                };
                doorlockRow.AddChidren(doorlockBtn);
                    lockView.frameLayout.Y = Application.GetRealHeight(140 + 20 + 160 * i);
                    completeView.Show(count).AddChidren(lockView.Show());
                }
                lockView.titleBtn.Text = userifon.ModeName;
                var doorlockSelected = new Button
                {
                    X = Application.GetRealWidth(860),
                    Width = Application.GetMinRealAverage(60),
                    Height = Application.GetMinRealAverage(60),
                    UnSelectedImagePath = "ZigeeLogic/selected.png",
                    Visible = false,
                    Gravity = Gravity.CenterVertical,
                };
                doorlockRow.AddChidren(doorlockSelected);
                if ((user.UserIdMode.Count - 1) == i)
                {
                    doorlockRow.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
                    lockView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
                }
                EventHandler<MouseEventArgs> doorlockclick = (sender2, e2) =>
                {
                    SelectedDeviceStatuscondition = "DoorLock";
                    selectedIcon.Visible = false;
                    selectedIcon = doorlockSelected;
                    doorlockSelected.Visible = true;
                    userId = userifon.UserId;
                    openMode = userifon.OpenMode.ToString();
                    accountname = Btntitle.Text + doorlockBtn.Text;
                    //doorlockBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                };
                doorlockRow.MouseUpEventHandler += doorlockclick;
                doorlockBtn.MouseUpEventHandler += doorlockclick;
                doorlockSelected.MouseUpEventHandler += doorlockclick;
                doorlockfra.MouseUpEventHandler += doorlockclick;
                lockView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
                 {
                     SelectedDeviceStatuscondition = "DoorLock";
                     selectedIcon.Visible = false;
                     selectedIcon = lockView.selectedIconBtn;
                     lockView.selectedIconBtn.Visible = true;
                     userId = userifon.UserId;
                     openMode = userifon.OpenMode.ToString();
                     accountName = completeView.Btntitle.Text + lockView.titleBtn.Text;
                 };
                if (string.IsNullOrEmpty(doorlockBtn.Text))
                if (string.IsNullOrEmpty(lockView.titleBtn.Text))
                {
                    string strname = "";
                    switch (userifon.OpenMode)
@@ -385,7 +235,7 @@
                            }
                            break;
                    }
                    doorlockBtn.Text = userifon.UserId + strname;
                    lockView.titleBtn.Text = userifon.UserId + strname;
                }
                if (edit && editdeviceConditionsInfo != null)
@@ -394,15 +244,17 @@
                    if (editdeviceConditionsInfo["AttriButeData2"] == userifon.UserId.ToString())
                    {
                        selectedIcon.Visible = false;
                        selectedIcon = doorlockSelected;
                        doorlockSelected.Visible = true;
                        selectedIcon = lockView.selectedIconBtn;
                        lockView.selectedIconBtn.Visible = true;
                    }
                }
            }
            Btncomplete.MouseUpEventHandler += (sender3, e3) =>
            completeView.Btncomplete.MouseUpEventHandler += (sender, e) =>
            {
                string userIdstr = "", openModestr = "";
                var deviceConditionsInfo = new Dictionary<string, string>();
                var userdictionary = new Dictionary<string, string>();
@@ -416,7 +268,7 @@
                deviceConditionsInfo.Add("AttriButeId", openMode);
                deviceConditionsInfo.Add("AttriButeData2", userId);
                userdictionary.Add("Account", Config.Instance.Guid);
                userdictionary.Add("AccountName", accountname);
                userdictionary.Add("AccountName", accountName);
                userdictionary.Add("Type", "1");
                userdictionary.Add("UserId", userId);
                if (edit)
@@ -491,7 +343,7 @@
            };
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
@@ -719,9 +719,16 @@
        /// <param name="CurrentLogic">当前逻辑</param>
        public async static void SaveLogic(string if_logic, string name, bool tag, Common.Logic CurrentLogic)
        {
            //记录逻辑类型
            //只是对跳转界面有用,基本没啥用
            int Type = CurrentLogic.LogicType;
            if (CurrentLogic.Conditions.Count == 0 || CurrentLogic.Actions.Count == 0)
            {
                var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
                  Language.StringByID(MyInternationalizationString.addnull),
                  Language.StringByID(MyInternationalizationString.confrim));
                alert.Show();
                return;
            }
            if (string.IsNullOrEmpty(name))
            {
                var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
@@ -779,7 +786,7 @@
            if (LogicView.IfString._Logic == if_logic)
            {
                if (Type == 0)
                if (CurrentLogic.LogicType == 0)
                {
                   
                    UserView.HomePage.Instance.RemoveViewByTag("Logic");
@@ -787,7 +794,7 @@
                    Phone.Category.CategoryMainForm.instance?.RefreshBodyView();
                    // Category.Category.instance?.RefreshBodyView();
                }
                else if (Type == 2)
                else if (CurrentLogic.LogicType == 2)
                {
                    //刷新整个分类;
                    //门锁常开模式特殊;
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -358,10 +358,10 @@
                    refresview.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
                }
            }
            int i = 1;//局部变量,默认是第一条逻辑;
            foreach (var logic in Common.Logic.LogicList)
            {
                var fLayout = new FrameLayout
                {
                    Height = Application.GetRealHeight(190 + 30),
@@ -369,7 +369,7 @@
                    BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
                };
                refresview.AddChidren(fLayout);
                var logicRowlayout = new RowLayout
                {
                    Height = Application.GetRealHeight(190 + 30),
@@ -380,7 +380,14 @@
                };
                fLayout.AddChidren(logicRowlayout);
                if (i == 1)
                {
                    //实现android显示逻辑列表的圆角;
                    fLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                    logicRowlayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                    i = 2;
                }
                var logicnameBtn = new Button
                {
                    Height = Application.GetRealHeight(58),
@@ -396,8 +403,8 @@
                var logicswitchBtn = new Button
                {
                    Width = Application.GetRealWidth(104),
                    Height = Application.GetRealHeight(63),
                    Width = Application.GetMinRealAverage(104),
                    Height = Application.GetMinRealAverage(63),
                    UnSelectedImagePath = "ZigeeLogic/logicclose.png",
                    SelectedImagePath = "ZigeeLogic/logicopen.png",
                    X = logicRowlayout.Width - Application.GetRealWidth(104 + 58),
@@ -421,7 +428,7 @@
                        logic.IsEnable = 0;
                        StatusColor(logic, logicRowlayout, 0);
                    }
                    Device.Logic.Send.LogicControlSwitch(logic);
                   Send.LogicControlSwitch(logic);
                    //Logic.Send.AddModifyLogic(logic);
                };
                if (logic.IsEnable == 1)
@@ -507,7 +514,7 @@
            logicRowlayout.AddChidren(logictimeBtn);
            ///显示执行周期
            Device.Logic.Method.UpdateWeek(logictimeBtn, logic);
            Method.UpdateWeek(logictimeBtn, logic);
            List<string> indexlist = new List<string>();
@@ -546,7 +553,7 @@
                    Height = Application.GetMinRealAverage(82),
                    X = Application.GetRealWidth(58) + Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i),
                    Y = Application.GetRealHeight(58 + 30 + 30),
                    Radius = (uint)Application.GetRealHeight(41),
                    Radius = (uint)Application.GetMinRealAverage(41),
                    BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                };
                logicRowlayout.AddChidren(typebjBtn);
ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs
@@ -15,15 +15,12 @@
  
        public void Show (string titlename)
        {
            var weeklist = new List<string> ();
            #region  上面的布局代码
            #region  界面的布局代码
            TopView view = new TopView();
            this.AddChidren(view.TopRowView());
            view.toptitleNameBtn.Text=titlename;
            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
            #endregion
            var middle = new VerticalScrolViewLayout
            {
                Y = view.topRowLayout.Bottom,
@@ -31,11 +28,12 @@
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            LogicView.SaveView saveView = new LogicView.SaveView();
            saveView.frameLayout.Y = middle.Bottom;
            this.AddChidren(saveView.Show());
            #endregion
            var weeklist = new List<string>();
            if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 5)
            {
                string len = "";
@@ -83,7 +81,6 @@
                    }
                }
            }
            var cyclelist = new List<string> ();
            cyclelist.AddRange (new string [] {
                        Language.StringByID(MyInternationalizationString.mon),
@@ -138,8 +135,6 @@
                };
            }
            saveView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
            {
ZigbeeApp/Shared/R.cs
old mode 100755 new mode 100644
@@ -717,6 +717,7 @@
        public readonly static int tiptextnull = 5378;
        public readonly static int tiplocktextnull = 5379;
        public readonly static int openmode = 5380;
        public readonly static int addnull = 5381;
        #region 登录注册
        /// <summary>