| | |
| | | Y = Application.GetRealHeight(667 - 50), |
| | | Height = Application.GetRealHeight(50), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.WarningColor, |
| | | TextColor = CSS_Color.WarningColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.Del, |
| | | TextID = StringId.Del, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //IsBold = true |
| | | }; |
| | |
| | | void LoadFunctionRow() |
| | | { |
| | | functionListView.RemoveAll(); |
| | | functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count); |
| | | for(int i =0;i<scene.functions.Count;) |
| | | { |
| | | var scenefunction = scene.functions[i]; |
| | |
| | | scene.functions.Remove(scenefunction); |
| | | continue; |
| | | } |
| | | functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count); |
| | | try |
| | | { |
| | | //将spk实体里面的min max值放入场景功能实体里,要不然数据会丢失 2022-06-21 16:06:45 |
| | |
| | | btnOn.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | temp = new SceneFunction(); |
| | | temp.type = "7"; |
| | | temp.status.Add(new SceneFunctionStatus() |
| | | var kv = temp.status.Find((obj) => obj.key == "enable"); |
| | | if (kv != null) |
| | | { |
| | | key = "enable", |
| | | value = "true" |
| | | }); |
| | | kv.value = "true"; |
| | | } |
| | | else |
| | | { |
| | | temp.status.Add(new SceneFunctionStatus() |
| | | { |
| | | key = "enable", |
| | | value = "true", |
| | | }); |
| | | } |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | |
| | | if (code == "0") |
| | | { |
| | | btnTipText.TextID = StringId.OpenArm; |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(code); |
| | | } |
| | | }); |
| | | } |
| | |
| | | btnOff.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | dialog.Close(); |
| | | temp = new SceneFunction(); |
| | | temp.type = "7"; |
| | | temp.status.Add(new SceneFunctionStatus() |
| | | |
| | | var kv = temp.status.Find((obj) => obj.key == "enable"); |
| | | if (kv != null) |
| | | { |
| | | key = "enable", |
| | | value = "false" |
| | | }); |
| | | kv.value = "false"; |
| | | } |
| | | else |
| | | { |
| | | temp.status.Add(new SceneFunctionStatus() |
| | | { |
| | | key = "enable", |
| | | value = "false", |
| | | }); |
| | | } |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | |
| | | if (code == "0") |
| | | { |
| | | btnTipText.TextID = StringId.Close; |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(code); |
| | | } |
| | | }); |
| | | } |
| | |
| | | void LoadEvent_ChangeFunctionList() |
| | | { |
| | | btnAddFunctionTitle.MouseUpEventHandler = (sender, e) => { |
| | | //var sefp =new SceneFunctionListChoosePage(scene,refreshFunctionRowAction); |
| | | var sefp = new SceneTargetTypeChoosePage(scene, refreshFunctionRowAction); |
| | | MainPage.BasePageView.AddChidren(sefp); |
| | | sefp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportSceneEnableAutomation) |
| | | { |
| | | //var sefp =new SceneFunctionListChoosePage(scene,refreshFunctionRowAction); |
| | | var sefp = new SceneTargetTypeChoosePage(scene, refreshFunctionRowAction); |
| | | MainPage.BasePageView.AddChidren(sefp); |
| | | sefp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | else |
| | | { |
| | | var sefp = new SceneFunctionListChoosePage(scene,refreshFunctionRowAction); |
| | | //var sefp = new SceneTargetTypeChoosePage(scene, refreshFunctionRowAction); |
| | | MainPage.BasePageView.AddChidren(sefp); |
| | | sefp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | }; |
| | | } |
| | | |