xm
2020-07-14 d87400af518ebc9274f4447f06476959c3aa5102
ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
@@ -60,6 +60,7 @@
            this.ButtonClickEvent += (sender, e) =>
            {
                //调用场景
                this.CanClick = false;
                this.SetSceneAction();
            };
        }
@@ -125,12 +126,17 @@
                timeSelect.Init();
                timeSelect.TimeAction = (time) =>
                {
                    //选择的是不开启
                    if (time == 0) { return; }
                    i_scene.SceneDelayTime = time;
                   //时间图标不显示
                   this.btnTimeIcon.Visible = false;
                   //显示剩余的时间
                   this.btnTimeView.Text = this.GetTimeString(time, hourText, minuText, secondText);
                    //选择延时时,需要刷新主页
                    UserView.UserPage.Instance.RefreshAllForm = true;
                };
            };
@@ -195,7 +201,13 @@
            var result = await HdlSceneLogic.Current.ControlScene(scene);
            if (result == false)
            {
                this.CanClick = true;
                return;
            }
            if (scene.SceneDelayTime > 0)
            {
                //调用有延时的场景,需要刷新主页
                UserView.UserPage.Instance.RefreshAllForm = true;
            }
            //修改时间
            scene.RemainTime = scene.SceneDelayTime;
@@ -236,6 +248,7 @@
            }
            //开启延时倒计时特效
            this.CanClick = false;
            this.StartRemainTimeApreal(i_scene);
        }
@@ -251,6 +264,7 @@
        {
            if (i_scene.RemainTime <= 0)
            {
                this.CanClick = true;
                return;
            }
            int remainTine = i_scene.RemainTime;
@@ -284,6 +298,7 @@
                    this.btnTimeView.Text = string.Empty;
                    //直接开启Loading特效
                    this.StartLoadingApreal();
                    this.CanClick = true;
                });
            })
            { IsBackground = true }.Start();