| | |
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //回路数大于1才展开
|
| | | if (Common.LocalDevice.Current.GetDevicesCountByMac(deviceMac) > 1)
|
| | | var listMacDevice = LocalDevice.Current.GetDevicesByMac(deviceMac, false);
|
| | | if (listMacDevice.Count > 1)
|
| | | {
|
| | | btnRight.IsSelected = !btnRight.IsSelected;
|
| | | //展开或者折叠明细列表
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (LocalDevice.Current.IsMiniLight(listMacDevice[0]) == true)
|
| | | {
|
| | | //mini夜灯的功能设置界面
|
| | | var room = HdlRoomLogic.Current.GetRoomByDevice(listMacDevice[0]);
|
| | | var form = new MainPage.DeviceDetailInfoForm();
|
| | | form.AddForm(listMacDevice[0], room);
|
| | | }
|
| | | else
|
| | | {
|
| | | //设备信息界面
|
| | | var form = new DeviceMacInfoEditorForm();
|
| | | form.AddForm(deviceMac);
|
| | | }
|
| | | btnNew.Visible = false;
|
| | | var form = new DeviceMacInfoEditorForm();
|
| | | form.AddForm(deviceMac);
|
| | | //界面跳转,记录当前的正在操作的设备的Mac地址
|
| | | this.nowActionDeviceMac = deviceMac;
|
| | | }
|
| | |
| | | form2.AddForm(deviceMac);
|
| | | return;
|
| | | }
|
| | | var listMacDevice = LocalDevice.Current.GetDevicesByMac(deviceMac, false);
|
| | | if (LocalDevice.Current.IsMiniLight(listMacDevice[0]) == true)
|
| | | {
|
| | | //mini夜灯的功能设置界面
|
| | | var room = HdlRoomLogic.Current.GetRoomByDevice(listMacDevice[0]);
|
| | | var form = new MainPage.DeviceDetailInfoForm();
|
| | | form.AddForm(listMacDevice[0], room);
|
| | | }
|
| | | else
|
| | | {
|
| | | //设备信息界面
|
| | | var form = new DeviceMacInfoEditorForm();
|
| | | form.AddForm(deviceMac);
|
| | | }
|
| | |
|
| | | btnNew.Visible = false;
|
| | | var form = new DeviceMacInfoEditorForm();
|
| | | form.AddForm(deviceMac);
|
| | | //界面跳转,记录当前的正在操作的设备的Mac地址
|
| | | this.nowActionDeviceMac = deviceMac;
|
| | | };
|
| | |
| | | /// <summary>
|
| | | /// 滑动控件下拉刷新
|
| | | /// </summary>
|
| | | private async void ListViewBeginHeaderRefreshing()
|
| | | private void ListViewBeginHeaderRefreshing()
|
| | | {
|
| | | //如果当前住宅是虚拟的
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | |
| | | {
|
| | | //显示进度条
|
| | | ProgressBar.Show();
|
| | | int result2 = await HdlGatewayLogic.Current.ReBindNewGateway(realWay);
|
| | | int result2 = HdlGatewayLogic.Current.ReBindNewGateway(realWay);
|
| | | //关闭进度条
|
| | | ProgressBar.Close();
|
| | | if (result2 == -1)
|