HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-12-30 3dcbd186c42c598c0c08d1cd37034cf2baa09e54
ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs
@@ -48,6 +48,7 @@
        /// <param name="i_iasZone">传感器设备</param>
        public void ShowForm(IASZone i_iasZone)
        {
            UserView.HomePage.Instance.ScrollEnabled = false;
            deviceIASZone = i_iasZone;
            //设置头部信息
@@ -70,8 +71,6 @@
            var result = await this.GetDeviceAllDefultData();
            if (result == false)
            {
                //显示重新加载的界面
                this.ShowReLoadView();
                return;
            }
@@ -108,7 +107,7 @@
            var btnIfRinght = frameIfRow.AddMostRightEmptyIcon(58, 58);
            frameIfRow.ChangedChidrenBindMode(btnIfRinght, ChidrenBindMode.NotBind);
            btnIfRinght.UseClickStatu = false;
            btnIfRinght.UnSelectedImagePath = "Item/Next.png";
            btnIfRinght.UnSelectedImagePath = "Item/RightNext.png";
            btnIfRinght.SelectedImagePath = "Item/Down.png";
            btnIfRinght.IsSelected = true;
            btnIfRinght.ButtonClickEvent += (sender, e) =>
@@ -130,22 +129,19 @@
            btnLight.Y = Application.GetRealHeight(58);
            frameLight.AddChidren(btnLight);
            //进度条
            var seekBar = new HorizontalSeekBar();
            seekBar.X = Application.GetRealWidth(138);
            seekBar.Y = Application.GetRealHeight(152);
            seekBar.Width = Application.GetRealWidth(884);
            seekBar.Height = Application.GetRealHeight(84);
            seekBar.Max = lightLevelCount - 1;
            seekBar.BackgroundColor = 0xfff5f5f5;
            seekBar.ThumbColor = Common.ZigbeeColor.Current.GXCButtonBlueColor;
            seekBar.ProgressColor = 0xfffdb500;
            seekBar.Progress = lightLevelCount - Lightconfigure.levelSize;
            var seekBar = new SeekBarControl(900);
            seekBar.Gravity = Gravity.Frame;
            seekBar.X = Application.GetRealWidth(125);
            seekBar.Y = Application.GetRealHeight(142);
            seekBar.MaxValue = lightLevelCount - 1;
            seekBar.ProgressBarColor = 0xfffdb500;
            frameLight.AddChidren(seekBar);
            seekBar.ProgressChanged += (sender, value) =>
            seekBar.ProgressChangedEvent += (div, value) =>
            {
                //因为它的等级刻度从左往右是从大到小的
                this.Lightconfigure.levelSize = lightLevelCount - value;
            };
            seekBar.Progress = lightLevelCount - Lightconfigure.levelSize;
            //低
            var btnDown = new NormalViewControl(300, 50, true);
@@ -184,7 +180,7 @@
            var btnResultRight = frameDo.AddMostRightEmptyIcon(58, 58);
            frameDo.ChangedChidrenBindMode(btnResultRight, ChidrenBindMode.NotBind);
            btnResultRight.UseClickStatu = false;
            btnResultRight.UnSelectedImagePath = "Item/Next.png";
            btnResultRight.UnSelectedImagePath = "Item/RightNext.png";
            btnResultRight.SelectedImagePath = "Item/Down.png";
            btnResultRight.IsSelected = true;
            btnResultRight.ButtonClickEvent += (sender, e) =>
@@ -286,7 +282,6 @@
                this.CloseProgressBar(ShowReLoadMode.YES);
                return false;
            }
            listDevice = Common.LocalDevice.Current.SortDevice(listDevice);
            foreach (var device in listDevice)
            {
                this.listEsixtDevice.Add(Common.LocalDevice.Current.GetDeviceMainKeys(device));
@@ -445,7 +440,7 @@
            if (listOldData[0] != Lightconfigure.levelSize || listOldData[1] != Lightconfigure.transitionTime)
            {
                //保存灯光配置
                var result = await HdlDevicePirSensorLogic.Current.SetPirSensorLightSettion(this.deviceIASZone, this.Lightconfigure);
                var result = await HdlDevicePirSensorLogic.Current.SetPirSensorSettion(this.deviceIASZone, this.Lightconfigure);
                if (result == false)
                {
                    //关闭进度条
@@ -464,5 +459,18 @@
        }
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>
        /// 界面关闭
        /// </summary>
        public override void CloseFormBefore()
        {
            UserView.HomePage.Instance.ScrollEnabled = true;
            base.CloseFormBefore();
        }
        #endregion
    }
}