From ed9547e90c664739da9d3535bc01f66f24e184db Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 09 六月 2021 17:46:32 +0800
Subject: [PATCH] Merge branch 'tzy2' into wxr6
---
HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs | 59 ++++++++++++++++++++++++++++++-----------------------------
1 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs
index 800f8a5..345f80f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs
@@ -66,7 +66,8 @@
#endregion
#region 鍖哄煙鍙橀噺
- AC aC;
+ AC acTemp = new AC();
+ Function function;
Button btnCollection_Out;
Button btnFunctionName_Out;
Button btnFromFloor_Out;
@@ -75,10 +76,10 @@
/// </summary>
Action actionRefresh;
#endregion
- public ACPage(AC func)
+ public ACPage(Function func)
{
bodyView = this;
- aC = func;
+ function = func;
}
public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut)
@@ -107,7 +108,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextAlignment = TextAlignment.CenterLeft,
TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
- Text = aC.name,
+ Text = function.name,
};
controlView.AddChidren(btnFunctionName);
@@ -120,7 +121,7 @@
TextColor = CSS_Color.PromptingColor1,
TextAlignment = TextAlignment.CenterLeft,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = aC.GetRoomListName()
+ Text = function.GetRoomListName()
};
controlView.AddChidren(btnFromFoorAndRoom);
@@ -132,29 +133,29 @@
Height = Application.GetMinRealAverage(40),
SelectedImagePath = "Collection/CollectionIcon.png",
UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
- IsSelected = aC.collect
+ IsSelected = function.collect
};
- //controlView.AddChidren(btnCollection);
+ controlView.AddChidren(btnCollection);
//2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
- if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
- {
- controlView.AddChidren(btnCollection);
- }
+ //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
+ //{
+ // controlView.AddChidren(btnCollection);
+ //}
arcBar = new DiyArcSeekBar()
{
Gravity = Gravity.CenterHorizontal,
OpenAngle = 160,
- ThumbImagePath = aC.trait_on_off.curValue.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png",
+ ThumbImagePath = function.trait_on_off.curValue.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png",
ThumbImageHeight = Application.GetRealWidth(50),
ProgressBarColor = CSS_Color.MainColor,
OfflineProgressBarColor = CSS_Color.PromptingColor2,
- IsOffline = aC.trait_on_off.curValue.ToString() == "off",
- MinValue = aC.GetAttribute(FunctionAttributeKey.SetTemp).min,
- MaxValue = aC.GetAttribute(FunctionAttributeKey.SetTemp).max,
- //IsClickable = aC.trait_on_off.curValue.ToString() == "on",
+ IsOffline = function.trait_on_off.curValue.ToString() == "off",
+ MinValue = function.GetAttribute(FunctionAttributeKey.SetTemp).min,
+ MaxValue = function.GetAttribute(FunctionAttributeKey.SetTemp).max,
+ //IsClickable = function.trait_on_off.curValue.ToString() == "on",
ArcColor = CSS_Color.BackgroundColor,
- Progress = Convert.ToInt32(aC.GetAttrState(FunctionAttributeKey.SetTemp)),
+ Progress = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)),
#if __IOS__
Y = Application.GetRealHeight(120 + 25),
Width = Application.GetRealWidth(260 - 40),
@@ -179,7 +180,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = 50,
IsBold = true,
- Text = aC.GetAttrState(FunctionAttributeKey.SetTemp),
+ Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(),
TextAlignment = TextAlignment.Center,
};
controlView.AddChidren(btnTemp);
@@ -236,7 +237,7 @@
Y = Application.GetRealHeight(334),
Width = Application.GetRealWidth(30),
Height = Application.GetRealWidth(30),
- UnSelectedImagePath = aC.GetModeIconPath(),
+ UnSelectedImagePath = acTemp.GetModeIconPath(function.GetAttrState(FunctionAttributeKey.Mode)),
};
controlView.AddChidren(btnMode);
@@ -246,7 +247,7 @@
Y = Application.GetRealHeight(337),
Width = Application.GetRealWidth(30),
Height = Application.GetRealWidth(30),
- UnSelectedImagePath = aC.GetFanIconPath(),
+ UnSelectedImagePath = acTemp.GetFanIconPath(function.GetAttrState(FunctionAttributeKey.FanSpeed)),
};
controlView.AddChidren(btnWindSpeed);
@@ -258,15 +259,15 @@
Height = Application.GetRealWidth(32),
UnSelectedImagePath = "Public/PowerClose.png",
SelectedImagePath = "Public/PowerOpen.png",
- IsSelected = aC.trait_on_off.curValue.ToString() == "on"
+ IsSelected = function.trait_on_off.curValue.ToString() == "on"
};
controlView.AddChidren(btnSwitch);
LoadEventList();
- new TopViewDiv(bodyView,Language.StringByID(StringId.AC)).LoadTopView_FunctionTop(aC, actionRefresh);
+ new TopViewDiv(bodyView,Language.StringByID(StringId.AC)).LoadTopView_FunctionTop(function, actionRefresh);
new System.Threading.Thread(() =>
{
- DriverLayer.Control.Ins.SendReadCommand(aC);
+ DriverLayer.Control.Ins.SendReadCommand(function);
})
{ IsBackground = true }.Start();
}
@@ -318,7 +319,7 @@
};
modeChangeView.AddChidren(btnLine);
- var modeList = aC.GetAttribute(FunctionAttributeKey.Mode).value;
+ var modeList = function.GetAttribute(FunctionAttributeKey.Mode).value;
foreach (var m in modeList)
{
Button btnModeIcon = new Button()
@@ -327,7 +328,7 @@
Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8),
Width = Application.GetRealWidth(24),
Height = Application.GetRealWidth(24),
- IsSelected = aC.GetAttrState(FunctionAttributeKey.Mode) == m,
+ IsSelected = function.GetAttrState(FunctionAttributeKey.Mode) == m,
};
modeChangeView.AddChidren(btnModeIcon);
@@ -340,7 +341,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.FirstLevelTitleColor,
SelectedTextColor = CSS_Color.MainColor,
- IsSelected = aC.GetAttrState(FunctionAttributeKey.Mode) == m,
+ IsSelected = function.GetAttrState(FunctionAttributeKey.Mode) == m,
TextSize = CSS_FontSize.TextFontSize,
};
modeChangeView.AddChidren(btnModeText);
@@ -441,7 +442,7 @@
};
modeChangeView.AddChidren(btnLine);
- var modeList = aC.GetAttribute(FunctionAttributeKey.FanSpeed).value;
+ var modeList = function.GetAttribute(FunctionAttributeKey.FanSpeed).value;
foreach (var m in modeList)
{
Button btnFanIcon = new Button()
@@ -450,7 +451,7 @@
Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8),
Width = Application.GetRealWidth(24),
Height = Application.GetRealWidth(24),
- IsSelected = aC.GetAttrState(FunctionAttributeKey.FanSpeed) == m,
+ IsSelected = function.GetAttrState(FunctionAttributeKey.FanSpeed) == m,
};
modeChangeView.AddChidren(btnFanIcon);
@@ -463,7 +464,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.FirstLevelTitleColor,
SelectedTextColor = CSS_Color.MainColor,
- IsSelected = aC.GetAttrState(FunctionAttributeKey.FanSpeed) == m,
+ IsSelected = function.GetAttrState(FunctionAttributeKey.FanSpeed) == m,
TextSize = CSS_FontSize.TextFontSize,
};
modeChangeView.AddChidren(btnFanText);
--
Gitblit v1.8.0