WJC
2019-10-25 67aea08d675c88fe5c4b8362efc131d1292630f7
2019-10-25-2
7个文件已修改
104 ■■■■ 已修改文件
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide-wal 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/Category.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -2,15 +2,17 @@
  <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.ItemProperties.GateWay.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.913cb77b0eef11c9119c61a02bc00fec01bf67d6" />
  <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" />
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/Send.cs">
    <Files>
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs" Line="14" Column="44" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs" Line="641" Column="64" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs" Line="354" Column="41" />
      <File FileName="Shared/Phone/Device/Logic/AddLogicPage.cs" Line="181" Column="15" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs" Line="15" Column="31" />
      <File FileName="Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs" Line="145" Column="39" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/AddAction.cs" Line="193" Column="50" />
      <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="1192" Column="1" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs" Line="105" Column="49" />
      <File FileName="Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs" Line="151" Column="92" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/AddAction.cs" Line="128" Column="50" />
      <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="1127" Column="38" />
      <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1981" Column="76" />
      <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="50" Column="48" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -20,10 +22,10 @@
              <Node name="Common" expanded="True" />
              <Node name="Phone" expanded="True">
                <Node name="Device" expanded="True">
                  <Node name="Category" expanded="True" />
                  <Node name="Logic" expanded="True">
                    <Node name="DoorLockLogic" expanded="True">
                      <Node name="LockLogicCommunalPage.cs" selected="True" />
                    </Node>
                    <Node name="DoorLockLogic" expanded="True" />
                    <Node name="Send.cs" selected="True" />
                  </Node>
                </Node>
                <Node name="UserCenter" expanded="True">
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide-wal
Binary files differ
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
old mode 100755 new mode 100644
@@ -1975,34 +1975,19 @@
            CommonPage.Loading.Start();
            if (Common.Logic.LogicList.Count == 0)
            {
                //var Idlist = await Logic.Send.GetLogicId();
                //if (Idlist.Count != 0)
                //{
                //    foreach (var LogicId in Idlist)
                //    {
                //        var logic = await Logic.Send.GetLogic(LogicId);
                //        if (logic != null)
                //        {
                //            Common.Logic.LogicList.Add(logic);
                //        }
                //    }
                //}
                var Idlist = await Logic.Send.GetLogicId();
                var Idlist = await Logic.Send.GetLogicId(0);
                if (Idlist.Count != 0)
                {
                    var listlogic = await Logic.Send.ReadList(Idlist.Count);
                    for (int i = 0; i < Idlist.Count; i++)
                    {
                        var LogicId = Idlist[i];
                    var listlogic = await Logic.Send.ReadList(Idlist.Count,0);
                        //foreach可能集合已被修改,枚举操作可能不会执行,可能出现崩溃(建议for)。
                        for (int j = 0; j < listlogic.Count; j++)
                        {
                            var logic = listlogic[j];
                            if (logic.LogicId == LogicId)
                        if (logic.LogicType != 0)
                            {
                            continue;
                        }
                                Common.Logic.LogicList.Add(logic);
                            }
                        }
                    }
                }
            }
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
@@ -621,8 +621,6 @@
            UserView.HomePage.Instance.ScrollEnabled = false;
            Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
            List<Dictionary<string, string>> taskListInfo = new List<Dictionary<string, string>>();
            //var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
            //this.AddChidren(flMain);
            flMain.MouseUpEventHandler += (sender, e) =>
            {
                flMain.RemoveFromParent();
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -102,21 +102,31 @@
            CommonPage.Loading.Start();
            if (Common.Logic.LockLogicList.Count == 0)
            {
                var Idlist = await Device.Logic.Send.GetLogicId();
                var Idlist = await Send.GetLogicId(1);
                if (Idlist.Count != 0)
                {
                    var listlogic = await Device.Logic.Send.ReadList(Idlist.Count);
                    for (int i = 0; i < Idlist.Count; i++)
                    {
                        var LogicId = Idlist[i];
                    var listlogic = await Send.ReadList(Idlist.Count,1);
                        //foreach可能集合已被修改,枚举操作可能不会执行,可能出现崩溃(建议for)。
                        for (int j = 0; j < listlogic.Count; j++)
                        {
                            var logic = listlogic[j];
                            if (logic.LogicId == LogicId)
                        if (logic.LogicType == 0)
                            {
                                Common.Logic.LockLogicList.Add(logic);
                            continue;
                            }
                        bool yes = false;
                        for (int a = 0; a < logic.Accounts.Count; a++)
                        {
                            if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid)
                            {
                                //查找自己账号下的创建联动事件;
                                yes = true;
                                break;
                            }
                        }
                        if (yes)
                        {
                            Common.Logic.LockLogicList.Add(listlogic[j]);
                        }
                    }
                }
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -14,7 +14,7 @@
        /// 获取LogicId的方法
        /// </summary>
        /// <returns>The logic identifier.</returns>
        public static async System.Threading.Tasks.Task<List<int>> GetLogicId()
        public static async System.Threading.Tasks.Task<List<int>> GetLogicId(int LogicType)
        {
            return await System.Threading.Tasks.Task.Run(async () =>
            {
@@ -53,6 +53,8 @@
                mainGateWay.GwResDataAction += action;
                var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2004 } };
                var jObjectdata1 = new JObject { { "LogicType", LogicType } };
                jObject.Add("Data", jObjectdata1);
                mainGateWay?.Send("Logic/GetLogicList", jObject.ToString());
                //await System.Threading.Tasks.Task.Run(async () =>
                //{
@@ -74,7 +76,7 @@
        /// 获取Logic的方法
        /// </summary>
        /// <returns>The logic identifier.</returns>
        public static async System.Threading.Tasks.Task<Common.Logic> GetLogic(int LogicId)
        public static async System.Threading.Tasks.Task<Common.Logic> GetLogic(int LogicId,int LogicType)
        {
            return await System.Threading.Tasks.Task.Run(async () =>
            {
@@ -149,7 +151,8 @@
                {
                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2002 } };
                    var data = new JObject {
                        { "LogicId",LogicId}
                        { "LogicId",LogicId},
                        { "LogicType",LogicType}
                        };
                    jObject.Add("Data", data);
                    ZbGateway.MainGateWay?.Send("Logic/GetLogicInfo", jObject.ToString());
@@ -566,13 +569,13 @@
        /// 获取Logic列表的方法
        /// </summary>
        /// <returns>The logic identifier.</returns>
        public static async System.Threading.Tasks.Task<List<Common.Logic>> ReadList(int sum)
        public static async System.Threading.Tasks.Task<List<Common.Logic>> ReadList(int sum,int LogicType)
        {
            return await System.Threading.Tasks.Task.Run(async () =>
            {
                var listLogic = new List<Common.Logic>();
                bool @bool = false;
               // bool @bool = false;
                Action<string, string> action = (topic, data) =>
                {
                    var gatewayID = topic.Split('/')[0];
@@ -640,10 +643,10 @@
                        }
                    }
                    if (topic == $"{gatewayID}/Logic/AllLogicNum_Respon")
                    {
                        @bool = true;
                    }
                    //if (topic == $"{gatewayID}/Logic/AllLogicNum_Respon")
                    //{
                    //    @bool = true;
                    //}
                };
                var mainGateWay = ZbGateway.MainGateWay;
                if (mainGateWay == null)
@@ -655,6 +658,8 @@
                try
                {
                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2015 } };
                    var jObjectdata = new JObject { { "LogicType", LogicType } };
                    jObject.Add("Data", jObjectdata);
                    ZbGateway.MainGateWay?.Send("Logic/GetAllLogicListInfo", jObject.ToString());
                }
                catch { }
@@ -662,14 +667,14 @@
                while ((DateTime.Now - dateTime).TotalMilliseconds < 8 * 1000)
                {
                    await System.Threading.Tasks.Task.Delay(100);
                    //if (sum == listLogic.Count)
                    //{
                    //    break;
                    //}
                    if (@bool)
                    if (sum == listLogic.Count)
                    {
                        break;
                    }
                    //if (@bool)
                    //{
                    //    break;
                    //}
                }
                ZbGateway.MainGateWay.GwResDataAction -= action;
                return listLogic;