| | |
| | | /// <summary>
|
| | | /// 列表控件
|
| | | /// </summary>
|
| | | private VerticalListControl listview = null;
|
| | | private FrameListControl listview = null;
|
| | | /// <summary>
|
| | | /// 设备的设备类型
|
| | | /// </summary>
|
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | var listBackControl = new VerticalFrameControl();
|
| | | listBackControl.Height = bodyFrameLayout.Height;
|
| | | bodyFrameLayout.AddChidren(listBackControl);
|
| | |
|
| | | //初始化桌布
|
| | | var tableContr = new InformationEditorControl();
|
| | | this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 369, 1368);
|
| | | this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 1368);
|
| | |
|
| | | //图片
|
| | | var btnPic = new DeviceInfoIconControl();
|
| | | btnPic.Y = Application.GetRealHeight(92);
|
| | | btnPic.Gravity = Gravity.CenterHorizontal;
|
| | | bodyFrameLayout.AddChidren(btnPic);
|
| | | listBackControl.frameTable.AddChidren(btnPic);
|
| | | btnPic.InitControl(listNewDevice[0]);
|
| | |
|
| | | //设备备注
|
| | |
| | | //划线
|
| | | btnType.AddBottomLine();
|
| | |
|
| | | //所属区域
|
| | | //安装位置
|
| | | var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(rowBeloneArea);
|
| | | rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), this.listNewDevice);
|
| | | rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uInstallationLocation), this.listNewDevice);
|
| | | //底线
|
| | | rowBeloneArea.AddBottomLine();
|
| | |
|
| | | var listCheck = new List<string>();
|
| | | rowBeloneArea.SelectRoomEvent += (roomKeys) =>
|
| | | {
|
| | | //选择未分配时,清空
|
| | | if (roomKeys == string.Empty) { listCheck = new List<string>(); }
|
| | | foreach (var device in this.listNewDevice)
|
| | | {
|
| | | if (device is OTADevice)
|
| | | {
|
| | | //针对单纯只有一个200端点的设备
|
| | | continue;
|
| | | }
|
| | | if (roomKeys == string.Empty)
|
| | | {
|
| | | //如果选择的是未分配,则它的全部回路无条件全部清空房间
|
| | | HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
|
| | | continue;
|
| | | }
|
| | | var room = HdlRoomLogic.Current.GetRoomByDevice(device);
|
| | |
| | | this.AddAllMenuRow();
|
| | |
|
| | | //初始化桌布完成
|
| | | tableContr.FinishInitControl(bodyFrameLayout, this.listview);
|
| | | tableContr.FinishInitControl();
|
| | | tableContr = null;
|
| | |
|
| | | //保存
|
| | |
| | | };
|
| | | actionNone = () =>
|
| | | {
|
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action);
|
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock);
|
| | | };
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone);
|
| | | }
|
| | |
| | | };
|
| | | actionNone = () =>
|
| | | {
|
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action);
|
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock);
|
| | | };
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone);
|
| | |
|
| | |
| | | {
|
| | | //检测此回路是否拥有定位功能(拿端点最小的那个回路去定位)
|
| | | bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
|
| | | if (this.deviceEnumInfo.BeloneType == DeviceBeloneType.A智能门锁)
|
| | | {
|
| | | canTest = false;
|
| | | }
|
| | | else if (this.deviceEnumInfo.BeloneType == DeviceBeloneType.A传感器
|
| | | && this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir)
|
| | | {
|
| | | //传感器除了Pir都没有定位功能
|
| | | canTest = false;
|
| | | }
|
| | | |
| | | var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
|
| | |
|
| | | string deviceMenu = string.Empty;
|
| | | if (canTest == true)
|
| | | {
|