WJC
2019-12-24 51cd95b143cd928ea86a11e3618256a7d779c745
2019-12-24-1

最新代码,请合并代码
8个文件已修改
174 ■■■■ 已修改文件
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,13 +1,9 @@
<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/Logic/MemberList.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/AddLogicPage.cs">
    <Files>
      <File FileName="Shared/Phone/Device/Logic/LogicDevicePage.cs" Line="2094" Column="22" />
      <File FileName="Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs" Line="2098" Column="1" />
      <File FileName="Shared/Phone/Device/Logic/DeviceStateCondition.cs" Line="1433" Column="54" />
      <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="624" Column="307" />
      <File FileName="Shared/Phone/Device/Logic/MemberList.cs" Line="12" Column="16" />
      <File FileName="Shared/Phone/Device/Logic/AddLogicPage.cs" Line="70" Column="1" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -24,10 +20,13 @@
              <Node name="Phone" expanded="True">
                <Node name="Device" expanded="True">
                  <Node name="Logic" expanded="True">
                    <Node name="DoorLockLogic" expanded="True" />
                    <Node name="MemberList.cs" selected="True" />
                    <Node name="AddLogicPage.cs" selected="True" />
                  </Node>
                </Node>
                <Node name="ZigBee" expanded="True">
                  <Node name="Common" expanded="True" />
                  <Node name="Device" expanded="True" />
                </Node>
              </Node>
            </Node>
          </Node>
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019121001" android:installLocation="auto" android:versionName="1.0.1912101">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019122301" android:installLocation="auto" android:versionName="1.0.1912231">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" />
    <permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -968,6 +968,8 @@
                //调用方法,跳转页面
                GDMapKit.Show((mLatitude, mLongitude, mRadius, name) =>
                {
                    //截取字符串后第6位;
                    //var len = name.Substring(name.Length - 6, 6);
                    //点击保存按钮,回调当前选择的纬度,经度,半径范围
                    var latitudW = (int)Math.Truncate(mLatitude * 1000000);
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -94,23 +94,13 @@
                //关闭刷新View;
                middle.EndHeaderRefreshing();
            };
            //Read();
            CommonPage.Loading.Start();
            new System.Threading.Thread(() =>
            {
                Application.RunOnMainThread(() =>
                {
                    Read();
                    CommonPage.Loading.Hide();
                });
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 读取当前门锁的云端数据;
        /// </summary>
        public async void Read()
        public void Read()
        {
            bool d = false;
            string macport = Send.CurrentDoorLock.DeviceAddr + "_" + Send.CurrentDoorLock.DeviceEpoint.ToString();
@@ -126,11 +116,23 @@
            CommonPage.Loading.Start();
            if (!d)
            {
                CommonPage.Loading.Start();
                new System.Threading.Thread(async () =>
                {
                var allMemberslist = await Send.AllMembers(macport);
                Send.LockList.AddRange(allMemberslist);
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Hide();
                    });
                })
                { IsBackground = true }.Start();
            }
            UserAllView(macport);
            CommonPage.Loading.Hide();
        }
        /// <summary>
        /// 显示所有用户
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
@@ -871,20 +871,24 @@
                                //本地没有存在;
                                if (sceneinof == null)
                                {
                                    //在网关查找该场景;
                                    sceneinof = await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString()));
                                    //网关没有存在;
                                    if (sceneinof == null)
                                    {
                                        //注解:本地和网关都不存在该场景,界面将不会显示该场景;
                                        //sceneinof = new SceneUI();
                                        //移除该场景数据;
                                        Common.Logic.CurrentLogic.Actions.Remove(actions);
                                        //移除该场景视图;
                                        devicesFrameLayout.RemoveFromParent();
                                        continue;
                                    }
                                    //实现目的:显示出来让可以自己是否删除
                                    sceneinof = new SceneUI();
                                    #region -----
                                    ////在网关查找该场景;
                                    ////标记问题:网络请求,存在视图加载快慢的问题;
                                    //sceneinof = await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString()));
                                    ////网关没有存在;
                                    //if (sceneinof == null)
                                    //{
                                    //    //注解:本地和网关都不存在该场景,界面将不会显示该场景;
                                    //    //sceneinof = new SceneUI();
                                    //    //移除该场景数据;
                                    //    Common.Logic.CurrentLogic.Actions.Remove(actions);
                                    //    //移除该场景视图;
                                    //    devicesFrameLayout.RemoveFromParent();
                                    //    continue;
                                    //}
                                    #endregion
                                }
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -79,12 +79,7 @@
                action();
                RemoveFromParent();
            };
            #endregion
            var middle = new VerticalScrolViewLayout
            {
@@ -93,7 +88,26 @@
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(middle);
            var saveFrameLayout = new FrameLayout
            {
                Y = middle.Bottom,
                Height = Application.GetRealHeight(180),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(saveFrameLayout);
            var btnsave = new Button
            {
                X = Application.GetRealWidth(85),
                Height = Application.GetRealHeight(130),//194
                Width = Application.GetRealWidth(910),
                Radius = (uint)Application.GetRealHeight(60),
                BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
                TextID = MyInternationalizationString.Save,
                TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
                TextSize = 16,
            };
            saveFrameLayout.AddChidren(btnsave);
            #region -----自动化名称 设置名称-----
            var logicnamefl = new FrameLayout
@@ -1511,20 +1525,24 @@
                                //本地没有存在;
                                if (sceneinof == null)
                                {
                                    //在网关查找该场景;
                                    sceneinof =await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString()));
                                    //网关没有存在;
                                    if (sceneinof == null)
                                    {
                                        //注解:本地和网关都不存在该场景,界面将不会显示该场景;
                                        //sceneinof = new SceneUI();
                                        //移除该场景数据;
                                        Common.Logic.CurrentLogic.Actions.Remove(actions);
                                        //移除该场景视图;
                                        devicesFrameLayout.RemoveFromParent();
                                        continue;
                                    }
                                    //实现目的:显示出来让可以自己是否删除
                                    sceneinof = new SceneUI();
                                    #region --------
                                    ////在网关查找该场景;
                                    ////标记问题:网络请求,存在视图加载快慢的问题;
                                    //sceneinof = await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString()));
                                    ////网关没有存在;
                                    //if (sceneinof == null)
                                    //{
                                    //    //注解:本地和网关都不存在该场景,界面将不会显示该场景;
                                    //    //sceneinof = new SceneUI();
                                    //    //移除该场景数据;
                                    //    Common.Logic.CurrentLogic.Actions.Remove(actions);
                                    //    //移除该场景视图;
                                    //    devicesFrameLayout.RemoveFromParent();
                                    //    continue;
                                    //}
                                    #endregion
                                }
                                actionsIcon.UnSelectedImagePath = "ZigeeLogic/scene.png";
