| | |
| | | /// </summary> |
| | | public void SceneMethod() |
| | | { |
| | | var sceneList = LogicMethod.CurrLogicMethod.GetSceneList(); |
| | | var sceneList = LogicMethod.Current.GetSceneList(); |
| | | List<string> nameList = new List<string>(); |
| | | for (int i = 0; i < sceneList.Count; i++) { |
| | | var scene = sceneList[i]; |
| | | nameList.Add(scene.name); |
| | | } |
| | | PublicInterface publicInterface = new PublicInterface(); |
| | | publicInterface.FrameOrVv(this, nameList,new List<string> { }, StringId.addSceneLogic, (index) => |
| | | publicInterface.FrameOrVv(this, nameList,new List<string> { },Language.StringByID(StringId.addSceneLogic), (index) => |
| | | { |
| | | var sceneSelecetd = sceneList[index]; |
| | | Output outputDevice = new Output(); |
| | |
| | | //没啥作用,为了发送数据格式统一; |
| | | outputDevice.status = new List<Dictionary<string, string>> { new Dictionary<string, string> { { "key", "scene" }, { "value", "0" } } }; |
| | | AddOutput(outputDevice); |
| | | LogicMethod.CurrLogicMethod.RemoveAllView(); |
| | | LogicMethod.Current.RemoveAllView(); |
| | | AddLogic addLogic = new AddLogic(); |
| | | MainPage.BasePageView.AddChidren(addLogic); |
| | | addLogic.Show(); |
| | |
| | | List<string> stateList = new List<string>(); |
| | | if (edit&& index1 != -1) { |
| | | Output output = Logic.currlogic.output[index1]; |
| | | var security = LogicMethod.CurrLogicMethod.GetSecurity(output.sid); |
| | | var security = LogicMethod.Current.GetSecurity(output.sid); |
| | | stateList.Add(security.name); |
| | | } |
| | | var securityList = LogicMethod.CurrLogicMethod.GetSecurityList(); |
| | | var securityList = LogicMethod.Current.GetSecurityList(); |
| | | List<string> nameList = new List<string>(); |
| | | for (int i = 0; i < securityList.Count; i++) |
| | | { |
| | |
| | | nameList.Add(security.name); |
| | | } |
| | | PublicInterface publicInterface = new PublicInterface(); |
| | | publicInterface.FrameOrVv(frameLayout, nameList, stateList, StringId.addSecurityLogic,(index) => |
| | | publicInterface.FrameOrVv(frameLayout, nameList, stateList,Language.StringByID(StringId.addSecurityLogic),(index) => |
| | | { |
| | | var securitySelecetd = securityList[index]; |
| | | Output outputDevice = new Output(); |
| | |
| | | //没啥作用,为了发送数据格式统一; |
| | | outputDevice.status = new List<Dictionary<string, string>> { new Dictionary<string, string> { { "key", "security" }, { "value", "0" } } }; |
| | | AddOutput(outputDevice,true); |
| | | LogicMethod.CurrLogicMethod.RemoveAllView(); |
| | | LogicMethod.Current.RemoveAllView(); |
| | | AddLogic addLogic = new AddLogic(); |
| | | MainPage.BasePageView.AddChidren(addLogic); |
| | | addLogic.Show(); |
| | |
| | | return; |
| | | } |
| | | Output outputTime= new Output(); |
| | | outputTime.sid = LogicMethod.CurrLogicMethod.NewSid(); |
| | | outputTime.sid = LogicMethod.Current.NewSid(); |
| | | outputTime.target_type = "4"; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.CurrLogicMethod.dictionary(dic, "key", "delay"); |
| | | LogicMethod.CurrLogicMethod.dictionary(dic, "value", timepoint); |
| | | LogicMethod.Current.dictionary(dic, "key", "delay"); |
| | | LogicMethod.Current.dictionary(dic, "value", timepoint); |
| | | outputTime.status.Add(dic); |
| | | if (edit) |
| | | { |
| | |
| | | AddOutput(outputTime); |
| | | } |
| | | fLayout.RemoveFromParent(); |
| | | LogicMethod.CurrLogicMethod.RemoveAllView(); |
| | | LogicMethod.Current.RemoveAllView(); |
| | | AddLogic addLogic = new AddLogic(); |
| | | MainPage.BasePageView.AddChidren(addLogic); |
| | | addLogic.Show(); |