WJC
2019-12-05 73e6bfcd3eed1b4aa714af538891a3a62864b516
2019-12-05-1

加上列表刷新操作
6个文件已修改
154 ■■■■ 已修改文件
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/Category.cs 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,19 +1,28 @@
<Properties StartupConfiguration="{F1296E2C-3777-4385-85B2-DA77617E3178}|Default">
  <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Category/Category.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs">
    <Files>
      <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1" Column="1" />
      <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1908" Column="11" />
      <File FileName="Shared/Phone/Device/Logic/DeviceStateCondition.cs" Line="1435" Column="38" />
      <File FileName="Shared/Phone/Device/Logic/MemberList.cs" Line="122" Column="20" />
      <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="798" Column="37" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs" Line="1" Column="1" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="GateWay" expanded="True">
            <Node name="Home.IOS" expanded="True" />
            <Node name="Shared" expanded="True">
              <Node name="Common" expanded="True" />
              <Node name="Phone" expanded="True">
                <Node name="Device" expanded="True">
                  <Node name="Category" expanded="True">
                    <Node name="Category.cs" selected="True" />
                  <Node name="Category" expanded="True" />
                  <Node name="Logic" expanded="True">
                    <Node name="DoorLockLogic" expanded="True">
                      <Node name="AddCondition.cs" selected="True" />
                    </Node>
                  </Node>
                </Node>
              </Node>
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -1742,7 +1742,7 @@
        #region ◆ 自动化__________________________
        /// <summary>
        /// 自动化
        /// 自动化功能代码入口
        /// </summary>
        private async void ShowAutotion()
        {
@@ -1804,7 +1804,7 @@
            };
            functionSceneAutoBodyView.AddChidren(scenehorizontalScrol);
            var logicScrolView = new VerticalScrolViewLayout
            var logicScrolView = new VerticalRefreshLayout//VerticalScrolViewLayout
            {
                Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
@@ -1905,7 +1905,24 @@
                logicScrolView.Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight;
                Automationview(logicScrolView);
            };
            logicScrolView.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
                Common.Logic.LogicList.Clear();
                Read(logicScrolView);
                //关闭刷新View;
                logicScrolView.EndHeaderRefreshing();
            };
            Read(logicScrolView);
        }
        /// <summary>
        /// 读取自动化列表数据;
        /// </summary>
        /// <param name="logicScrolView"></param>
        private async void Read(VerticalRefreshLayout logicScrolView)
        {
            CommonPage.Loading.Start();
            if (Common.Logic.LogicList.Count == 0)
            {
@@ -1930,12 +1947,11 @@
            CommonPage.Loading.Hide();
            
        }
        /// <summary>
        /// 自动化列表界面
        /// 加载自动化列表界面
        /// </summary>
        /// <param name="refresview">Refresview.</param>
        private async void Automationview(VerticalScrolViewLayout refresview)
        private async void Automationview(VerticalRefreshLayout refresview)
        {
            refresview.RemoveAll();
            foreach (var logic in Common.Logic.LogicList)
@@ -2064,7 +2080,7 @@
        }
        /// <summary>
        /// 显示图标的颜色
        /// 显示自动化输出功能模块图标的颜色
        /// </summary>
        /// <param name="logic"></param>
        /// <param name="logicRowlayout"></param>
@@ -2463,6 +2479,7 @@
                }
            }
        }
        #endregion
        #region ◆ 控制状态_________________________
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -12,10 +12,10 @@
            Tag = "LockLogic";
        }
        Button selectedIcon = new Button();
        VerticalScrolViewLayout middle;
        VerticalRefreshLayout middle;
        public int conditionsIndex = -1;
        public async void Show()
        public void Show()
        {
            #region  最上面的布局代码
            var topRowLayout = new RowLayout
@@ -69,14 +69,37 @@
            #endregion
            middle = new VerticalScrolViewLayout
            middle = new VerticalRefreshLayout
            {
                Y = topRowLayout.Bottom,
                Height = Application.GetRealHeight(1920 - 184),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            middle.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
                string macport = Send.CurrentDoorLock.DeviceAddr + "_" + Send.CurrentDoorLock.DeviceEpoint.ToString();
                for (int i = 0; i < Send.LockList.Count; i++)
                {
                    if (Send.LockList[i].DoorLockMacPort == macport)
                    {
                        ///从列表移除当前门锁全部的旧数据;
                        Send.LockList.Remove(Send.LockList[i]);
                    }
                }
                Read();
                //关闭刷新View;
                middle.EndHeaderRefreshing();
            };
            Read();
        }
        /// <summary>
        /// 读取当前门锁的云端数据;
        /// </summary>
        public async void Read()
        {
            bool d = false;
            string macport = Send.CurrentDoorLock.DeviceAddr + "_" + Send.CurrentDoorLock.DeviceEpoint.ToString();
            for (int i = 0; i < Send.LockList.Count; i++)
@@ -96,12 +119,11 @@
            }
            UserAllView(macport);
            CommonPage.Loading.Hide();
        }
        /// <summary>
        /// 显示所有用户
        /// </summary>
        void UserAllView(string macport)
        public void UserAllView(string macport)
        {
            for (int i = 0; i < Send.LockList.Count; i++)
@@ -167,8 +189,8 @@
        /// 选择某个用户
        /// </summary>
        /// <param name="membershipIfon">触发源列表</param>
        /// <param name="userName">用户名字</param>
        void SelectedUserID(Send.MembershipIfon membershipIfon) {
        public void SelectedUserID(Send.MembershipIfon membershipIfon)
        {
           var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
            this.AddChidren(flMain);
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -12,8 +12,8 @@
        {
            Tag = "LockLogicList";
        }
        VerticalScrolViewLayout middle;
        public async void Show()
        VerticalRefreshLayout middle;
        public void Show()
        {
            #region  最上面的布局代码
@@ -89,14 +89,29 @@
            };
            #endregion
            middle = new VerticalScrolViewLayout
            middle = new VerticalRefreshLayout
            {
                Y = topRowLayout.Bottom,
                Height = Application.GetRealHeight(1920 - 184),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            middle.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
                Common.Logic.LockLogicList.Clear();
                Read();
                //关闭刷新View;
                middle.EndHeaderRefreshing();
            };
            Read();
        }
        /// <summary>
        /// 读取自动化数据
        /// </summary>
        public async void Read()
        {
            CommonPage.Loading.Start();
            if (Common.Logic.LockLogicList.Count == 0)
            {
@@ -129,12 +144,13 @@
                    }
                }
            }
            //自动化
            Automationview();
            CommonPage.Loading.Hide();
        }
        void Automationview()
        /// <summary>
        /// 加载自动化列表的界面
        /// </summary>
        public void Automationview()
        {
            middle.RemoveAll();
            for (int i = 0; i < Common.Logic.LockLogicList.Count; i++)
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -15,12 +15,14 @@
        }
        Button selectedIcon = new Button();
        public static bool edit = false;
        VerticalScrolViewLayout middle;
        VerticalRefreshLayout middle;
        CommonDevice common;
        Dictionary<string, string> editdeviceConditionsInfo;
        public async void Show(CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo = null)
        public void Show(CommonDevice commondevice, Dictionary<string, string> editdeviceConditions = null)
        {
            common = commondevice;
            editdeviceConditionsInfo = editdeviceConditions;
            UserView.HomePage.Instance.ScrollEnabled = false;
            this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
            #region  最上面的布局代码
@@ -73,14 +75,36 @@
            };
            #endregion
            middle = new VerticalScrolViewLayout
            middle = new VerticalRefreshLayout
            {
                Y = topRowLayout.Bottom,
                Height = Application.GetRealHeight(1920 - 184),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            middle.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
                string macport = common.DeviceAddr + "_" + common.DeviceEpoint.ToString();
                for (int i = 0; i < Send.LockList.Count; i++)
                {
                    if (Send.LockList[i].DoorLockMacPort == macport)
                    {
                        ///从列表移除当前门锁全部的旧数据;
                        Send.LockList.Remove(Send.LockList[i]);
                    }
                }
                Read();
                //关闭刷新View;
                middle.EndHeaderRefreshing();
            };
            Read();
        }
        /// <summary>
        /// 读取当前门锁的云端数据;
        /// </summary>
        public async void Read()
        {
            bool d = false;
            string macport = common.DeviceAddr + "_" + common.DeviceEpoint.ToString();
@@ -100,14 +124,14 @@
                var allMemberslist = await Send.AllMembers(common.DeviceAddr);
                Send.LockList.AddRange(allMemberslist);
            }
            UserList(macport, common, editdeviceConditionsInfo);
            UserList(macport);
            CommonPage.Loading.Hide();
        }
        /// <summary>
        /// 成员列表的方法
        /// </summary>
        /// <param name="macport"></param>
        void UserList(string macport, CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo)
        public void UserList(string macport)
        {
            foreach (var user in Send.LockList)
@@ -156,7 +180,7 @@
                EventHandler<MouseEventArgs> useridclick = (sender, e) =>
                {
                    User(user, common, editdeviceConditionsInfo);
                    User(user);
                };
                userBtn.MouseUpEventHandler += useridclick;
@@ -172,7 +196,7 @@
        /// 当前成员信息的方法
        /// </summary>
        /// <param name="user"></param>
        void User(Send.MembershipIfon user, CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo)
        public void User(Send.MembershipIfon user)
        {
            var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
            this.AddChidren(flMain);