| | |
| | | #region 执行推送 发送通知 |
| | | ///上下间隔12像素 |
| | | viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) }); |
| | | /////执行推送iew |
| | | //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView(); |
| | | //push.frameLayout.Height = Application.GetRealHeight(50); |
| | | //push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | //push.btnText.TextID = StringId.push; |
| | | //push.btnNextIcon.Width = Application.GetRealWidth(36); |
| | | //push.btnNextIcon.Height = Application.GetRealWidth(36); |
| | | //push.btnNextIcon.X = Application.GetRealWidth(305); |
| | | //push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png"; |
| | | //push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png"; |
| | | //viewLayout.AddChidren(push.FLayoutView()); |
| | | /////发送通知View |
| | | //LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView(); |
| | | //notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); |
| | | //notification.btnText.TextID = StringId.notification; |
| | | //viewLayout.AddChidren(notification.FLayoutView()); |
| | | /////上下间隔62像素 |
| | | //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) }); |
| | | ///执行推送iew |
| | | LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView(); |
| | | push.frameLayout.Height = Application.GetRealHeight(50); |
| | | push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | push.btnText.TextID = StringId.push; |
| | | push.btnNextIcon.Width = Application.GetRealWidth(36); |
| | | push.btnNextIcon.Height = Application.GetRealWidth(36); |
| | | push.btnNextIcon.X = Application.GetRealWidth(305); |
| | | push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png"; |
| | | push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png"; |
| | | push.btnClick.Width = Application.GetRealWidth(305); |
| | | viewLayout.AddChidren(push.FLayoutView()); |
| | | ///发送通知View |
| | | LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView(); |
| | | notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); |
| | | notification.btnText.TextID = StringId.notification; |
| | | notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor; |
| | | viewLayout.AddChidren(notification.FLayoutView()); |
| | | |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | push.btnNextIcon.IsSelected = true; |
| | | } |
| | | else |
| | | { |
| | | push.btnNextIcon.IsSelected = false; |
| | | } |
| | | ///上下间隔62像素 |
| | | viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) }); |
| | | #endregion |
| | | |
| | | |
| | | #region 保存 |
| | | ///保存View |
| | | LogicView.SaveView saveView = new LogicView.SaveView(); |
| | |
| | | cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | 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) => |
| | | { |
| | | 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); |
| | | } |
| | | else |
| | | { |
| | | if (Logic.currlogic.pushConfigs.Count > 0) |
| | | { |
| | | //默认取第一个赋值 |
| | | pushConfigs = Logic.currlogic.pushConfigs[0]; |
| | | //清空配置数据 |
| | | Logic.currlogic.pushConfigs.Clear(); |
| | | } |
| | | } |
| | | }; |
| | | ///输入推送文本 |
| | | notification.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | InputPushText inputPushText = new InputPushText(); |
| | | MainPage.BasePageView.AddChidren(inputPushText); |
| | | inputPushText.Show(pushConfigs); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | inputPushText.action += (pushConfigsIfon) => |
| | | { |
| | | //赋值 |
| | | pushConfigs = pushConfigsIfon; |
| | | }; |
| | | }; |
| | | ///保存点击事件 |
| | | saveView.btnClick.MouseUpEventHandler += (sender, e) => |
| | |
| | | { |
| | | //定义一个局部weekList列表用来记录选中数据; |
| | | List<string> weekStateList = new List<string>(); |
| | | |
| | | PublicInterface weekView = new PublicInterface(); |
| | | if (Logic.currlogic.cycle.type == "week") |
| | | { |