| | |
| | | using System;
|
| | | using Shared.Common;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using ZigBee.Device;
|
| | |
| | | this.AddBindRow();
|
| | | //添加背光灯行
|
| | | this.AddBackLightRow();
|
| | | //添加接近感应行
|
| | | this.AddProximityInductionRow();
|
| | |
|
| | | //初始化桌布完成
|
| | | tableContr.FinishInitControl(bodyFrameLayout, this.listview);
|
| | |
| | | btnLight.AddRightArrow();
|
| | | btnLight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new PanelBackLightSettionForm();
|
| | | form.AddForm((Panel)nowSelectDevice);
|
| | | List<CommonDevice> listNewDevice = new List<CommonDevice> { };
|
| | | listNewDevice.Add((Panel)nowSelectDevice);
|
| | | var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listNewDevice);
|
| | | //如果设备是方悦开控设备,背光灯页需要滑动且有接近感应功能 |
| | | if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueTwo
|
| | | || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFour
|
| | | || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEight)
|
| | | {
|
| | | var form = new PanelBackLighWithSensorForm();
|
| | | form.AddForm((Panel)nowSelectDevice);
|
| | | }
|
| | | else
|
| | | {
|
| | | //不带接近感应的
|
| | | var form = new PanelBackLightSettionForm();
|
| | | form.AddForm((Panel)nowSelectDevice);
|
| | | }
|
| | | };
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 接近感应___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加接近感应行
|
| | | /// </summary>
|
| | | private void AddProximityInductionRow()
|
| | | {
|
| | | //接近感应
|
| | | var rowContr = new FrameRowControl(listview.rowSpace / 2);
|
| | | rowContr.UseClickStatu = false;
|
| | | listview.AddChidren(rowContr);
|
| | | rowContr.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uProximityInduction), 600);
|
| | | //底线
|
| | | rowContr.AddBottomLine();
|
| | | //开关
|
| | | var btnSwitch = rowContr.AddMostRightSwitchIcon();
|
| | | btnSwitch.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected;
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | if (listOffSwitch.Count == 8)
|
| | | {
|
| | | //八按键面板
|
| | | btnPic.UnSelectedImagePath = "Device/PanelFangyueEightButtonTable.png";
|
| | | btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueEightButtonTable.png";
|
| | | this.InitEightButtonPanelIcon(frameBorder, listOffSwitch);
|
| | | }
|
| | | else if (listOffSwitch.Count == 4)
|
| | | {
|
| | | //四按键面板
|
| | | btnPic.UnSelectedImagePath = "Device/PanelFangyueFourButtonTable.png";
|
| | | btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueFourButtonTable.png";
|
| | | this.InitFourButtonPanelIcon(frameBorder, listOffSwitch);
|
| | | }
|
| | | else
|
| | | {
|
| | | //二按键面板
|
| | | btnPic.UnSelectedImagePath = "Device/PanelFangyueTwoButtonTable.png";
|
| | | btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueTwoButtonTable.png";
|
| | | this.InitTwoButtonPanelIcon(frameBorder, listOffSwitch);
|
| | | }
|
| | | }
|