From 52e317b95d830f8cd1156b403ff5a34fb8f9bccb Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 31 七月 2020 17:43:42 +0800
Subject: [PATCH] 2020-7-31-2
---
HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs | 47 +++++++++++++++++++----------------------------
1 files changed, 19 insertions(+), 28 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
index eb3cb6f..56e3053 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
@@ -17,13 +17,20 @@
{
return;
}
- bodyView.arcBar.Progress = uAc.curTemp;
bodyView.arcBar.ProgressBarColor = bodyView.aC.on_off == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2;
bodyView.btnTemp.Text = uAc.curTemp.ToString();
bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + uAc.indoorTemp + "掳C";
bodyView.btnMode.UnSelectedImagePath = uAc.curModeImage;
bodyView.btnWindSpeed.UnSelectedImagePath = uAc.curFanImage;
bodyView.btnSwitch.IsSelected = uAc.on_off == "on";
+ if (uAc.refreshTime.AddMilliseconds(1000) < DateTime.Now)
+ {
+ bodyView.arcBar.Progress = uAc.curTemp;
+ }
+ bodyView.arcBar.ProgressBarColor = uAc.on_off == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2;
+ bodyView.arcBar.ThumbImagePath = uAc.on_off == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png";
+ bodyView.arcBar.IsClickable = uAc.on_off == "on";
+
});
}
catch (Exception ex)
@@ -64,7 +71,7 @@
{
btnMinus.MouseUpEventHandler = (sender, e) =>
{
- if (aC.curTemp < 20)
+ if (aC.curTemp < 17)
{
return;
}
@@ -104,42 +111,24 @@
btnMode.MouseUpEventHandler = (sender, e) =>
{
LoadDiv_ChangeModeView();
- //if (aC.mode.Count <= 1)
- // return;
- //var modeIndex = aC.mode.IndexOf(aC.curMode) + 1;
- //if (modeIndex == aC.mode.Count)
- //{
- // modeIndex = 0;
- //}
- //aC.curMode = aC.mode[modeIndex];
- //btnMode.UnSelectedImagePath = aC.curModeImage;
- //btnWindSpeed.UnSelectedImagePath = aC.curFanImage;
- //Control.Send(CommandType_A.write, aC);
};
btnWindSpeed.MouseUpEventHandler = (sender, e) =>
{
LoadDiv_ChangeFanView();
- //if (aC.fan.Count <= 1)
- // return;
- //var windSpeedIndex = aC.fan.IndexOf(aC.curFan) + 1;
- //if (windSpeedIndex == aC.fan.Count)
- //{
- // windSpeedIndex = 0;
- //}
- //aC.curFan = aC.fan[windSpeedIndex];
- //btnMode.UnSelectedImagePath = aC.curModeImage;
- //btnWindSpeed.UnSelectedImagePath = aC.curFanImage;
- //Control.Send(CommandType_A.write, aC);
};
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
btnSwitch.IsSelected = !btnSwitch.IsSelected;
aC.on_off = btnSwitch.IsSelected ? "on" : "off";
+
+ bodyView.arcBar.ProgressBarColor = aC.on_off == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2;
+ bodyView.arcBar.ThumbImagePath = aC.on_off == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png";
+ bodyView.arcBar.IsClickable = aC.on_off == "on";
+
Control.Send(CommandType_A.write, aC);
};
}
-
/// <summary>
/// 鍔犺浇妯″紡鏀瑰彉浜嬩欢
@@ -153,7 +142,8 @@
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
btn1.IsSelected = btn2.IsSelected = true;
- aC.curMode = curMode;
+ aC.trait_mode.curValues = curMode;
+ btnMode.UnSelectedImagePath = aC.curModeImage;
Control.Send(CommandType_A.write, aC);
dialog.Close();
};
@@ -162,7 +152,7 @@
dialogView.MouseUpEventHandler = eventHandler;
}
/// <summary>
- /// 鍔犺浇妯″紡鏀瑰彉浜嬩欢
+ /// 鍔犺浇椋庨�熸敼鍙樹簨浠�
/// </summary>
void LoadEvent_ChangeFan(Dialog dialog, FrameLayout dialogView, Button btn1, Button btn2,string curFan)
{
@@ -173,7 +163,8 @@
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
btn1.IsSelected = btn2.IsSelected = true;
- aC.curFan = curFan;
+ aC.trait_fan.curValues = curFan;
+ btnWindSpeed.UnSelectedImagePath = aC.curFanImage;
Control.Send(CommandType_A.write, aC);
dialog.Close();
};
--
Gitblit v1.8.0