| | |
| | | /// <summary>
|
| | | /// 列表控件
|
| | | /// </summary>
|
| | | private VerticalListControl listview = null;
|
| | | private FrameListControl listview = null;
|
| | | /// <summary>
|
| | | /// 当前选择的设备
|
| | | /// </summary>
|
| | |
| | | /// 设备需要保存的设备功能
|
| | | /// </summary>
|
| | | private Dictionary<int, DeviceFunctionType> dicDeviceFuncType = new Dictionary<int, DeviceFunctionType>();
|
| | | /// <summary>
|
| | | /// 信息编辑控件
|
| | | /// </summary>
|
| | | private InformationEditorControl tableContr = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | //清空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.uDeviceEditor), 708, 1028);
|
| | | this.tableContr = new InformationEditorControl();
|
| | | this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028);
|
| | |
|
| | | //初始化设备回路图标
|
| | | this.InitDeviceEpointIcon();
|
| | |
|
| | | //初始化桌布完成
|
| | | tableContr.FinishInitControl(bodyFrameLayout, this.listview);
|
| | | tableContr = null;
|
| | | this.InitDeviceEpointIcon(listBackControl);
|
| | |
|
| | | //保存
|
| | | var btnFinish = new BottomClickButton();
|
| | |
| | | rowBeloneArea.SelectRoomEvent += (roomKeys) =>
|
| | | {
|
| | | //变更房间
|
| | | Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, roomKeys);
|
| | | HdlRoomLogic.Current.ChangedRoom(nowSelectDevice, roomKeys);
|
| | | };
|
| | |
|
| | | //添加功能类型行
|
| | | this.AddFunctionTypeRow();
|
| | | //初始化桌布完成
|
| | | tableContr.FinishInitControl();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// </summary>
|
| | | private void InitTopRightMenu()
|
| | | {
|
| | | //检测此回路是否拥有定位功能
|
| | | if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var btnIcon = new MostRightIconControl(69, 69);
|
| | | btnIcon.UnSelectedImagePath = "Item/More.png";
|
| | | topFrameLayout.AddChidren(btnIcon);
|
| | |
| | | string deviceMenu = string.Empty;
|
| | | //检测此回路是否拥有定位功能
|
| | | bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice);
|
| | | if (canTest == true)
|
| | | {
|
| | | menuCount = 2;
|
| | | }
|
| | | var frame = new TopRightMenuControl(menuCount);
|
| | | //if (canTest == true)
|
| | | //{
|
| | | // menuCount = 2;
|
| | | //}
|
| | | var frame = new TopRightMenuControl(menuCount, 1);
|
| | | if (canTest == true)
|
| | | {
|
| | | //定位
|
| | |
| | | }
|
| | |
|
| | | //删除
|
| | | deviceMenu = Language.StringByID(R.MyInternationalizationString.uDelete);
|
| | | frame.AddRowMenu(deviceMenu, "Item/DeleteIcon2.png", "Item/DeleteIcon2Selected.png", () =>
|
| | | {
|
| | | });
|
| | | //deviceMenu = Language.StringByID(R.MyInternationalizationString.uDelete);
|
| | | //frame.AddRowMenu(deviceMenu, "Item/DeleteIcon2.png", "Item/DeleteIcon2Selected.png", () =>
|
| | | //{
|
| | | //});
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | //标题:选择功能类型
|
| | | var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
|
| | |
|
| | | var form = new BottomDialogSelectForm();
|
| | | var form = new BottomItemSelectForm();
|
| | | form.AddForm(title, listText, nowSelectNo);
|
| | | form.FinishSelectEvent += (selectNo) =>
|
| | | {
|
| | |
| | | /// <summary>
|
| | | /// 初始化设备回路图标
|
| | | /// </summary>
|
| | | private void InitDeviceEpointIcon()
|
| | | private void InitDeviceEpointIcon(VerticalFrameControl listBackControl)
|
| | | {
|
| | | bool hadDevice = false;
|
| | | var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceObj.DeviceAddr);
|
| | |
| | | frameBorder.Gravity = Gravity.CenterHorizontal;
|
| | | frameBorder.Width = Application.GetMinRealAverage(426);
|
| | | frameBorder.Height = Application.GetMinRealAverage(426);
|
| | | bodyFrameLayout.AddChidren(frameBorder);
|
| | | listBackControl.frameTable.AddChidren(frameBorder);
|
| | |
|
| | | var btnPic = new PicViewControl(frameBorder.Width, frameBorder.Height, false);
|
| | | btnPic.UnSelectedImagePath = "Device/PanelTable.png";
|
| | | btnPic.UnSelectedImagePath = "DeviceItem/PanelTable.png";
|
| | | frameBorder.AddChidren(btnPic);
|
| | |
|
| | | if (listSort.Count == 4)
|
| | |
| | | var btnIcon = new NormalViewControl(Application.GetMinRealAverage(52), Application.GetMinRealAverage(52), false);
|
| | | btnIcon.Name = "btn" + device.DeviceEpoint;
|
| | | btnIcon.Gravity = Gravity.Center;
|
| | | btnIcon.Radius = 6;
|
| | | btnIcon.RadiusEx = 16;
|
| | | btnIcon.BorderWidth = 2;
|
| | | btnIcon.BorderColor = 0xff979797;
|
| | | frame.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
|