| | |
| | | /// </summary>
|
| | | private VerticalListRefreshControl listView = null;
|
| | | /// <summary>
|
| | | /// 前一次显示出左滑菜单的RowLayout
|
| | | /// </summary>
|
| | | private RowLayoutControl oldShowRightMuneRow = null;
|
| | | /// <summary>
|
| | | /// 行控件的信息(Keys:Mac地址)
|
| | | /// </summary>
|
| | | private Dictionary<string, DeviceObjRowInfo> dicRowInfo = new Dictionary<string, DeviceObjRowInfo>();
|
| | |
| | |
|
| | | //控件
|
| | | var rowMenu = new DeviceObjectControl(deviceMac, listView.rowSpace / 2);
|
| | | rowMenu.MainKeys = deviceMac;
|
| | | frameTable.AddChidren(rowMenu);
|
| | | rowMenu.InitControl();
|
| | | rowInfo.MenuRow = rowMenu;
|
| | |
| | | if (listdevice.Count > 0 && Common.LocalDevice.Current.DeviceIsCanFixedPosition(listdevice[0]) == true)
|
| | | {
|
| | | //定位
|
| | | var btnPosition = new NormalViewControl(Application.GetRealWidth(184), rowMenu.Height, false);
|
| | | var btnPosition = rowMenu.AddEditorControl(false);
|
| | | btnPosition.TextID = R.MyInternationalizationString.uFixedPosition;
|
| | | btnPosition.TextAlignment = TextAlignment.Center;
|
| | | btnPosition.TextSize = 12;
|
| | | btnPosition.TextColor = UserCenterColor.Current.White;
|
| | | btnPosition.BackgroundColor = 0xff4a4a4a;
|
| | | rowMenu.AddRightView(btnPosition);
|
| | | btnPosition.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //定位
|
| | |
| | |
|
| | | rowMenu.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //隐藏菜单
|
| | | rowMenu.HideMenu();
|
| | | //强制跳转真实设备界面
|
| | | if (UserCenterResourse.HideOption.GotoRealDeviceForm == 1)
|
| | | {
|
| | | var form2 = new DeviceAddSuccessForm();
|
| | | form2.AddForm(deviceMac);
|
| | | return;
|
| | | }
|
| | | btnNew.Visible = false;
|
| | | var form = new DeviceMacInfoEditorForm();
|
| | | form.AddForm(deviceMac);
|
| | | //界面跳转,记录当前的正在操作的设备的Mac地址
|
| | | this.nowActionDeviceMac = deviceMac;
|
| | | };
|
| | | //左滑菜单事件
|
| | | rowMenu.OpenMenuAction += () =>
|
| | | {
|
| | | if (this.oldShowRightMuneRow != null && this.oldShowRightMuneRow.MainKeys != rowMenu.MainKeys)
|
| | | {
|
| | | //左滑菜单只能滑一个
|
| | | this.oldShowRightMuneRow.HideMenu();
|
| | | }
|
| | | this.oldShowRightMuneRow = rowMenu;
|
| | | };
|
| | | }
|
| | |
|
| | |
| | |
|
| | | //行控件
|
| | | var rowDevice = new DeviceRoomControl(device, frame.rowSpace / 2);
|
| | | rowDevice.MainKeys = LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | frame.AddChidren(rowDevice);
|
| | | rowDevice.frameTable.LeftOffset = Application.GetRealWidth(173) - ControlCommonResourse.XXLeft;
|
| | | rowDevice.InitControl();
|
| | |
| | | if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(device) == true)
|
| | | {
|
| | | //定位
|
| | | var btnPosition = new NormalViewControl(Application.GetRealWidth(184), rowDevice.Height, false);
|
| | | var btnPosition = rowDevice.AddEditorControl(false);
|
| | | btnPosition.TextID = R.MyInternationalizationString.uFixedPosition;
|
| | | btnPosition.TextAlignment = TextAlignment.Center;
|
| | | btnPosition.TextSize = 12;
|
| | | btnPosition.TextColor = UserCenterColor.Current.White;
|
| | | btnPosition.BackgroundColor = 0xff4a4a4a;
|
| | | rowDevice.AddRightView(btnPosition);
|
| | | btnPosition.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //定位
|
| | |
| | |
|
| | | rowDevice.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //隐藏菜单
|
| | | rowDevice.HideMenu();
|
| | | //界面跳转,记录当前的正在操作的设备的Mac地址
|
| | | this.nowActionDeviceMac = device.DeviceAddr;
|
| | | //显示设备功能配置界面
|
| | | this.ShowDeviceFunctionSettionForm(device, deviceEnumInfo);
|
| | | };
|
| | | //左滑菜单事件
|
| | | rowDevice.OpenMenuAction += () =>
|
| | | {
|
| | | if (this.oldShowRightMuneRow != null && this.oldShowRightMuneRow.MainKeys != rowDevice.MainKeys)
|
| | | {
|
| | | //左滑菜单只能滑一个
|
| | | this.oldShowRightMuneRow.HideMenu();
|
| | | }
|
| | | this.oldShowRightMuneRow = rowDevice;
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | form.AddForm(device, true);
|
| | | }
|
| | | //新风面板
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueNewWind)
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
|
| | | {
|
| | | var form = new DeviceFunctionSettionForm();
|
| | | form.AddForm(device, true);
|
| | | //方悦新风面板的按键配置
|
| | | var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
|
| | | form.AddForm(device);
|
| | | }
|
| | | //方悦面板
|
| | | else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueTwo
|