From b079d370b3c23751a5d200dc2d25f6c80977b4d4 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 11 三月 2022 15:03:50 +0800
Subject: [PATCH] 代码同步
---
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs | 55 +++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
index 9bb66af..f2de9ff 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
@@ -305,6 +305,15 @@
};
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
btnModeIcon.IsSelected = btnModeText.IsSelected = true;
device.SetAttrState(FunctionAttributeKey.Mode, m);
btnMode.UnSelectedImagePath = fhTemp.GetModeIconPath(m);
@@ -362,6 +371,15 @@
{
btnMinus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
{
return;
@@ -381,6 +399,15 @@
};
btnPlus.MouseUpEventHandler = (sender, e) =>
{
+ if (!device.online)
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ }
if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
{
return;
@@ -398,19 +425,23 @@
d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
Control.Ins.SendWriteCommand(device, d);
};
- arcBar.OnStopTrackingTouchEvent = (sender, e) =>
+
+ if (!device.online)
{
- device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
- btnTemp.Text = arcBar.Progress.ToString();
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
- Control.Ins.SendWriteCommand(device, d);
- };
- arcBar.OnProgressChangedEvent = (sender, e) =>
- {
- device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
- btnTemp.Text = e.ToString();
- };
+ arcBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+ btnTemp.Text = arcBar.Progress.ToString();
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
+ Control.Ins.SendWriteCommand(device, d);
+ };
+ arcBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
+ btnTemp.Text = e.ToString();
+ };
+ }
}
/// <summary>
/// 鎺у埗妯″紡浜嬩欢
--
Gitblit v1.8.0