| | |
| | |
|
| | | var frameTemp = new FrameLayout();
|
| | | frameTemp.Height = Application.GetRealHeight(69);
|
| | | listView.AddChidrenFrame(frameTemp);
|
| | | listView.AddChidren(frameTemp);
|
| | |
|
| | | HdlThreadLogic.Current.RunMainInThread(() =>
|
| | | {
|
| | |
| | | }
|
| | | var frameTemp2 = new FrameLayout();
|
| | | frameTemp2.Height = Application.GetRealHeight(29);
|
| | | listView.AddChidrenFrame(frameTemp2);
|
| | | listView.AddChidren(frameTemp2);
|
| | |
|
| | | //数据接收
|
| | | this.StartReceiveDataEvent();
|
| | |
| | | {
|
| | | var rowInfo = new RowControlInfo();
|
| | |
|
| | | var frameTable = new FrameLayoutControl();
|
| | | var frameTable = new FrameLayoutStatuControl();
|
| | | frameTable.UseClickStatu = false;
|
| | | frameTable.Width = Application.GetRealWidth(994);
|
| | | frameTable.Height = Application.GetRealHeight(337);
|
| | | frameTable.BackgroundImagePath = "Item/IndoorUnitGround.png";
|
| | | frameTable.Gravity = Gravity.CenterHorizontal;
|
| | | listView.AddChidrenFrame(frameTable);
|
| | | listView.AddChidren(frameTable);
|
| | |
|
| | | //设备图标
|
| | | var btnIconBack = new FrameLayout();
|
| | | btnIconBack.X = Application.GetRealWidth(46);
|
| | | btnIconBack.Y = Application.GetRealHeight(43);
|
| | | btnIconBack.Height = Application.GetMinRealAverage(112);
|
| | | btnIconBack.Width = Application.GetMinRealAverage(112);
|
| | | btnIconBack.Radius = (uint)Application.GetMinRealAverage(112) / 2;
|
| | | btnIconBack.Height = this.GetPictrueRealSize(112);
|
| | | btnIconBack.Width = this.GetPictrueRealSize(112);
|
| | | btnIconBack.Radius = (uint)this.GetPictrueRealSize(112) / 2;
|
| | | btnIconBack.BackgroundColor = 0xfff5f6fa;
|
| | | frameTable.AddChidren(btnIconBack, ChidrenBindMode.NotBind);
|
| | | rowInfo.btnIconBack = btnIconBack;
|
| | |
| | | btnIcon.Gravity = Gravity.Center;
|
| | | Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device);
|
| | | btnIconBack.AddChidren(btnIcon);
|
| | | frameTable.ChangedChidrenBindMode(btnIconBack, ChidrenBindMode.BindEventOnly);
|
| | | frameTable.ChangedChidrenBindMode(btnIconBack, ChidrenBindMode.BindEvent);
|
| | | rowInfo.btnIcon = btnIcon;
|
| | |
|
| | | //设备名称
|
| | |
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | btnDeviceName.X = Application.GetRealWidth(193);
|
| | | btnDeviceName.Y = Application.GetRealHeight(45);
|
| | | frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEventOnly);
|
| | | frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent);
|
| | | rowInfo.btnDeviceName = btnDeviceName;
|
| | | //房间
|
| | | var btnRoom = new NormalViewControl(400, 50, true);
|
| | |
| | | btnRoom.TextSize = 12;
|
| | | btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnRoom.Text = HdlRoomLogic.Current.GetRoomNameByDevice(device);
|
| | | frameTable.AddChidren(btnRoom, ChidrenBindMode.BindEventOnly);
|
| | | frameTable.AddChidren(btnRoom, ChidrenBindMode.BindEvent);
|
| | | rowInfo.btnRoom = btnRoom;
|
| | | //摄氏度
|
| | | var btnValue = new NormalViewControl(300, 60, true);
|
| | |
| | | btnValue.X = frameTable.Width - Application.GetRealWidth(300 + 58);
|
| | | btnValue.TextAlignment = TextAlignment.CenterRight;
|
| | | btnValue.TextID = R.MyInternationalizationString.uGetting;
|
| | | frameTable.AddChidren(btnValue, ChidrenBindMode.BindEventOnly);
|
| | | frameTable.AddChidren(btnValue, ChidrenBindMode.BindEvent);
|
| | | rowInfo.btnValue = btnValue;
|
| | | //警告图标
|
| | | var btnWarningIcon = new IconViewControl(69);
|
| | |
| | | {
|
| | | for (int i = 0; i < listDevice.Count; i++)
|
| | | {
|
| | | if (i != 0 && i % 3 == 0)
|
| | | if (this.Parent == null)
|
| | | {
|
| | | //读取5个后,间隔一段时间
|
| | | System.Threading.Thread.Sleep(200);
|
| | | if (this.Parent == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | return;
|
| | | }
|
| | | //获取当前室温
|
| | | ((AC)listDevice[i]).ReadLocalTemperature();
|
| | | //获取开关状态(处于某种工作状态,即为打开状态)
|
| | | ((AC)listDevice[i]).ReadSystemMode();
|
| | | //清洗滤网
|
| | | listDevice[i].ReadAttri(Cluster_ID.Thermostat, AttriButeId.FilterCleaningStatus);
|
| | | //读取状态
|
| | | HdlDeviceAttributeLogic.Current.SendThermostatStatuComand(listDevice[i]);
|
| | | System.Threading.Thread.Sleep(200);
|
| | | }
|
| | | });
|
| | | }
|