From 84e76cf2fcbe26142750131d3c27eaac0335e40a Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 11 三月 2021 11:04:08 +0800
Subject: [PATCH] 上传一个添加红外宝 Ios 版本
---
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs | 145 +++++++++++++++++++++++++----------------------
1 files changed, 77 insertions(+), 68 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
index 8ce8ad9..a2014d0 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
@@ -37,7 +37,7 @@
/// <summary>
/// 娓愬彉鏃堕棿淇敼
/// </summary>
- DiyImageSeekBar barFadeTime;
+ //DiyImageSeekBar barFadeTime;
/// <summary>
/// 鑹叉俯鐨勬粦鍔ㄦ帶浠�
/// </summary>
@@ -141,9 +141,9 @@
dimmerBar = new WaveSeekBarOn()
{
Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(74 + 16),
- Width = Application.GetRealWidth(142 - 40),
- Height = Application.GetRealHeight(222 - 16 - 16),
+ Y = Application.GetRealHeight(108),
+ Width = Application.GetRealWidth(142 - 16 -16),
+ Height = Application.GetRealHeight(222),
BorderColor = 0x00000000,
CornerRadius = Application.GetRealWidth(20),
BorderWidth = 0,
@@ -163,7 +163,7 @@
btnBrightnessText = new Button()
{
Gravity = Gravity.CenterHorizontal,
- Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16 - 16) / 100) + Application.GetRealWidth(40),
+ Y = ((100 - light.brightness) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80),
Width = Application.GetRealWidth(56),
Height = Application.GetRealWidth(46),
UnSelectedImagePath = "FunctionIcon/Light/BrightnessBg.png",
@@ -177,7 +177,7 @@
//鑹叉俯
var btnTempClolor = new Button();
btnTempClolor.X = Application.GetRealWidth(35);
- btnTempClolor.Y = Application.GetRealHeight(306);
+ btnTempClolor.Y = Application.GetRealHeight(306 +60);
btnTempClolor.Width = Application.GetRealWidth(224);
btnTempClolor.Height = Application.GetRealHeight(21);
btnTempClolor.TextAlignment = TextAlignment.CenterLeft;
@@ -218,6 +218,9 @@
barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2;
//鏄剧ず涓婃柟鐨凾xt
barColorTemplatrue.ShowCustomTextView(Application.GetRealWidth(50), CSS_FontSize.PromptFontSize_FirstLevel, CSS_Color.FirstLevelTitleColor);
+ var cct = 27;
+ int.TryParse(light.Attr_CCT.curValue.ToString(), out cct);
+ barColorTemplatrue.Progress = cct;
//璁剧疆鍒濆鍊�
barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
@@ -239,71 +242,71 @@
#endregion
#region 娓愬彉鏃堕棿璋冭妭
- var btnGradualChangeText = new Button()
- {
- X = Application.GetRealWidth(35),
- Y = Application.GetRealHeight(385),
- Width = Application.GetRealWidth(224),
- Height = Application.GetRealHeight(21),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- TextID = StringId.SpeedOfChange,
- };
- controlView.AddChidren(btnGradualChangeText);
+ //var btnGradualChangeText = new Button()
+ //{
+ // X = Application.GetRealWidth(35),
+ // Y = Application.GetRealHeight(385),
+ // Width = Application.GetRealWidth(224),
+ // Height = Application.GetRealHeight(21),
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.FirstLevelTitleColor,
+ // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ // TextID = StringId.SpeedOfChange,
+ //};
+ //controlView.AddChidren(btnGradualChangeText);
- var btnGradualChangeMinValuesText = new Button()
- {
- X = Application.GetRealWidth(35),
- Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
- Width = Application.GetRealWidth(22),
- Height = Application.GetRealHeight(21),
- Text = "0s",
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.PromptingColor1,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- };
- controlView.AddChidren(btnGradualChangeMinValuesText);
+ //var btnGradualChangeMinValuesText = new Button()
+ //{
+ // X = Application.GetRealWidth(35),
+ // Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
+ // Width = Application.GetRealWidth(22),
+ // Height = Application.GetRealHeight(21),
+ // Text = "0s",
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.PromptingColor1,
+ // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ //};
+ //controlView.AddChidren(btnGradualChangeMinValuesText);
- barFadeTime = new DiyImageSeekBar()
- {
- X = btnGradualChangeMinValuesText.Right,
- Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
- Width = Application.GetRealWidth(210),
- Height = Application.GetRealHeight(54),
- SeekBarViewHeight = Application.GetRealHeight(8),
- ThumbImagePath = "Public/ThumbImage.png",
- ThumbImageHeight = Application.GetRealHeight(54),
- ProgressBarColor = CSS_Color.MainColor,
- ProgressTextColor = CSS_Color.FirstLevelTitleColor,
- ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- ProgressBarUnitSring = "s",
- MaxValue = 10,
- Progress = light.fadeTime,
- SeekBarPadding = Application.GetRealWidth(20),
- };
- controlView.AddChidren(barFadeTime);
+ //barFadeTime = new DiyImageSeekBar()
+ //{
+ // X = btnGradualChangeMinValuesText.Right,
+ // Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
+ // Width = Application.GetRealWidth(210),
+ // Height = Application.GetRealHeight(54),
+ // SeekBarViewHeight = Application.GetRealHeight(8),
+ // ThumbImagePath = "Public/ThumbImage.png",
+ // ThumbImageHeight = Application.GetRealHeight(54),
+ // ProgressBarColor = CSS_Color.MainColor,
+ // ProgressTextColor = CSS_Color.FirstLevelTitleColor,
+ // ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ // ProgressBarUnitSring = "s",
+ // MaxValue = 10,
+ // Progress = light.fadeTime,
+ // SeekBarPadding = Application.GetRealWidth(20),
+ //};
+ //controlView.AddChidren(barFadeTime);
- var btnGradualChangeMaxValuesText = new Button()
- {
- X = barFadeTime.Right,
- Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
- Width = Application.GetRealWidth(35),
- Height = Application.GetRealHeight(21),
- Text = "10s",
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.PromptingColor1,
- TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- };
- controlView.AddChidren(btnGradualChangeMaxValuesText);
+ //var btnGradualChangeMaxValuesText = new Button()
+ //{
+ // X = barFadeTime.Right,
+ // Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
+ // Width = Application.GetRealWidth(35),
+ // Height = Application.GetRealHeight(21),
+ // Text = "10s",
+ // TextAlignment = TextAlignment.CenterLeft,
+ // TextColor = CSS_Color.PromptingColor1,
+ // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ //};
+ //controlView.AddChidren(btnGradualChangeMaxValuesText);
#endregion
btnSwitch = new Button()
{
- X = Application.GetRealWidth(184),
- Y = Application.GetRealHeight(462),
- Width = Application.GetRealWidth(40),
- Height = Application.GetRealWidth(40),
+ X = Application.GetRealWidth(180),
+ Y = Application.GetRealHeight(466),
+ Width = Application.GetRealWidth(32),
+ Height = Application.GetRealWidth(32),
UnSelectedImagePath = "Public/PowerClose.png",
SelectedImagePath = "Public/PowerOpen.png",
IsSelected = light.trait_on_off.curValue.ToString() == "on",
@@ -312,11 +315,11 @@
//鑹叉俯鐨勫揩鎹锋柟寮忓浘鏍�
btnShortcut = new Button();
- btnShortcut.X = Application.GetRealWidth(104);
+ btnShortcut.X = Application.GetRealWidth(116);
btnShortcut.Y = btnSwitch.Y;
- btnShortcut.Width = Application.GetRealWidth(40);
- btnShortcut.Height = Application.GetRealWidth(40);
- btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatrueQuick.png";
+ btnShortcut.Width = Application.GetRealWidth(32);
+ btnShortcut.Height = Application.GetRealWidth(32);
+ btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
controlView.AddChidren(btnShortcut);
btnShortcut.MouseUpEventHandler += (sender, e) =>
{
@@ -396,6 +399,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(light, d);
+ btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
};
//娓╅Θ 2700k
var btnCozy = new Button();
@@ -420,6 +424,7 @@
DriverLayer.Control.Ins.SendWriteCommand(light, d); barColorTemplatrue.Progress = 27;
barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
frameBack.Close();
+ btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
};
//浼氬鍥炬爣
@@ -440,6 +445,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(light, d);
+ btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/MeetingGuestsIconOn.png";
};
//浼氬 3000k
@@ -463,6 +469,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(light, d);
+ btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/MeetingGuestsIconOn.png";
};
//闃呰鍥炬爣
@@ -483,6 +490,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(light, d);
+ btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ReadIconOn.png";
};
//闃呰 6500k
var btnRead = new Button();
@@ -505,6 +513,7 @@
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(light, d);
+ btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ReadIconOn.png";
};
btnCozy.IsSelected = false;
btnCozyIcon.IsSelected = false;
--
Gitblit v1.8.0