From 2d5cd35af7437ad4015d38594d8c721dc6166b11 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 29 八月 2023 09:22:38 +0800 Subject: [PATCH] Merge branch 'wjc' of http://59.41.255.150:6688/r/~wxr/OnPro into wjc --- HDL_ON/Common/Utlis.cs | 36 +++++++++++++++++++++++++++++++----- 1 files changed, 31 insertions(+), 5 deletions(-) diff --git a/HDL_ON/Common/Utlis.cs b/HDL_ON/Common/Utlis.cs index 13a4af0..7778dc5 100644 --- a/HDL_ON/Common/Utlis.cs +++ b/HDL_ON/Common/Utlis.cs @@ -20,11 +20,37 @@ #endif } - /// <summary> - /// 寮圭獥鎻愮ず - /// </summary> - /// <param name="mes"></param> - public static void ShowAlertOnMainThread(string mes) + /// <summary> + /// 鍏ㄥ眬鎵撳嵃 + /// </summary> + /// <param name="tag">鎻忚堪淇℃伅</param> + /// <param name="url">璇锋眰鍦板潃(鍙互鏍规嵁鍦板潃杩囨护璇ユ暟鎹�)</param> + /// <param name="content">淇℃伅鍐呭</param> + public static void WriteLine(string tag, string url, string content) + { +#if DEBUG + if (url == "") + { + return; + } + if (!string.IsNullOrEmpty(content)) + { + if (content.StartsWith("{") && content.EndsWith("}")) + { + //瀹屽叏鏄负浜嗘墦鍗板ソ鐪嬩竴鐐�,娌$壒娈婃剰涔�; + content = Newtonsoft.Json.JsonConvert.DeserializeObject(content)?.ToString(); + } + } + string text = tag + "======" + url + "\r\n" + content; + Console.WriteLine(text); +#endif + } + + /// <summary> + /// 寮圭獥鎻愮ず + /// </summary> + /// <param name="mes"></param> + public static void ShowAlertOnMainThread(string mes) { Application.RunOnMainThread(() => { new Alert("", mes, Language.StringByID(StringId.Close)).Show(); -- Gitblit v1.8.0