| | |
| | | using System.Collections.Generic; |
| | | using System.Threading; |
| | | using HDL_ON.DAL.Server; |
| | | #if DEBUG |
| | | using Xamarin.Essentials; |
| | | #endif |
| | | //#if DEBUG |
| | | //using Xamarin.Essentials; |
| | | //#endif |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | |
| | | //测试提前当前推送ID |
| | | allMenuButton.ImageButton.MouseLongEventHandler = (sender, e) => |
| | | { |
| | | #if DEBUG |
| | | //#if DEBUG |
| | | |
| | | CopyToClipboard("推送ID:" + OnAppConfig.Instance.PushId); |
| | | #else |
| | | // CopyToClipboard("推送ID:" + OnAppConfig.Instance.PushId); |
| | | //#else |
| | | //检测是否获取推送ID成功,提示推送注册是否正常 |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) |
| | | { |
| | |
| | | { |
| | | Utlis.ShowTip(Language.StringByID(StringId.PushNormal)); |
| | | } |
| | | #endif |
| | | //#endif |
| | | |
| | | }; |
| | | #endregion |
| | |
| | | //日期 |
| | | var btnDatetime = new Button() |
| | | { |
| | | X = Application.GetRealWidth(259), |
| | | X = Application.GetRealWidth(249), |
| | | Y = btnTilte.Bottom + Application.GetRealHeight(4), |
| | | Width = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(110), |
| | | Height = Application.GetRealHeight(17), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | |
| | | }; |
| | | |
| | | |
| | | btnDatetime.Text = GetUnixToDateTime(pushMessageInfo.createTime); |
| | | btnDatetime.Text = GetUnixToDateTime2(pushMessageInfo.createTime); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | |
| | | try |
| | | { |
| | | return Utlis.UnixToDateTimeWithFormatMS(time, "MM/dd HH:mm"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 时间格式转换处理 |
| | | /// </summary> |
| | | /// <param name="time">毫秒时间戳</param> |
| | | /// <returns></returns> |
| | | string GetUnixToDateTime2(long time) |
| | | { |
| | | try |
| | | { |
| | | return Utlis.UnixToDateTimeWithFormatMS(time, "yyyy.MM.dd HH:mm"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | HDLCommon.GetPushMessageAction = null; |
| | | } |
| | | |
| | | #if DEBUG |
| | | //#if DEBUG |
| | | |
| | | /// <summary> |
| | | /// 复制到剪切板 |
| | | /// </summary> |
| | | /// <param name="text"></param> |
| | | void CopyToClipboard(string text) |
| | | { |
| | | Clipboard.SetTextAsync(text); |
| | | Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess)); |
| | | } |
| | | #endif |
| | | // /// <summary> |
| | | // /// 复制到剪切板 |
| | | // /// </summary> |
| | | // /// <param name="text"></param> |
| | | // void CopyToClipboard(string text) |
| | | // { |
| | | // Clipboard.SetTextAsync(text); |
| | | // Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess)); |
| | | // } |
| | | //#endif |
| | | |
| | | } |
| | | |