From 20e0fb92d25047fabd2dc418597c0ff9b595b07c Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 21 十二月 2020 19:35:33 +0800
Subject: [PATCH] 2020-12-21 1.解决房间修改图片后,分类页面对应房间图标没及时刷新问题。
---
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 154 insertions(+), 2 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index 74d498c..edad55f 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -60,6 +60,9 @@
case FunctionAttributeKey.Brightness:
LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness));
break;
+ case FunctionAttributeKey.FadeTime:
+ LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.FadeTime));
+ break;
}
}
@@ -248,7 +251,8 @@
case FunctionAttributeKey.SetTemp:
LoadEditDialog_Temp(sceneStatus, btnFunctionText);
break;
- case "delay":
+ case FunctionAttributeKey.FadeTime:
+
break;
case "cct":
break;
@@ -707,7 +711,155 @@
}
};
}
-
+
+
+ /// <summary>
+ /// 鍔犺浇鍙樺寲閫熷害閫夋嫨寮圭獥
+ /// </summary>
+ /// <param name="function"></param>
+ /// <param name="btn"></param>
+ void LoadEditDialog_FadeTime(SceneFunctionStatus trait, Button btn)
+ {
+ if (trait == null)
+ {
+ return;
+ }
+
+ Dialog dialog = new Dialog();
+
+ var pView = new FrameLayout()
+ {
+ BackgroundColor = CSS_Color.DialogTransparentColor1,
+ };
+ dialog.AddChidren(pView);
+
+ var optionBaseView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(467),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(180),
+ AnimateSpeed = 0.3f,
+ Animate = Animate.DownToUp,
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ };
+ pView.AddChidren(optionBaseView);
+
+ var topView = new FrameLayout()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(40),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(12),
+ };
+ optionBaseView.AddChidren(topView);
+ topView.AddChidren(new Button() { Y = Application.GetRealHeight(39), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor });
+
+ var btnTitle = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ TextAlignment = TextAlignment.Center,
+ Width = Application.GetRealWidth(100),
+ Text = FunctionList.List.GetNameText(trait.key),
+ IsBold = true,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ };
+ topView.AddChidren(btnTitle);
+
+ var btnCancel = new Button()
+ {
+ X = Application.GetRealWidth(21),
+ Width = Application.GetRealWidth(100),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextID = StringId.Cancel,
+ };
+ topView.AddChidren(btnCancel);
+
+ var btnConfrim = new Button()
+ {
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.CenterRight,
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextID = StringId.Confirm,
+ };
+ topView.AddChidren(btnConfrim);
+
+ Button btnMinusSignIcon = new Button()
+ {
+ X = Application.GetRealWidth(26),
+ Y = Application.GetRealHeight(118),
+ Width = Application.GetMinRealAverage(24),
+ Height = Application.GetMinRealAverage(24),
+ Text = "0s",
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ };
+ optionBaseView.AddChidren(btnMinusSignIcon);
+
+ DiyImageSeekBar controlBar = new DiyImageSeekBar()
+ {
+ X = btnMinusSignIcon.Right + Application.GetRealWidth(12),
+ Y = Application.GetRealHeight(100),//414,璁捐鏁版嵁
+ Width = Application.GetRealWidth(220),
+ 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,
+ MaxValue = 100,
+ Progress = trait.value.ToString().Replace("{}", "") == "" ? 0 : Convert.ToInt32(trait.value.Replace("{}", "")),
+ SeekBarPadding = Application.GetRealWidth(20),
+ };
+ optionBaseView.AddChidren(controlBar);
+
+ Button btnPlusSgnIcon = new Button()
+ {
+ X = controlBar.Right + Application.GetRealWidth(12),
+ Y = Application.GetRealHeight(118),
+ Width = Application.GetMinRealAverage(24),
+ Height = Application.GetMinRealAverage(24),
+ Text = "10s",
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ };
+ optionBaseView.AddChidren(btnPlusSgnIcon);
+
+ btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
+ {
+ controlBar.Progress--;
+ };
+ btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
+ {
+ controlBar.Progress++;
+ };
+
+ dialog.Show();
+ pView.MouseUpEventHandler = (sender, e) =>
+ {
+ dialog.Close();
+ };
+
+ btnCancel.MouseUpEventHandler = (sender, e) =>
+ {
+ dialog.Close();
+ };
+ btnConfrim.MouseUpEventHandler = (sender, e) =>
+ {
+ dialog.Close();
+ trait.value = controlBar.Progress.ToString();
+ btn.Text = trait.value + FunctionList.List.GetUintString(trait.key);
+ };
+ }
+
+
/// <summary>
/// 鍔犺浇鍔熻兘灞炴�ф暟鎹�夋嫨寮圭獥
/// </summary>
--
Gitblit v1.8.0