| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | using Shared.Phone.UserCenter.Device.Bind; |
| | | using Shared.Phone.UserCenter.DeviceBind; |
| | | using ZigBee.Common; |
| | | using ZigBee.Device; |
| | | |
| | |
| | | {
|
| | | this.deviceObj = i_device;
|
| | | //获取数据 |
| | | ReadDoorLockUserInfo(deviceObj); |
| | | InitInfo(deviceObj); |
| | |
|
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uPanelSettion));
|
| | |
| | | /// <summary> |
| | | /// 初始化数据 |
| | | /// </summary> |
| | | void ReadDoorLockUserInfo(CommonDevice curControlDev) |
| | | void InitInfo(CommonDevice curControlDev) |
| | | { |
| | | System.Threading.Tasks.Task.Run(async () => |
| | | { |
| | |
| | | } |
| | | }); |
| | | } |
| | | #endregion |
| | |
|
| | | #region ■ 新风目标_________________________ |
| | | /// <summary> |
| | | /// 新风目标行 |
| | | /// </summary> |
| | | private void AddFreshAirRow() |
| | | { |
| | | //新风目标
|
| | | var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
|
| | | listview.AddChidren(rowNewWind);
|
| | | rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNewWindTarget), 600);
|
| | | //底线
|
| | | rowNewWind.AddBottomLine();
|
| | | //右箭头
|
| | | rowNewWind.AddRightArrow();
|
| | | |
| | | var msg = Language.StringByID(R.MyInternationalizationString.nothing); |
| | | if (!string.IsNullOrEmpty(bindFreshAirName)) |
| | | { |
| | | msg = bindFreshAirName; |
| | | } |
| | | var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
|
| | | |
| | | rowNewWind.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindFreshAirDev, 1); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | | |
| | | addDevicePage.actionFreshAirTarget += (bindName) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (string.IsNullOrEmpty(bindName)) |
| | | { |
| | | btnNewWindStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing); |
| | | } |
| | | else |
| | | { |
| | | btnNewWindStatu.Text = bindName; |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | }; |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 获取绑定目标 |
| | |
| | | return result; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 新风目标_________________________ |
| | | /// <summary> |
| | | /// 新风目标行 |
| | | /// </summary> |
| | | private void AddFreshAirRow() |
| | | { |
| | | //新风目标 |
| | | var rowNewWind = new FrameRowControl(listview.rowSpace / 2); |
| | | listview.AddChidren(rowNewWind); |
| | | rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNewWindTarget), 600); |
| | | //底线 |
| | | rowNewWind.AddBottomLine(); |
| | | //右箭头 |
| | | rowNewWind.AddRightArrow(); |
| | | |
| | | var msg = Language.StringByID(R.MyInternationalizationString.nothing); |
| | | if (!string.IsNullOrEmpty(bindFreshAirName)) |
| | | { |
| | | msg = bindFreshAirName; |
| | | } |
| | | var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700); |
| | | |
| | | rowNewWind.ButtonClickEvent += (sender, e) => |
| | | { |
| | | var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindFreshAirDev, BindInfo.BindType.FreshAir); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | paneTargetsBaseFormp.Show(); |
| | | paneTargetsBaseFormp.actionFreshAirTarget += (bindName) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (string.IsNullOrEmpty(bindName)) |
| | | { |
| | | btnNewWindStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing); |
| | | } |
| | | else |
| | | { |
| | | btnNewWindStatu.Text = bindName; |
| | | } |
| | | }); |
| | | }; |
| | | }; |
| | | } |
| | | #endregion |
| | | |
| | | #region ■ PM2.5来源_________________________ |
| | | /// <summary> |
| | | /// PM2.5来源行 |
| | |
| | | var btnPMStatu = rowPM.AddMostRightView(msg, 700); |
| | | rowPM.ButtonClickEvent += (sender, e) => |
| | | { |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindPMDev, 4); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindPMDev, BindInfo.BindType.PM); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | | |
| | | addDevicePage.actionPMTarget += (bindName) => |
| | | paneTargetsBaseFormp.Show(); |
| | | paneTargetsBaseFormp.actionPMTarget += (bindName) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700); |
| | | rowTemPerature.ButtonClickEvent += (sender, e) => |
| | | { |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindTemperatureDev, 2); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindTemperatureDev, BindInfo.BindType.Temperature); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | | |
| | | addDevicePage.actionTemperatureTarget += (bindName) => |
| | | paneTargetsBaseFormp.Show(); |
| | | paneTargetsBaseFormp.actionTemperatureTarget += (bindName) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700); |
| | | rowHumidity.ButtonClickEvent += (sender, e) => |
| | | { |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindHumidityDev, 3); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindHumidityDev, BindInfo.BindType.Humidity); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | | |
| | | addDevicePage.actionHumidityTarget += (bindName) => |
| | | paneTargetsBaseFormp.Show(); |
| | | paneTargetsBaseFormp.actionHumidityTarget += (bindName) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | rowLight.AddRightArrow();
|
| | | rowLight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //给新风面板建立一个新的支持面板对象,用200端点设置
|
| | | var panel = new Panel();
|
| | | panel.DeviceAddr = this.deviceObj.DeviceAddr;
|
| | | panel.DeviceEpoint = 200; |
| | | panel.CurrentGateWayId = this.deviceObj.CurrentGateWayId; |
| | | var form = new PanelFangyueFreshAirBackLightSettionForm();
|
| | | form.AddForm(panel);
|
| | | var form = new PanelBrightnessAdjustForm();
|
| | | form.AddForm(this.deviceObj);
|
| | | }; |
| | | } |
| | | #endregion
|