| | |
| | | /// <param name="CurrentLogic">当前逻辑</param> |
| | | public async static void SaveLogic(string if_logic, string name, bool tag, Common.Logic CurrentLogic) |
| | | { |
| | | //记录逻辑类型 |
| | | //只是对跳转界面有用,基本没啥用 |
| | | int Type = CurrentLogic.LogicType; |
| | | |
| | | if (CurrentLogic.Conditions.Count == 0 || CurrentLogic.Actions.Count == 0) |
| | | { |
| | | var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, |
| | | Language.StringByID(MyInternationalizationString.addnull), |
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, |
| | |
| | | |
| | | if (LogicView.IfString._Logic == if_logic) |
| | | { |
| | | if (Type == 0) |
| | | if (CurrentLogic.LogicType == 0) |
| | | { |
| | | |
| | | UserView.HomePage.Instance.RemoveViewByTag("Logic"); |
| | |
| | | Phone.Category.CategoryMainForm.instance?.RefreshBodyView(); |
| | | // Category.Category.instance?.RefreshBodyView(); |
| | | } |
| | | else if (Type == 2) |
| | | else if (CurrentLogic.LogicType == 2) |
| | | { |
| | | //刷新整个分类; |
| | | //门锁常开模式特殊; |