| | |
| | | notification.btnText.TextID = StringId.notification; |
| | | notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor; |
| | | viewLayout.AddChidren(notification.FLayoutView()); |
| | | |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | //显示之前推送开关状态 |
| | | if (Logic.currlogic.noticeConfig.enable) |
| | | { |
| | | push.btnNextIcon.IsSelected = true; |
| | | } |
| | |
| | | DateMethod(cyclicTitle.btnText); |
| | | }; |
| | | ///是否要推送点击事件 |
| | | //初始化对象 |
| | | PushConfigs pushConfigs = new PushConfigs(); |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | pushConfigs = Logic.currlogic.pushConfigs[0]; |
| | | } |
| | | else |
| | | { |
| | | if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo)) |
| | | { |
| | | //默认推送当前账号 |
| | | pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo); |
| | | } |
| | | else |
| | | { |
| | | //默认推送当前账号 |
| | | pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo); |
| | | } |
| | | } |
| | | push.btnNextIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //账号列表为空默认推送当前账号 |
| | | if (Logic.currlogic.pushConfigs.Count == 0) |
| | | { |
| | | //初始化对象 |
| | | PushConfigs pushConfigs = new PushConfigs(); |
| | | //默认添加推送当前账号 |
| | | pushConfigs.pushTarget.Add(UserInfo.Current.ID); |
| | | Logic.currlogic.pushConfigs.Add(pushConfigs); |
| | | } |
| | | push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected; |
| | | if (push.btnNextIcon.IsSelected) |
| | | { |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | //清空之前旧配置数据 |
| | | Logic.currlogic.pushConfigs.Clear(); |
| | | } |
| | | //增加配置数据 |
| | | Logic.currlogic.pushConfigs.Add(pushConfigs); |
| | | Logic.currlogic.noticeConfig.enable = true; |
| | | } |
| | | else |
| | | { |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | //默认取第一个赋值 |
| | | pushConfigs = Logic.currlogic.pushConfigs[0]; |
| | | //清空配置数据 |
| | | Logic.currlogic.pushConfigs.Clear(); |
| | | } |
| | | Logic.currlogic.noticeConfig.enable = false; |
| | | } |
| | | }; |
| | | ///输入推送文本 |
| | |
| | | { |
| | | InputPushText inputPushText = new InputPushText(); |
| | | MainPage.BasePageView.AddChidren(inputPushText); |
| | | inputPushText.Show(pushConfigs); |
| | | inputPushText.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | inputPushText.action += (pushConfigsIfon) => |
| | | { |
| | | //赋值 |
| | | pushConfigs = pushConfigsIfon; |
| | | }; |
| | | }; |
| | | ///保存点击事件 |
| | | saveView.btnClick.MouseUpEventHandler += (sender, e) => |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |