From bb6ad792b598927a5459a5fb6f6c27fb1aa9e94e Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期四, 17 十二月 2020 14:06:36 +0800 Subject: [PATCH] 20201217-1 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs index 8651933..6b4111e 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs @@ -255,7 +255,7 @@ TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = scene.delayText + Text = FunctionList.List.GetDelayText(scene.delay.ToString()) }; sceneDelayRow.AddChidren(btnSceneDelayInfo); @@ -273,7 +273,11 @@ btnSceneDelayTitle.MouseUpEventHandler = (sender, e) => { - new PublicAssmebly().SetSceneDelayDialog(scene, btnSceneDelayInfo); + Action<string> action = (obj) => { + scene.delay = obj; + btnSceneDelayInfo.Text = FunctionList.List.GetDelayText(obj); + }; + new PublicAssmebly().SetSceneDelayDialog(action ,scene.delay); }; contentView.AddChidren(new Button() @@ -419,7 +423,7 @@ if (Convert.ToInt32(scenefunction.delay) > 0) { - btnFunctionDelayInfo.Text = Language.StringByID(StringId.Delay) + " " + scenefunction.localFunction.delayText; + btnFunctionDelayInfo.Text = Language.StringByID(StringId.Delay) + " " + FunctionList.List.GetDelayText(scenefunction.delay); } else { @@ -522,18 +526,10 @@ { sceneFunctionInfo += Language.StringByID(StringId.Open) + " " + sceneFunction.localFunction.attributes.Find((obj) => obj.key == "brightness").curValue.ToString() + "%"; } - else - { - sceneFunctionInfo += Language.StringByID(StringId.Open); - } var perState = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Percent); if (perState != null) { sceneFunctionInfo += Language.StringByID(StringId.Open) + " " + sceneFunction.localFunction.attributes.Find((obj) => obj.key == "brightness").curValue.ToString() + "%"; - } - else - { - sceneFunctionInfo += Language.StringByID(StringId.Open); } //FunctionAttributes perTrait; @@ -734,7 +730,7 @@ void LoadEvent_ChangeFunctionList() { btnAddFunctionTitle.MouseUpEventHandler = (sender, e) => { - var sefp = new SceneFunctionListEditPage(scene, refreshFunctionRowAction); + var sefp = new SceneFunctionListChoosePage(scene, refreshFunctionRowAction); MainPage.BasePageView.AddChidren(sefp); sefp.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; @@ -898,8 +894,9 @@ return; } } - var result = scene.AddScene(); - if (result == StateCode.SUCCESS) + string result = ""; + var addScene = FunctionList.List.AddScene(scene,out result); + if (addScene != null) { FunctionList.List.scenes.Add(scene); backAction(); -- Gitblit v1.8.0