| | |
| | | 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); |
| | | |
| | |
| | | |
| | | 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() |
| | |
| | | |
| | | 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 |
| | | { |
| | |
| | | { |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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(); |