@@ -1972,26 +1990,7 @@
            #endregion
            var saveFrameLayout = new FrameLayout
            {
                Y = middle.Bottom,
                Height = Application.GetRealHeight(180),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
            };
            this.AddChidren(saveFrameLayout);
            var btnsave = new Button
            {
                X = Application.GetRealWidth(85),
                Height = Application.GetRealHeight(130),//194
                Width = Application.GetRealWidth(910),
                Radius = (uint)Application.GetRealHeight(60),
                BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
                TextID = MyInternationalizationString.Save,
                TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
                TextSize=16,
            };
            saveFrameLayout.AddChidren(btnsave);
            btnsave.MouseUpEventHandler += async (sender, e) =>
            {
                var name = logicTextBox.Text.Trim();
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -99,23 +99,12 @@
                //关闭刷新View;
                middle.EndHeaderRefreshing();
            };
            //Read();
            CommonPage.Loading.Start();
            new System.Threading.Thread(() =>
           {
               Application.RunOnMainThread(() =>
               {
                   Read();
                   CommonPage.Loading.Hide();
               });
           })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 读取当前门锁的云端数据;
        /// </summary>
        public async void Read()
        public void Read()
        {
            bool d = false;
@@ -132,8 +121,17 @@
            }
            if (!d)
            {
                CommonPage.Loading.Start();
                new System.Threading.Thread(async () =>
                {
                var allMemberslist = await Send.AllMembers(macport);
                Send.LockList.AddRange(allMemberslist);
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Hide();
                    });
                })
                { IsBackground = true }.Start();
            }
            UserList(macport);
        }
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -1016,7 +1016,6 @@
        /// <returns></returns>
        public static async System.Threading.Tasks.Task<string> WebClientAsync(int value, string url, Residential residential = null)
        {
            NameValueCollection postValues = new NameValueCollection();
            if (value == 0)
@@ -1046,7 +1045,6 @@
            byte[] responseArray = webClient.UploadValues(url, postValues);
            var s = System.Text.Encoding.UTF8.GetString(responseArray);
            return s;
        }
        public class Residential