From 7eb8b78a26accd059cf8e17d756f6d77e6b3f9dd Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 09 六月 2022 21:40:26 +0800
Subject: [PATCH] 2022年06月09日21:39:40
---
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs | 2
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs | 84 ++++++++++++++++++++++++++++++------------
2 files changed, 61 insertions(+), 25 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
index c0a2ba0..2072723 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -9,7 +9,6 @@
{
Tag = "Logic";
}
-
public void Show()
{
LogicView.TopView topView = new LogicView.TopView();
@@ -79,6 +78,7 @@
//鏃堕棿
timeView.btnClick.MouseUpEventHandler += (sen, e) =>
{
+
TimeTpye timeTpye = new TimeTpye();
MainPage.BasePageView.AddChidren(timeTpye);
timeTpye.Show();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
index c4f3c87..860de44 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -23,7 +23,7 @@
bodyView.btnTemp.Text = outinTemp.ToString();
bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "掳C";
bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode));
- bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode),false);
+ bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode), false);
bodyView.arcBar.Progress = outinTemp;
//if (updateTemp.trait_on_off.curValue.ToString() == "on")
//{
@@ -73,15 +73,16 @@
bodyView.arcBar.IsClickable = false;
bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
}
- //鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
- if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto"|| updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer")
- {
- bodyView.btnPlus.Enable = false;
- bodyView.btnMinus.Enable = false;
- bodyView.arcBar.IsClickable = false;
- bodyView.arcBar.IsOffline = true;
- }
-
+ ////鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
+ //if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto" || updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer")
+ //{
+ // bodyView.btnPlus.Enable = false;
+ // bodyView.btnMinus.Enable = false;
+ // bodyView.arcBar.IsClickable = false;
+ // bodyView.arcBar.IsOffline = true;
+ //}
+ //鏇存柊涓嶅悓鐣岄潰鐘舵�� 2022骞�06鏈�09鏃�19:22:55 wjc 淇敼
+ bodyView.updateStatusPage();
});
}
catch (Exception ex)
@@ -102,14 +103,17 @@
btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
//function.SaveFunctionData(true);
};
- //鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
- if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer")
- {
- btnPlus.Enable = false;
- btnMinus.Enable = false;
- arcBar.IsClickable = false;
- arcBar.IsOffline = true;
- }
+
+ ////鑷姩妯″紡涓嶅厑璁歌皟娓╁害 2021-10-27 09:41:35 wxr 闄堢惓鍙嶉
+ //if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer")
+ //{
+ // btnPlus.Enable = false;
+ // btnMinus.Enable = false;
+ // arcBar.IsClickable = false;
+ // arcBar.IsOffline = true;
+ //}
+ //鍒濆鍖栦笉鍚岀晫闈㈢姸鎬� 2022骞�06鏈�09鏃�19:22:55 wjc 淇敼
+ this.updateStatusPage();
}
/// <summary>
@@ -141,7 +145,7 @@
//}
btnMinus.MouseUpEventHandler = (sender, e) =>
{
- if(function.trait_on_off.curValue.ToString() == "off")
+ if (function.trait_on_off.curValue.ToString() == "off")
{
return;
}
@@ -166,7 +170,7 @@
{
return;
}
- var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
+ var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
if (temp >= Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max))
{
return;
@@ -182,7 +186,7 @@
};
arcBar.OnStopTrackingTouchEvent = (sender, e) =>
{
- function.SetAttrState(FunctionAttributeKey.SetTemp,arcBar.Progress);
+ function.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress);
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());
@@ -191,7 +195,7 @@
arcBar.OnProgressChangedEvent = (sender, e) =>
{
function.SetAttrState(FunctionAttributeKey.SetTemp, e);
- btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString();
+ btnTemp.Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString();
};
}
/// <summary>
@@ -229,7 +233,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
Control.Ins.SendWriteCommand(function, d);
-
+
};
}
@@ -246,7 +250,7 @@
EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
{
btn1.IsSelected = btn2.IsSelected = true;
- function.SetAttrState(FunctionAttributeKey.Mode,curMode);
+ function.SetAttrState(FunctionAttributeKey.Mode, curMode);
btnMode.UnSelectedImagePath = btn1.SelectedImagePath;
//byte pro = 6;//涓嶅鐞嗘俯搴︽樉绀猴紝绛夊緟鍥炲鏁版嵁鍐嶅鐞�
//function.Fh_Mode_Temp.TryGetValue(curMode, out pro);
@@ -260,5 +264,37 @@
btn2.MouseUpEventHandler = eventHandler1;
dialogView.MouseUpEventHandler = eventHandler;
}
+
+ /// <summary>
+ /// 鏇存柊涓嶅悓鐣岄潰鐘舵��
+ /// </summary>
+ private void updateStatusPage()
+ {
+ btnPlus.Enable = true;
+ btnMinus.Enable = true;
+ arcBar.IsClickable = true;
+ arcBar.IsOffline = false;
+ switch (getModeValue)
+ {
+ case "auto"://鑷姩
+ case "timer"://
+ btnPlus.Enable = false;
+ btnMinus.Enable = false;
+ arcBar.IsClickable = false;
+ arcBar.IsOffline = true;
+ break;
+
+ }
+ }
+ /// <summary>
+ /// 鑾峰彇妯″紡value鍊�
+ /// </summary>
+ private string getModeValue
+ {
+ get
+ {
+ return function.GetAttrState(FunctionAttributeKey.Mode);
+ }
+ }
}
}
--
Gitblit v1.8.0