| | |
| | | {
|
| | | //开关的背景图片
|
| | | var picSwitchBack = new FrameLayout();
|
| | | picSwitchBack.Height = Application.GetMinRealAverage(579);
|
| | | picSwitchBack.Width = Application.GetMinRealAverage(579);
|
| | | picSwitchBack.Height = this.GetPictrueRealSize(579);
|
| | | picSwitchBack.Width = this.GetPictrueRealSize(579);
|
| | | picSwitchBack.Y = Application.GetRealHeight(340);
|
| | | picSwitchBack.BackgroundImagePath = "Light/OnOff.png";
|
| | | picSwitchBack.Gravity = Gravity.CenterHorizontal;
|
| | |
| | | var btnClose = new IconViewControl(81);
|
| | | btnClose.UnSelectedImagePath = "Light/OFF.png";
|
| | | btnClose.SelectedImagePath = "Light/OFFSelected.png";
|
| | | btnClose.X = Application.GetMinRealAverage(101);
|
| | | btnClose.Y = Application.GetMinRealAverage(248);
|
| | | btnClose.X = this.GetPictrueRealSize(101);
|
| | | btnClose.Y = this.GetPictrueRealSize(248);
|
| | | picSwitchBack.AddChidren(btnClose);
|
| | | listControl.Add(btnClose);
|
| | |
|
| | |
| | | var btnOpen = new IconViewControl(81);
|
| | | btnOpen.UnSelectedImagePath = "Light/ON.png";
|
| | | btnOpen.SelectedImagePath = "Light/ONSelected.png";
|
| | | btnOpen.X = Application.GetMinRealAverage(397);
|
| | | btnOpen.X = this.GetPictrueRealSize(397);
|
| | | btnOpen.Y = btnClose.Y;
|
| | | picSwitchBack.AddChidren(btnOpen);
|
| | | listControl.Add(btnOpen);
|
| | |
| | | /// <param name="isOpen"></param>
|
| | | private void SetSwitchCommand(bool isOpen)
|
| | | {
|
| | | //如果住宅为虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | ((LightBase)this.device).OnOffStatus = isOpen == true ? 1 : 0;
|
| | | //变更卡片状态
|
| | | this.RefreshSwitchStatu(((LightBase)this.device).OnOffStatus == 1);
|
| | | //设置状态文字
|
| | | this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
|
| | | return;
|
| | | }
|
| | | //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
|
| | | this.StartCheckResponeResult(this.listControl, (result) =>
|
| | | {
|