HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-10-24 31497bb69602433d94c8a28ea01c3ee3c7cc8576
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TimeSettignPage.cs
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using Com.Autonavi.Amap.Mapcore;
using Java.Security;
using Shared.Common;
using ZigBee.Device;
@@ -14,19 +12,19 @@
        /// </summary>
        /// <param name="common"></param>
        /// <param name="typeTag"></param>
        public void DeviceInfoChange(CommonDevice common, string typeTag)
        public void DeviceInfoChange(CommonDevice tempDevice, string typeTag)
        {
            if (typeTag == "DeviceStatusReport" && common != null)
            if (typeTag == "DeviceStatusReport" && tempDevice != null)
            {
                var tempDevice = (CommonDevice)common;
                if (tempDevice != null)
                {
                if (tempDevice.DeviceEpoint == doorLock.DeviceEpoint
                    && tempDevice.DeviceAddr == doorLock.DeviceAddr)
                {
                    var door = tempDevice as ZigBee.Device.DoorLock;
                    if (door != null && door.DeviceStatusReport != null && door.DeviceStatusReport.AttriBute != null)
                        if (tempDevice.DeviceStatusReport != null && tempDevice.DeviceStatusReport.AttriBute != null)
                    {
                        var dataReport = door.DeviceStatusReport.AttriBute[0];
                        if (door.DeviceStatusReport.CluterID == 10 && dataReport.AttributeId == 0)
                            var dataReport = tempDevice.DeviceStatusReport.AttriBute[0];
                            if (tempDevice.DeviceStatusReport.CluterID == 10 && dataReport.AttributeId == 0)
                        {
                            CurentDoorLockTime = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocalTime(dataReport.AttriButeData);
                            Application.RunOnMainThread(() =>
@@ -41,6 +39,7 @@
                                    textDisplayTime.Text = CurentDoorLockTime.Hour + ":" + CurentDoorLockTime.Minute;
                                }
                            });
                            }
                        }
                    }
                }
@@ -197,6 +196,7 @@
                        TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                        TextAlignment = TextAlignment.CenterRight,
                        TextSize = 12,
                        Text = "_" + Language.StringByID(R.MyInternationalizationString.Year) + "_" + Language.StringByID(R.MyInternationalizationString.Month) + "_" + Language.StringByID(R.MyInternationalizationString.Day),
                    };
                    textDisplayDateFrameLayout.AddChidren(textDisplayDate);
                    textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = btnDateTime.Y;
@@ -219,6 +219,7 @@
                        TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                        TextAlignment = TextAlignment.CenterRight,
                        TextSize = 12,
                        Text = "00:00",
                    };
                    textDisplayDateFrameLayout.AddChidren(textDisplayTime);
                    textDisplayDateFrameLayout.Y = btnNextFrameLayout.Y = btnDateTime.Y;
@@ -403,6 +404,7 @@
                        {
                            this.btnBottomTitle.TextID = R.MyInternationalizationString.CurrentTime;
                        }
                        mUIPickerView.Y = Application.GetRealWidth(95);
                        var mList1 = new List<string>();
                        var mList2 = new List<string>();
@@ -451,6 +453,7 @@
                            curMin = m;
                            curSec = dtNow.Second;
                        };
                        if (setTimeType == "ValidTime")
                        {
                            Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour = curHour;
@@ -464,6 +467,8 @@
                            Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateSecond = curSec;
                        }
                        if (setTimeType != "DoorLockTime")
                        {
                        var btnOk = new Button
                        {
                            X = Application.GetRealWidth(919),
@@ -496,6 +501,7 @@
                            this.shadowRadiusFrameLayout.RemoveFromParent();
                        };
                    }
                    }
                };
                btnDateTime.MouseDownEventHandler += hander;
                textDisplayDateFrameLayout.MouseDownEventHandler += hander;