wxr
2022-01-19 121c045cf55c647420cb372f717e528c053295ef
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -5,6 +5,7 @@
using System.Text;
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
using HDL_ON.DriverLayer;
namespace HDL_ON.UI
{
@@ -96,24 +97,26 @@
            this.dicText["已连接"] = Language.StringByID(StringId.Connected);
            this.dicText["未连接"] = Language.StringByID(StringId.UnConnected);
            //左右翻页的事件
            base.PageChangeEvent += (index) =>
            {
                if (index == 1)
                {
                    //初始化门锁历史记录以及控件
                    this.InitDoorHistoryLogAndControl();
                }
            };
            ////左右翻页的事件
            //base.PageChangeEvent += (index) =>
            //{
            //    if (index == 1)
            //    {
            //        //初始化门锁历史记录以及控件
            //        this.InitDoorHistoryLogAndControl();
            //    }
            //};
            //刷新当前设备的状态缓存
            this.RefreshNowDeviceStatuMemory(this.device);
            //初始化第一个索引页的内容
            this.InitFrameWhiteContent1();
            //初始化第二个索引页(历史记录)
            this.InitFrameWhiteContent2();
            ////初始化第二个索引页(历史记录)
            //this.InitFrameWhiteContent2();
            //刷新界面状态
            this.RefreshFormStatu();
            //读取设备状态
            Control.Ins.SendReadCommand(device);
        }
        /// <summary>
@@ -182,42 +185,42 @@
            frameTempPsw.Visible = false;
            FrameWhiteCentet1.AddChidren(frameTempPsw);
            //声音
            this.btnVoice = new IconViewControl(24);
            btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png";
            btnVoice.X = Application.GetRealWidth(23);
            btnVoice.Y = Application.GetRealHeight(410);
            FrameWhiteCentet1.AddChidren(btnVoice);
            ////声音
            //this.btnVoice = new IconViewControl(24);
            //btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png";
            //btnVoice.X = Application.GetRealWidth(23);
            //btnVoice.Y = Application.GetRealHeight(410);
            //FrameWhiteCentet1.AddChidren(btnVoice);
            //声音的滑动条
            this.seekBarVoiceControl = new SeekBarImageControl(215);
            seekBarVoiceControl.Gravity = Gravity.CenterHorizontal;
            FrameWhiteCentet1.AddChidren(seekBarVoiceControl);
            seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2;
            //绑定PageLayout控件
            seekBarVoiceControl.BindPageLayout();
            ////声音的滑动条
            //this.seekBarVoiceControl = new SeekBarImageControl(215);
            //seekBarVoiceControl.Gravity = Gravity.CenterHorizontal;
            //FrameWhiteCentet1.AddChidren(seekBarVoiceControl);
            //seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2;
            ////绑定PageLayout控件
            //seekBarVoiceControl.BindPageLayout();
            //声音百分比
            this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false);
            btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding;
            btnVoicePersent.Y = btnVoice.Y;
            btnVoicePersent.TextColor = CSS_Color.PromptingColor1;
            btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
            btnVoicePersent.Text = "100%";
            FrameWhiteCentet1.AddChidren(btnVoicePersent);
            ////声音百分比
            //this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false);
            //btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding;
            //btnVoicePersent.Y = btnVoice.Y;
            //btnVoicePersent.TextColor = CSS_Color.PromptingColor1;
            //btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
            //btnVoicePersent.Text = "100%";
            //FrameWhiteCentet1.AddChidren(btnVoicePersent);
            seekBarVoiceControl.ProgressChangedEvent += (div, value) =>
            {
                btnVoicePersent.Text = value + "%";
                if (div == 1)
                {
                }
            };
            //seekBarVoiceControl.ProgressChangedEvent += (div, value) =>
            //{
            //    btnVoicePersent.Text = value + "%";
            //    if (div == 1)
            //    {
            //    }
            //};
            //初始化开锁菜单(一键开锁,临时密码开锁)
            this.InitUnLockMenuControl();
            //初始化底部菜单图标
            this.InitBottomMenuIconControl();
            //this.InitBottomMenuIconControl();
        }
        /// <summary>
@@ -226,7 +229,7 @@
        private void InitUnLockMenuControl()
        {
            //如果是成员,则只有一键开锁
            if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
            if (true)// DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
            {
                //一键开锁
                var btnOneKey = new NormalViewControl(100, 25, true);
@@ -908,6 +911,7 @@
                HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2);
                return;
            }
            Control.Ins.OneKeyUnlocking(this.device, this.device.GetAttrState("key"));
            //第一次使用,请先绑定门锁密码
            //HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () =>
            //{
@@ -921,42 +925,40 @@
            //    });
            //});
            if (UserInfo.Current.appUnlockPage.Contains("3") == true)
            {
                //调起安全认证
                HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
                {
                    //锁已打开
                    if (div == 1)
                    {
                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
                    }
                    else
                    {
                        //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
                        {
                            var page = new AppUnlockSettingsPage();
                            MainPage.BasePageView.AddChidren(page);
                            page.LoadPage();
                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        }, Language.StringByID(StringId.Jump));
                    }
                });
            }
            else
            {
                //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
                HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
                {
                    var page = new AppUnlockSettingsPage();
                    MainPage.BasePageView.AddChidren(page);
                    page.LoadPage();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }, Language.StringByID(StringId.Jump));
            }
            //if (UserInfo.Current.appUnlockPage.Contains("3") == true)
            //{
            //    //调起安全认证
            //    HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
            //    {
            //        //锁已打开
            //        if (div == 1)
            //        {
            //            HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
            //        }
            //        else
            //        {
            //            //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
            //            HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
            //            {
            //                var page = new AppUnlockSettingsPage();
            //                MainPage.BasePageView.AddChidren(page);
            //                page.LoadPage();
            //                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            //            }, Language.StringByID(StringId.Jump));
            //        }
            //    });
            //}
            //else
            //{
            //    //为了安全,请跳转至个人中心{0}设置个人密码,并应用于门锁开锁
            //    HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
            //    {
            //        var page = new AppUnlockSettingsPage();
            //        MainPage.BasePageView.AddChidren(page);
            //        page.LoadPage();
            //        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            //    }, Language.StringByID(StringId.Jump));
            //}
        }
        #endregion