| | |
| | | /// <summary>
|
| | | /// 初始化中部信息
|
| | | /// </summary>
|
| | | private async void InitMiddleFrame()
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //获取设备初始数据
|
| | | var result = await this.GetDeviceDefultData();
|
| | | var result = this.GetDeviceDefultData();
|
| | | if (result == false)
|
| | | {
|
| | | return;
|
| | |
| | | var btnSave = new BottomClickButton();
|
| | | btnSave.TextID = R.MyInternationalizationString.uSave;
|
| | | bodyFrameLayout.AddChidren(btnSave);
|
| | | btnSave.ButtonClickEvent += async (sender, e) =>
|
| | | btnSave.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (valueChanged == true)
|
| | | {
|
| | | this.ShowProgressBar();
|
| | | //亮度调节更改(他们说随便一个回路就行)
|
| | | result = await HdlDevicePanelLogic.Current.SetDeviceLightSettion(listDevice[0], linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
|
| | | result = HdlDevicePanelLogic.Current.SetDeviceLightSettion(listDevice[0], linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel);
|
| | | if (result == false)
|
| | | {
|
| | | this.CloseProgressBar();
|
| | | return;
|
| | | }
|
| | | //节能模式修改(他们说随便一个回路就行)
|
| | | result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(listDevice[0], energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
|
| | | result = HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(listDevice[0], energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
|
| | | this.CloseProgressBar();
|
| | | if (result == false)
|
| | | {
|
| | |
| | | /// 获取设备初始数据
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | private async Task<bool> GetDeviceDefultData()
|
| | | private bool GetDeviceDefultData()
|
| | | {
|
| | | //开启进度条
|
| | | this.ShowProgressBar();
|
| | | //亮度调节(他们说随便拿一路回路就行了)
|
| | | linghtLevelInfo = await HdlDevicePanelLogic.Current.GetDeviceLightSettion(listDevice[0]);
|
| | | linghtLevelInfo = HdlDevicePanelLogic.Current.GetDeviceLightSettion(listDevice[0]);
|
| | | if (linghtLevelInfo == null)
|
| | | {
|
| | | //关闭进度条
|
| | |
| | | return false;
|
| | | }
|
| | | //节能模式(他们说随便拿一路回路就行了)
|
| | | energyModeInfo = await HdlDevicePanelLogic.Current.GetDeviceEnergyConservationMode(listDevice[0]);
|
| | | energyModeInfo = HdlDevicePanelLogic.Current.GetDeviceEnergyConservationMode(listDevice[0]);
|
| | | if (energyModeInfo == null)
|
| | | {
|
| | | //关闭进度条
|