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
|
| | | };
|
| | |
| | | var listDevice = new List<CommonDevice>();
|
| | | for (int i = 0; i < rowInfo.listDeviceKeys.Count; i++)
|
| | | {
|
| | | var device = LocalDevice.Current.GetDevice(rowInfo.listDeviceKeys[i]); |
| | | |
| | | //获取设备类型的 |
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | //新风面板下的回路不显示,(如新风、温/湿度传感器则不显示) |
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) |
| | | { |
| | | continue; |
| | | var device = LocalDevice.Current.GetDevice(rowInfo.listDeviceKeys[i]);
|
| | |
|
| | | //获取设备类型的
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
|
| | | //新风面板下的回路不显示,(如新风、温/湿度传感器则不显示)
|
| | | if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (device != null)
|
| | |
| | | }
|
| | | // 新风
|
| | | else if (device.Type == DeviceType.FreshAir)
|
| | | { |
| | | cardContr = new Controls.DeviceFreshAirRowControl(listView.rowSpace / 2); |
| | | {
|
| | | cardContr = new Controls.DeviceFreshAirRowControl(listView.rowSpace / 2);
|
| | | }
|
| | | //彩灯(调光器)
|
| | | else if (device.Type == DeviceType.DimmableLight)
|
| | |
| | | {
|
| | | listview2 = new VerticalListControl();
|
| | | functionSceneBodyView.AddChidren(listview2);
|
| | | } |
| | | |
| | | }
|
| | | |
| | | foreach (var scene in listScene)
|
| | | {
|
| | | //场景卡片控件
|
| | |
| | | {
|
| | | 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;
|
| | | }
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | //开启场景延时特效
|
| | | 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(sceneContr.scene);
|
| | | while (remainTime > 0 && this.Parent != null)
|
| | | {
|
| | | //开启内部延时时间线程(旨在全部地方的同一场景时间同步)
|
| | | HdlSceneLogic.Current.StartDelayTimeThread(seceneContr.scene);
|
| | | while (remainTime > 0 && this.Parent != null)
|
| | | {
|
| | | System.Threading.Thread.Sleep(1000);
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | seceneContr.SetTimeText(this.GetTimeString(remainTime, hourText, minuText, secondText));
|
| | | });
|
| | | remainTime--;
|
| | | }
|
| | | System.Threading.Thread.Sleep(1000);
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | if (listview.Parent != null)
|
| | | {
|
| | | seceneContr.SetTimeImage();
|
| | | //开启Loading特效
|
| | | seceneContr.StartLoadingApreal();
|
| | | }
|
| | | sceneContr.SetTimeText(this.GetTimeString(remainTime, hourText, minuText, secondText));
|
| | | });
|
| | | remainTime--;
|
| | | }
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | if (listview.Parent != null)
|
| | | {
|
| | | sceneContr.SetTimeImage();
|
| | | //开启Loading特效
|
| | | 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
|
| | | };
|
| | |
| | | LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2);
|
| | | dic[typeInfo.BeloneTextId].IconPath = path1;
|
| | | dic[typeInfo.BeloneTextId].IconPathSelected = path2;
|
| | | if (device.Type == DeviceType.FreshAir) |
| | | { |
| | | dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png"; |
| | | dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png"; |
| | | if (device.Type == DeviceType.FreshAir)
|
| | | {
|
| | | dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png";
|
| | | dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png";
|
| | | }
|
| | | dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
|
| | | }
|