WJC
2019-10-24 1f4cec0e3b571e7541f0c7f3a5ea302ed586d9fb
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs
old mode 100644 new mode 100755
@@ -161,8 +161,6 @@
                Text = Language.StringByID(R.MyInternationalizationString.ClickGenerate),
                TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
                TextSize = 12,
                Visible = true,
                Enable = true,
            };
            topMidTopFrameLayout.AddChidren(topPic);
@@ -245,15 +243,11 @@
            {
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                btnFinifh.Enable = true;
                topPic.Visible = true;
                topPic.Enable = true;
            }
            else
            {
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                btnFinifh.Enable = false;
                topPic.Visible = false;
                topPic.Enable = false;
            }
            if (string.IsNullOrEmpty(doorLock.LocalTempPassword))
            {
@@ -262,15 +256,12 @@
                randomPassword.X = Application.GetRealWidth(215);
                randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4;
                Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.IsModify = true;
                topPic.Visible = true;
                topPic.Enable = true;
            }
            else
            {
                randomPassword.Text = doorLock.LocalTempPassword;
                temPasswordVisiable.Visible = true;
                // topPic.Visible = false;
                // topPic.Enable = false;
                if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable)
                {
                    randomPassword.SecureTextEntry = false;
@@ -440,29 +431,6 @@
                btnNext.MouseDownEventHandler += hander;
            }
            var modifyTempPasswordTip1 = new Button()
            {
                Height = Application.GetRealHeight(49),
                Y = Application.GetRealHeight(628),
                TextID = R.MyInternationalizationString.ModifyTempPasswordTip1,
                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                TextSize = 12,
                TextAlignment = TextAlignment.Center,
            };
            bottomFrameLayout.AddChidren(modifyTempPasswordTip1);
            var modifyTempPasswordTip2 = new Button()
            {
                Height = Application.GetRealHeight(49),
                Y = modifyTempPasswordTip1.Bottom,
                Radius = (uint)Application.GetRealHeight(120) / 2,
                TextID = R.MyInternationalizationString.ModifyTempPasswordTip2,
                TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                TextSize = 12,
                TextAlignment = TextAlignment.Center,
            };
            bottomFrameLayout.AddChidren(modifyTempPasswordTip2);
            btnFinifh = new Button()
            {
                Width = Application.GetRealWidth(907),
@@ -501,40 +469,40 @@
                        });
                        return;
                    }
                    //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour == 100)
                    //{
                    //    //请设置生效时间;
                    //    Application.RunOnMainThread(() =>
                    //    {
                    //        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip2), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                    //    });
                    //    return;
                    //}
                    //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth == 0)
                    //{
                    //    //请设置生效日期;
                    //    Application.RunOnMainThread(() =>
                    //    {
                    //        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip3), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                    //    });
                    //    return;
                    //}
                    //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour == 100)
                    //{
                    //    Application.RunOnMainThread(() =>
                    //    {
                    //        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip4), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                    //    });
                    //    return;
                    //}
                    //if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth == 0)
                    //{
                    //    Application.RunOnMainThread(() =>
                    //    {
                    //        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip5), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                    //    });
                    //    return;
                    //}
                    if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour == 100)
                    {
                        //请设置生效时间;
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip2), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                        });
                        return;
                    }
                    if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth == 0)
                    {
                        //请设置生效日期;
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip3), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                        });
                        return;
                    }
                    if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateHour == 100)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip4), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                        });
                        return;
                    }
                    if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InValidDateMonth == 0)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip5), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                        });
                        return;
                    }
                    var dNow = DateTime.Now;
                    var validDateTime = new DateTime(dNow.Year, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMonth, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateDay, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour, Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateMinute, dNow.Second);
@@ -604,8 +572,8 @@
                                });
                                return;
                            }
                            //btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;//XMUnSelect  XMBlack
                            //btnFinifh.Enable = false;
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;//XMUnSelect  XMBlack
                            btnFinifh.Enable = false;
                            Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.IsModify = false;
                            doorLock.LocalTempPassword = doorLock.tempPasswordObject.TempPassword;
                            TimeDateData(doorLock.tempPasswordObject.ValidTime, doorLock.tempPasswordObject.InValidTime);
@@ -628,10 +596,7 @@
                        return;
                    }
                }
                catch (Exception ex)
                {
                    var mess = ex.Message;
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
@@ -671,7 +636,6 @@
                            doorLock.LocalTempPassword = "";
                            TimeDateData(DateTime.Now, DateTime.Now, true);
                            Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.InTempPasswordVisiable = false;
                            Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.IsModify = true;
                        }
                        else
                        {