| | |
| | | { |
| | | if (MainPage.LoginUser == null) |
| | | return; |
| | | #if HDL |
| | | System.Threading.Tasks.Task.Run (() => { |
| | | var se = new service.hdlcontrol.com_push.WebServicePush (); |
| | | var msgList = se.MsgList (rsgID); |
| | | foreach (var msg in msgList) { |
| | | Current.RemoteInfoList.Add (new RemoteInfoMsg () { Msg = msg.Msg, MsgID = msg.MsgID, MsgTime = msg.MsgTime, MsgType = msg.MsgType }); |
| | | } |
| | | Current.Save (); |
| | | if (msgList.Length > 0) { |
| | | Application.RunOnMainThread (() => { |
| | | string tipMsg = Language.StringByID (SimpleControl.R.MyInternationalizationString.NewMessageReceived); |
| | | //#if HDL |
| | | // System.Threading.Tasks.Task.Run (() => { |
| | | // var se = new service.hdlcontrol.com_push.WebServicePush (); |
| | | // var msgList = se.MsgList (rsgID); |
| | | // foreach (var msg in msgList) { |
| | | // Current.RemoteInfoList.Add (new RemoteInfoMsg () { Msg = msg.Msg, MsgID = msg.MsgID, MsgTime = msg.MsgTime, MsgType = msg.MsgType }); |
| | | // } |
| | | // Current.Save (); |
| | | // if (msgList.Length > 0) { |
| | | // Application.RunOnMainThread (() => { |
| | | // string tipMsg = Language.StringByID (SimpleControl.R.MyInternationalizationString.NewMessageReceived); |
| | | |
| | | if (needTip) { |
| | | Alert alert = new Alert (Language.StringByID (SimpleControl.R.MyInternationalizationString.Tip), |
| | | tipMsg , |
| | | Language.StringByID (SimpleControl.R.MyInternationalizationString.Close), |
| | | Language.StringByID (SimpleControl.R.MyInternationalizationString.Read)); |
| | | alert.Show (); |
| | | alert.ResultEventHandler += (sender, e) => { |
| | | if (e) { |
| | | if (Shared.Application.IsPad) { |
| | | //SimpleControl.Pad.WarningList.ShowWarningListPage (); |
| | | } else { |
| | | SimpleControl.Phone.UserMiddle.ShowSettingView (); |
| | | var msgView = new SimpleControl.Phone.WarningList (); |
| | | SimpleControl.Phone.UserMiddle.SettingPageView.AddChidren (msgView); |
| | | msgView.ShowWarningListPage (); |
| | | SimpleControl.Phone.UserMiddle.SettingPageView.PageIndex = 1; |
| | | } |
| | | } |
| | | }; |
| | | } else { |
| | | if (Shared.Application.IsPad) { |
| | | //SimpleControl.Pad.WarningList.ShowWarningListPage (); |
| | | } else { |
| | | SimpleControl.Phone.UserMiddle.ShowSettingView (); |
| | | var msgView = new SimpleControl.Phone.WarningList (); |
| | | SimpleControl.Phone.UserMiddle.SettingPageView.AddChidren (msgView); |
| | | msgView.ShowWarningListPage (); |
| | | SimpleControl.Phone.UserMiddle.SettingPageView.PageIndex = 1; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | #endif |
| | | // if (needTip) { |
| | | // Alert alert = new Alert (Language.StringByID (SimpleControl.R.MyInternationalizationString.Tip), |
| | | // tipMsg , |
| | | // Language.StringByID (SimpleControl.R.MyInternationalizationString.Close), |
| | | // Language.StringByID (SimpleControl.R.MyInternationalizationString.Read)); |
| | | // alert.Show (); |
| | | // alert.ResultEventHandler += (sender, e) => { |
| | | // if (e) { |
| | | // if (Shared.Application.IsPad) { |
| | | // //SimpleControl.Pad.WarningList.ShowWarningListPage (); |
| | | // } else { |
| | | // SimpleControl.Phone.UserMiddle.ShowSettingView (); |
| | | // var msgView = new SimpleControl.Phone.WarningList (); |
| | | // SimpleControl.Phone.UserMiddle.SettingPageView.AddChidren (msgView); |
| | | // msgView.ShowWarningListPage (); |
| | | // SimpleControl.Phone.UserMiddle.SettingPageView.PageIndex = 1; |
| | | // } |
| | | // } |
| | | // }; |
| | | // } else { |
| | | // if (Shared.Application.IsPad) { |
| | | // //SimpleControl.Pad.WarningList.ShowWarningListPage (); |
| | | // } else { |
| | | // SimpleControl.Phone.UserMiddle.ShowSettingView (); |
| | | // var msgView = new SimpleControl.Phone.WarningList (); |
| | | // SimpleControl.Phone.UserMiddle.SettingPageView.AddChidren (msgView); |
| | | // msgView.ShowWarningListPage (); |
| | | // SimpleControl.Phone.UserMiddle.SettingPageView.PageIndex = 1; |
| | | // } |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | //#endif |
| | | } |
| | | |
| | | public static RemoteInfo Current { |