From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 11 九月 2020 09:16:59 +0800 Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs index 21fed47..4aa704a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs @@ -40,6 +40,39 @@ #region 鈻� Log鍑哄姏____________________________ /// <summary> + /// 璋冭瘯鐢�,杩藉姞鍐欏叆鍏朵粬Log + /// </summary> + /// <param name="fullName">鍏ㄨ矾寰�</param> + /// <param name="i_text">瑕佸啓鍏ョ殑鍐呭</param> + /// <param name="deleteFile">鏄惁鍏堝垹闄ゆ枃浠�</param> + /// <param name="encrypt">鍐欏叆鐨勫唴瀹规槸鍚﹀姞瀵�</param> + public void WriteOtherText(string fullName, string i_text, bool deleteFile, bool encrypt) + { + if (deleteFile == true) + { + HdlFileLogic.Current.DeleteFile(fullName); + } + System.IO.StreamWriter sw = null; + try + { + string strLog = "[" + DateTime.Now.ToString("yyyyMMdd HH:mm:ss") + "] " + i_text; + if (encrypt == true) + { + strLog = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, strLog); + } + strLog = "\r\n" + strLog + "\r\n"; + sw = new System.IO.StreamWriter(fullName, true, Encoding.UTF8); + sw.WriteLine(strLog); + } + catch { } + finally + { + sw?.Close(); + sw = null; + } + } + + /// <summary> /// Log鍑哄姏 /// </summary> /// <param name="ex"></param> -- Gitblit v1.8.0