| | |
| | | this.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //调用场景
|
| | | this.CanClick = false;
|
| | | this.SetSceneAction();
|
| | | };
|
| | | }
|
| | |
| | | //场景背景图控件
|
| | | this.btnSceneBackGroud = new PicViewControl(this.Width, this.Height, false);
|
| | | btnSceneBackGroud.UnSelectedImagePath = "Scene/Background.png";
|
| | | this.AddChidren(btnSceneBackGroud, ChidrenBindMode.BindEventOnly);
|
| | | this.AddChidren(btnSceneBackGroud, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //延时时间显示控件
|
| | | this.btnTimeView = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(280), HdlControlLogic.Current.GetPictrueRealSize(63), false);
|
| | |
| | | {
|
| | | btnTimeView.Text= this.GetTimeString(i_scene.SceneDelayTime, hourText, minuText, secondText);
|
| | | }
|
| | | this.AddChidren(btnTimeView, ChidrenBindMode.BindEventOnly);
|
| | | this.AddChidren(btnTimeView, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //时间图标控件
|
| | | this.btnTimeIcon = new IconViewControl(63);
|
| | |
| | | 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;
|
| | | };
|
| | | };
|
| | |
|
| | |
| | | {
|
| | | //取消收藏
|
| | | HdlSceneLogic.Current.DeleteLoveScene(i_scene);
|
| | | if (HdlRoomLogic.Current.CurrentRoom.IsLove == true)
|
| | | if (HdlRoomLogic.Current.NowMainPageRoom.IsLove == true)
|
| | | {
|
| | | //如果当前房间是我的喜爱的话,回调卡片被删除的事件
|
| | | this.CardNeedRemoveEvent?.Invoke();
|
| | |
| | | btnSceneName.Y = HdlControlLogic.Current.GetPictrueRealSize(236);
|
| | | btnSceneName.IsBold = true;
|
| | | btnSceneName.TextColor = UserCenterColor.Current.White;
|
| | | this.AddChidren(btnSceneName, ChidrenBindMode.BindEventOnly);
|
| | | this.AddChidren(btnSceneName, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //刷新控件状态
|
| | | this.RefreshControlInfo(i_scene);
|
| | |
| | | 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();
|
| | | }
|