old mode 100644
new mode 100755
| | |
| | | frameSwitchBack.AddChidren(btnFloorName);
|
| | | btnFloorName.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var floors = new Device.Category.SelectFloor();
|
| | | var floors = new SelectFloorForm();
|
| | | AddChidren(floors);
|
| | | floors.Init(580, 330, Direction.Right);
|
| | | floors.changeFloor = true;
|
| | |
| | | var noFunction = new Button()
|
| | | {
|
| | | Y = Application.GetRealHeight(320),
|
| | | Width = Application.GetMinRealAverage(757),
|
| | | Height = Application.GetMinRealAverage(435),
|
| | | Width = this.GetPictrueRealSize(757),
|
| | | Height = this.GetPictrueRealSize(435),
|
| | | UnSelectedImagePath = "Item/NoFunction.png",
|
| | | Gravity = Gravity.CenterHorizontal
|
| | | };
|
| | |
| | | {
|
| | | if (listview1 != null)
|
| | | {
|
| | | //获取全部场景的延时时间
|
| | | this.GetAllDelayScene(dicSceneContr, listview1);
|
| | | //打开全部场景的延时时间
|
| | | this.StartAllDelayScene(dicSceneContr, listview1);
|
| | | }
|
| | | else
|
| | | {
|
| | | //获取全部场景的延时时间
|
| | | this.GetAllDelayScene(dicSceneContr, listview2);
|
| | | //打开全部场景的延时时间
|
| | | this.StartAllDelayScene(dicSceneContr, listview2);
|
| | | }
|
| | | }, ShowErrorMode.NO);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 获取全部场景的延时时间
|
| | | /// 打开全部场景的延时时间
|
| | | /// </summary>
|
| | | /// <param name="dicSceneContr"></param>
|
| | | private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, ViewGroup listview)
|
| | | private async void StartAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, ViewGroup listview)
|
| | | {
|
| | | string hourText = Language.StringByID(R.MyInternationalizationString.Hour);
|
| | | string minuText = Language.StringByID(R.MyInternationalizationString.Minute);
|
| | | string secondText = Language.StringByID(R.MyInternationalizationString.Second);
|
| | |
|
| | | //如果当前住宅是虚拟住宅
|
| | | if (Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //开启延时特效
|
| | | foreach (var myContr in dicSceneContr.Values)
|
| | | {
|
| | | if (myContr.scene.RemainTime > 0)
|
| | | {
|
| | | //开启场景延时特效
|
| | | this.StartSceneDelayApeal(myContr, listview, myContr.scene.RemainTime, hourText, minuText, secondText);
|
| | | }
|
| | | }
|
| | | }, ShowErrorMode.NO);
|
| | | return;
|
| | | }
|
| | |
|
| | | //读取全部的延时时间
|
| | | var result = await Scene.CatDelaySceneAsync();
|
| | | if (result == null || result.catDelaySceneResponseData == null ||
|
| | |
| | | //出错不鸟它
|
| | | return;
|
| | | }
|
| | |
|
| | | string hourText = Language.StringByID(R.MyInternationalizationString.Hour);
|
| | | string minuText = Language.StringByID(R.MyInternationalizationString.Minute);
|
| | | string secondText = Language.StringByID(R.MyInternationalizationString.Second);
|
| | |
|
| | | foreach (var data in result.catDelaySceneResponseData.DelayScenesList)
|
| | | {
|
| | |
| | | {
|
| | | continue;
|
| | | }
|
| | | //开启场景延时特效
|
| | | this.StartSceneDelayApeal(seceneContr, listview, remainTime, hourText, minuText, secondText);
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 开启场景延时特效
|
| | | /// </summary>
|
| | | /// <param name="sceneContr"></param>
|
| | | /// <param name="remainTime"></param>
|
| | | /// <param name="hourText"></param>
|
| | | /// <param name="minuText"></param>
|
| | | /// <param name="secondText"></param>
|
| | | private void StartSceneDelayApeal(SceneCategoryView sceneContr, ViewGroup listview, int remainTime,
|
| | | string hourText, string minuText, string secondText)
|
| | | {
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //开启内部延时时间线程(旨在全部地方的同一场景时间同步)
|
| | | HdlSceneLogic.Current.StartDelayTimeThread(seceneContr.scene);
|
| | | HdlSceneLogic.Current.StartDelayTimeThread(sceneContr.scene);
|
| | | while (remainTime > 0 && this.Parent != null)
|
| | | {
|
| | | System.Threading.Thread.Sleep(1000);
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | seceneContr.SetTimeText(this.GetTimeString(remainTime, hourText, minuText, secondText));
|
| | | sceneContr.SetTimeText(this.GetTimeString(remainTime, hourText, minuText, secondText));
|
| | | });
|
| | | remainTime--;
|
| | | }
|
| | |
| | | {
|
| | | if (listview.Parent != null)
|
| | | {
|
| | | seceneContr.SetTimeImage();
|
| | | sceneContr.SetTimeImage();
|
| | | //开启Loading特效
|
| | | seceneContr.StartLoadingApreal();
|
| | | sceneContr.StartLoadingApreal();
|
| | | }
|
| | | });
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | var noFunction = new Button()
|
| | | {
|
| | | Y = Application.GetRealHeight(320),
|
| | | Width = Application.GetMinRealAverage(757),
|
| | | Height = Application.GetMinRealAverage(435),
|
| | | Width = this.GetPictrueRealSize(757),
|
| | | Height = this.GetPictrueRealSize(435),
|
| | | UnSelectedImagePath = "Item/NoFunction.png",
|
| | | Gravity = Gravity.CenterHorizontal
|
| | | };
|