| | |
| | | this.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //调用场景
|
| | | this.CanClick = false;
|
| | | this.SetSceneAction();
|
| | | };
|
| | | }
|
| | |
| | | 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;
|
| | | };
|
| | | };
|
| | |
|
| | |
| | | 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;
|
| | |
| | | }
|
| | |
|
| | | //开启延时倒计时特效
|
| | | this.CanClick = false;
|
| | | this.StartRemainTimeApreal(i_scene);
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (i_scene.RemainTime <= 0)
|
| | | {
|
| | | this.CanClick = true;
|
| | | return;
|
| | | }
|
| | | int remainTine = i_scene.RemainTime;
|
| | |
| | | while (remainTine > 0 && this.Parent != null)
|
| | | {
|
| | | System.Threading.Thread.Sleep(1000);
|
| | | Application.RunOnMainThread(() =>
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | this.btnTimeView.Text = this.GetTimeString(remainTine, hourText, minuText, secondText);
|
| | | });
|
| | | }, ShowErrorMode.NO);
|
| | | remainTine--;
|
| | | }
|
| | | Application.RunOnMainThread(() =>
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //倒计时结束时,时间图标显示
|
| | | this.btnTimeIcon.Visible = true;
|
| | | this.btnTimeView.Text = string.Empty;
|
| | | //直接开启Loading特效
|
| | | this.StartLoadingApreal();
|
| | | });
|
| | | this.CanClick = true;
|
| | | }, ShowErrorMode.NO);
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | }
|