| | |
| | | btnDry.SelectedImagePath = "Airer/Dry.png"; |
| | | btnDry.X = Application.GetRealWidth(98); |
| | | btnDry.Y = Application.GetRealHeight(913); |
| | | btnDry.IsSelected = ((Airer)this.device).DryOnOffStatus == 1 ? true : false; |
| | | frameWhiteBack.AddChidren(btnDry); |
| | | |
| | | //风干 |
| | |
| | | btnWind.UnSelectedImagePath = "Airer/WindOffline.png"; |
| | | btnWind.SelectedImagePath = "Airer/Wind.png"; |
| | | btnWind.X = Application.GetRealWidth(328); |
| | | btnWind.IsSelected = ((Airer)this.device).WindOnOffStatus == 1 ? true : false; |
| | | btnWind.Y = btnDry.Y; |
| | | |
| | | //消毒 |
| | |
| | | frameWhiteBack.AddChidren(btnDisinfect); |
| | | btnDisinfect.UnSelectedImagePath = "Airer/DisinfectOffline.png"; |
| | | btnDisinfect.SelectedImagePath = "Airer/DisinfectSelected.png"; |
| | | btnDisinfect.IsSelected = ((Airer)this.device).DisinfectOnOffStatus == 1 ? true : false; |
| | | btnDisinfect.X = Application.GetRealWidth(556); |
| | | btnDisinfect.Y = btnDry.Y; |
| | | |
| | |
| | | frameWhiteBack.AddChidren(btnLight); |
| | | btnLight.UnSelectedImagePath = "Airer/LightOffline.png"; |
| | | btnLight.SelectedImagePath = "Airer/LightSelected.png"; |
| | | btnLight.IsSelected = ((Airer)this.device).OnOffStatus == 1 ? true : false; |
| | | btnLight.X = Application.GetRealWidth(786); |
| | | btnLight.Y = btnDry.Y; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //时间倒计时文本 |
| | | TimeShow(frameWhiteBack); |
| | | //右箭头 {烘干、风干和消毒的设置默认时间暂时取去掉,且倒计时也去掉,因为第三方设备不支持」 |
| | | //TimeShow(frameWhiteBack); |
| | | |
| | | ClickEventHander(); |
| | | |
| | |
| | | }); |
| | | |
| | | //打开 |
| | | switch (type) |
| | | { |
| | | case 2: |
| | | this.device.DeviceEpoint = 2; |
| | | break; |
| | | case 3: |
| | | this.device.DeviceEpoint = 3; |
| | | //发送默认时间 |
| | | if (airer.WindTime == 0) |
| | | { |
| | | airer.WindTime = 180; |
| | | } |
| | | airer.SetAirerFunTimeDevice(airer.WindTime, 3); |
| | | break; |
| | | case 4: |
| | | this.device.DeviceEpoint = 4; |
| | | //发送默认时间 |
| | | if (airer.DryTime == 0) |
| | | { |
| | | airer.DryTime = 180; |
| | | } |
| | | airer.SetAirerFunTimeDevice(airer.DryTime, 4); |
| | | break; |
| | | case 5: |
| | | this.device.DeviceEpoint = 5; |
| | | //发送默认时间 |
| | | if (airer.DisinfectTime == 0) |
| | | { |
| | | airer.DisinfectTime = 30; |
| | | } |
| | | airer.SetAirerFunTimeDevice(airer.DisinfectTime, 5); |
| | | break; |
| | | } |
| | | //switch (type) |
| | | //{ |
| | | // case 3: |
| | | //发送默认时间 |
| | | //if (airer.WindTime == 0) |
| | | //{ |
| | | // airer.WindTime = 180; |
| | | //} |
| | | //airer.SetAirerFunTimeDevice(airer.WindTime, 3); |
| | | // break; |
| | | //case 4: |
| | | //发送默认时间 |
| | | //if (airer.DryTime == 0) |
| | | //{ |
| | | // airer.DryTime = 180; |
| | | //} |
| | | //airer.SetAirerFunTimeDevice(airer.DryTime, 4); |
| | | // break; |
| | | //case 5: |
| | | //发送默认时间 |
| | | //if (airer.DisinfectTime == 0) |
| | | //{ |
| | | // airer.DisinfectTime = 30; |
| | | //} |
| | | //airer.SetAirerFunTimeDevice(airer.DisinfectTime, 5); |
| | | // break; |
| | | //} |
| | | if (isOpen == true) |
| | | { |
| | | this.device.SwitchControl(1); |
| | | airer.SwitchControl(1, type); |
| | | } |
| | | else |
| | | { |
| | | this.device.SwitchControl(0); |
| | | airer.SwitchControl(0, type); |
| | | } |
| | | } |
| | | |
| | |
| | | break; |
| | | case 3: |
| | | btnWind.IsSelected = isOpen; |
| | | btnWindTimeText.Text = GetTimeString(airer.WindRemainTime); |
| | | if (!isOpen) |
| | | { |
| | | airer.WindRemainTime = 0; |
| | | } |
| | | //btnWindTimeText.Text = GetTimeString(airer.WindRemainTime); |
| | | //if (!isOpen) |
| | | //{ |
| | | // airer.WindRemainTime = 0; |
| | | //} |
| | | break; |
| | | case 4: |
| | | btnDry.IsSelected = isOpen; |
| | | btnDryTimeText.Text = GetTimeString(airer.DryRemainTime); |
| | | if (!isOpen) |
| | | { |
| | | airer.DryRemainTime = 0; |
| | | } |
| | | //btnDryTimeText.Text = GetTimeString(airer.DryRemainTime); |
| | | //if (!isOpen) |
| | | //{ |
| | | // airer.DryRemainTime = 0; |
| | | //} |
| | | break; |
| | | case 5: |
| | | btnDisinfect.IsSelected = isOpen; |
| | | btnDisinfectTimeText.Text = GetTimeString(airer.DisinfectRemainTime); |
| | | if (!isOpen) |
| | | { |
| | | airer.DisinfectRemainTime = 0; |
| | | } |
| | | //btnDisinfectTimeText.Text = GetTimeString(airer.DisinfectRemainTime); |
| | | //if (!isOpen) |
| | | //{ |
| | | // airer.DisinfectRemainTime = 0; |
| | | //} |
| | | break; |
| | | } |
| | | //设置状态文字 |